From d73760fc39858154cf4bcc05397c85b56e8851c8 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 23 Apr 2026 17:14:46 +0200 Subject: [PATCH 1/3] Raised version --- system.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system.json b/system.json index babdde26..6751f957 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "2.1.2", + "version": "2.2.0", "compatibility": { "minimum": "14.359", "verified": "14.360", @@ -10,7 +10,7 @@ }, "url": "https://github.com/Foundryborne/daggerheart", "manifest": "https://raw.githubusercontent.com/Foundryborne/daggerheart/v14/system.json", - "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.1.2/system.zip", + "download": "https://github.com/Foundryborne/daggerheart/releases/download/2.2.0/system.zip", "authors": [ { "name": "WBHarry" From 41829bc9d5611f4832fb22109f16f6c2e7a69920 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 23 Apr 2026 22:51:54 +0200 Subject: [PATCH 2/3] Fixed so that Homebrew Item Features without effects don't error out because effects are expected --- .../applications/sheets-configs/setting-feature-config.mjs | 5 +++-- module/config/itemConfig.mjs | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/module/applications/sheets-configs/setting-feature-config.mjs b/module/applications/sheets-configs/setting-feature-config.mjs index f90bb52f..a5bcc4f9 100644 --- a/module/applications/sheets-configs/setting-feature-config.mjs +++ b/module/applications/sheets-configs/setting-feature-config.mjs @@ -188,8 +188,9 @@ export default class SettingFeatureConfig extends HandlebarsApplicationMixin(App if (type === 'effect') { const move = foundry.utils.getProperty(this.settings, this.movePath); for (const action of move.actions) { - const remainingEffects = action.effects.filter(x => x._id !== id); - if (action.effects.length !== remainingEffects.length) { + const actionEffects = action.effects ?? []; + const remainingEffects = actionEffects.filter(x => x._id !== id); + if (actionEffects.length !== remainingEffects.length) { await action.update({ effects: remainingEffects.map(x => { const { _id, ...rest } = x; diff --git a/module/config/itemConfig.mjs b/module/config/itemConfig.mjs index a3e785c3..84bbbbdc 100644 --- a/module/config/itemConfig.mjs +++ b/module/config/itemConfig.mjs @@ -453,7 +453,7 @@ export const allArmorFeatures = () => { const feature = homebrewFeatures[key]; const actions = feature.actions.map(action => ({ ...action, - effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)), + effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id))??[], type: action.type })); const actionEffects = actions.flatMap(a => a.effects); @@ -1407,7 +1407,7 @@ export const allWeaponFeatures = () => { const actions = feature.actions.map(action => ({ ...action, - effects: action.effects.map(effect => feature.effects.find(x => x.id === effect._id)), + effects: action.effects?.map(effect => feature.effects.find(x => x.id === effect._id)) ?? [], type: action.type })); const actionEffects = actions.flatMap(a => a.effects); From f45b1210c72a36451d59b2d9d916e913bfdb33b1 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 23 Apr 2026 23:01:12 +0200 Subject: [PATCH 3/3] Adding so that newly creatd parties default to having the ownership default be owner --- module/documents/actor.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index db249033..a1b1f347 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -99,7 +99,7 @@ export default class DhpActor extends Actor { } // Configure prototype token settings - if (['character', 'companion', 'party'].includes(this.type)) + if (['character', 'companion', 'party'].includes(this.type)) { Object.assign(update, { prototypeToken: { sight: { enabled: true }, @@ -107,6 +107,14 @@ export default class DhpActor extends Actor { disposition: CONST.TOKEN_DISPOSITIONS.FRIENDLY } }); + } + + if (this.type === 'party') { + Object.assign(update, { + 'ownership.default': CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER, + }); + } + this.updateSource(update); }