From f76c97792bb39b2ea4ec895d16f71b11e036623c Mon Sep 17 00:00:00 2001 From: Ender Date: Mon, 6 May 2024 21:03:48 +0200 Subject: [PATCH] hide unlearned skills as default added effects consolidated items - attack, defence, spells + effects on combat tab - attributes, skills + gear on properties tab --- lang/de.json | 1 + source/template.json | 5 +- templates/sheets/npc/combat.hbs | 85 ++++++++++++++++++++--------- templates/sheets/npc/main.hbs | 6 -- templates/sheets/npc/properties.hbs | 13 ++--- 5 files changed, 66 insertions(+), 44 deletions(-) diff --git a/lang/de.json b/lang/de.json index a12db20..21443eb 100644 --- a/lang/de.json +++ b/lang/de.json @@ -283,6 +283,7 @@ "rangedWeapon": "Schusswaffe", "assignItemToCharacter": "Füge Gegenstand einem Charakter hinzu, um hier etwas auswählen zu können", "showAll": "Alle anzeigen", + "showUnlearned": "Ungelernte Fertigkeiten", "wealthAndWeight": "Vermögen und Lasten", "itemsInContainers": "Gegenstände in Aufbewahrung", "allItems": "Alle Gegenstände", diff --git a/source/template.json b/source/template.json index cc298e8..b337148 100644 --- a/source/template.json +++ b/source/template.json @@ -13,7 +13,6 @@ "npc-class": "", "race": "", "magicUsing": false, - "showAllItems": false, "gender": "", "weight": "", "height": "", @@ -26,7 +25,9 @@ "level": 1, "gold": 0, "silver": 0, - "copper": 0 + "copper": 0, + "showAllItems": false, + "showUnlearned": false } }, "characterBars": { diff --git a/templates/sheets/npc/combat.hbs b/templates/sheets/npc/combat.hbs index 5802edb..91164f5 100644 --- a/templates/sheets/npc/combat.hbs +++ b/templates/sheets/npc/combat.hbs @@ -1,7 +1,7 @@
-
+
{{localize "midgard5.calculated-values"}}
@@ -28,7 +28,7 @@ -
+
{{localize "midgard5.actionrank"}}
@@ -37,7 +37,43 @@
-
+
+
+
{{localize "TYPES.Item.effect"}}
+
+ + + + + + + + {{#each data.calc.gear.effects as |item itemId|}} + + + + {{!--{{#unless (eq item.label "Belastung")}}--}} + + {{!--{{/unless}}--}} + + {{/each}} + +
{{localize "TYPES.Item.effect"}} + +
+ {{item.label}} + {{#if item.equipped}} + {{localize "midgard5.active"}} + {{#unless (or (eq item.duration.unit "") (eq item.duration.unit "limitless"))}} + {{item.duration.time}} {{localize (concat "midgard5.time-" item.duration.unit)}} + {{/unless}} + {{/if}} +
+
+
+ + +
{{localize "midgard5.attack"}}
@@ -89,7 +125,7 @@ -
+
{{localize "midgard5.defense"}}
@@ -110,7 +146,6 @@ -
{{data.calc.stats.resistanceBody.value}}
@@ -118,7 +153,6 @@ - @@ -129,7 +163,6 @@ - @@ -161,38 +194,36 @@ {{#if actor.system.info.magicUsing }} -
+
{{localize "TYPES.Item.spell"}}
+
{{localize "TYPES.Item.defensiveWeapon"}} {{localize "midgard5.ew"}}{{localize "midgard5.defenseBonus-short"}}
{{item.label}} {{item.calc.ew}}{{item.defenseBonus}}
+ + + + + + +
{{localize "midgard5.spellCasting"}}{{data.calc.stats.spellCasting.value}}
+ - - - + {{#each data.calc.spells as |item itemId|}} - {{#if item.equipped}} - - - - - - - - - {{/if}} + + + + + + + {{/each}}
{{localize "TYPES.Item.spell"}}{{localize "midgard5.spell-castDuration"}}{{localize "midgard5.actor-ap"}} {{localize "midgard5.ew"}}
{{item.label}}{{#if item.special}}(*){{/if}}{{item.castDuration}}{{item.ap}}{{item.calc.ew}} - {{#if item.equipped}} - - {{else}} - - {{/if}} -
{{item.label}}{{#if item.special}}(*){{/if}}{{item.calc.ew}}
diff --git a/templates/sheets/npc/main.hbs b/templates/sheets/npc/main.hbs index 39135f3..610f929 100644 --- a/templates/sheets/npc/main.hbs +++ b/templates/sheets/npc/main.hbs @@ -108,9 +108,6 @@ @@ -122,9 +119,6 @@
{{> "systems/midgard5/templates/sheets/npc/properties.hbs"}}
-
- {{> "systems/midgard5/templates/sheets/character/spells.hbs"}} -
{{> "systems/midgard5/templates/sheets/npc/description.hbs"}}
diff --git a/templates/sheets/npc/properties.hbs b/templates/sheets/npc/properties.hbs index 56c10a8..08439b4 100644 --- a/templates/sheets/npc/properties.hbs +++ b/templates/sheets/npc/properties.hbs @@ -40,6 +40,8 @@
{{localize "midgard5.skills"}}
+ + @@ -58,7 +60,7 @@ {{/each}} - + {{#unless (not data.info.showUnlearned)}} {{#each data.skills.general as |skill key|}} {{#unless (isSkillInList (localizeMidgard key) ../actor.system.calc.skills.general) }} @@ -69,6 +71,7 @@ {{/unless}} {{/each}} + {{/unless}}
@@ -83,7 +86,6 @@ {{localize "TYPES.Item.item"}} {{localize "midgard5.item-quantity"}} {{localize "midgard5.item-value"}} - @@ -105,13 +107,6 @@ {{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}} {{/unless}} - - {{#if item.equipped}} - - {{else}} - - {{/if}} - {{/each}}