Created Third Party Development Details (markdown)

WBHarry 2026-05-10 12:42:22 +02:00
parent 9e43fbeaf9
commit c9777fadb8

@ -0,0 +1,75 @@
As with any Foundry system, you make a module and define a few `compendiums` to store your items, journals or other entities in to distribute them to others. There are however some extra considerations if you are adding specific homebrew, and some help on those are found below:
## Custom Domains
If you are adding custom domains for your classes and domain cards, then those domains need to always be present when the module is active.
Simply add your new domains as keys on the config path `CONFIG.DH.DOMAIN.domains` in the Foundry init hook for your module:
```js
Hooks.once('init', () => {
CONFIG.DH.DOMAIN.domains.test = {
id: 'test',
label: 'Test', // Alternatively a translation string if the module uses lang files
description: 'A test domain', // Alternatively a translation string if the module uses lang files
src: 'modules/test-module/assets/test-domain-image.png',
};
});
```
## Custom Resources
If you want all characters to have access to a new sort of resource similar to `Hope`, then you define that resource as an additional key on the config path `CONFIG.DH.RESOURCE.character.custom`. This makes it available in the extra resource section
<img width="710" height="414" alt="image" src="https://github.com/user-attachments/assets/827e6b37-33ff-4fad-9a59-206cc67aab72" />
```js
Hooks.once('init', () => {
/* If no images are specified, the default empty/full circle is used */
CONFIG.DH.RESOURCE.character.custom.basic = {
id: 'basic',
initial: 0,
max: 4, // If max is 0, then it won't be useable for a character unless an Active Effect raises the maximum, in this case via this key: "system.resources.basic.max"
reverse: false, // Reverse = true means that if the resource is spent via automation, then the value increases towards maximum like how Stress does.
label: 'Basic Test', // Alternatively a translation string if the module uses lang files
maxLabel: 'Max Basic' // Alternatively a translation string if the module uses lang files
};
CONFIG.DH.RESOURCE.character.custom.hunger = {
id: 'hunger',
initial: 0,
max: 4,
reverse: true,
label: 'Hunger',
maxLabel: 'Max Hunger',
images: {
empty: {
value: 'fa-regular fa-burger', // The font-awesome string or image filepath
isIcon: true, // If the value is a font-awesome string or not
noColorFilter: false, // If the standard system icon color should be omitted for the image
},
full: {
value: 'fa-solid fa-burger',
isIcon: true,
noColorFilter: false,
},
}
};
CONFIG.DH.RESOURCE.character.custom.innerFire = {
id: 'innerFire',
initial: 0,
max: 4,
reverse: true,
label: 'Inner Fire',
maxLabel: 'Max Inner Fire',
images: {
empty: {
value: 'icons/magic/fire/barrier-wall-flame-ring-blue.webp',
isIcon: false,
noColorFilter: true,
},
full: {
value: 'icons/magic/fire/barrier-wall-explosion-orange.webp',
isIcon: false,
noColorFilter: true,
},
}
};
});
```