Where/how are Active Effects calculated
I have an AE that may boost a characteristic by a fraction. I want the boost to be the floor of the sum of all the AE's. Where are these calculated so I can override the calculation? I was thinking about using a fake/virtual prop: system.characteristics.str.boost instead of system.characteristics.value as the key.
1 Reply
The AEs are applied to the
Actor
during Actor#applyActiveEffects()
: https://foundryvtt.com/api/classes/client.Actor.html#applyActiveEffects.
It might also be useful to look into Actor#allApplicableEffects()
: https://foundryvtt.com/api/classes/client.Actor.html#allApplicableEffects. Useful if you want to, for example, sort the effects into categories for display purposes.