View Single Post
07/19/16, 01:02 PM   #18
Justinon
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 8
Originally Posted by ZOS_ChipHilseberg View Post
So here's what we were able to do for this issue:

We added a function to get a unique identifier for the current character. It's a 64 bit number represented as a string. We have also added a new ZO_SavedVars constructor named NewCharacterIdSettings which will store the settings under the current character id instead of the name. It will also look to see if there is a setting table under the character name and automatically copy that to the character id key, then delete the character name copy. For most addons it should be sufficient to replace ZO_SavedVars:New with ZO_SavedVars:NewCharacterIdSettings to handle name changes. This has been done to all stock UI saved vars. Finally, we added an automatically generated key at the namespace level called "$LastCharacterName" which will hold the last name the character with that id had so the saved var files are a bit easier to read and modify manually. Let me know if there are any questions or concerns.
I think this is the best and safest way to go about resolving the issue. By doing it this way, it'll be easy to correct and then we won't have to worry about it anymore. Plus, I think it's more efficient this way.