Closed farling42 closed 1 year ago
I don't understand the issue. What is this for and what problem does it solve? Can you elaborate?
In order for the active effects to handle the recursion and tags
Active effects aren't supposed to handle tags and recursions. Those are handled by the system.
If an active effect is on an Item which is linked to being only in a single recursion, then that item gets archived when in the other recursion. If that item has an effect tied to it which modifies stats or pools (for whatever reason), then the updates aren't handled gracefully because of the above routines reading the pool values when they have possibly been changed by an effect already on the actor.
I've found an alternative solution which is that at the start of the above two routines, you can set
let pool = actor._source.system.pools;
rather than
let pool = actor.system.pools;
This will read the values from the actor from the _source block which are the values for those pools without any effects having been applied to them.
I see, thanks for clarifying. Done in the current develop branch. After a quick test, this doesn’t affect the functionality without the Active Effects module, so it’s a good solution.
In order for the active effects to handle the recursion and tags, it would be nice if the code didn't set all the pool values when all the "Stat Modifiers" configured for the recursions and tags are left at 0 value (or leave the values unchanged).
tagging-engine-computation.js:
AND in macros.js (here it is still necessary to set the "flags.cyphersystem.recursion", but not the pool values.