ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Tutorials & Other Helpful Info (https://www.esoui.com/forums/forumdisplay.php?f=172)
-   -   Update 2.5 (https://www.esoui.com/forums/showthread.php?t=6384)

sirinsidiator 06/28/16 03:43 AM

Update 2.5
 
Now that Ayantir won't make these threads anymore, you will have to put up with some low-effort ones by me ;)

New API Version: 100016

PTS Dev Guild
We always create a guild for all addon developers on the PTS, so we can test guild related things and more, ask for help with testing or just chat.
If you need an invite, ask here or over on our Gitter channel.

Links
Undocumented Changes
  • GetCraftingSkillName was renamed to ZO_GetCraftingSkillName

I'll edit the OP with more useful information as you post it. :p

Ayantir 06/28/16 04:32 AM

http://wiki.esoui.com/Globals updated
+ textures in progress.
http://wiki.esoui.com/Constant_Values too.

haggen 06/28/16 01:10 PM

I think it'd be worthy of a honorable mention:

Quote:

3D Textures
An early API for placing GUI textures in 3D space has been added. The form of this API is likely to change a lot before it is officially launched in the following update. The textures still render in the GUI layer, but it allows for 3D visual effects to be created.
More on the docs https://15254b2dcaab7f5478ab-24461f3...55ffb93863.txt

And also an important and pertinent comment about name changes:

Quote:

I didn't see anything specific here, but is there a method to detect a name change for a character such that it could be used to migrate add-on settings? I attempted a name change and when I logged in I noticed a number of my add-ons reverted to default settings. It would be nice to be able to migrate the settings of the add-ons affected without popping open all of the saved variable files and editing them manually.

sirinsidiator 06/28/16 02:29 PM

Quote:

Originally Posted by haggen (Post 27587)
And also an important and pertinent comment about name changes

I already created a thread about this problem on the wishlist.

haggen 06/28/16 04:55 PM

Quote:

Originally Posted by sirinsidiator (Post 27591)
I already created a thread about this problem on the wishlist.

I don't know why I even try. :P Thanks sid.

haggen 06/29/16 07:18 AM

Just updated the repo with PTS files:
https://github.com/esoui/esoui/tree/pts

Haho 07/01/16 12:03 PM

GetUnitName("player") caps the name in german or/and french and doubles the data of chars with no cap in the name. (when testing multilang it's a problem)

didn't check if English let it as typed or uncap it.


GetCraftingSkillName(...) replaced by ZO_GetCraftingSkillName(...) *just saw the nb in op post ^^ sry

Is it the same for a number of functions? (it's the first one i check and nothing is documented on ESO official post about the API changes)

Edit : is it possible to post a fix for these renamed functions in medic or something?

QuadroTony 07/01/16 12:49 PM

Quote:

Originally Posted by haggen (Post 27587)
I think it'd be worthy of a honorable mention:


wait, what its meant?
really

haggen 07/01/16 12:58 PM

Quote:

Originally Posted by QuadroTony (Post 27645)
wait, what its meant?
really

What did I meant with it or what does the whole 3d texture is about?

QuadroTony 07/01/16 01:01 PM

Quote:

Originally Posted by haggen (Post 27646)
what does the whole 3d texture is about?


this one! indeed

Ayantir 07/01/16 01:47 PM

3d object in ui is here for housing editor.

sirinsidiator 07/01/16 02:52 PM

Quote:

Originally Posted by Haho (Post 27643)
GetUnitName("player") caps the name in german or/and french and doubles the data of chars with no cap in the name. (when testing multilang it's a problem)

didn't check if English let it as typed or uncap it.


GetCraftingSkillName(...) replaced by ZO_GetCraftingSkillName(...) *just saw the nb in op post ^^ sry

Is it the same for a number of functions? (it's the first one i check and nothing is documented on ESO official post about the API changes)

Edit : is it possible to post a fix for these renamed functions in medic or something?

I am not sure what problem you have with GetUnitName. Can you give an example?

GetCraftingSkillName is the only renamed method that I am aware of. I think it would be better if ZOS added an alias to addoncompatibilityaliases.lua, but if they don't do it before it goes live, I will add it to medic.

Haho 07/01/16 03:09 PM

sure :
I created a char with no cap first letter on PTS...

In English, savedvars were saved correctly but when i switched to german, something wasn't working because it didnt use the data that were saved on some event while i was testing in English, and the name appeared twice in the saved vars with 2 different orthographs :


Lua Code:
  1. ["craftlevels"] =
  2.                 {
  3.                     ["Randomion"] =
  4.                     {
  5.                     },
  6.                     ["Fgyhftgh"] =
  7.                     {
  8.                     },  --- this one was saved from german or french or both.
  9.                     ["fgyhftgh"] =
  10.                     {
  11.                         [1] = 10,
  12.                         [2] = 10,
  13.                         [6] = 10,
  14.                     },   --- this one was saved from english
  15.                 },

But as i switched to german and french before opening the savedvars, I can't tell which one(s) is faulty.

Not sure if it has always been like this cause i dont remember if i already used an uncapped name.

If it has always been like this, then it's not really an issue since "thatname" and "Thatname" count as the same upon creation, thus we cant create 2 name alike in the same savedvars,
BUT if it wasn't, prepare to hear people reporting missing data. (especially on addons that save data on the long run, it would suck badly)

Ayantir 07/01/16 03:31 PM

there is no bug with GetUnitName().
And you can't create a char when the string.lower(name) already exists.

Please review your code first.

Haho 07/01/16 03:45 PM

whaw... I dont need to fix this for myself you know. But i'll refrain to point at a potential issue from now.


and since you didn't test it for yourself before bashing me, i did : with circonian's click4info (it must be badly coded too, seing the results) :

d(GetUnitName("player")) of an uncapped name does cap the first letter in German, and only in german.

Ayantir 07/01/16 04:18 PM

Now I understood your bug. So indeed, yes.

It only affect users switching languages with a name without capitalization switching to german.
Just /bug ? They'll maybe fix, or not. It's maybe not a bug :rolleyes:

votan 07/02/16 02:14 AM

Quote:

Originally Posted by Haho (Post 27652)
whaw... I dont need to fix this for myself you know. But i'll refrain to point at a potential issue from now.


and since you didn't test it for yourself before bashing me, i did : with circonian's click4info (it must be badly coded too, seing the results) :

d(GetUnitName("player")) of an uncapped name does cap the first letter in German, and only in german.

I think you want to use GetRawUnitName("player")

Names were never a good data-layer identifier. And with the upcoming name change, we know why.

Besides that, all names, I mean really everything which as "name" or "caption" in it, should be processed by zo_strformat for presentation-layer. Including return values.
That has to do with the "^..." most english native speakers just strip away. ;)

Lua Code:
  1. local caption = zo_strformat(SI_TOOLTIP_UNIT_CAPTION, GetUnitCaption(unitTag))

Normally SI_TOOLTIP_UNIT_CAPTION looks like this "<<1>>", but in german it is "<<C:1>>".
That would explain why the first letter is capitalized in german only.

Haho 07/02/16 03:49 AM

that would be worse. The character tables of the savedvars are saved the same way. Got two table for most addons in my saved vars on pts.

And I don't need to repair anything, I just noticed and pointed it out in case someone is having troubles too while testing their multilang addons and in case it's a new "feature" introduced with the name change thing. (I cant test on live, all chars are already created)

sirinsidiator 07/02/16 05:34 AM

It will be a problem for German players if it stays like this. The live version does not have this bug, so any character save data will disappear for names that start with a lowercase letter, unless it gets fixed.

Haho 07/02/16 05:52 AM

that and potentially any addon that would communicate player/teammates data through the chat (or idk how you do/intend to do this) with clients of different languages.

Is the "target" tag even affected by the same overzealous translation too? (i'd test, but pts is a freaking desert. idk where people are)

Ayantir 07/02/16 06:35 AM

You cant communicate throught chat...
the only way to communicate is grpsocket and it's an unoficial usage of a feature not meaned for this...

ZOS_ChipHilseberg 07/06/16 11:31 AM

Quote:

Originally Posted by sirinsidiator (Post 27656)
It will be a problem for German players if it stays like this. The live version does not have this bug, so any character save data will disappear for names that start with a lowercase letter, unless it gets fixed.

We just checked out live and it does capitalize the first letter of the character name (improperly), but it seems to have been doing this for a while. Did you see it behave differently somewhere?

Ayantir 07/06/16 09:52 PM

I've updated http://wiki.esoui.com/Collectibles even if I still don't know if anyone use it... :rolleyes:

sirinsidiator 07/07/16 03:40 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 27683)
We just checked out live and it does capitalize the first letter of the character name (improperly), but it seems to have been doing this for a while. Did you see it behave differently somewhere?

I tried it again and found that it works as you describe when I set the language to "de" during character creation and like I said when the selected language is "en" and I switch to "de" right after creation. Meaning it won't be a problem for players that always play in one language.

ZOS_ChipHilseberg 07/07/16 08:16 AM

Quote:

Originally Posted by sirinsidiator (Post 27687)
I tried it again and found that it works as you describe when I set the language to "de" during character creation and like I said when the selected language is "en" and I switch to "de" right after creation. Meaning it won't be a problem for players that always play in one language.

Ah, gotcha. Thanks.

Ayantir 07/11/16 09:12 PM

Because I looked at this, there is a typo error in new dye system in patchnotes and txt.

When referring to a DyeDefId , you should remove the "Def" from your function names, etc. It's a DyeId

ex:

GetItemLinkDyeDefIds doesn't exist : it's GetItemLinkDyeIds
GetDyeDefColorsById doesn't exist : it's GetDyeColorsById
GetDyeDefInfoById doesn't exist : it's GetDyeInfoById

Ayantir 07/13/16 05:22 PM

And because, I needed doc on the control type TextureComposite (who knows it ? :rolleyes: ) .. I updated the 2 years old page http://wiki.esoui.com/Controls

It was really needed because since few updates ZOS added a lot of methods on this topic and we had 0 doc uptodate except the txt and patchnotes.

And I wrote how to update the page at the bottom of 1st topic of thread :
http://www.esoui.com/forums/showthread.php?p=26365



PS: Basically this page list all methods (functions) you can do with a control type.

ex if your control is a EditControl and the control name is Foo,

you can , per exemple, do :

Lua Code:
  1. Foo:TakeFocus()

I also added few things at the top of the page, and tried to keep refs with globals page.

ZOS_ChipHilseberg 07/14/16 08:04 AM

1 Attachment(s)
Here's the updated docs for the next PTS update.

sirinsidiator 07/14/16 11:22 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 27767)
Here's the updated docs for the next PTS update.

Thank you very much!
There are some nice changes:

Code:

MAX_TEXT_CHAT_INPUT_CHARACTERS

* GetLocationName(*integer* _worldId_)
** _Returns:_ *string* _worldName_

* GetCurrentCharacterId()
** _Returns:_ *string* _id_

* RequestOpenUnsafeURL(*string* _URL_)


* GetNumCharacters()
** _Returns:_ *integer* _numCharacters_

* GetCharacterInfo(*luaindex* _index_)
** _Returns:_ *string* _name_, *[Gender|#Gender]* _gender_, *integer* _level_, *integer* _championRank_, *integer* _classId_, *integer* _raceId_, *[Alliance|#Alliance]* _alliance_, *string* _id_, *integer* _locationId_

* EVENT_KEEP_ALLIANCE_OWNER_CHANGED (*integer* _keepId_, *integer* _battlegroundContext_, *integer* _owningAlliance_, *integer* _oldOwningAlliance_)

Will GetLocationName return the same worldName as GetWorldName and will there be constant values for the IDs (e.g. WORLD_EU, WORLD_NA, WORLD_PTS)?
And does RequestOpenUnsafeURL mean there has been a change of policy regarding exchanging data with external services? If it is what I think it is, it would allow addons to send data to external servers pretty easily, which would make me hope that CopyAllTextToClipboard will be made public again and we may get functions to access saveData files directly without the need for an UI reload.

ZOS_ChipHilseberg 07/14/16 12:44 PM

Quote:

Originally Posted by sirinsidiator (Post 27772)
Thank you very much!
Will GetLocationName return the same worldName as GetWorldName and will there be constant values for the IDs (e.g. WORLD_EU, WORLD_NA, WORLD_PTS)?
And does RequestOpenUnsafeURL mean there has been a change of policy regarding exchanging data with external services? If it is what I think it is, it would allow addons to send data to external servers pretty easily, which would make me hope that CopyAllTextToClipboard will be made public again and we may get functions to access saveData files directly without the need for an UI reload.

worldName is the zone name that the character is in. It doesn't refer to the server. RequestOpenUnsafeURL requires a secure confirmation so it will not function as an automatic export mechanism. Data can already be exported through the saved variables on reload UI so we don't see it as contradicting the existing policies.

Weolo 07/19/16 10:31 AM

Storing data
 
Then it looks like instead of using either of these 2 functions to store addon data against:

GetUnitName("player")
GetRawUnitName("player")

We should actually be using:

GetCurrentCharacterId()

I did a very quick test and the ID seems unique to the character and was the same after using a character name change token.

Also looking forward to making use of GetCharacterInfo(index) :)

QuadroTony 07/20/16 03:21 AM

right now i tried to teleport to player who in REapers march according to Guild roster

i tried few times but every time it port me to Worthgar
is new changes will fix it?

Weolo 07/23/16 08:17 PM

GetCharacterInfo() bug?
 
I just found something a bit odd
When you create a brand new character and log in for the first time, the character does not show up in the GetCharacterInfo() function
It doesn't seem to appear in the functions data until you log out to the character selection screen and back in.

Lua Code:
  1. d("GetCurrentCharacterId: "..GetCurrentCharacterId())
  2. d("GetNumCharacters: "..GetNumCharacters())
  3. for i = 1, GetNumCharacters() do
  4.     local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)
  5.     d("id="..tostring(id))
  6. end
  7. local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(GetCurrentCharacterId())
  8. d("id2="..tostring(id))
In the above code example GetCurrentCharacterId() does not appear in the for loop.
And id2 prints out nothing, not even nil

ZOS_ChipHilseberg 07/25/16 02:06 PM

Quote:

Originally Posted by Weolo (Post 27844)
I just found something a bit odd
When you create a brand new character and log in for the first time, the character does not show up in the GetCharacterInfo() function
It doesn't seem to appear in the functions data until you log out to the character selection screen and back in.

Lua Code:
  1. d("GetCurrentCharacterId: "..GetCurrentCharacterId())
  2. d("GetNumCharacters: "..GetNumCharacters())
  3. for i = 1, GetNumCharacters() do
  4.     local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)
  5.     d("id="..tostring(id))
  6. end
  7. local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(GetCurrentCharacterId())
  8. d("id2="..tostring(id))
In the above code example GetCurrentCharacterId() does not appear in the for loop.
And id2 prints out nothing, not even nil

Yup, that's a bug. We'll get a fix in for it.

Woeler 07/30/16 12:36 AM

Quote:

Originally Posted by Ayantir (Post 27686)
I've updated http://wiki.esoui.com/Collectibles even if I still don't know if anyone use it... :rolleyes:

Is there also a page like that with all motifs? I still need the ingame ID's of the new ones for eso-database.

Ayantir 07/30/16 03:55 AM

http://wiki.esoui.com/StyleItemIndex

Ayantir 07/30/16 01:33 PM

I finally automatized the Events page a bit better.
Guide is here : http://www.esoui.com/forums/showthread.php?t=6141
It create the new source and warn for thing to add manually

This reduce page update to 10min from 2hours.

Ex for 2.5 :

Quote:

Event found on Wiki but not in ZOS ref -> * [[EVENT_DIFFICULTY_LEVEL_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_VETERAN_POINTS_GAIN]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_VETERAN_POINTS_UPDATE]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_VETERAN_RANK_UPDATE]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_DATA_LOADED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_DESCRIPTION_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_HISTORY_CATEGORY_UPDATED]] ('''integer''' ''eventCode'', '''integer''' ''guildId'', '''[[Globals#GuildHistoryCategory|GuildHistoryCategory]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_HISTORY_RESPONSE_RECEIVED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_KEEP_CLAIM_UPDATED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_ADDED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_CHARACTER_LEVEL_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_CHARACTER_UPDATED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_CHARACTER_VETERAN_RANK_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_CHARACTER_ZONE_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_NOTE_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_PLAYER_STATUS_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_RANK_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MEMBER_REMOVED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_MOTD_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_RANK_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_RANKS_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_SELF_JOINED_GUILD]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GUILD_SELF_LEFT_GUILD]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_SAVE_GUILD_RANKS_RESPONSE]] ('''integer''' ''eventCode'', '''integer''' ''guildId'', '''[[Globals#SocialActionResult|SocialActionResult]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_GROUPING_TOOLS_STATUS_UPDATE]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_ADDED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_CHARACTER_LEVEL_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_CHARACTER_UPDATED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_CHARACTER_VETERAN_RANK_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_CHARACTER_ZONE_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_NOTE_UPDATED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_PLAYER_STATUS_CHANGED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_FRIEND_REMOVED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_IGNORE_ADDED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_IGNORE_NOTE_UPDATED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_IGNORE_REMOVED]]
Event found on Wiki but not in ZOS ref -> * [[EVENT_SOCIAL_DATA_LOADED]]
New ZOS event -> * [[EVENT_GROUP_ELECTION_REQUESTED]] ('''integer''' ''eventCode'', '''string''' ''descriptor'')
New ZOS event -> * [[EVENT_CURRENT_SUBZONE_LIST_CHANGED]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_GROUP_ELECTION_NOTIFICATION_REMOVED]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_CHAMPION_POINT_UPDATE]] ('''integer''' ''eventCode'', '''string''' ''unitTag'', '''number''' ''oldChampionPoints'', '''number''' ''currentChampionPoints'')
New ZOS event -> * [[EVENT_INVENTORY_ITEMS_AUTO_TRANSFERRED_TO_CRAFT_BAG]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_ITEM_PREVIEW_READY]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_PLAYER_QUEUED_FOR_CYCLIC_RESPAWN]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_CAMPAIGN_UNASSIGNMENT_RESULT]] ('''integer''' ''eventCode'', '''number''' ''result'')
New ZOS event -> * [[EVENT_ACTIVITY_FINDER_ACTIVITY_COMPLETE]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_CHAMPION_LEVEL_ACHIEVED]] ('''integer''' ''eventCode'', '''boolean''' ''wasChampionSystemUnlocked'')
New ZOS event -> * [[EVENT_COLLECTIBLE_NEW_STATUS_CLEARED]] ('''integer''' ''eventCode'', '''number''' ''collectibleId'')
New ZOS event -> * [[EVENT_GROUP_ELECTION_RESULT]] ('''integer''' ''eventCode'', '''number''' ''electionResult'', '''string''' ''descriptor'')
New ZOS event -> * [[EVENT_GROUP_ELECTION_FAILED]] ('''integer''' ''eventCode'', '''number''' ''failureReason'', '''string''' ''descriptor'')
New ZOS event -> * [[EVENT_HOUSING_EDITOR_MODE_CHANGED]] ('''integer''' ''eventCode'', '''number''' ''oldMode'', '''number''' ''newMode'')
New ZOS event -> * [[EVENT_VISUAL_LAYER_CHANGED]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_DYE_STAMP_USE_FAIL]] ('''integer''' ''eventCode'', '''number''' ''reason'')
New ZOS event -> * [[EVENT_COLLECTIBLE_USE_BLOCKED]] ('''integer''' ''eventCode'', '''number''' ''reason'')
New ZOS event -> * [[EVENT_WEAPON_PAIR_LOCK_CHANGED]] ('''integer''' ''eventCode'', '''boolean''' ''locked'')
New ZOS event -> * [[EVENT_CADWELL_PROGRESSION_LEVEL_CHANGED]] ('''integer''' ''eventCode'', '''number''' ''progressionLevel'')
New ZOS event -> * [[EVENT_GROUP_ELECTION_NOTIFICATION_ADDED]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_CRAFT_BAG_AUTO_TRANSFER_NOTIFICATION_CLEARED]] ('''number''' ''eventCode'')
New ZOS event -> * [[EVENT_ACTIVITY_FINDER_STATUS_UPDATE]] ('''integer''' ''eventCode'', '''number''' ''status'')
New ZOS event -> * [[EVENT_PERSONALITY_CHANGED]] ('''number''' ''eventCode'')

Woeler 07/30/16 04:30 PM

Quote:

Originally Posted by Ayantir (Post 27881)

Exactly what I needed. Thanks!

Ayantir 07/31/16 10:07 AM

I've updated Keeps page & I've updated API page :

Lua Code:
  1. @@ -79,6 +79,9 @@
  2.  * GetRaceName(number [[Globals#Gender|Gender]] gender, number raceId)
  3.  ** Returns: string raceName
  4.  
  5. +* GetLocationName(number worldId)
  6. +** Returns: string worldName
  7. +
  8.  * GetGenderFromNameDescriptor(string nameDescriptor)
  9.  ** Returns: number [[Globals#Gender|Gender]] gender
  10.  
  11. @@ -123,6 +126,8 @@
  12.  * IsInternalBuild()
  13.  ** Returns: boolean isInternalBuild
  14.  
  15. +* SaveLoadDialogResult(number [[Globals#SaveLoadDialogError|SaveLoadDialogError]] errorType, number [[Globals#SaveLoadDialogAnswer|SaveLoadDialogAnswer]] result)
  16. +
  17.  * GetSecondsSinceMidnight()
  18.  ** Returns: number secondsSinceMidnight
  19.  
  20. @@ -216,6 +221,33 @@
  21.  * HashString(string text)
  22.  ** Returns: number hashValue
  23.  
  24. +* Create3DRenderSpace()
  25. +** Returns: number spaceId
  26. +
  27. +* Set3DRenderSpaceOrigin(number spaceId, number x, number y, number z)
  28. +
  29. +* Set3DRenderSpaceRight(number spaceId, number x, number y, number z)
  30. +
  31. +* Set3DRenderSpaceUp(number spaceId, number x, number y, number z)
  32. +
  33. +* Set3DRenderSpaceForward(number spaceId, number x, number y, number z)
  34. +
  35. +* Set3DRenderSpaceSystem(number spaceId, number [[Globals#GuiRender3DSpaceSystem|GuiRender3DSpaceSystem]] system)
  36. +
  37. +* Set3DRenderSpaceToCurrentCamera(number spaceId)
  38. +
  39. +* ComputeDepthAtWhichWorldWidthRendersAsUIWidth(number worldWidth, number UIWidth)
  40. +** Returns: number depth
  41. +
  42. +* GetWorldDimensionsOfViewFrustumAtDepth(number depth)
  43. +** Returns: number frustumWidth, number frustumHeight
  44. +
  45. +* GetESOVersionString()
  46. +** Returns: string versionString
  47. +
  48. +* Is64BitClient()
  49. +** Returns: boolean is64Bit
  50. +
  51.  * GetEULADetails(number [[Globals#EULAType|EULAType]] eulaType)
  52.  ** Returns: string message, string agreeText, string disagreeText, boolean hasAgreed, string dialogText
  53.  
  54. @@ -619,7 +651,7 @@
  55.  * GetNumPlayerStatuses()
  56.  ** Returns: number numStatuses
  57.  
  58. -* GetCriticalStrikeChance(number statValue, boolean useMin)
  59. +* GetCriticalStrikeChance(number statValue)
  60.  ** Returns: number chance
  61.  
  62.  * TakeScreenshot()
  63. @@ -681,6 +713,9 @@
  64.  * GetUnitChampionPoints(string unitTag)
  65.  ** Returns: number championPoints
  66.  
  67. +* GetUnitEffectiveChampionPoints(string unitTag)
  68. +** Returns: number championPoints
  69. +
  70.  * CanUnitGainChampionPoints(string unitTag)
  71.  ** Returns: boolean canGainChampionPoints
  72.  
  73. @@ -861,6 +896,9 @@
  74.  * GetUnitPower(string unitTag, number [[Globals#CombatMechanicType|CombatMechanicType]] powerType)
  75.  ** Returns: number current, number max, number effectiveMax
  76.  
  77. +* GetCurrentCharacterId()
  78. +** Returns: string id
  79. +
  80.  * GetPlayerStat(number [[Globals#DerivedStats|DerivedStats]] derivedStat, number [[Globals#StatBonusOption|StatBonusOption]] statBonusOption)
  81.  ** Returns: number value
  82.  
  83. @@ -1692,6 +1730,8 @@
  84.  * IsFeedbackGatheringEnabled()
  85.  ** Returns: boolean enabled
  86.  
  87. +* RequestOpenUnsafeURL(string URL)
  88. +
  89.  * Logout()
  90.  
  91.  * Quit()
  92. @@ -1828,6 +1868,12 @@
  93.  * GetActiveActionLayerIndex(number activeActionLayerIndex)
  94.  ** Returns: number:nilable layerIndex
  95.  
  96. +* GetNumCharacters()
  97. +** Returns: number numCharacters
  98. +
  99. +* GetCharacterInfo(number index)
  100. +** Returns: string name, number [[Globals#Gender|Gender]] gender, number level, number championRank, number classId, number raceId, number [[Globals#Alliance|Alliance]] alliance, string id, number locationId
  101. +
  102.  * GetNumAttributes()
  103.  ** Returns: number numAttributes
  104.  
  105. @@ -2351,6 +2397,11 @@
  106.  
  107.  * SetChatFontSize(number fontSize)
  108.  
  109. +* GetGamepadChatFontSize()
  110. +** Returns: number gamepadFontSize
  111. +
  112. +* SetGamepadChatFontSize(number gamepadFontSize)
  113. +
  114.  * ResetChatFontSizeToDefault()
  115.  
  116.  * GetChatCategoryColor(number [[Globals#ChatChannelCategories|ChatChannelCategories]] category)
  117. @@ -2680,6 +2731,27 @@
  118.  * CanItemBeVirtual(number bagId, number slotIndex)
  119.  ** Returns: boolean canBeVirtualItem
  120.  
  121. +* IsItemPlaceableFurniture(number bagId, number slotIndex)
  122. +** Returns: boolean isPlaceable
  123. +
  124. +* IsDisplayNameInItemBoPAccountTable(number bagId, number slotIndex, string displayName)
  125. +** Returns: boolean isInTable
  126. +
  127. +* IsItemBoPAndTradeable(number bagId, number slotIndex)
  128. +** Returns: boolean isBoPAndTradeable
  129. +
  130. +* GetItemBoPTimeRemainingSeconds(number bagId, number slotIndex)
  131. +** Returns: number timeRemainingS
  132. +
  133. +* GetItemBoPTradeableDisplayNamesString(number bagId, number slotIndex)
  134. +** Returns: string namesString
  135. +
  136. +* GetItemBoPTradeableNumEligibleNames(number bagId, number slotIndex)
  137. +** Returns: number numNames
  138. +
  139. +* GetItemBoPTradeableEligibleNameByIndex(number bagId, number slotIndex, number nameIndex)
  140. +** Returns: string name
  141. +
  142.  * HasCraftBagAccess()
  143.  ** Returns: boolean hasAccess
  144.  
  145. @@ -2728,6 +2800,9 @@
  146.  * GetItemLinkItemType(string itemLink)
  147.  ** Returns: number [[Globals#ItemType|ItemType]] itemType, number [[Globals#SpecializedItemType|SpecializedItemType]] specializedItemType
  148.  
  149. +* GetItemLinkItemUseType(string itemLink)
  150. +** Returns: number [[Globals#ItemUseType|ItemUseType]] onUseType
  151. +
  152.  * GetItemLinkArmorType(string itemLink)
  153.  ** Returns: number [[Globals#ArmorType|ArmorType]] armorType
  154.  
  155. @@ -2902,6 +2977,12 @@
  156.  * CanItemLinkBeVirtual(string itemLink)
  157.  ** Returns: boolean canBeVirtual
  158.  
  159. +* GetItemLinkDyeIds(string itemLink)
  160. +** Returns: number primaryDefId, number secondaryDefId, number accentDefId
  161. +
  162. +* GetItemLinkDyeStampId(string itemLink)
  163. +** Returns: number dyeStampId
  164. +
  165.  * ShouldHideTooltipRequiredLevel(string itemLink)
  166.  ** Returns: boolean shouldHideLevel
  167.  
  168. @@ -3812,6 +3893,15 @@
  169.  * GetTradeItemInfo(number [[Globals#TradeParticipant|TradeParticipant]] who, number tradeIndex)
  170.  ** Returns: string name, textureName icon, number stack, number quality, string creatorName, number sellPrice, boolean meetsUsageRequirement, number [[Globals#EquipType|EquipType]] equipType, number [[Globals#ItemStyle|ItemStyle]] itemStyle
  171.  
  172. +* IsTradeItemBoPAndTradeable(number [[Globals#TradeParticipant|TradeParticipant]] who, number tradeIndex)
  173. +** Returns: boolean isBoPAndTradeable
  174. +
  175. +* GetTradeItemBoPTimeRemainingSeconds(number [[Globals#TradeParticipant|TradeParticipant]] who, number tradeIndex)
  176. +** Returns: number timeRemainingS
  177. +
  178. +* GetTradeItemBoPTradeableDisplayNamesString(number [[Globals#TradeParticipant|TradeParticipant]] who, number tradeIndex)
  179. +** Returns: string namesString
  180. +
  181.  * GetTradeItemBagAndSlot(number [[Globals#TradeParticipant|TradeParticipant]] who, number tradeIndex)
  182.  ** Returns: number:nilable [[Globals#Bag|Bag]] bagId, number:nilable slotIndex
  183.  
  184. @@ -4005,10 +4095,13 @@
  185.  * IsCollectibleCategoryUsable(number [[Globals#CollectibleCategoryType|CollectibleCategoryType]] collectibleCategoryType)
  186.  ** Returns: boolean isUsable
  187.  
  188. -* IsCollectibleCategoryBlocked(number [[Globals#CollectibleCategoryType|CollectibleCategoryType]] collectibleCategoryType)
  189. +* IsCollectibleBlocked(number collectibleId)
  190.  ** Returns: boolean isBlocked
  191.  
  192. -* GetCollectibleCategoryBlockReason(number [[Globals#CollectibleCategoryType|CollectibleCategoryType]] collectibleCategoryType)
  193. +* IsCollectibleValidForPlayer(number collectibleId)
  194. +** Returns: boolean isValidForPlayer
  195. +
  196. +* GetCollectibleBlockReason(number collectibleId)
  197.  ** Returns: number [[Globals#CollectibleUsageBlockReason|CollectibleUsageBlockReason]] usageBlockReason
  198.  
  199.  * IsCollectibleSlottable(number collectibleId)
  200. @@ -4052,6 +4145,11 @@
  201.  * GetCollectibleHelpIndices(number collectibleId)
  202.  ** Returns: number:nilable helpCategoryIndex, number:nilable helpIndex
  203.  
  204. +* IsCollectibleNew(number collectibleId)
  205. +** Returns: boolean isNew
  206. +
  207. +* ClearCollectibleNewStatus(number collectibleId)
  208. +
  209.  * GetNumCollectibleNotifications()
  210.  ** Returns: number count
  211.  
  212. @@ -4083,6 +4181,17 @@
  213.  * GetCollectibleCooldownAndDuration(number collectibleId)
  214.  ** Returns: number cooldownRemaining, number cooldownDuration
  215.  
  216. +* GetCollectiblePersonalityOverridenEmoteDisplayNames(number collectibleId)
  217. +** Uses variable returns...
  218. +** Returns: string overriddenEmoteDisplayName
  219. +
  220. +* GetCollectiblePersonalityOverridenEmoteSlashCommandNames(number collectibleId)
  221. +** Uses variable returns...
  222. +** Returns: string overriddenEmoteSlashCommandName
  223. +
  224. +* GetCollectibleRestrictionsByType(number collectibleId, number [[Globals#CollectibleRestrictionType|CollectibleRestrictionType]] restrictionType)
  225. +** Returns: boolean hasRestrictions, boolean passesRestrictions, string allowedNamesString
  226. +
  227.  * GetNumAchievementCategories()
  228.  ** Returns: number numCategories
  229.  
  230. @@ -4144,6 +4253,9 @@
  231.  * GetAchievementLink(number achievementId, number [[Globals#LinkStyle|LinkStyle]] linkStyle)
  232.  ** Returns: string link
  233.  
  234. +* GetAchievementIdFromLink(string link)
  235. +** Returns: number achievementId
  236. +
  237.  * GetAchievementNameFromLink(string link)
  238.  ** Returns: string name
  239.  
  240. @@ -4161,7 +4273,7 @@
  241.  ** Returns: boolean hasRewardOfType, string titleName
  242.  
  243.  * GetAchievementRewardDye(number achievementId)
  244. -** Returns: boolean hasRewardOfType, number dyeIndex
  245. +** Returns: boolean hasRewardOfType, number dyeId
  246.  
  247.  * GetAchievementRewardCollectible(number achievementId)
  248.  ** Returns: boolean hasRewardOfType, number collectibleId
  249. @@ -4351,6 +4463,9 @@
  250.  * IsGamepadHelpOption(number [[Globals#HelpShowOptions|HelpShowOptions]] showOption)
  251.  ** Returns: boolean isGamepadOption
  252.  
  253. +* IsSubmitFeedbackSupported()
  254. +** Returns: boolean isSupported
  255. +
  256.  * GetCraftingInteractionType()
  257.  ** Returns: number [[Globals#TradeskillType|TradeskillType]] currentCraftingInteraction
  258.  
  259. @@ -4491,20 +4606,20 @@
  260.  * GetNumSmithingStyleItems()
  261.  ** Returns: number numStyleItems
  262.  
  263. -* GetSmithingStyleItemInfo(number [[StyleItemIndex|styleItemIndex]])
  264. -** Returns: string itemName, textureName icon, number sellPrice, boolean meetsUsageRequirement, number itemStyle, number quality
  265. -
  266. -* GetSmithingStyleItemLink(number [[StyleItemIndex|styleItemIndex]], number [[Globals#LinkStyle|linkStyle]])
  267. +* GetSmithingStyleItemInfo(number styleItemIndex)
  268. +** Returns: string itemName, textureName icon, number sellPrice, boolean meetsUsageRequirement, number itemStyle, number quality, boolean alwaysHideIfLocked
  269. +
  270. +* GetSmithingStyleItemLink(number styleItemIndex, number [[Globals#LinkStyle|LinkStyle]] linkStyle)
  271.  ** Returns: string link
  272.  
  273. -* GetCurrentSmithingStyleItemCount(number [[StyleItemIndex|styleItemIndex]])
  274. +* GetCurrentSmithingStyleItemCount(number styleItemIndex)
  275.  ** Returns: number count
  276.  
  277. -* IsSmithingStyleKnown(number [[StyleItemIndex|styleItemIndex]], number patternIndex)
  278. +* IsSmithingStyleKnown(number styleItemIndex, number patternIndex)
  279.  ** Returns: boolean known
  280.  
  281.  * GetFirstKnownStyleIndex(number patternIndex)
  282. -** Returns: number [[StyleItemIndex|styleItemIndex]]
  283. +** Returns: number styleItemIndex
  284.  
  285.  * CanSmithingStyleBeUsedOnPattern(number styleIndex, number patternIndex, number materialIndex, number materialQuantity)
  286.  ** Returns: boolean canBeUsed, number levelRequirement, number championPointsRequirement
  287. @@ -4749,19 +4864,30 @@
  288.  * GetNumTelvarStonesLost()
  289.  ** Returns: number telvarStonesLost
  290.  
  291. -* SetPendingEquippedItemDye(number [[Globals#EquipSlot|EquipSlot]] equipSlot, number:nilable primaryDyeIndex, number:nilable secondaryDyeIndex, number:nilable accentDyeIndex)
  292. -
  293. -* GetPendingEquippedItemDye(number [[Globals#EquipSlot|EquipSlot]] equipSlot)
  294. -** Returns: number:nilable primaryDyeIndex, number:nilable secondaryDyeIndex, number:nilable accentDyeIndex
  295. +* InitializePendingDyes(number [[Globals#DyeMode|DyeMode]] dyeMode)
  296. +
  297. +* SetPendingSlotDyes(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot, number primaryDyeId, number secondaryDyeId, number accentDyeId)
  298. +
  299. +* GetPendingSlotDyes(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  300. +** Returns: number primaryDyeId, number secondaryDyeId, number accentDyeId
  301.  
  302.  * GetNumDyes()
  303.  ** Returns: number numDyes
  304.  
  305.  * GetDyeInfo(number dyeIndex)
  306. +** Returns: string dyeName, boolean known, number [[Globals#DyeRarity|DyeRarity]] rarity, number [[Globals#DyeHueCategory|DyeHueCategory]] hueCategory, number achievementId, number r, number g, number b, number sortKey, number dyeId
  307. +
  308. +* GetDyeInfoById(number dyeId)
  309.  ** Returns: string dyeName, boolean known, number [[Globals#DyeRarity|DyeRarity]] rarity, number [[Globals#DyeHueCategory|DyeHueCategory]] hueCategory, number achievementId, number r, number g, number b, number sortKey
  310.  
  311. +* GetDyeColorsById(number dyeId)
  312. +** Returns: number r, number g, number b
  313. +
  314.  * GetCurrentItemDyes(number bagId, number slotIndex)
  315. -** Returns: number:nilable primaryDyeIndex, number:nilable secondaryDyeIndex, number:nilable accentDyeIndex
  316. +** Returns: number primaryDyeIndex, number secondaryDyeIndex, number accentDyeIndex
  317. +
  318. +* GetCurrentCollectibleDyes(number collectibleId)
  319. +** Returns: number primaryDyeIndex, number secondaryDyeIndex, number accentDyeIndex
  320.  
  321.  * ApplyPendingDyes()
  322.  
  323. @@ -4769,9 +4895,68 @@
  324.  ** Returns: number numSavedDyeSets
  325.  
  326.  * GetSavedDyeSetDyes(number dyeSetIndex)
  327. -** Returns: number:nilable primaryDyeIndex, number:nilable secondaryDyeIndex, number:nilable accentDyeIndex
  328. -
  329. -* SetSavedDyeSetDyes(number dyeSetIndex, number:nilable primaryDyeIndex, number:nilable secondaryDyeIndex, number:nilable accentDyeIndex)
  330. +** Returns: number primaryDyeId, number secondaryDyeId, number accentDyeId
  331. +
  332. +* SetSavedDyeSetDyes(number dyeSetIndex, number primaryDyeId, number secondaryDyeId, number accentDyeId)
  333. +
  334. +* CanUseCollectibleDyeing()
  335. +** Returns: boolean collectibleDyeingAllowed
  336. +
  337. +* IsDyeableSlotDyeable(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  338. +** Returns: boolean isDyeable
  339. +
  340. +* IsDyeableSlotBound(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  341. +** Returns: boolean isBound
  342. +
  343. +* AreDyeableSlotDyeChannelsDyeable(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  344. +** Returns: boolean primary, boolean secondary, boolean accent
  345. +
  346. +* GetDyeableSlotDyeData(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  347. +** Returns: number dyeData
  348. +
  349. +* GetDyeableSlotId(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  350. +** Returns: number id
  351. +
  352. +* GetDyeableSlotIcon(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  353. +** Returns: textureName icon
  354. +
  355. +* GetDyeableSlotCurrentDyes(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  356. +** Returns: number primaryDyeId, number secondaryDyeId, number accentDyeId
  357. +
  358. +* IsDyeIndexKnown(number dyeIndex)
  359. +** Returns: boolean isKnown
  360. +
  361. +* CanPlayerUseCostumeDyeStamp(number dyeStampId)
  362. +** Returns: number [[Globals#DyeStampUseResult|DyeStampUseResult]] dyeStampUseResult
  363. +
  364. +* CanPlayerUseItemDyeStamp(number dyeStampId)
  365. +** Returns: number [[Globals#DyeStampUseResult|DyeStampUseResult]] dyeStampUseResult
  366. +
  367. +* SetupDyeStampPreview(number bagId, number slotIndex)
  368. +
  369. +* GetNumDyeableEquipSlots()
  370. +** Returns: number numDyeableEquipSlots
  371. +
  372. +* GetNumDyeableCollectibleCategories()
  373. +** Returns: number numDyeableCollectibleCategories
  374. +
  375. +* GetDyeableEquipSlot(number dyeableEquipSlotIndex)
  376. +** Returns: number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot
  377. +
  378. +* GetDyeableCollectibleCategory(number dyeableCollectibleCategoryIndex)
  379. +** Returns: number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot
  380. +
  381. +* GetDyeableEquipSlotGamepadOrder(number dyeableEquipSlotIndex)
  382. +** Returns: number gamepadOrder
  383. +
  384. +* GetDyeableCollectibleCategoryGamepadOrder(number dyeableCollectibleCategoryIndex)
  385. +** Returns: number gamepadOrder
  386. +
  387. +* GetEquipSlotFromDyeableSlot(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  388. +** Returns: number [[Globals#EquipSlot|EquipSlot]] equipSlot
  389. +
  390. +* GetCollectibleCategoryFromDyeableSlot(number [[Globals#DyeableSlot|DyeableSlot]] dyeableSlot)
  391. +** Returns: number [[Globals#CollectibleCategoryType|CollectibleCategoryType]] collectibleCategory
  392.  
  393.  * IsJusticeEnabled()
  394.  ** Returns: boolean isJusticeEnabled
  395. @@ -4997,6 +5182,12 @@
  396.  * {{Private function}} IsCurrentlyPreviewing()
  397.  ** Returns: boolean isPreviewing
  398.  
  399. +* {{Private function}} IsInPreviewMode()
  400. +** Returns: boolean isInPreviewMode
  401. +
  402. +* IsCharacterPreviewingAvailable()
  403. +** Returns: boolean canPreview
  404. +
  405.  * {{Private function}} EndCurrentItemPreview()
  406.  
  407.  * {{Private function}} BeginItemPreviewSpin()
  408. @@ -5006,6 +5197,14 @@
  409.  * {{Private function}} CanSpinPreviewCharacter()
  410.  ** Returns: boolean canSpin
  411.  
  412. +* {{Private function}} PreviewCollectible (number collectibleDefId, number variation, number dyeBrushId)
  413. +
  414. +* {{Private function}} PreviewDyeStamp (number dyeStampId, number [[Globals#ItemUseType|ItemUseType]] itemType)
  415. +
  416. +* {{Private function}} PreviewCraftItem (number patternIndex, number materialIndex, number materialQuantity, number styleIndex, number traitIndex, boolean useUniversalStyleItem, number aDyeStampId)
  417. +
  418. +* {{Private function}} SetPreviewDyeMode (number [[Globals#DyeMode|DyeMode]] dyeMode)
  419. +
  420.  * GetNumDefaultQuickChats()
  421.  ** Returns: number numQuickChats
  422.  
  423. @@ -5182,4 +5381,33 @@
  424.  ** Returns: string emailAddress
  425.  
  426.  * GetCurrentZoneDungeonDifficulty()
  427. -** Returns: number [[Globals#DungeonDifficulty|DungeonDifficulty]] isVeteranDifficulty
  428. \ No newline at end of file
  429. +** Returns: number [[Globals#DungeonDifficulty|DungeonDifficulty]] isVeteranDifficulty
  430. +
  431. +* {{Private function}} HousingEditorToggleSnapMode()
  432. +
  433. +* {{Private function}} HousingEditorRequestPlacement()
  434. +
  435. +* {{Private function}} HousingEditorRotateFixture (number [[Globals#AxisTypes|AxisTypes]] axis, number magnitude)
  436. +
  437. +* {{Private function}} HousingEditorPushFixture (number magnitude)
  438. +
  439. +* {{Private function}} HousingEditorPreviewItemFurniture (number [[Globals#Bag|Bag]] bagId, number slotIndex)
  440. +** Returns: boolean success
  441. +
  442. +* {{Private function}} HousingEditorHasPendingFixture()
  443. +** Returns: boolean isPreview
  444. +
  445. +* {{Private function}} HousingEditorSelectFurniture()
  446. +
  447. +* {{Private function}} HousingEditorCanSelectFurniture()
  448. +
  449. +* {{Private function}} HousingEditorRequestModeChange (number [[Globals#HousingEditorMode|HousingEditorMode]] mode)
  450. +
  451. +* {{Private function}} GetHousingEditorMode()
  452. +** Returns: number [[Globals#HousingEditorMode|HousingEditorMode]] mode
  453. +
  454. +* {{Private function}} DebugHousingEditorPreviewTestFurniture (number index)
  455. +** Returns: boolean success
  456. +
  457. +* {{Private function}} DebugGetNumTestFurniture()
  458. +** Returns: number size
  459. \ No newline at end of file

Weolo 08/01/16 11:55 AM

Shadow of the Hist - Storing addon data
 
Shadow of the Hist now comes with API functions to allow your addon data to survive a character rename, class change, race change and even figure out if the player has deleted an old character.

Old way of storing addon data
Lua Code:
  1. local settings =  ZO_SavedVars:NewAccountWide("Test Addon", 1, nil, defaults)
  2. local name = zo_strformat("<<1>>",GetRawUnitName("player"))
  3. settings[name] = {
  4.   [something] = 1,
  5.   [show] = true
  6. }
This would produce a saved variables file like this:
Lua Code:
  1. {
  2.   ["Fred Smith"] = {
  3.     ["something"] = 1,
  4.     ["show"] = false,
  5.   },
  6.   ["John Smith"] = {
  7.     ["something"] = 2,
  8.     ["show"] = true,
  9.   }
  10. }

The problem with that is if the player purchases a rename token they will not have access to their old addon data.

This can all be fixed with these few functions

GetNumCharacters()
GetCharacterInfo()
GetCurrentCharacterId()

The "CharacterId" is unique for each character you have.

Example of the new way to store addon data
Lua Code:
  1. local id = GetCurrentCharacterId()
  2. settings[id] = {
  3.   [something] = 1,
  4.   [show] = true
  5. }
This would produce a saved variables file like this:
Lua Code:
  1. {
  2.   ["11111111"] = {
  3.     ["something"] = 1,
  4.     ["show"] = false,
  5.   },
  6.   ["22222222"] = {
  7.     ["something"] = 2,
  8.     ["show"] = true,
  9.   }
  10. }

And they can also be used to convert the old format over to the new one.
Lua Code:
  1. for i = 1, GetNumCharacters() do
  2.   local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)
  3.   name = zo_strformat("<<1>>",name)
  4.   if settings[name] then
  5.     --Found the old data, now convert it
  6.     settings[id] = {
  7.       [something] = settings[name].something,
  8.       [show] = settings[name].show
  9.     }
  10.     --Now tidy up/remove the old data
  11.     settings[name] = nil
  12.   end
  13. end
  14.  
  15. local id = GetCurrentCharacterId()
  16. settings[id] = {
  17.   [something] = 1,
  18.   [show] = true
  19. }

This last example just tidies up old/deleted characters
Lua Code:
  1. local found = {}
  2. for i = 1, GetNumCharacters() do
  3.   local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)
  4.   found[id] = true
  5. end
  6.  
  7. for id,data in pairs(settings) do
  8.   if not found[id] then
  9.     settings[id] = nil
  10.   end
  11. end
  12.  
  13. local id = GetCurrentCharacterId()
  14. settings[id] = {
  15.   [something] = 1,
  16.   [show] = true
  17. }

I did find one bug with GetCharacterInfo() on PTS which is being fixed and that was if you created a brand new character they did not appear in GetCharacterInfo(). But that is easy enough to fix with a small bit of code for now. I need to test live once Shadow of the Hist is all patched up to see if the bug fix is there.

sirinsidiator 08/01/16 01:40 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 27767)
Here's the updated docs for the next PTS update.

Any chance we can get an updated file for live? ;)

Weolo 08/01/16 02:40 PM

I just got in to the game and my addon is broken.
Something has changed with GetCharacterInfo(). It is not working the same way it was on PTS.

Lua Code:
  1. local found = false
  2. d("DEBUG currentId: "..GetCurrentCharacterId())
  3. d("DEBUG num characters: "..tostring(GetNumCharacters()))
  4. for i = 1, GetNumCharacters() do
  5.   local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)
  6.   d("DEBUG id="..tostring(id).." name="..zo_strformat("<<1>>",name))
  7.   if id == GetCurrentCharacterId() then
  8.     found = true
  9.   end
  10. end
  11. d("DEBUG Found id="..tostring(found))

The above code is generating this. The ids are way too short and some of the ids are duplicated

Screenshot

I am investigating to see if I can fix it myself :(

Ayantir 08/01/16 02:43 PM

Just don't rush on maybe broken new things :)

Weolo 08/01/16 02:54 PM

Quote:

Originally Posted by Ayantir (Post 27908)
Just don't rush on maybe broken new things :)

I tested the hell out of it on PTS and even submitted bug reports. They changed it for go live.

This:
Lua Code:
  1. local name, gender, level, championRank, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)
Seems to now be this:
Lua Code:
  1. local name, gender, level, classId, raceId, alliance, id, locationId = GetCharacterInfo(i)

championRank has gone.
I will adapt my addon but it will have properly broken it for anyone who patched and tried to use it :(

ZOS_ChipHilseberg 08/01/16 03:03 PM

Sorry about that, the fix made it impossible to populate champion rank and it didn't particularly make sense in the returns anyway so we ripped it out.

Weolo 08/01/16 03:10 PM

No problem.
I fixed my addon and because it now tidies itself up its all good.
Keep up the good work, love the game, love the API, loving your work ;)

Sounomi 08/01/16 04:27 PM

Just a heads up, it seems that calling "GetItemBoPTradeableDisplayNamesString" on an item that's not BoP Tradable will crash the client, even if you override it with your code. Discovered it while testing things on the PTS during maint and sent in a description about it with the crash report. Its bugged on live as well.

ZOS_ChipHilseberg 08/01/16 04:31 PM

Quote:

Originally Posted by Sounomi (Post 27912)
Just a heads up, it seems that calling "GetItemBoPTradeableDisplayNamesString" on an item that's not BoP Tradable will crash the client, even if you override it with your code. Discovered it while testing things on the PTS during maint and sent in a description about it with the crash report. Its bugged on live as well.

Thanks for the info.

Ayantir 08/02/16 09:16 AM

I randomly have this error on live for my char

Lua Code:
  1. EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:74: attempt to index a nil value
  2. stack traceback:
  3.     EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:74: in function 'ZO_SharedFurnitureManager:CreateOrUpdateItemDataEntry'
  4.     EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:29: in function 'ZO_SharedFurnitureManager:OnSingleSlotInventoryUpdate'
  5.     EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:13: in function 'callback'
  6.     EsoUI/Libraries/Utility/ZO_CallbackObject.lua:111: in function 'ZO_CallbackObject:FireCallbacks'
  7.     EsoUI/Ingame/Inventory/SharedInventory.lua:109: in function 'OnInventorySlotUpdated'

You should disable the housing editor while it's still unfinished :)

Baertram 08/02/16 11:35 AM

Yep, makes sense :)
Got this error message as well after a reloadui. I was standing at the bank and was doing nothing. No new items in my bag or others removed.
So it seems to be randomly.


Quote:

Originally Posted by Ayantir (Post 27919)
I randomly have this error on live for my char

Lua Code:
  1. EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:74: attempt to index a nil value
  2. stack traceback:
  3.     EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:74: in function 'ZO_SharedFurnitureManager:CreateOrUpdateItemDataEntry'
  4.     EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:29: in function 'ZO_SharedFurnitureManager:OnSingleSlotInventoryUpdate'
  5.     EsoUI/Ingame/HousingEditor/SharedFurnitureManager.lua:13: in function 'callback'
  6.     EsoUI/Libraries/Utility/ZO_CallbackObject.lua:111: in function 'ZO_CallbackObject:FireCallbacks'
  7.     EsoUI/Ingame/Inventory/SharedInventory.lua:109: in function 'OnInventorySlotUpdated'

You should disable the housing editor while it's still unfinished :)


ZOS_ChipHilseberg 08/03/16 08:03 AM

We haven't been able to reproduce the housing error internally. Does anyone have insight on possible triggers or know roughly how often it occurs?

Ayantir 08/03/16 08:58 AM

It only happens after a reloadui.

It should be really in first ms of a reload.
I had this 10 times while standing in wayrest yesterday before hotfix while doing tests on addons.
I didn't changed anything in my inventory to have this (no item creation, update or durability, nothing).

Baertram 08/03/16 09:21 AM

Yes, the same here.

Just standing around testing my addons and doing a reloadui here and there.
The error message appeared 3/5 times then just directly after the reloadui.
No items were changed,no new items created, no items were mailed or destroyed.

It did not depend on the city where I was standing or if I was inside a bank or outside as it seems.

Quote:

Originally Posted by Ayantir (Post 27937)
It only happens after a reloadui.

It should be really in first ms of a reload.
I had this 10 times while standing in wayrest yesterday before hotfix while doing tests on addons.
I didn't changed anything in my inventory to have this (no item creation, update or durability, nothing).


sirinsidiator 08/03/16 11:09 AM

I don't have the error, but I also haven't reloaded my UI much.
Maybe you can just comment out line 12 and 13 in sharedfurnituremanager.lua for now and call it a day?

Sounomi 08/03/16 09:18 PM

Same here, pretty much only get it after I've reloaded the UI when working on add-ons.

Code:

local itemCache = self.furnitureCache[ZO_PLACEABLE_TYPE_ITEM]
local bag = itemCache[bagId]

Looking at the code, my guess is that its being executed before the self.furnitureCache is fully initialized. Perhaps a simple fix would simply be to check that variable to make sure its not nil before trying to do stuff with it.

Weolo 08/06/16 10:34 AM

Weird bug with GetNumCharacters()
 
  • I logged in to ESO
  • Started playing with one of my characters
  • GetNumCharacters() was returning 8
  • Grouped up with a friend and did some Thieves guild heists
  • Did a couple of /reloadui during this time
  • GetNumCharacters() ended up only ever returning 1

I had to log out to the character selection screen for it to start returning 8 again

Sounomi 08/06/16 07:15 PM

I've run into that problem too. After a UI reload, it'll just randomly start saying there's only one character. Using "GetCharacterInfo" at this point with any index except for "1" returns empty values as well.

votan 08/07/16 05:25 AM

Quote:

Originally Posted by Weolo (Post 28011)
  • I logged in to ESO
  • Started playing with one of my characters
  • GetNumCharacters() was returning 8
  • Grouped up with a friend and did some Thieves guild heists
  • Did a couple of /reloadui during this time
  • GetNumCharacters() ended up only ever returning 1

I had to log out to the character selection screen for it to start returning 8 again

The information is lost at the second "Player Activated". In both cases: Due to travel or reloadui.

And there is a little mistake in the ESOUIDocumentation.txt.
GetCharacterInfo does not return championRank anymore. The return value has been removed, but is still in the doc file.

Weolo 08/07/16 06:55 AM

Quote:

Originally Posted by votan (Post 28018)
And there is a little mistake in the ESOUIDocumentation.txt.
GetCharacterInfo does not return championRank anymore. The return value has been removed, but is still in the doc file.

Yeah I raised that in post #44 above in this thead.
championRank was remove when Shodow of the Hist hit live.
ESOUIDocumentation.txt was given to us prior to go live so it is a little out.

I think I will have to build my own workaround. Capture all of the GetCharacterInfo() data that I want on first load and then re-use that from then on.

ZOS_ChipHilseberg 08/08/16 12:00 PM

Quote:

Originally Posted by Weolo (Post 28021)
Yeah I raised that in post #44 above in this thead.
championRank was remove when Shodow of the Hist hit live.
ESOUIDocumentation.txt was given to us prior to go live so it is a little out.

I think I will have to build my own workaround. Capture all of the GetCharacterInfo() data that I want on first load and then re-use that from then on.

This is fixed, but won't be in until the next update.


All times are GMT -6. The time now is 11:02 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI