Download
(2 Kb)
Download
Updated: 08/05/14 09:47 AM
Pictures
File Info
Compatibility:
Update 3 (1.3.3)
Updated:08/05/14 09:47 AM
Created:07/02/14 08:14 AM
Monthly downloads:29
Total downloads:4,921
Favorites:5
MD5:
Categories:Discontinued & Outdated, Data Mods, UI Media, Miscellaneous, Utility Mods
Display Name Fix
Version: 0.03
by: zgrssd [More]
With Update 1.2.3 Zenimax accidently broke the proper working of the GetDisplayName() function.
It was fixed with the 1.3 release, but between that the function was broken and this addon was usefull.
It can stay installed (it will do nothing if the original function seems to work).

Without it, the Saved Variable system (among others) is unable to get the right account name and tries to store/read data from a account named "" (empty string). While this does work, it means pre-patch saved data is inaccessible (unless you followed Cairenn's guide: http://www.esoui.com/forums/showthread.php?t=1843)

This Addon/Patch replaces the borken version of GetDisplayName() with a version that is under certain conditions (see Behavior) able to get the right name.

How to use:
Step -1: Backup your Saved Variable Files. There is a 50/50 chance that the data will be eitehr reset or the pre-patch data currently becomes active again.
Step 0: verify your client is working without the addon enabeled.
Step 1: Install Addon at own risk. Pray to applicable gods/saints. Reload the UI
Step 2: If you have BugEater or LibDebug installed and pre-ini debug enabeled, you will get proper messages into the chat.
Step 3: If it works (and saved variables now use the proper account name again), do the opposite of what is described here: http://www.esoui.com/forums/showthread.php?t=1843 (replace "" with "@accountname"). Do not work on the Backups you made under step -1.
Step 4: Make regular backups of the saved variables. The addon will stop replacing the original GetDisplayName() function once it returns something remotely valid as account name.


Behavior:
During starting it will first check if the currently used version of GetDisplayName() returns anything remotely valid (at least two sings and starts with a @). If so it will do nothing. If not it will replace the existing original version that with one that does the following:
1. If you selected "Remmeber account name" on the Login Screen of the game client, the function will take that value and return (I advise to choose this option; it is the fastest and most reliable way to get the account name short of a working original GetDispalyName() function).
2. If that failed it tries to access your guilds. If you are in at least one guild it will retreive your account name via the guilds member list.
3. If it has not found a name on the previous attempts, it turns to the user override: One file of the addon is called "DisplayNameFix_Constants.lua". Open it with a text editor and write your account name (with leading @) betwen the Quotation marks.* Save and reload the ui. If it finds a valid entry there it will use it and return (this is not adviseable. The file will be used by everyone using the same Operating System user; hence it is very late in the list).
4. If all other attempts to get a valid username failed, it will return what the buggy original version of GetDispalyName() returns (so at worst the original function get's a bit slower).


*example for me:
Lua Code:
  1. if (DisplayNameFixConstants == nil) then
  2.     DisplayNameFixConstants =
  3.     {
  4.         UserOverride = "@zgrssd"
  5.     }
  6. end


Warning:
Entirely Alpha! Use at own Risk!
Neither I nor Zenimax are resposible for any damages (inlcuding but not limited to loss of gametime, saved variable data and client crashes) that come from using this addon/patch.
I have no idea what consequences could arise from the DisplayName function suddenly returning something different then before the Addons were loaded. And even I am still testing this carefully myself.


Special Thanks to:
Garkin and farangkao for being wise enough to think this fix up. I only checked some possible error cases, wrote the whole thing down and added the user override feature.
v0.03:
Bumped API version to 100008
Fixed an issues with the code that detects if the original functions is working.
The original bug is fixed with 1.3.3 release, so this addon is no longer nesseary for anything. It can be kept around in case of future problems with the GetDisplayName function.

v0.02:
renamed readme to not have a extension anymore
Added user override feature
Reordered the logic so it goes for login screen first, then guild, then user override

v0.01:
Original release
Archived Files (2)
File Name
Version
Size
Uploader
Date
0.02
2kB
zgrssd
07/04/14 05:59 AM
0.01
1kB
07/02/14 08:14 AM


Post A Reply Comment Options
Unread 07/03/14, 08:29 AM  
zgrssd
AddOn Author - Click to view AddOns

Forum posts: 280
File comments: 26
Uploads: 3
Re: .txt fiel issues.
I had checked that on the NA client and was 100% certain it stopped happening. I only renamed it .txt to test it/demonstrate that. Odd.
But I removed the ending for the next release so it stops happening again.

Re; Decorate functions.
I made some tests and worked the results into the wiki. They have some odd cases in wich they do not return what I expect them too:
http://wiki.esoui.com/DecorateDisplayName
http://wiki.esoui.com/IsDecoratedDisplayName
IsDecorated might be usefull.
Decorate only after I run IsDecorated over it.

I am uncertain about using them:
On the plus side, they work instantly if the decoration sign ever changes (very unlikely but possible).
On the other hand I rather keep on know KISS stuff then risk running into another issue with a provided function while trying to fix an issue with a provided function.
I have to think on that for at least 1 day from now on. Just to dangerous area to make any hasty calls.
Report comment to moderator  
Reply With Quote
Unread 07/03/14, 06:00 AM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Originally Posted by zgrssd
Originally Posted by Garkin
Please change extension of "DisplayNameFix Readme.txt", addon manager it shows as a separate addon.
I am pretty sure that old problem (text files lying next to manifest files will be treated as another maifest) was stealth fixed after 1.2.4 rolled out. In another update.
I have to test it again to be sure.
I have written it just because I had "DisplayNameFix Readme" item in addon manager. So I'm sure that ZOS did't fix the issue.

Originally Posted by zgrssd
Originally Posted by Garkin
And I have just find out that there are functions for work with display names:
Lua Code:
  1. DecorateDisplayName(displayName)
  2. UndecorateDisplayName(displayName)
  3. IsDecoratedDisplayName(displayName)
Good to know. But wich cases exactly do they care for?
Only adding/removing/checking for the @? What about checks for lenght, empty strings and nil values?

Need to run some tests on thier exactly behavior before I start relying on them.
I have tested that code I have posted works and it is what I use now.
Function IsDecoratedDisplayName(displayName) returns true only if displayName is valid string starting with "@" and have more than 2 characters. If displayName is anything else it returns false. I believe it works exactly as you need.
Report comment to moderator  
Reply With Quote
Unread 07/03/14, 03:04 AM  
zgrssd
AddOn Author - Click to view AddOns

Forum posts: 280
File comments: 26
Uploads: 3
Originally Posted by Garkin
Please change extension of "DisplayNameFix Readme.txt", addon manager it shows as a separate addon.
I am pretty sure that old problem (text files lying next to manifest files will be treated as another maifest) was stealth fixed after 1.2.4 rolled out. In another update.
I have to test it again to be sure.

Originally Posted by Garkin
And I have just find out that there are functions for work with display names:
Lua Code:
  1. DecorateDisplayName(displayName)
  2. UndecorateDisplayName(displayName)
  3. IsDecoratedDisplayName(displayName)
Good to know. But wich cases exactly do they care for?
Only adding/removing/checking for the @? What about checks for lenght, empty strings and nil values?

Need to run some tests on thier exactly behavior before I start relying on them.
Last edited by zgrssd : 07/03/14 at 03:04 AM.
Report comment to moderator  
Reply With Quote
Unread 07/02/14, 02:01 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
Please change extension of "DisplayNameFix Readme.txt", addon manager it shows as a separate addon.

And I have just find out that there are functions for work with display names:
Lua Code:
  1. DecorateDisplayName(displayName)
  2. UndecorateDisplayName(displayName)
  3. IsDecoratedDisplayName(displayName)
Basically it adds/removes "@" if necessary and check if displayName is valid.

Warning: Spoiler
Last edited by Garkin : 07/02/14 at 02:36 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: