kandashi / Active-Token-Lighting

MIT License
23 stars 25 forks source link

Change implementation to save original values instead of using the prototype token #133

Closed kaelad02 closed 1 year ago

kaelad02 commented 1 year ago

The current implementation takes the prototype token and then applies all the active effects on top of that. That means any other changes to the token before applying AEs, whether manually or from another module like TVA, are overwritten. Same goes for changes when you then turn the AEs off, they'll be reverted back to the prototype token.

Older versions of ATL/ATE used to change just the things the active effects touched and saved the original values so they could be reverted with the active effect was removed. There were some problems with that implementation which was the reason for the switch to use the prototype token. I've tried to avoid those same pitfalls in two ways:

  1. The original values are saved to the Token instead of the Actor. This mainly caused issues for linked tokens. Although the active effects are the same, the tokens could be manually changed on different scenes and cause some issues.
  2. The original values were never removed. This caused issues when resetting the token back to its original settings from when they were first captured as opposed to what the current token's original settings were. This implementation removes the original settings when they're restored. It's not the full mutation stack like Warp Gate tracks but it should work for ATE's case