From 0b0b74754fd2bbc8868202650ec6fcb014160ac5 Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Tue, 6 Jun 2023 09:18:33 +0200 Subject: [PATCH] =?UTF-8?q?Various/changes=20from=2030th=20may=20requests?= =?UTF-8?q?=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/hero6-actor-sheet.js | 6 +- modules/hero6-actor.js | 111 +++++++++--------- modules/hero6-commands.js | 10 +- modules/hero6-roll-dialog.js | 2 +- modules/hero6-utility.js | 16 ++- packs/skills.db | 2 +- styles/unused.html | 60 ---------- system.json | 6 +- template.json | 5 +- templates/actors/actor-sheet.hbs | 43 ++++--- templates/apps/roll-dialog-generic.hbs | 8 +- templates/chat/chat-hr-roll.hbs | 3 + templates/chat/chat-lift-dice-result.hbs | 1 + templates/items/item-equipment-sheet.hbs | 63 ++++++---- .../partial-actor-equipment-section.hbs | 17 ++- .../partials/partial-actor-equipment.hbs | 12 +- .../partials/partial-item-description.hbs | 2 +- .../partials/partial-power-equipment-cost.hbs | 3 + 18 files changed, 186 insertions(+), 184 deletions(-) delete mode 100644 styles/unused.html create mode 100644 templates/chat/chat-hr-roll.hbs diff --git a/modules/hero6-actor-sheet.js b/modules/hero6-actor-sheet.js index ff9c70d..c774ca3 100644 --- a/modules/hero6-actor-sheet.js +++ b/modules/hero6-actor-sheet.js @@ -152,6 +152,10 @@ export class Hero6ActorSheet extends ActorSheet { const characKey = $(event.currentTarget).data("charac-key"); this.actor.rollCharac(characKey); }); + html.find('.roll-perception').click((event) => { + this.actor.rollPerception("int"); + }); + html.find('.roll-direct').click((event) => { const rollFormula = $(event.currentTarget).data("roll-formula") const rollSource = $(event.currentTarget).data("roll-source") @@ -179,7 +183,7 @@ export class Hero6ActorSheet extends ActorSheet { const skillId = li.data("item-id") this.actor.rollWeapon(skillId) }); - + html.find('.lock-unlock-sheet').click((event) => { this.options.editScore = !this.options.editScore; this.render(true); diff --git a/modules/hero6-actor.js b/modules/hero6-actor.js index 0f1de6c..5652135 100644 --- a/modules/hero6-actor.js +++ b/modules/hero6-actor.js @@ -60,10 +60,15 @@ export class Hero6Actor extends Actor { } /* -------------------------------------------- */ - computeHitPoints() { + computeDerivatedData() { if (this.type == "character") { + let newSTREND = this.computeSTREND() + if (newSTREND != this.system.characteristics.str.strend) { + this.update({ 'system.characteristics.str.strend': newSTREND }) + } } } + computeDicesValue() { this.system.biodata.presenceattack = Hero6Utility.getDerivatedDiceFormulas(this.system.characteristics.pre.value) this.system.characteristics.str.strdice = Hero6LiftDice.getLiftDice(this.system.characteristics.str.value) @@ -75,7 +80,7 @@ export class Hero6Actor extends Actor { if (this.type == 'character' || game.user.isGM) { this.system.encCapacity = this.getEncumbranceCapacity() this.buildContainerTree() - this.computeHitPoints() + this.computeDerivatedData() this.computeDicesValue() } @@ -90,7 +95,10 @@ export class Hero6Actor extends Actor { /* -------------------------------------------- */ getEncumbranceCapacity() { - return 1; + let numLift = this.system.characteristics.str.lift.match(/\d*\s/g) + if (numLift && numLift[0] && Number(numLift[0])) { + return numLift[0] / 2 + } } /* -------------------------------------------- */ @@ -147,18 +155,6 @@ export class Hero6Actor extends Actor { return listItem } - /* -------------------------------------------- */ - getConditions() { - let comp = duplicate(this.items.filter(item => item.type == 'condition') || []); - Hero6Utility.sortArrayObjectsByName(comp) - return comp; - } - /* -------------------------------------------- */ - getWeapons() { - let comp = duplicate(this.items.filter(item => item.type == 'weapon') || []); - Hero6Utility.sortArrayObjectsByName(comp) - return comp; - } /* -------------------------------------------- */ getItemById(id) { let item = this.items.find(item => item.id == id); @@ -324,46 +320,16 @@ export class Hero6Actor extends Actor { } /* ------------------------------------------- */ - async buildContainerTree() { - let equipments = duplicate(this.items.filter(item => item.type == "equipment") || []) - for (let equip1 of equipments) { - if (equip1.system.iscontainer) { - equip1.system.contents = [] - equip1.system.contentsEnc = 0 - for (let equip2 of equipments) { - if (equip1._id != equip2.id && equip2.system.containerid == equip1.id) { - equip1.system.contents.push(equip2) - let q = equip2.system.quantity ?? 1 - equip1.system.contentsEnc += q * equip2.system.weight - } - } - } - } - - // Compute whole enc + buildContainerTree() { + let equipments = duplicate(this.items.filter(item => item.type == "equipment") || []); let enc = 0 - for (let item of equipments) { - //item.data.idrDice = Hero6Utility.getDiceFromLevel(Number(item.data.idr)) - if (item.system.equipped) { - if (item.system.iscontainer) { - enc += item.system.contentsEnc - } else if (item.system.containerid == "") { - let q = item.system.quantity ?? 1 - enc += q * item.system.weight - } + for (let equip1 of equipments) { + if (Number(equip1.system.weight) && Number(equip1.system.quantity)) { + enc += equip1.system.weight * equip1.system.quantity } } - for (let item of this.items) { // Process items/shields/armors - if ((item.type == "weapon" || item.type == "shield" || item.type == "armor") && item.system.equipped) { - let q = item.system.quantity ?? 1 - enc += q * item.system.weight - } - } - // Store local values this.encCurrent = enc - this.containersTree = equipments.filter(item => item.system.containerid == "") // Returns the root of equipements without container - } /* -------------------------------------------- */ @@ -392,7 +358,7 @@ export class Hero6Actor extends Actor { } else { await this.updateEmbeddedDocuments("Item", [{ _id: object.id, 'system.containerid': containerId }]) } - } else if (object && object.system.containerid) { // remove from container + } else if (object?.system?.containerid) { // remove from container console.log("Removeing: ", object) await this.updateEmbeddedDocuments("Item", [{ _id: object.id, 'system.containerid': "" }]); } @@ -409,7 +375,7 @@ export class Hero6Actor extends Actor { /* -------------------------------------------- */ async equipGear(equipmentId) { let item = this.items.find(item => item.id == equipmentId); - if (item && item.system) { + if (item?.system) { let update = { _id: item.id, "system.equipped": !item.system.equipped }; await this.updateEmbeddedDocuments('Item', [update]); // Updates one EmbeddedEntity } @@ -423,7 +389,7 @@ export class Hero6Actor extends Actor { } /* -------------------------------------------- */ getSegments() { - let index = Math.min(Math.max(this.system.characteristics.spd.value, 1), 12) // Security bounds + let index = [ Math.min(Math.max(this.system.characteristics.spd.value, 1), 12) ] // Security bounds return __speed2Segments[index] } /* -------------------------------------------- */ @@ -485,6 +451,22 @@ export class Hero6Actor extends Actor { return skill; } + /* -------------------------------------------- */ + computeSTREND() { + let newSTREND = 0 + switch (this.system.characteristics.str.strendmode) { + case "str20": + newSTREND = Math.floor(this.system.characteristics.str.value / 20) + break; + case "str10": + newSTREND = Math.floor(this.system.characteristics.str.value / 10) + break; + case "str5": + newSTREND = Math.floor(this.system.characteristics.str.value / 5) + break; + } + return newSTREND + } /* -------------------------------------------- */ async deleteAllItemsByType(itemType) { let items = this.items.filter(item => item.type == itemType); @@ -557,6 +539,18 @@ export class Hero6Actor extends Actor { return rollData } + /* -------------------------------------------- */ + rollPerception() { + let rollData = this.getCommonRollData("int") + rollData.isPerception = true + rollData.charac.roll = Number(rollData.charac.perceptionroll) + rollData.mode = "perception" + if (rollData.target) { + ui.notifications.warn("You are targetting a token with a skill : please use a Weapon instead.") + return + } + this.startRoll(rollData) + } /* -------------------------------------------- */ rollCharac(chKey) { @@ -588,7 +582,7 @@ export class Hero6Actor extends Actor { rollData.diceFormula = Hero6Utility.convertRollHeroSyntax(item.system.damage) let myRoll = new Roll(rollData.diceFormula).roll({ async: false }) await Hero6Utility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) - + rollData.roll = myRoll rollData.result = myRoll.total rollData.bodyValue = Hero6Utility.computeBodyValue(myRoll) @@ -604,11 +598,12 @@ export class Hero6Actor extends Actor { async rollLiftDice() { let rollData = this.getCommonRollData() rollData.mode = "lift-dice" - rollData.diceFormula = Hero6Utility.convertRollHeroSyntax( Hero6LiftDice.getLiftDice(this.system.characteristics.str.value)) + rollData.diceFormula = Hero6Utility.convertRollHeroSyntax(Hero6LiftDice.getLiftDice(this.system.characteristics.str.value)) let myRoll = new Roll(rollData.diceFormula).roll({ async: false }) await Hero6Utility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) - - rollData.roll = myRoll + + rollData.roll = duplicate(myRoll) + rollData.bodyValue = Hero6Utility.computeBodyValue(myRoll) rollData.result = myRoll.total let msg = await Hero6Utility.createChatWithRollMode(rollData.alias, { @@ -617,7 +612,7 @@ export class Hero6Actor extends Actor { msg.setFlag("world", "rolldata", rollData) console.log("Rolldata result", rollData) } - + /* -------------------------------------------- */ rollSkill(skillId) { let skill = this.items.get(skillId) diff --git a/modules/hero6-commands.js b/modules/hero6-commands.js index 1d39f66..997537b 100644 --- a/modules/hero6-commands.js +++ b/modules/hero6-commands.js @@ -123,9 +123,17 @@ export class Hero6Commands { let formula = params.join(' ') if (formula) { let foundryFormula = Hero6Utility.convertRollHeroSyntax(formula) + let myRoll = new Roll(foundryFormula).roll({ async: false }) await Hero6Utility.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) - myRoll.toMessage() + let bodyValue = Hero6Utility.computeBodyValue(myRoll) + + let msgFlavor = await renderTemplate('systems/fvtt-hero-system-6/templates/chat/chat-hr-roll.hbs', {myRoll, bodyValue} ) + let msg = await myRoll.toMessage({ + user: game.user.id, + rollMode: game.settings.get("core", "rollMode"), + flavor: msgFlavor + }) return true } return false diff --git a/modules/hero6-roll-dialog.js b/modules/hero6-roll-dialog.js index 26cc287..457cf8f 100644 --- a/modules/hero6-roll-dialog.js +++ b/modules/hero6-roll-dialog.js @@ -53,7 +53,7 @@ export class Hero6RollDialog extends Dialog { activateListeners(html) { super.activateListeners(html); - var dialog = this; + let dialog = this; function onLoad() { } $(function () { onLoad(); }); diff --git a/modules/hero6-utility.js b/modules/hero6-utility.js index 3f34a55..85088dd 100644 --- a/modules/hero6-utility.js +++ b/modules/hero6-utility.js @@ -367,20 +367,24 @@ export class Hero6Utility { rollData.result = roll.total rollData.bodyValue = this.computeBodyValue(rollData.roll) - this.outputRollMessage(rollData) + this.outputRollMessage(rollData).catch(function() { ui.notifications.warn("Error during message output.") }) } /* -------------- ----------------------------- */ static async outputRollMessage(rollData) { - let msg = await this.createChatWithRollMode(rollData.alias, { - content: await renderTemplate(`systems/fvtt-hero-system-6/templates/chat/chat-generic-result.hbs`, rollData) + let msgFlavor = await renderTemplate(`systems/fvtt-hero-system-6/templates/chat/chat-generic-result.hbs`, rollData) + let msg = await rollData.roll.toMessage({ + user: game.user.id, + rollMode: game.settings.get("core", "rollMode"), + flavor: msgFlavor }) + rollData.roll = duplicate(rollData.roll) // Convert to object msg.setFlag("world", "rolldata", rollData) console.log("Rolldata result", rollData) } /* -------------- ----------------------------- */ - static convertRollHeroSyntax( hero6Formula) { + static convertRollHeroSyntax(hero6Formula) { // Ensure we have no space at all //hero6Formula = hero6Formula.replace(/\s/g, '') let hasHalfDice = "" @@ -388,7 +392,7 @@ export class Hero6Utility { hero6Formula = hero6Formula.replace("1/2d6", "d6") hasHalfDice = "+round(1d6)" } - + let foundryFormula = hero6Formula + hasHalfDice foundryFormula = foundryFormula.replace(' ', '') console.log("Parsed formula : ", hero6Formula, foundryFormula) @@ -433,7 +437,7 @@ export class Hero6Utility { static blindMessageToGM(chatOptions) { let chatGM = duplicate(chatOptions); chatGM.whisper = this.getUsers(user => user.isGM); - chatGM.content = "Blinde message of " + game.user.name + "
" + chatOptions.content; + chatGM.content = "Blind message of " + game.user.name + "
" + chatOptions.content; console.log("blindMessageToGM", chatGM); game.socket.emit("system.fvtt-hero-system-6", { msg: "msg_gm_chat_message", data: chatGM }); } diff --git a/packs/skills.db b/packs/skills.db index cc845a5..09adc7b 100644 --- a/packs/skills.db +++ b/packs/skills.db @@ -39,9 +39,9 @@ {"name":"Concealment","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Concealment","description":"Concealment represents a character’s ability to hide things and to find things which others have hidden — important papers, weapons, jewels, arti- facts, drugs, and so forth.","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Intellect","characteristic":"INT","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505024,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"YfLechAkLdcHGPCm"} {"name":"Security Systems","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Security Systems","description":"A character with Security Systems can locate, recognize, evade, and build various types of alarms and traps. This usually requires the proper equipment, and often a lot of time (one Turn or longer) as well.","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Intellect","characteristic":"INT","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505024,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"bBoNhL0myNTylcHm"} {"name":"Transport Familiarity","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Transport Familiarity","description":"This Background Skill allows characters to drive or pilot specific types of vehicles, or ride a living mount, under routine conditions (combat or crisis conditions require other Skills listed above).\nEach Transport Familiarity (TF) costs 2 Character Points. The character must select one of the following groups of vehicles:\n\nRiding Animals (horses, camels, elephants, and so on)\nGround Vehicles (cars, trucks, trains, motorcycles, sleds, snowmobiles)\nWater Vehicles (rowed boats, sailed boats, motorized boats)\nAir Vehicles (airplanes, helicopters) Space Vehicles (spaceships, starships) Mecha\nCharacters can purchase a TF with a single specific type of vehicle for 1 Character Point. This includes not only individual vehicles (Ford Mus- tangs, Los Angeles-class submarines) but recreational “vehicles” (such as SCUBA, Parachuting, Snow Skiing, or the like).","notes":"","effects":"","cost":"","activecost":"","basecost":"","value":"","modifiers":"","skilltype":"Background","characteristic":"","base":"","levelscost":"","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505028,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"bstMbLdHkP16NpyE"} +{"name":"Charm","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Charm","description":"Charm is the ability to gain others’ trust (and perhaps even friendship) by offering companionship or favors. This Skill is normally only for use on NPCs; a player should have more control over his character’s actions. The GM may rule that Charm can be used on a PC when it fits his Complications or personality.","notes":"","effects":"","cost":null,"activecost":null,"basecost":3,"value":"","modifiers":"","skilltype":"interaction","characteristic":"PRE","base":"","levelscost":2,"levels":null,"skilllevelonly":0,"skillfamiliarity":0,"skilleveryman":false,"skillprofiency":0,"plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.39","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1686003305741,"lastModifiedBy":"psfGTCIZQgpI1hvV"},"ownership":{"default":0,"psfGTCIZQgpI1hvV":3},"folder":null,"sort":0,"_id":"ddpdwDnfixUNP0eF"} {"name":"Streetwise","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Streetwise","description":"Streetwise gives a character knowledge of the seamy side of civilization. He knows how to find the black market, talk to thugs and criminals, gain information, deal with organized (and not so organized) crime figures, and so on.","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Interaction","characteristic":"PRE","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505023,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"gIYMsOzBOnRNRCLv"} {"name":"Tracking","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Tracking","description":"Characters with Tracking can follow a trail by observing tracks, marks, broken twigs and so forth, and also know how to hide tracks.","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Intellect","characteristic":"INT","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505027,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"gpzcF5naO9H3vNzi"} -{"name":"Charm","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Charm","description":"Charm is the ability to gain others’ trust (and perhaps even friendship) by offering companionship or favors. This Skill is normally only for use on NPCs; a player should have more control over his character’s actions. The GM may rule that Charm can be used on a PC when it fits his Complications or personality.","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Interaction","characteristic":"PRE","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505026,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"hZxL8I4mNlTsA9xQ"} {"name":"Systems Operation","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Systems Operation","description":"Characters with Systems Operation know how to operate sensing and communication devices properly. It does not cover navigational equipment (that’s Navigation) or encoding transmissions (that’s Cryptography).","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Intellect","characteristic":"INT","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505025,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"j7rkLue81LaHIzz7"} {"name":"Ventriloquism","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"Ventriloquism","description":"A character with Ventriloquism can make his voice sound as if it’s coming from somewhere other than himself, and can speak without apparently moving his lips. Ventriloquism is detected with a PER Roll in a Skill Versus Skill Contest. A Ventriloquism roll takes a -1 for every 2m of distance between the ventriloquist and the point where the voice “speaks.”","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Intellect","characteristic":"INT","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505026,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"jFd7i04Eu1FLCEpJ"} {"name":"High Society","type":"skill","img":"systems/fvtt-hero-system-6/images/icons/HeroIcon-Skills.webp","system":{"displayname":"High Society","description":"Characters with High Society know about upper-class culture and how to interact with it: what clothes to wear, which fork to use for shrimp, who’s who, the gossip and “court politics” applicable to the situation, and so forth.","notes":"","effects":"","cost":"","activecost":"","basecost":"3","value":"","modifiers":"","skilltype":"Interaction","characteristic":"PRE","base":"","levelscost":"2","levels":"","plusonecost":0,"skillroll":""},"effects":[],"flags":{"core":{"sourceId":"Item.KBoef00TNP73lDg0"}},"_stats":{"systemId":"fvtt-hero-system-6","systemVersion":"10.0.4","coreVersion":"10.291","createdTime":1671911635138,"modifiedTime":1674948505025,"lastModifiedBy":"PNdow54uXjPLt2Zr"},"folder":null,"sort":0,"ownership":{"default":0,"PNdow54uXjPLt2Zr":3},"_id":"m40buQ4y7AzWbrA9"} diff --git a/styles/unused.html b/styles/unused.html deleted file mode 100644 index 5f8d30b..0000000 --- a/styles/unused.html +++ /dev/null @@ -1,60 +0,0 @@ -{{!-- Carac Tab --}} -
- -
-
-
- -
-
- -
- -
    -
  • -

    {{data.momentum.label}}

    - - -
  • -
- -
- -
- -
- - - - - -
  • - {{#each data.secondary as |stat2 key|}} - {{#if stat2.iscombat}} - -

    {{stat2.label}} :

    -
    - Cur -  Max - {{/if}} -{{/each}} -
  • -
  • -

    {{data.momentum.label}}:

    - Cur -  Max -
  • diff --git a/system.json b/system.json index c6b3992..f881882 100644 --- a/system.json +++ b/system.json @@ -91,15 +91,15 @@ "styles": [ "styles/simple.css" ], - "version": "10.0.37", + "version": "10.0.40", "compatibility": { "minimum": "10", "verified": "10", - "maximum": "10" + "maximum": "11" }, "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.37.zip", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-hero-system-6/archive/fvtt-hero-system-6-v10.0.40.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 1960d3f..093b99c 100644 --- a/template.json +++ b/template.json @@ -43,9 +43,10 @@ "value": 10, "base": 10, "category": "main", - "strdice": "", + "strdice": "1d6", "lift": "", "strend": 0, + "strendmode": "str10", "hasroll": true, "realcost": 0, "activecost": 0 @@ -331,7 +332,7 @@ "senseaffecting": false, "modifiers": [], "levels": 0, - "quantity": 0, + "quantity": 1, "range": "", "damage": "", "endurance": 0, diff --git a/templates/actors/actor-sheet.hbs b/templates/actors/actor-sheet.hbs index b1c4cf9..4b63247 100644 --- a/templates/actors/actor-sheet.hbs +++ b/templates/actors/actor-sheet.hbs @@ -125,11 +125,22 @@ {{characteristics.str.strdice}} + + +
  • - + +
  • @@ -220,10 +231,10 @@ - + - +
  • {{#each characteristics as |char key|}} @@ -286,7 +297,9 @@
  • - Perception Roll + + Perception Roll +
  • @@ -514,11 +527,11 @@ - - + + - - + + @@ -535,8 +548,8 @@ {{power.system.cost}} - {{power.name}} - {{power.system.displayname}} + {{power.name}} + {{power.system.displayname}} {{power.system.damage}} {{#if power.system.hasroll}} {{power.system.roll}}- @@ -651,31 +664,31 @@ {{!-- Notes Tab --}}

    Notes 1 :

    -
    +
    {{editor notes1 target="system.biodata.notes1" button=true owner=owner editable=editable}}

    Notes 2 :

    -
    +
    {{editor notes2 target="system.biodata.notes2" button=true owner=owner editable=editable}}

    Notes 3 :

    -
    +
    {{editor notes3 target="system.biodata.notes3" button=true owner=owner editable=editable}}

    Notes 4 :

    -
    +
    {{editor notes4 target="system.biodata.notes4" button=true owner=owner editable=editable}}

    Notes 5 :

    -
    +
    {{editor notes5 target="system.biodata.notes5" button=true owner=owner editable=editable}}
    diff --git a/templates/apps/roll-dialog-generic.hbs b/templates/apps/roll-dialog-generic.hbs index 0241213..27bd617 100644 --- a/templates/apps/roll-dialog-generic.hbs +++ b/templates/apps/roll-dialog-generic.hbs @@ -9,10 +9,10 @@
    {{#if charac}} -
    - Characteristic : - {{charac.roll}}- -
    +
    + {{#if isPerception}}Perception{{else}}Characteristic{{/if}} : + {{charac.roll}}- +
    {{/if}} {{#if item}} diff --git a/templates/chat/chat-hr-roll.hbs b/templates/chat/chat-hr-roll.hbs new file mode 100644 index 0000000..de0fa98 --- /dev/null +++ b/templates/chat/chat-hr-roll.hbs @@ -0,0 +1,3 @@ +
    + BODY : {{bodyValue}} +
    \ No newline at end of file diff --git a/templates/chat/chat-lift-dice-result.hbs b/templates/chat/chat-lift-dice-result.hbs index ed72a8e..1ad6e02 100644 --- a/templates/chat/chat-lift-dice-result.hbs +++ b/templates/chat/chat-lift-dice-result.hbs @@ -19,6 +19,7 @@
    • Lift dice formula : {{diceFormula}}
    • +
    • BODY : {{bodyValue}}
    • Result : {{result}}
    • diff --git a/templates/items/item-equipment-sheet.hbs b/templates/items/item-equipment-sheet.hbs index 4d087fd..24fbe31 100644 --- a/templates/items/item-equipment-sheet.hbs +++ b/templates/items/item-equipment-sheet.hbs @@ -1,9 +1,9 @@
      - -
      -

      -
      + +
      +

      +
      {{> systems/fvtt-hero-system-6/templates/partials/partial-item-nav.hbs}} @@ -16,33 +16,54 @@
        - {{> systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs}} - -
      • - -
      • -
      • - + +
      • + +
      • + +
      • + +
      • + + +   + +
      • - + +   + +
      • -
      • - + + {{> systems/fvtt-hero-system-6/templates/partials/partial-power-equipment-cost.hbs quantityDone=1}} + +
      • +
      • + {{> systems/fvtt-hero-system-6/templates/partials/partial-item-hasroll.hbs}} + + + {{> systems/fvtt-hero-system-6/templates/partials/partial-item-cost.hbs}}
      -
      + \ No newline at end of file diff --git a/templates/partials/partial-actor-equipment-section.hbs b/templates/partials/partial-actor-equipment-section.hbs index 1f69d20..d8f9aef 100644 --- a/templates/partials/partial-actor-equipment-section.hbs +++ b/templates/partials/partial-actor-equipment-section.hbs @@ -3,10 +3,10 @@ - - + + - + @@ -15,9 +15,16 @@ - - + + + + + + + + +
       
      diff --git a/templates/partials/partial-actor-equipment.hbs b/templates/partials/partial-actor-equipment.hbs index 5ed435e..3d028bf 100644 --- a/templates/partials/partial-actor-equipment.hbs +++ b/templates/partials/partial-actor-equipment.hbs @@ -1,8 +1,8 @@
    • - {{equip.name}} + {{equip.name}} -
    • + {{#if quantityDone}} + {{else}}
    • + {{/if}}