diff --git a/src/lang/de.json b/src/lang/de.json index 8b2b80c..2d37bef 100644 --- a/src/lang/de.json +++ b/src/lang/de.json @@ -146,6 +146,14 @@ "DS4.CombatValuesRangedAttack": "Schießen", "DS4.CombatValuesSpellcasting": "Zaubern", "DS4.CombatValuesTargetedSpellcasting": "Zielzaubern", + "DS4.CombatValuesHitPointsSheet": "Lebenskraft", + "DS4.CombatValuesDefenseSheet": "Abwehr", + "DS4.CombatValuesInitiativeSheet": "Initiative", + "DS4.CombatValuesMovementSheet": "Laufen", + "DS4.CombatValuesMeleeAttackSheet": "Schlagen", + "DS4.CombatValuesRangedAttackSheet": "Schießen", + "DS4.CombatValuesSpellcastingSheet": "Zaubern", + "DS4.CombatValuesTargetedSpellcastingSheet": "Zielzaubern", "DS4.CharacterBaseInfoRace": "Volk", "DS4.CharacterBaseInfoClass": "Klasse", "DS4.CharacterBaseInfoHeroClass": "Heldenklasse", diff --git a/src/lang/en.json b/src/lang/en.json index 91ddc37..60f638a 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -146,6 +146,14 @@ "DS4.CombatValuesRangedAttack": "Ranged Attack", "DS4.CombatValuesSpellcasting": "Spellcasting", "DS4.CombatValuesTargetedSpellcasting": "Targeted Spellcasting", + "DS4.CombatValuesHitPointsSheet": "Hit Points", + "DS4.CombatValuesDefenseSheet": "Defense", + "DS4.CombatValuesInitiativeSheet": "Initiative", + "DS4.CombatValuesMovementSheet": "Movement", + "DS4.CombatValuesMeleeAttackSheet": "Melee Attack", + "DS4.CombatValuesRangedAttackSheet": "RAT", + "DS4.CombatValuesSpellcastingSheet": "Spellcasting", + "DS4.CombatValuesTargetedSpellcastingSheet": "TSC", "DS4.CharacterBaseInfoRace": "Race", "DS4.CharacterBaseInfoClass": "Class", "DS4.CharacterBaseInfoHeroClass": "Hero Class", diff --git a/src/module/config.ts b/src/module/config.ts index a8850b3..0c13243 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -162,6 +162,20 @@ export const DS4 = { targetedSpellcasting: "DS4.CombatValuesTargetedSpellcasting", }, + /** + * The what do display in the actor sheets for the combat value text (in some languages, abbreviations are necessary) + */ + combatValuesSheet: { + hitPoints: "DS4.CombatValuesHitPointsSheet", + defense: "DS4.CombatValuesDefenseSheet", + initiative: "DS4.CombatValuesInitiativeSheet", + movement: "DS4.CombatValuesMovementSheet", + meleeAttack: "DS4.CombatValuesMeleeAttackSheet", + rangedAttack: "DS4.CombatValuesRangedAttackSheet", + spellcasting: "DS4.CombatValuesSpellcastingSheet", + targetedSpellcasting: "DS4.CombatValuesTargetedSpellcastingSheet", + }, + /** * Define the base info of a character */ diff --git a/src/scss/components/_combat_value.scss b/src/scss/components/_combat_value.scss index 66b102e..326d0f6 100644 --- a/src/scss/components/_combat_value.scss +++ b/src/scss/components/_combat_value.scss @@ -6,13 +6,14 @@ @use "../utils/mixins"; @use "../utils/variables"; +@use "../utils/typography"; .ds4-combat-value { $size: 3.75rem; display: grid; place-items: center; - row-gap: 0.5em; + row-gap: 0.125em; &__value { $combat-values-icons-path: "#{variables.$official-icons-path}/combat-values"; @@ -51,6 +52,12 @@ } } + &__label { + @include typography.font-heading-upper; + font-size: 1.2em; + white-space: nowrap; + } + &__formula { align-items: center; justify-content: space-between; diff --git a/src/scss/components/_sheet_tab_nav.scss b/src/scss/components/_sheet_tab_nav.scss index 9d86fd9..ed8bcdb 100644 --- a/src/scss/components/_sheet_tab_nav.scss +++ b/src/scss/components/_sheet_tab_nav.scss @@ -7,11 +7,12 @@ @use "../utils/variables"; .ds4-sheet-tab-nav { - height: auto; - border-top: variables.$border-groove; border-bottom: variables.$border-groove; + border-top: variables.$border-groove; + height: auto; &__item { font-weight: bold; + white-space: nowrap; } } diff --git a/src/templates/sheets/actor/components/combat-value.hbs b/src/templates/sheets/actor/components/combat-value.hbs index 5d55c0f..3037f92 100644 --- a/src/templates/sheets/actor/components/combat-value.hbs +++ b/src/templates/sheets/actor/components/combat-value.hbs @@ -9,20 +9,24 @@ SPDX-License-Identifier: MIT !-- !-- @param combat-value-key: The key of the combat value !-- @param combat-value-data: The data for the combat value -!-- @param combat-value-label: The label for the combat value +!-- @param combat-value-title: The title for the combat value +!-- @param combat-value-label: The label for the combat value (possibly an abbreviation) +!-- @param actor-id: The id of the actor the core value belongs to --}}
+ title="{{combat-value-title}}: {{combat-value-data.tooltip}}"> {{combat-value-data.total}}
+ {{combat-value-label}}
{{combat-value-data.base}} + title="{{combat-value-title}} {{localize 'DS4.TooltipBaseValue'}}">{{combat-value-data.base}} + - +
diff --git a/src/templates/sheets/actor/components/combat-values.hbs b/src/templates/sheets/actor/components/combat-values.hbs index fe0fabc..63ebe6e 100644 --- a/src/templates/sheets/actor/components/combat-values.hbs +++ b/src/templates/sheets/actor/components/combat-values.hbs @@ -6,8 +6,10 @@ SPDX-License-Identifier: MIT --}}
- {{#each config.i18n.combatValues as |combat-value-label combat-value-key|}} + {{#each config.i18n.combatValues as |combat-value-title combat-value-key|}} {{> systems/ds4/templates/sheets/actor/components/combat-value.hbs combat-value-key=combat-value-key - combat-value-data=(lookup ../data.data.combatValues combat-value-key) combat-value-label=combat-value-label}} + combat-value-data=(lookup ../data.data.combatValues combat-value-key) combat-value-label=(lookup + ../config.i18n.combatValuesSheet combat-value-key) combat-value-title=combat-value-title + actor-id=../data._id}} {{/each}}
diff --git a/src/templates/sheets/actor/components/core-value.hbs b/src/templates/sheets/actor/components/core-value.hbs index d9e0797..0d24a83 100644 --- a/src/templates/sheets/actor/components/core-value.hbs +++ b/src/templates/sheets/actor/components/core-value.hbs @@ -11,21 +11,22 @@ SPDX-License-Identifier: MIT !-- @param core-value-key: The key of the core value !-- @param core-value-data: The data for the core value !-- @param core-value-variant: The variant of the core value, i.e. attribute or trait +!-- @param actor-id: The id of the actor the core value belongs to --}}
-
+ + id="data.{{core-value-variant}}s.{{core-value-key}}.mod-{{actor-id}}" value='{{core-value-data.mod}}' + data-dtype="Number" title="{{core-value-label}} {{localize 'DS4.TooltipModifier'}}" /> {{core-value-data.total}} diff --git a/src/templates/sheets/actor/components/core-values.hbs b/src/templates/sheets/actor/components/core-values.hbs index e476ce0..68aab3d 100644 --- a/src/templates/sheets/actor/components/core-values.hbs +++ b/src/templates/sheets/actor/components/core-values.hbs @@ -9,11 +9,11 @@ SPDX-License-Identifier: MIT {{#each config.i18n.attributes as |attribute-label attribute-key|}} {{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=attribute-label core-value-key=attribute-key core-value-data=(lookup ../data.data.attributes - attribute-key) core-value-variant="attribute"}} + attribute-key) core-value-variant="attribute" actor-id=../data._id}} {{/each}} {{#each config.i18n.traits as |trait-label trait-key|}} {{> systems/ds4/templates/sheets/actor/components/core-value.hbs core-value-label=trait-label core-value-key=trait-key - core-value-data=(lookup ../data.data.traits trait-key) core-value-variant="trait"}} + core-value-data=(lookup ../data.data.traits trait-key) core-value-variant="trait" actor-id=../data._id}} {{/each}}
diff --git a/src/templates/sheets/actor/tabs/description.hbs b/src/templates/sheets/actor/tabs/description.hbs index a46a2ee..375748b 100644 --- a/src/templates/sheets/actor/tabs/description.hbs +++ b/src/templates/sheets/actor/tabs/description.hbs @@ -5,6 +5,6 @@ SPDX-License-Identifier: MIT --}}
- {{editor content=data.baseInfo.description target="data.baseInfo.description" button=true owner=owner + {{editor content=data.data.baseInfo.description target="data.baseInfo.description" button=true owner=owner editable=editable}}