Registers a custom group of equipment types, to be rendered on the item sheet as their own section of options within the Equipment Type input.
the group to add
Registers a custom description, to be rendered on the item sheet.
the description to add
Hooks.once('tidy5e-sheet.ready', (api) => {
api.config.item.registerDescription({
id: 'my-curse-description',
label: 'Curse Details',
itemTypes: ['weapon', 'equipment', 'tool', 'loot'],
visible: (item) => game.user.isGM && foundry.utils.getProperty(item, 'flags.my-example.is-cursed'),
field: 'flags.my-example.my-curse-description',
editable: (item) => game.user.isGM,
});
});
Registers a custom toggle switch to appear in the item sheet sidebar, where other toggles like "Identified," "Equipped," and "Attuned."
the toggle to add
Hooks.once('tidy5e-sheet.ready', (api) => {
api.config.item.registerToggle?.({
id: 'cursed-toggle',
label: 'Cursed',
icon: 'fa-solid fa-book-skull',
itemTypes: ['weapon', 'equipment', 'tool', 'loot'],
editable: () => game.user.isGM,
field: 'flags.my-example.is-cursed',
visible: (item) => game.user.isGM,
});
});
APIs related to the configuration of items.