Thread Tools Display Modes
03/31/15, 04:17 PM   #1
hisdad
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 33
Permanently Unique Char Names

Hi,
I'm working on a history addon.
I'm concerned that if the user deletes char "fred" and then creates "fred" that they cannot be distinguished.
Consequently the data for the historic "fred" will be overwritten.

There is a unique name function that merely prepends the server name, which is useless.

Is there some sort of GUID or other permanently unique identifier?
Uniqueness across servers is not required..

Regards,

--Dad
  Reply With Quote
03/31/15, 04:27 PM   #2
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Not that I know of. You could save information about the character along with their name & compare it though. Like save their class & level.

As long as the character is over level 1 (or a different class), when they delete it and create a new toon with the same name the class or level would not match and you would know it was a different toon and then do whatever you need to preserve the old data. Copy it out to an archived table or something before overwriting everything with the new toons information. Or if you cared about level 1 data, you could go a little bit further & check their exact xp amount (and alliance)....check if they have any achievements, probably a bunch of things like that you could check to see if its a newly created toon.

EDIT: Or this might be just what you need:
Lua Code:
  1. GetSecondsPlayed()
Its returning unique values for different toons (and no where near zero when you first log in) so my guess is that this is the total time played for the current character. If you save that with your other data you could compare times played and if the time played is < saved time it must be a new toon.

Last edited by circonian : 03/31/15 at 04:39 PM.
  Reply With Quote
03/31/15, 04:59 PM   #3
hisdad
AddOn Author - Click to view addons
Join Date: Dec 2014
Posts: 33
Originally Posted by circonian View Post
Not that I know of. You could save information about the character along with their name & compare it though. Like save their class & level.

As long as the character is over level 1 (or a different class), when they delete it and create a new toon with the same name the class or level would not match and you would know it was a different toon and then do whatever you need to preserve the old data. Copy it out to an archived table or something before overwriting everything with the new toons information. Or if you cared about level 1 data, you could go a little bit further & check their exact xp amount (and alliance)....check if they have any achievements, probably a bunch of things like that you could check to see if its a newly created toon.

EDIT: Or this might be just what you need:
Lua Code:
  1. GetSecondsPlayed()
Its returning unique values for different toons (and no where near zero when you first log in) so my guess is that this is the total time played for the current character. If you save that with your other data you could compare times played and if the time played is < saved time it must be a new toon.
Yes, indeed that's one of the stats I'm capturing! On reflection I think I'm overdesigning this. The capture will in game but the display will be offline, where I'm not limited to the ESO toolkit.
Thus I could have an "Archive" button which will add a GUID and copy to another file.
Thus if the user deletes and recreates the char in game, before archiving, well just too bad.

--Dad
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Permanently Unique Char Names


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