From 27da3d8e6cba60c13f2c77a12d2d07c842a804ec Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Thu, 16 Jul 2026 02:07:29 +0200 Subject: [PATCH] Updated Module Builder Information (markdown) --- Module-Builder-Information.md | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/Module-Builder-Information.md b/Module-Builder-Information.md index 014d0bb..c3f0402 100644 --- a/Module-Builder-Information.md +++ b/Module-Builder-Information.md @@ -18,6 +18,63 @@ Hooks.once('init', () => { ``` image +## Weapon & Armor Features +In the `init` hook, you can register custom weapon and armor feautures so they can be easily selected onto weapons and armor. This is done by defining new key/object pairs on `CONFIG.DH.ITEM.weaponFeatures`/`CONFIG.DH.ITEM.armorFeatures`. +The data structure has many options, but two examples would be: +```js +Hooks.once('init', () => { + CONFIG.DH.ITEM.weaponFeatures.kickback = { + label: "Kickback", + description: "Weapons with kickback hurt you too!", + actions: [ + { + type: "damage", + name: "Kickback - Recoil", + description: "Weapons with kickback hurt you too!", + img: "icons/weapons/guns/pistol-fire-orange.webp", + target: { + type: "self" + }, + damage: { + parts: { + hitPoints: { + applyTo: 'hitPoints', + value: { + custom: { + enabled: true, + formula: '1d6+2' + } + } + } + } + } + } + ], + effects: [], + }; + + CONFIG.DH.ITEM.weaponFeatures.hangry = { + label: "Hangry", + description: "Weapons that make you hangry lower your max stress by 1", + actions: [], + effects: [ + { + name: "Hangry", + description: "Weapons that make you hangry lower your max stress by 1", + img: "icons/magic/control/fear-fright-white.webp", + changes: [ + { + key: "system.resources.stress.max", + type: "subtract", + value: "1" + } + ] + } + ], + }; +}) +``` + ## Custom Resources In the `init` hook, you can register custom resources for characters. This is done by defining new key/object pairs on `CONFIG.DH.RESOURCE.character.custom`. The data structure is: