So I've got this mod, SDR. And up until the current version I've been working on, disabling SDR, saving the game without it loaded, and then enabling the new version worked perfectly well since it would wipe out the tokens and then assign new ones that force a reset on all the traits and characteristics. It's also a technique that I've been recommending in the case of a few particular .ini setting changes.
However, I've run into a snag. The new version will have spells that are available. If the player has one of those spells, a clean save will wipe those spells out.
So I'm looking for some alternative ideas that will somehow "reset" the token assigned to each NPC without ending up in a constant loop of removing and adding tokens. If I can bypass the clean save requirement, it means folks can keep their spells, and it will make updating much easier. (Assuming I don't make any drastic changes)
I have a couple of thoughts.
1. For updates, I could capture the current version number and save it as a custom actor value for each actor. When the assign tokens script checks actors, it can look to see with which version of SDR the actor was given a token. If it is different than the current version, it would remove the old token (if any), replace it with a new one, and update the actor value accordingly. This could even work for reverting back to previous versions within the same series if I accidentally release a buggy version down the line.
2. For the .ini setting change which specifically deals with how tokens are assigned and the order/rate in which they are processed, I could do something similar where when the token is assigned, it also saves the assigned rate with the token (or maybe another custom actor value?). If the rate is changed in the .ini, the token will removed and replaced with a new token.
3. In theory, I could use a formula that combines the SDR version and token distribution rate into a unique ID and just store that. So any variation will kick in a remove/replace.
Any thoughts?