How do I add active effects support?
I'm a bit lost here ... I want to add effects to items like "increase speed by 1 while having this item in the inventory" and from what I found online, active effects seem to be the answer here - however, it also says that the game system I'm using has to support them.
But how do I add that support? So far I've been following the guide from the wikie https://foundryvtt.wiki/en/development/guides/SD-tutorial, but I can't find anything helpful in there on this. Can anyone give me some pointers?
3 Replies
The base Actor class already applies active effects to the actor. It has an
applyActiveEffects
function that's called during the prepareData
phase.
So it's already doing the heavy lifting for you. I suspect most of the work to add active effects to a system is on the Actor and Item sheets so you can create/edit/delete themI created a module which would add friendly UI to a game system which didn't otherwise have any way for normal users to access active effects.
https://github.com/farling42/fvtt-cyphersystem-activeeffects
GitHub
GitHub - farling42/fvtt-cyphersystem-activeeffects: Support for Act...
Support for Active Effects in the Foundry VTT Cyphersystem - GitHub - farling42/fvtt-cyphersystem-activeeffects: Support for Active Effects in the Foundry VTT Cyphersystem
Active Effects don't really need any special support, besides your system working with the modifications they make.
Otherwise it's just providing interface for making the AEs and editing them, and editing them can be done simply by opening the default AE config sheet via
ae.sheet.render(true)