Updated Module Builder Information (markdown)

WBHarry 2026-07-16 02:07:29 +02:00
parent efed8bcc1d
commit 27da3d8e6c

@ -18,6 +18,63 @@ Hooks.once('init', () => {
```
<img width="837" height="958" alt="image" src="https://github.com/user-attachments/assets/890943e5-ff48-4500-b3c5-a1450cc8765b" />
## 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: