Enables using compendium items as templates, linking them in a similar way to how linked actors work. Players can edit linked items only partially, most fields are disabled.
Currently only compatible with DnD5e system.
In the setup screen, use the manifest URL https://raw.githubusercontent.com/elizeuangelo/fvtt-module-item-linking/master/module.json to install the module.
Compendium items become Templates and items can now be linked to them.
Sponsor: TCR (The Cracked Realms)
This module was comissioned for their Westmeath server as they are trying to create an MMO variant of DnD 5e. You can help them comissioning more MODs: https://ko-fi.com/thecrackedrealms
TODO DOCUMENTATION
const actor = ...; // actor to update
const compendiumsFolderToCheck = ['My Compendium Folder Name'] // array of folder names on the compendiums directory
game.modules.get('item-linking').api.tryToUpdateActorWithLinkedDocumentsFromCompendiumFolder(actor, compendiumsFolderToCheck, {
onlyItems: true,
typesToFilter: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'spell', 'backpack', 'feat'],
compendiumForNoMatch: 'Miscellaneous'
});
const actor = ...; // actor to update
const compendiumsToCheck = ...; // array of compendium collection
game.modules.get('item-linking').api.tryToUpdateActorWithLinkedDocumentsFromCompendiums(actor, compendiumsToCheck, {
onlyItems: true,
typesToFilter: ['weapon', 'equipment', 'consumable', 'tool', 'loot', 'spell', 'backpack', 'feat'],
compendiumForNoMatch: 'Miscellaneous'
});