Thread Tools Display Modes
Prev Previous Post   Next Post Next
07/08/16, 07:56 PM   #17
haggen
 
haggen's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2015
Posts: 137
Originally Posted by sirinsidiator View Post
From the two ways that you have brought up, I would prefer the unique identifier.

I don't think just giving us the previous name is enough. What will happen when a user renames the character, loads the game, quits the client via alt+f4 and loads the game again? Or when he disables an addon, renames, loads, renames again and then enables the addon?

Giving us the unique identifier is a good way to make sure that we have the right character, regardless of how often it is renamed, but using it as the key in the save data may be inconvenient for users that want to edit the save data from hand and putting the character name in the table is not really ideal as it could break an addon that doesn't expect the new entry in the table. Maybe you could extend the save data serialization so it can put comments into the file and add the character name there? That way it could be in the same line as the table key and would not interfere with existing addons. I am not sure how the API for that would look though.
Maybe have a method to read and write comments for a key in a table? GetSaveDataComment(table, key), SetSaveDataComment(table, key, comment)?
The case where a player disables an addon before the conversion to the new identifier, then renames and afterwards reactivates the addon would still remove the save data, but I think it could be neglected.

I still believe having the account history would be a better way of solving this problem, but identifiers are also nice. Maybe we could also get them for another player's characters? Some addons save things about other chars and would not be able to follow renames, which would result in a loss of data.
/sign that, but my conclusion is that identifiers is the best option. It might be painful right now but safe in the long term, and since we don't follow strict standards and some of us are casual coders I'd take the safer bet and avoid future complications.
 
 

ESOUI » Developer Discussions » Wish List » [implemented] Name change notifications for addons


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off