[Feature] Configurable starting gold amounts in Homebrew settings (#1969)

* [Feature] Configurable starting gold amounts in Homebrew settings
This commit is contained in:
Iohan R. Trézze 2026-06-07 10:37:42 -03:00 committed by GitHub
parent 67cd28f991
commit a148aa3bcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 72 additions and 24 deletions

View file

@ -64,7 +64,18 @@ export default class DhCharacter extends DhCreature {
core: new fields.BooleanField({ initial: false })
})
),
gold: new GoldField(),
gold: new GoldField({
initial: () => {
const homebrew = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew);
const { coins, handfuls, bags, chests } = homebrew.currency;
return {
coins: coins.enabled ? coins.initialAmount : 0,
handfuls: handfuls.enabled ? handfuls.initialAmount : 0,
bags: bags.enabled ? bags.initialAmount : 0,
chests: chests.enabled ? chests.initialAmount : 0
};
}
}),
scars: new fields.NumberField({ initial: 0, integer: true, label: 'DAGGERHEART.GENERAL.scars' }),
biography: new fields.SchemaField({
background: new fields.HTMLField(),