diff --git a/source/PreloadTemplates.ts b/source/PreloadTemplates.ts index f014a0b..a126db5 100644 --- a/source/PreloadTemplates.ts +++ b/source/PreloadTemplates.ts @@ -16,6 +16,10 @@ const preloadTemplates = async (): Promise[]> = "sheets/character/combat.hbs", "sheets/character/effects.hbs", "sheets/npc/main.hbs", + "sheets/npc/combat.hbs", + "sheets/npc/properties.hbs", + "sheets/npc/description.hbs", + "sheets/npc/attribute.hbs", "sheets/partial/mod.hbs", "sheets/item/rolls.hbs", "chat/roll-m5.hbs", diff --git a/source/module/M5Base.ts b/source/module/M5Base.ts index e890123..fdc1b26 100644 --- a/source/module/M5Base.ts +++ b/source/module/M5Base.ts @@ -162,6 +162,7 @@ export interface M5AttributeCalculated extends M5ModResult { export interface M5CharacterCalculatedData { level: number; + movement: number; attributes: { st: M5AttributeCalculated; gs: M5AttributeCalculated; diff --git a/source/module/sheets/M5CharacterSheet.ts b/source/module/sheets/M5CharacterSheet.ts index e91fe79..1a41242 100644 --- a/source/module/sheets/M5CharacterSheet.ts +++ b/source/module/sheets/M5CharacterSheet.ts @@ -22,7 +22,7 @@ export default class M5CharacterSheet extends ActorSheet { get template() { //console.log("M5CharacterSheet", this.actor.data.type) - if (this.actor.data.type === "npc") { + if (this.actor.type === "npc") { return "systems/midgard5/templates/sheets/npc/main.hbs"; } else { diff --git a/source/style/npc-sheet.less b/source/style/npc-sheet.less new file mode 100644 index 0000000..408202f --- /dev/null +++ b/source/style/npc-sheet.less @@ -0,0 +1,23 @@ +// main: midgard5.less +@borderGroove: 2px groove #eeede0; +@attributeBorderColor: rgba(0, 0, 0, 0.5); + +.midgard5 { + .sheet-npc { + .attribute-header { + align-items: center; + text-align: center; + font-weight: bold; + border: 0px solid transparent; + } + .attribute-value { + align-items: center; + text-align: center; + border: 0px solid transparent; + } + .fixed-value { + width: 3rem; + text-align: center; + } + } +} \ No newline at end of file diff --git a/source/template.json b/source/template.json index 7f0ecb5..9847b52 100644 --- a/source/template.json +++ b/source/template.json @@ -10,6 +10,7 @@ "description": "", "background": "", "class": {}, + "npc-class": "", "race": "", "magicUsing": false, "showAllItems": false, @@ -48,6 +49,8 @@ "gp": 0 }, "attributes": { + "level": 1, + "movement": 24, "attributes": { "st": { "value": 50, "bonus": 0 }, "gs": { "value": 50, "bonus": 0 }, @@ -383,6 +386,7 @@ "hoarded": false, "skillId": "", "damageBase": "1d6", + "ew": 5, "rolls": { "formulas": { "0": { diff --git a/templates/sheets/character/gear.hbs b/templates/sheets/character/gear.hbs index c36ef5f..263bb40 100644 --- a/templates/sheets/character/gear.hbs +++ b/templates/sheets/character/gear.hbs @@ -234,7 +234,7 @@ {{localize "midgard5.capacity"}} - + @@ -289,7 +289,7 @@ {{localize "midgard5.item-weight"}} - + @@ -345,7 +345,7 @@ {{localize "midgard5.item-value"}} {{localize "midgard5.item-weight"}} - + @@ -392,7 +392,7 @@ {{localize "midgard5.item-value"}} {{localize "midgard5.item-weight"}} - + @@ -438,7 +438,7 @@ {{localize "midgard5.item-value"}} {{localize "midgard5.item-weight"}} - + diff --git a/templates/sheets/npc/attribute.hbs b/templates/sheets/npc/attribute.hbs new file mode 100644 index 0000000..6d6f4e6 --- /dev/null +++ b/templates/sheets/npc/attribute.hbs @@ -0,0 +1,4 @@ +
+
{{localize (m5concat "midgard5.actor-" attributeId "-long")}}
+
+
\ No newline at end of file diff --git a/templates/sheets/npc/combat.hbs b/templates/sheets/npc/combat.hbs new file mode 100644 index 0000000..5802edb --- /dev/null +++ b/templates/sheets/npc/combat.hbs @@ -0,0 +1,202 @@ + +
+ +
+
+
{{localize "midgard5.calculated-values"}}
+ + + + + + + + + + + + + + +
{{localize "midgard5.movementRange"}}{{data.calc.stats.movement.value}}
{{localize "midgard5.initiative"}} + {{#if (isSkillInList (localizeMidgard "anfuehren") data.calc.skills.general)}} + {{skillEwInList (localizeMidgard "anfuehren") data.calc.skills.general}} + {{else}} + {{skillEw actor._id data.skills.general.anfuehren}} + {{/if}} + {{localize "midgard5.actionrank"}}{{data.calc.attributes.gw.value}}
+
+
+ +
+
+
{{localize "midgard5.actionrank"}}
+ + + +
+
+ +
+
+
{{localize "midgard5.attack"}}
+ + + + + + + + + + + + {{#each data.calc.gear.weapons as |item itemId|}} + + + + + + + + + {{/each}} + +
{{localize "TYPES.Item.weapon"}}{{localize "midgard5.ew"}}{{localize "midgard5.damage"}} +
{{item.label}}{{#if item.special}}(*){{/if}}{{item.calc.ew}}{{item.damageBase}}
+ + + + + + + + + + + + {{#each data.calc.skills.combat as |skill skillId|}} + + + + + + + + {{/each}} + +
{{localize "midgard5.weapon-skill"}}{{localize "midgard5.ew"}}
{{skill.label}}{{skill.calc.ew}}
+
+
+ +
+
+
{{localize "midgard5.defense"}}
+ + + + + + + + + + + + + + + + + + + +
{{localize "midgard5.defense"}}{{add data.calc.stats.defense.value data.calc.stats.defenseBonus.value}}
{{localize "midgard5.resistanceMind"}}{{data.calc.stats.resistanceMind.value}}
{{localize "midgard5.resistanceBody"}}{{data.calc.stats.resistanceBody.value}}
+ + + + + + + + + + + + + {{#each data.calc.gear.defensiveWeapons as |item itemId|}} + + + + + + + + + {{/each}} + +
{{localize "TYPES.Item.defensiveWeapon"}}{{localize "midgard5.ew"}}{{localize "midgard5.defenseBonus-short"}}
{{item.label}}{{item.calc.ew}}{{item.defenseBonus}}
+ + + + + + + + + + + + {{#each data.calc.gear.armor as |item itemId|}} + + + + + + + {{/each}} + +
{{localize "TYPES.Item.armor"}}{{localize "midgard5.actor-lp-short"}}
{{item.label}}{{lpProtection}}
+
+
+ + {{#if actor.system.info.magicUsing }} +
+
+
{{localize "TYPES.Item.spell"}}
+ + + + + + + + + + + + + {{#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}} +
+
+
+ {{/if}} +
diff --git a/templates/sheets/npc/description.hbs b/templates/sheets/npc/description.hbs new file mode 100644 index 0000000..d1b9e9f --- /dev/null +++ b/templates/sheets/npc/description.hbs @@ -0,0 +1,18 @@ +
+
+
+
{{localize "midgard5.description"}}
+
+
{{editor data.info.description target="data.info.description" button=true owner=owner editable=editable}}
+
+
+ +
+
+
{{localize "midgard5.background"}}
+
+
{{editor data.info.background target="data.info.background" button=true owner=owner editable=editable}}
+
+
+ +
\ No newline at end of file diff --git a/templates/sheets/npc/main.hbs b/templates/sheets/npc/main.hbs index d29f296..aab7074 100644 --- a/templates/sheets/npc/main.hbs +++ b/templates/sheets/npc/main.hbs @@ -16,16 +16,16 @@ {{localize "midgard5.class"}} - + {{localize "midgard5.level"}} - + {{data.calc.level}} - + @@ -36,28 +36,28 @@
- - - - - - - - - - + + + + + + + + + + - + + + + + + + + +
{{localize "midgard5.actor-st"}}{{localize "midgard5.actor-gs"}}{{localize "midgard5.actor-gw"}}{{localize "midgard5.actor-ko"}}{{localize "midgard5.actor-in"}}{{localize "midgard5.actor-zt"}}{{localize "midgard5.actor-au"}}{{localize "midgard5.actor-pa"}}{{localize "midgard5.actor-wk"}}{{localize "midgard5.actor-git"}}{{localize "midgard5.actor-st"}}{{localize "midgard5.actor-gs"}}{{localize "midgard5.actor-gw"}}{{localize "midgard5.actor-ko"}}{{localize "midgard5.actor-in"}}{{localize "midgard5.actor-zt"}}{{localize "midgard5.actor-au"}}{{localize "midgard5.actor-pa"}}{{localize "midgard5.actor-wk"}}{{localize "midgard5.actor-git"}}
- - - - - - - - - + {{data.attributes.st.value}}{{data.attributes.gs.value}}{{data.attributes.gw.value}}{{data.attributes.ko.value}}{{data.attributes.in.value}}{{data.attributes.zt.value}}{{data.attributes.au.value}}{{data.attributes.pa.value}}{{data.attributes.wk.value}}{{data.attributes.git.value}}
@@ -108,44 +108,21 @@ {{!-- Character Sheet Navigation --}}
-
- {{> "systems/midgard5/templates/sheets/character/base_values.hbs"}} -
- -
- {{> "systems/midgard5/templates/sheets/character/skills.hbs"}} -
- -
- {{> "systems/midgard5/templates/sheets/character/gear.hbs"}} -
-
- {{> "systems/midgard5/templates/sheets/character/combat.hbs"}} + {{> "systems/midgard5/templates/sheets/npc/combat.hbs"}}
- -
- {{> "systems/midgard5/templates/sheets/character/spells.hbs"}} -
- -
- {{> "systems/midgard5/templates/sheets/character/effects.hbs"}} +
+ {{> "systems/midgard5/templates/sheets/npc/properties.hbs"}}
- {{> "systems/midgard5/templates/sheets/character/description.hbs"}} + {{> "systems/midgard5/templates/sheets/npc/description.hbs"}}
diff --git a/templates/sheets/npc/properties.hbs b/templates/sheets/npc/properties.hbs new file mode 100644 index 0000000..90c0877 --- /dev/null +++ b/templates/sheets/npc/properties.hbs @@ -0,0 +1,118 @@ +
+
+
{{localize "midgard5.attributes"}}
+
+
+ {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="st" attribute=data.attributes.st}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="gs" attribute=data.attributes.gs}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="gw" attribute=data.attributes.gw}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="ko" attribute=data.attributes.ko}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="in" attribute=data.attributes.in}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="zt" attribute=data.attributes.zt}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="au" attribute=data.attributes.au}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="pa" attribute=data.attributes.pa}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="wk" attribute=data.attributes.wk}} + {{> "systems/midgard5/templates/sheets/npc/attribute.hbs" attributeId="git" attribute=data.attributes.git}} +
+
{{localize "midgard5.movementRange"}}
+
+
+
+
{{localize "midgard5.exp-overall"}}
+
+
+
+
{{localize "midgard5.actor-lp-short"}} {{localize "midgard5.maximum"}}
+
+
+
+
{{localize "midgard5.actor-ap-short"}} {{localize "midgard5.maximum"}}
+
+
+
+
+
+
+ +
+
{{localize "midgard5.skills"}}
+ + + + + + + + + + + {{#each data.calc.skills.general as |skill skillId|}} + + + + + + + {{/each}} + + {{#each data.skills.general as |skill key|}} + {{#unless (isSkillInList (localizeMidgard key) ../actor.system.calc.skills.general) }} + + + + + + + {{/unless}} + {{/each}} + +
{{localize "midgard5.skills"}}{{localize "midgard5.ew"}}
{{skill.label}}
{{localizeMidgard key}}
+
+
+
+
+
{{localize "midgard5.gear"}}
+ + + + + + + + + + + + + {{#each data.calc.gear.items as |item itemId|}} + + + + + + + + + {{/each}} + +
{{localize "TYPES.Item.item"}}{{localize "midgard5.item-quantity"}}{{localize "midgard5.item-value"}} +
+ {{item.label}} + + + {{item.quantity}} + + + {{#unless (or (eq item.value 0) (eq item.currency ""))}} + {{item.value}} {{localize (m5concat "midgard5.currency-" item.currency)}} + {{/unless}} + + {{#if item.equipped}} + + {{else}} + + {{/if}} +
+
+
+
\ No newline at end of file