From 28976bb4b8c5fdb505c7247df38c0ca0b271e0ce Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Sun, 7 Dec 2025 04:39:40 -0800 Subject: [PATCH 1/8] [Fix] Updating item quantity in party inventory (#1378) * Fix updating item quantity in party inventory * Remove unnecessary second render --- module/applications/sheets/actors/character.mjs | 12 ------------ module/applications/sheets/api/base-actor.mjs | 13 +++++++++++++ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/module/applications/sheets/actors/character.mjs b/module/applications/sheets/actors/character.mjs index b59fc7a4..016cff13 100644 --- a/module/applications/sheets/actors/character.mjs +++ b/module/applications/sheets/actors/character.mjs @@ -139,10 +139,6 @@ export default class CharacterSheet extends DHBaseActorSheet { element.addEventListener('change', this.updateItemResource.bind(this)); element.addEventListener('click', e => e.stopPropagation()); }); - htmlElement.querySelectorAll('.inventory-item-quantity').forEach(element => { - element.addEventListener('change', this.updateItemQuantity.bind(this)); - element.addEventListener('click', e => e.stopPropagation()); - }); // Add listener for armor marks input htmlElement.querySelectorAll('.armor-marks-input').forEach(element => { @@ -593,14 +589,6 @@ export default class CharacterSheet extends DHBaseActorSheet { this.render(); } - async updateItemQuantity(event) { - const item = await getDocFromElement(event.currentTarget); - if (!item) return; - - await item.update({ 'system.quantity': event.currentTarget.value }); - this.render(); - } - async updateArmorMarks(event) { const armor = this.document.system.armor; if (!armor) return; diff --git a/module/applications/sheets/api/base-actor.mjs b/module/applications/sheets/api/base-actor.mjs index 02dcc448..c5b7e131 100644 --- a/module/applications/sheets/api/base-actor.mjs +++ b/module/applications/sheets/api/base-actor.mjs @@ -134,6 +134,10 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) { _attachPartListeners(partId, htmlElement, options) { super._attachPartListeners(partId, htmlElement, options); + htmlElement.querySelectorAll('.inventory-item-quantity').forEach(element => { + element.addEventListener('change', this.updateItemQuantity.bind(this)); + element.addEventListener('click', e => e.stopPropagation()); + }); htmlElement.querySelectorAll('.item-button .action-uses-button').forEach(element => { element.addEventListener('contextmenu', DHBaseActorSheet.#modifyActionUses); }); @@ -172,6 +176,15 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) { return this._getContextMenuCommonOptions.call(this, { usable: true, toChat: true }); } + /* -------------------------------------------- */ + /* Application Listener Actions */ + /* -------------------------------------------- */ + + async updateItemQuantity(event) { + const item = await getDocFromElement(event.currentTarget); + await item?.update({ 'system.quantity': event.currentTarget.value }); + } + /* -------------------------------------------- */ /* Application Clicks Actions */ /* -------------------------------------------- */ From d6b1c7a36c3d274851914952332e15bf3790a14d Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 8 Dec 2025 01:22:28 +0100 Subject: [PATCH 2/8] Fixed some missing translations (#1386) --- lang/en.json | 13 ++++++++++--- templates/characterCreation/tabs/traits.hbs | 2 +- templates/dialogs/damageReduction.hbs | 4 ++-- templates/dialogs/dice-roll/header.hbs | 2 +- templates/dialogs/group-roll/group-roll.hbs | 2 +- templates/dialogs/rerollDialog/footer.hbs | 2 +- templates/levelup/tabs/footer.hbs | 2 +- templates/settings/downtime-config/main.hbs | 4 ++-- templates/sidebar/daggerheart-menu/main.hbs | 2 +- templates/ui/chat/parts/damage-part.hbs | 2 +- templates/ui/tooltip/beastform.hbs | 8 ++++---- 11 files changed, 25 insertions(+), 18 deletions(-) diff --git a/lang/en.json b/lang/en.json index 6a0d72d1..d2386744 100755 --- a/lang/en.json +++ b/lang/en.json @@ -386,7 +386,8 @@ "hideNewCountdowns": "Hide New Countdowns" }, "DaggerheartMenu": { - "title": "GM Tools" + "title": "GM Tools", + "refreshFeatures": "Refresh Features" }, "DeleteConfirmation": { "title": "Delete {type} - {name}", @@ -504,6 +505,7 @@ }, "navigateLevel": "To Level {level}", "navigateToLevelup": "Return To Levelup", + "finishLevelup": "Finish Levelup", "navigateToSummary": "To Summary", "options": { "trait": "Gain a +1 bonus to two unmarked character traits and mark them.", @@ -2105,6 +2107,7 @@ }, "hope": "Hope", "hordeHp": "Horde HP", + "icon": "Icon", "identify": "Identity", "imagePath": "Image Path", "inactiveEffects": "Inactive Effects", @@ -2141,6 +2144,7 @@ "recovery": "Recovery", "refresh": "Refresh", "reroll": "Reroll", + "rerolled": "Rerolled", "rerollThing": "Reroll {thing}", "resource": "Resource", "roll": "Roll", @@ -2240,7 +2244,9 @@ "evolvedDrag": "Drag a form here to evolve it.", "hybridize": "Hybridize", "hybridizeFeatureTitle": "Hybrid Features", - "hybridizeDrag": "Drag a form here to hybridize it." + "hybridizeDrag": "Drag a form here to hybridize it.", + "mainTrait": "Main Trait", + "traitBonus": "Trait Bonus" }, "Class": { "hopeFeatures": "Hope Features", @@ -2583,7 +2589,8 @@ "selectMember": "Select a Member", "rerollTitle": "Reroll Group Roll", "rerollContent": "Are you sure you want to reroll your {trait} check?", - "rerollTooltip": "Reroll" + "rerollTooltip": "Reroll", + "wholePartySelected": "The whole party is selected" }, "healingRoll": { "title": "Heal - {damage}", diff --git a/templates/characterCreation/tabs/traits.hbs b/templates/characterCreation/tabs/traits.hbs index bf32dd16..7bbf4b52 100644 --- a/templates/characterCreation/tabs/traits.hbs +++ b/templates/characterCreation/tabs/traits.hbs @@ -14,7 +14,7 @@
{{this}}
{{/each}} - +
{{#each traits.values}} diff --git a/templates/dialogs/damageReduction.hbs b/templates/dialogs/damageReduction.hbs index df7d8332..57d7ee61 100644 --- a/templates/dialogs/damageReduction.hbs +++ b/templates/dialogs/damageReduction.hbs @@ -93,13 +93,13 @@
\ No newline at end of file diff --git a/templates/dialogs/dice-roll/header.hbs b/templates/dialogs/dice-roll/header.hbs index b455462c..b2ca18cd 100644 --- a/templates/dialogs/dice-roll/header.hbs +++ b/templates/dialogs/dice-roll/header.hbs @@ -16,7 +16,7 @@ {{#if (and @root.hasRoll @root.activeTagTeamRoll)}}
- {{localize "Tag Team Roll"}} + {{localize "DAGGERHEART.APPLICATIONS.TagTeamSelect.title"}}
{{/if}} \ No newline at end of file diff --git a/templates/dialogs/group-roll/group-roll.hbs b/templates/dialogs/group-roll/group-roll.hbs index ab655c1f..9b23c0a5 100644 --- a/templates/dialogs/group-roll/group-roll.hbs +++ b/templates/dialogs/group-roll/group-roll.hbs @@ -40,7 +40,7 @@
{{localize "DAGGERHEART.UI.Chat.groupRoll.partyTeam"}} - + {{#if (gt this.members.length 0)}} diff --git a/templates/dialogs/rerollDialog/footer.hbs b/templates/dialogs/rerollDialog/footer.hbs index 4aff2823..5d4ae2b2 100644 --- a/templates/dialogs/rerollDialog/footer.hbs +++ b/templates/dialogs/rerollDialog/footer.hbs @@ -1,4 +1,4 @@
- +
\ No newline at end of file diff --git a/templates/levelup/tabs/footer.hbs b/templates/levelup/tabs/footer.hbs index 1e87a573..2ee7a316 100644 --- a/templates/levelup/tabs/footer.hbs +++ b/templates/levelup/tabs/footer.hbs @@ -3,7 +3,7 @@
{{#if this.navigate.previous.fromSummary}} - + {{else}} {{#if (not this.navigate.previous.disabled)}} diff --git a/templates/settings/downtime-config/main.hbs b/templates/settings/downtime-config/main.hbs index 7f681368..5b9c8031 100644 --- a/templates/settings/downtime-config/main.hbs +++ b/templates/settings/downtime-config/main.hbs @@ -5,14 +5,14 @@ > {{#if hasIcon}}
- {{localize "Icon"}} + {{localize "DAGGERHEART.GENERAL.icon"}}
{{/if}}
- {{localize "Description"}} + {{localize "DAGGERHEART.GENERAL.description"}} {{{ move.enrichedDescription }}} diff --git a/templates/sidebar/daggerheart-menu/main.hbs b/templates/sidebar/daggerheart-menu/main.hbs index a5a86284..4d948409 100644 --- a/templates/sidebar/daggerheart-menu/main.hbs +++ b/templates/sidebar/daggerheart-menu/main.hbs @@ -2,7 +2,7 @@

{{localize "DAGGERHEART.APPLICATIONS.DaggerheartMenu.title"}}

- {{localize "Refresh Features"}} + {{localize "DAGGERHEART.APPLICATIONS.DaggerheartMenu.refreshFeatures"}} diff --git a/templates/ui/tooltip/beastform.hbs b/templates/ui/tooltip/beastform.hbs index 96a77b9c..0b90c8f7 100644 --- a/templates/ui/tooltip/beastform.hbs +++ b/templates/ui/tooltip/beastform.hbs @@ -9,19 +9,19 @@
{{#with item.system.beastformAttackData}}
- +
{{this.trait}}
- +
{{this.traitBonus}}
- +
{{this.evasionBonus}}
- +
{{concat this.damageDice ' ' this.damageBonus}}
{{/with}} From f680ade1daddc092e70dc03bf3a4e071f201c9ab Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 8 Dec 2025 01:53:58 +0100 Subject: [PATCH 3/8] Corrected downtime prep from error state (#1390) --- module/applications/dialogs/downtime.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/applications/dialogs/downtime.mjs b/module/applications/dialogs/downtime.mjs index f7bab430..96e06446 100644 --- a/module/applications/dialogs/downtime.mjs +++ b/module/applications/dialogs/downtime.mjs @@ -118,7 +118,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV if ( x.system.resource && x.system.resource.type && - refreshIsAllowed([this.shortrest ? 'shortRest' : 'longRest'], action.uses.recovery) + refreshIsAllowed([this.shortrest ? 'shortRest' : 'longRest'], x.system.resource.recovery) ) { acc.push({ title: game.i18n.localize(`TYPES.Item.${x.type}`), From ccdd41393390f191da8271e292e5b48161c629b5 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Sun, 7 Dec 2025 17:29:07 -0800 Subject: [PATCH 4/8] [Fix] Allow disabling coins (#1381) * Add ability to disable coins * Omit currency section if all are disabled --- module/applications/sheets/api/base-actor.mjs | 1 + .../settings/homebrew-settings/settings.hbs | 2 +- .../sheets/actors/character/inventory.hbs | 22 +++++----- templates/sheets/actors/party/inventory.hbs | 41 +++++-------------- 4 files changed, 25 insertions(+), 41 deletions(-) diff --git a/module/applications/sheets/api/base-actor.mjs b/module/applications/sheets/api/base-actor.mjs index c5b7e131..adb0d39a 100644 --- a/module/applications/sheets/api/base-actor.mjs +++ b/module/applications/sheets/api/base-actor.mjs @@ -89,6 +89,7 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) { value: context.source.system.gold[key] }; } + context.inventory.hasCurrency = Object.values(context.inventory.currencies).some((c) => c.enabled); } return context; diff --git a/templates/settings/homebrew-settings/settings.hbs b/templates/settings/homebrew-settings/settings.hbs index d59a9cd5..35e2a786 100644 --- a/templates/settings/homebrew-settings/settings.hbs +++ b/templates/settings/homebrew-settings/settings.hbs @@ -34,7 +34,7 @@
{{formGroup settingFields.schema.fields.currency.fields.coins.fields.label value=settingFields._source.currency.coins.label localize=true}} - +
{{formGroup settingFields.schema.fields.currency.fields.handfuls.fields.label value=settingFields._source.currency.handfuls.label localize=true}} diff --git a/templates/sheets/actors/character/inventory.hbs b/templates/sheets/actors/character/inventory.hbs index 52de7f3c..e96d597c 100644 --- a/templates/sheets/actors/character/inventory.hbs +++ b/templates/sheets/actors/character/inventory.hbs @@ -12,16 +12,18 @@
-
- {{#each this.inventory.currencies as | currency |}} - {{#if currency.enabled}} -
- {{localize currency.label}} - {{formInput currency.field value=currency.value enriched=currency.value toggled=true}} -
- {{/if}} - {{/each}} -
+ {{#if this.inventory.hasCurrency}} +
+ {{#each this.inventory.currencies as | currency |}} + {{#if currency.enabled}} +
+ {{localize currency.label}} + {{formInput currency.field value=currency.value enriched=currency.value toggled=true}} +
+ {{/if}} + {{/each}} +
+ {{/if}}
{{> 'daggerheart.inventory-items' diff --git a/templates/sheets/actors/party/inventory.hbs b/templates/sheets/actors/party/inventory.hbs index 1596d47e..a3397145 100644 --- a/templates/sheets/actors/party/inventory.hbs +++ b/templates/sheets/actors/party/inventory.hbs @@ -15,37 +15,18 @@
-
- {{#each this.inventory.currencies as | currency |}} - {{#if currency.enabled}} -
- {{localize currency.label}} - {{formInput currency.field value=currency.value enriched=currency.value toggled=true}} -
- {{/if}} - {{/each}} - {{!--
- {{localize this.inventory.currency.coins}} - {{formInput systemFields.gold.fields.coins value=source.system.gold.coins enriched=source.system.gold.coins - localize=true toggled=true}} + {{#if inventory.hasCurrency}} +
+ {{#each this.inventory.currencies as | currency |}} + {{#if currency.enabled}} +
+ {{localize currency.label}} + {{formInput currency.field value=currency.value enriched=currency.value toggled=true}} +
+ {{/if}} + {{/each}}
-
- {{localize this.inventory.currency.handfuls}} - {{formInput systemFields.gold.fields.handfuls value=source.system.gold.handfuls - enriched=source.system.gold.handfuls localize=true toggled=true}} -
-
- {{localize this.inventory.currency.bags}} - {{formInput systemFields.gold.fields.bags value=source.system.gold.bags enriched=source.system.gold.bags - localize=true toggled=true}} -
-
- {{localize this.inventory.currency.chests}} - {{formInput systemFields.gold.fields.chests value=source.system.gold.chests - enriched=source.system.gold.chests localize=true toggled=true}} -
--}} - -
+ {{/if}}
{{> 'daggerheart.inventory-items' From b307d65d181955e3ecac5006e3dfd8f1f4143020 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Sun, 7 Dec 2025 17:32:05 -0800 Subject: [PATCH 5/8] Fix dropping features onto item sheets (#1394) --- module/applications/sheets/api/application-mixin.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/applications/sheets/api/application-mixin.mjs b/module/applications/sheets/api/application-mixin.mjs index 6f0bf3f4..449d6723 100644 --- a/module/applications/sheets/api/application-mixin.mjs +++ b/module/applications/sheets/api/application-mixin.mjs @@ -325,7 +325,8 @@ export default function DHApplicationMixin(Base) { if (data.type === 'ActiveEffect' && data.fromInternal !== this.document.uuid) { this.document.createEmbeddedDocuments('ActiveEffect', [data.data]); } else { - return super._onDrop(event); + // Fallback to super, but note that item sheets do not have this function + return super._onDrop?.(event); } } From 91d916a28dccf0200367c3ac933af3b87e980b96 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 8 Dec 2025 02:32:25 +0100 Subject: [PATCH 6/8] Fixed so that the critdamage should be correct (#1393) --- module/helpers/utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index a8fae2b5..39d5298d 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -471,5 +471,5 @@ export function refreshIsAllowed(allowedTypes, typeToCheck) { export async function getCritDamageBonus(formula) { const critRoll = new Roll(formula); - return critRoll.dice.reduce((acc, dice) => acc + dice.faces, 0); + return critRoll.dice.reduce((acc, dice) => acc + dice.faces * dice.number, 0); } From 5356f10b2a4c6f1798209fea4f3bac420e46c47f Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Mon, 8 Dec 2025 02:32:36 +0100 Subject: [PATCH 7/8] [Fix] 1389 - Errata Update (#1391) * Updated BookOfGrynn and SplinteringStrike for errata * Corrected Improved Small Dagger --- .../domains/domainCard_Book_of_Grynn_R0LNheiZycZlZzV3.json | 4 ++-- .../domainCard_Splintering_Strike_TYKfM3H9vBXyWiH4.json | 4 ++-- .../weapon_Improved_Small_Dagger_nMuF8ZDZ2aXZVTg6.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/packs/domains/domainCard_Book_of_Grynn_R0LNheiZycZlZzV3.json b/src/packs/domains/domainCard_Book_of_Grynn_R0LNheiZycZlZzV3.json index c388c9ce..05276707 100644 --- a/src/packs/domains/domainCard_Book_of_Grynn_R0LNheiZycZlZzV3.json +++ b/src/packs/domains/domainCard_Book_of_Grynn_R0LNheiZycZlZzV3.json @@ -4,7 +4,7 @@ "type": "domainCard", "folder": "rUGDM9JvGfhh9a2Y", "system": { - "description": "

Arcane Deflection: Once per long rest, spend a Hope to negate the damage of an attack targeting you or an ally within Very Close range.

Time Lock: Target an object within Far range. That object stops in time and space exactly where it is until your next rest. If a creature tries to move it, make a Spellcast Roll against them to maintain this spell.

Wall of Flame: Make a Spellcast Roll (15). On a success, create a wall of magical flame between two points within Far range. All creatures in its path must choose a side to be on, and anything that subsequently passes through the wall takes 4d10+3 magic damage.

", + "description": "

Arcane Deflection: Once per long rest, spend a Hope to negate the damage of an attack targeting you or an ally within Very Close range.

Time Lock: Target an object within Far range. That object stops in time and space exactly where it is until your next rest. If a creature tries to move it, make a Spellcast Roll against them to maintain this spell.

Wall of Flame: Make a Spellcast Roll (15). On a success, create a temporary wall of magical flame between two points within Far range. All creatures in its path must choose a side to be on, and anything that subsequently passes through the wall takes 4d10+3 magic damage.

", "domain": "codex", "recallCost": 2, "level": 4, @@ -66,7 +66,7 @@ "type": "attack", "_id": "K26kfjmTEH9zPMMO", "systemPath": "actions", - "description": "

Make a Spellcast Roll (15). On a success, create a wall of magical flame between two points within Far range. All creatures in its path must choose a side to be on, and anything that subsequently passes through the wall takes 4d10+3 magic damage.

@Template[type:ray|range:f]

", + "description": "

Make a Spellcast Roll (15). On a success, create a temporary wall of magical flame between two points within Far range. All creatures in its path must choose a side to be on, and anything that subsequently passes through the wall takes 4d10+3 magic damage.

@Template[type:ray|range:f]

", "chatDisplay": true, "actionType": "action", "cost": [], diff --git a/src/packs/domains/domainCard_Splintering_Strike_TYKfM3H9vBXyWiH4.json b/src/packs/domains/domainCard_Splintering_Strike_TYKfM3H9vBXyWiH4.json index 9fa8f92d..e36c744c 100644 --- a/src/packs/domains/domainCard_Splintering_Strike_TYKfM3H9vBXyWiH4.json +++ b/src/packs/domains/domainCard_Splintering_Strike_TYKfM3H9vBXyWiH4.json @@ -4,7 +4,7 @@ "type": "domainCard", "folder": "eg2vM8j9xhya9Rwa", "system": { - "description": "

Spend a Hope and make an attack against all adversaries within your weapon’s range. Once per long rest, on a success against any targets, add up the damage dealt, then redistribute that damage however you wish between the targets you succeeded against. When you deal damage to a target, roll an additional damage die and add its result to the damage you deal to that target.

", + "description": "

Spend a Hope and make an attack against all adversaries within your weapon’s range. Once per long rest, on a success against any targets, roll your weapon’s damage and distribute that damage however you wish between the targets you succeeded against. Before you deal damage to each target, roll an additional damage die and add its result to the damage you deal to them.

", "domain": "bone", "recallCost": 3, "level": 9, @@ -14,7 +14,7 @@ "type": "attack", "_id": "yjEcSlzsWGX79gpB", "systemPath": "actions", - "description": "

Spend a Hope and make an attack against all adversaries within your weapon’s range. Once per long rest, on a success against any targets, add up the damage dealt, then redistribute that damage however you wish between the targets you succeeded against. When you deal damage to a target, roll an additional damage die and add its result to the damage you deal to that target.

", + "description": "", "chatDisplay": true, "actionType": "action", "cost": [ diff --git a/src/packs/items/weapons/weapon_Improved_Small_Dagger_nMuF8ZDZ2aXZVTg6.json b/src/packs/items/weapons/weapon_Improved_Small_Dagger_nMuF8ZDZ2aXZVTg6.json index 6a149ec7..b69332a5 100644 --- a/src/packs/items/weapons/weapon_Improved_Small_Dagger_nMuF8ZDZ2aXZVTg6.json +++ b/src/packs/items/weapons/weapon_Improved_Small_Dagger_nMuF8ZDZ2aXZVTg6.json @@ -10,7 +10,7 @@ "attached": [], "tier": 2, "equipped": false, - "secondary": false, + "secondary": true, "burden": "oneHanded", "weaponFeatures": [ { From 09141053c93e5d2a8a98d398a494f87db0fe1b3b Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 8 Dec 2025 02:34:55 +0100 Subject: [PATCH 8/8] Raised version --- system.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system.json b/system.json index bca8a0c9..7e3c6b07 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.3.0", + "version": "1.3.1", "compatibility": { "minimum": "13.346", "verified": "13.351",