diff --git a/modules/hero6-actor-sheet.js b/modules/hero6-actor-sheet.js index 6afe073..fe3e682 100644 --- a/modules/hero6-actor-sheet.js +++ b/modules/hero6-actor-sheet.js @@ -39,16 +39,14 @@ export class Hero6ActorSheet extends ActorSheet { limited: this.object.limited, skills: this.actor.getSkills( ), perks: this.actor.getPerks( ), - powers: this.actor.getPowers( ), + powers: await this.actor.getPowers( ), talents: this.actor.getTalents( ), complications: this.actor.getComplications( ), + martialarts: this.actor.getMartialArts( ), weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ), armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())), shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields())), equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ), - equippedWeapons: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquippedWeapons()) ), - equippedArmor: this.actor.getEquippedArmor(), - equippedShield: this.actor.getEquippedShield(), subActors: duplicate(this.actor.getSubActors()), race: duplicate(this.actor.getRace()), moneys: duplicate(this.actor.getMoneys()), diff --git a/modules/hero6-actor.js b/modules/hero6-actor.js index f17bedb..43948c8 100644 --- a/modules/hero6-actor.js +++ b/modules/hero6-actor.js @@ -43,8 +43,8 @@ export class Hero6Actor extends Actor { } if (data.type == 'character') { - const skills = await Hero6Utility.loadCompendium("fvtt-hero-system-6.skills"); - data.items = skills.map(i => i.toObject()) + //const skills = await Hero6Utility.loadCompendium("fvtt-hero-system-6.skills"); + //data.items = skills.map(i => i.toObject()) } if (data.type == 'npc') { } @@ -175,8 +175,11 @@ export class Hero6Actor extends Actor { Hero6Utility.sortArrayObjectsByName(comp) return comp } - getPowers() { + async getPowers() { let comp = duplicate(this.items.filter(item => item.type == 'power') || []) + for(let c of comp) { + c.enrichDescription = c.name + "
" + await TextEditor.enrichHTML(c.system.description, {async: true}) + } Hero6Utility.sortArrayObjectsByName(comp) return comp } @@ -185,6 +188,11 @@ export class Hero6Actor extends Actor { Hero6Utility.sortArrayObjectsByName(comp) return comp } + getMartialArts() { + let comp = duplicate(this.items.filter(item => item.type == 'martialart') || []) + Hero6Utility.sortArrayObjectsByName(comp) + return comp + } getComplications() { let comp = duplicate(this.items.filter(item => item.type == 'complication') || []) Hero6Utility.sortArrayObjectsByName(comp) @@ -227,11 +235,20 @@ export class Hero6Actor extends Actor { /* ------------------------------------------- */ getEquipments() { - return this.items.filter(item => item.type == 'shield' || item.type == 'armor' || item.type == "weapon" || item.type == "equipment"); + return this.items.filter(item => item.type == "equipment" && item.system.subtype == "equipment"); + } + getWeapons() { + return this.items.filter(item => item.type == "equipment" && item.system.subtype == "weapon"); + } + getArmors() { + return this.items.filter(item => item.type == "equipment" && item.system.subtype == "armor"); + } + getShields() { + return this.items.filter(item => item.type == "equipment" && item.system.subtype == "shield"); } /* ------------------------------------------- */ getEquipmentsOnly() { - return duplicate(this.items.filter(item => item.type == "equipment") || []) + return duplicate(this.items.filter(item => item.type == "equipment" && item.system.subtype == "equipment") || []) } /* ------------------------------------------- */ diff --git a/modules/hero6-config.js b/modules/hero6-config.js index 0eeed7a..82967a9 100644 --- a/modules/hero6-config.js +++ b/modules/hero6-config.js @@ -1,6 +1,11 @@ export const Hero6_CONFIG = { - + equipmentSubType: { + equipment: "Equipment", + weapon: "Weapon", + armor: "Armor", + shield: "Shield" + }, rollCharac : { "str": "Strength", "dex": "Dexterity", diff --git a/modules/hero6-item-sheet.js b/modules/hero6-item-sheet.js index cf24432..8b6c9d6 100644 --- a/modules/hero6-item-sheet.js +++ b/modules/hero6-item-sheet.js @@ -145,6 +145,16 @@ export class Hero6ItemSheet extends ItemSheet { let itemType = li.data("item-type"); }); + html.find('.item-skill-profiency').click(ev => { + this.object.update( {'system.levels': 12, 'system.cost': 2} ) + } ) + html.find('.item-skill-familiarity').click(ev => { + this.object.update( {'system.levels': 10, 'system.cost': 1} ) + } ) + html.find('.item-skill-everyman').click(ev => { + this.object.update( {'system.levels': 8, 'system.cost': 0} ) + } ) + html.find('.view-subitem').click(ev => { this.viewSubitem(ev); }); diff --git a/modules/hero6-utility.js b/modules/hero6-utility.js index e4d2ab7..4eac5f5 100644 --- a/modules/hero6-utility.js +++ b/modules/hero6-utility.js @@ -50,8 +50,7 @@ export class Hero6Utility { return true; } return false - }) - + }) this.gameSettings() @@ -163,6 +162,8 @@ export class Hero6Utility { 'systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs', 'systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs', 'systems/fvtt-hero-system-6/templates/partials/partial-item-hasroll.hbs', + 'systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment.hbs', + 'systems/fvtt-hero-system-6/templates/partials/partial-actor-equipment-section.hbs' ] return loadTemplates(templatePaths); } diff --git a/styles/simple.css b/styles/simple.css index f1c9c5f..0ec8363 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -51,7 +51,7 @@ background: rgba(66, 66, 64, 0.95); } /* For title, sidebar character and scene */ .sheet nav.sheet-tabs { - font-size: 0.8rem; + font-size: 0.7rem; color: rgba(224, 208, 197, 0.9); background: rgba(66, 66, 64, 0.95); } /* For nav and title */ @@ -466,7 +466,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;} .sheet nav.sheet-tabs { font-size: 0.70rem; font-weight: bold; - height: 3rem; + height: 2.5rem; flex: 0 0 3rem; margin: 0; padding: 0 0 0 0.25rem; @@ -483,7 +483,7 @@ section.sheet-body{padding: 0.25rem 0.5rem;} nav.sheet-tabs .item { position: relative; - padding: 0 0.25rem; + padding: 0 0.15rem; } nav.sheet-tabs .item:after { @@ -1425,6 +1425,11 @@ Focus FOC: #ff0084 max-width: 16rem; min-width: 16rem; } +.item-field-label-long4 { + flex-grow:1; + max-width: 40rem; + min-width: 40rem; +} .item-control-end { align-self: flex-end; } diff --git a/system.json b/system.json index 164f948..a22bd51 100644 --- a/system.json +++ b/system.json @@ -91,7 +91,7 @@ "styles": [ "styles/simple.css" ], - "version": "10.0.10", + "version": "10.0.13", "compatibility": { "minimum": "10", "verified": "10", @@ -99,7 +99,7 @@ }, "title": "Hero System v6 for FoundrtVTT (Official)", "manifest": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/raw/branch/main/system.json", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/archive/fvtt-hero-system-6-v10.0.10.zip", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/archive/fvtt-hero-system-6-v10.0.13.zip", "url": "https://www.uberwald.me/gitea/uberwald/", "background": "images/ui/hro6_welcome_page.webp", "id": "fvtt-hero-system-6" diff --git a/template.json b/template.json index d564e73..c80c22a 100644 --- a/template.json +++ b/template.json @@ -14,6 +14,7 @@ "gm": "", "gender": 0, "character": "", + "mass":"", "religion": "", "weight": "", "height": "", @@ -204,6 +205,7 @@ "talent", "power", "advantage", + "martialart", "limitation", "complication", "equipment" @@ -252,6 +254,10 @@ "base": "", "levelscost": 0, "levels": 0, + "skilllevelonly": false, + "skillfamiliarity": false, + "skilleveryman": false, + "skillprofiency": false, "templates": [ "common" ] @@ -267,6 +273,7 @@ "common", "power" ], + "subtype": "equipment", "value": 0, "weight": 0, "moneycost": 0 diff --git a/templates/actors/actor-sheet.hbs b/templates/actors/actor-sheet.hbs index 034fbe0..4fd6bd8 100644 --- a/templates/actors/actor-sheet.hbs +++ b/templates/actors/actor-sheet.hbs @@ -9,19 +9,57 @@

-
- -
+ -
+
+
+
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • + +
    +
    +
      +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    +
    -
    @@ -30,17 +68,17 @@ {{!-- Sheet Tab Navigation --}} {{!-- Sheet Body --}} @@ -127,11 +165,11 @@
    diff --git a/templates/items/item-martialart-sheet.hbs b/templates/items/item-martialart-sheet.hbs new file mode 100644 index 0000000..42a6cc6 --- /dev/null +++ b/templates/items/item-martialart-sheet.hbs @@ -0,0 +1,23 @@ +
    +
    + +
    +

    +
    +
    + + {{> systems/fvtt-hero-system-6/templates/partials/partial-item-nav.hbs}} + + {{!-- Sheet Body --}} +
    + +
    + +
      + {{> systems/fvtt-hero-system-6/templates/partials/partial-item-description.hbs}} + {{> systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs}} +
    + +
    +
    +
    diff --git a/templates/items/item-skill-sheet.hbs b/templates/items/item-skill-sheet.hbs index e7b4d0f..82d5c6d 100644 --- a/templates/items/item-skill-sheet.hbs +++ b/templates/items/item-skill-sheet.hbs @@ -46,6 +46,29 @@ +
  • + +
  • + +
  • + +
  • + {{#if system.skillfamiliarity}} +
  • + +
  • + {{/if}} + +
  • + +
  • + {{#if (ne system.skilltype "combat")}}
  • diff --git a/templates/partials/partial-actor-equipment-section.hbs b/templates/partials/partial-actor-equipment-section.hbs new file mode 100644 index 0000000..b19993c --- /dev/null +++ b/templates/partials/partial-actor-equipment-section.hbs @@ -0,0 +1,32 @@ + diff --git a/templates/partials/partial-actor-equipment.hbs b/templates/partials/partial-actor-equipment.hbs index 51b1f41..5ec8ef1 100644 --- a/templates/partials/partial-actor-equipment.hbs +++ b/templates/partials/partial-actor-equipment.hbs @@ -1,37 +1,31 @@
  • - {{#if (eq level 1)}} {{equip.name}} - {{else}} - {{equip.name}} - {{/if}} -
  • diff --git a/templates/partials/partial-actor-full-charac.hbs b/templates/partials/partial-actor-full-charac.hbs index 7fa2a22..5a3bca6 100644 --- a/templates/partials/partial-actor-full-charac.hbs +++ b/templates/partials/partial-actor-full-charac.hbs @@ -1,13 +1,16 @@ -
  • + +
  • + + +

    {{charac.label}}

    - {{#if (eq charac.category "main")}} +

    {{charac.base}}

    - {{else}} - - {{/if}} -  

    {{charac.base}}

    -

    {{charac.total}}

    + +

    {{charac.roll}}-

    + +
  • \ No newline at end of file