ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   1.6 Addon API Feedback (https://www.esoui.com/forums/showthread.php?t=4243)

ZOS_ChipHilseberg 01/28/15 08:55 AM

1.6 Addon API Feedback
 
Feel free to post any questions or concerns about the 1.6 Addon API changes here.

sirinsidiator 01/28/15 02:10 PM

Admit it! You are actually testing your updates against our addons to ensure maximum mayhem :p
I just tried my addons on the pts and most of them won't run without some fixes.

Also a bit sad that there are no updates to the trading house search API. Could use a few improvements.

Other than that I haven't looked to deeply into the changes yet. Will save that for the weekend.

ZOS_ChipHilseberg 01/28/15 03:04 PM

Quote:

Originally Posted by sirinsidiator (Post 18447)
Also a bit sad that there are no updates to the trading house search API. Could use a few improvements.

What kind of functions would you like to see added?

Baertram 01/28/15 03:11 PM

Maybe a dumb question but where can I find the changes to the API with patch 1.6 listed?

SnowmanDK 01/28/15 03:27 PM

Quote:

Originally Posted by Baertram (Post 18449)
Maybe a dumb question but where can I find the changes to the API with patch 1.6 listed?

Only thing I have found so far is THIS

btw... is there an issue with existing version of LibMapPins-1.0 in 1.6?
I can't see any changes made to the API that should affect my Destinations addon, but there are no tooltips on ANY of the pins.

QuadroTony 01/28/15 03:38 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18448)
What kind of functions would you like to see added?

mby this, please :)

Quote:

Originally Posted by sirinsidiator
Quote:

Originally Posted by Ashtaris
Maybe I'm missing something but when I have reset all filters and just do a search in the search field text box for something like "Undaunted" and click Search, it will often return no items found even though I can do a manual search and find all kinds of Undaunted pieces. Is the search limited to one page only or across the entire store?

The name filter is only applied to the current page. This is due to technical limitations of the guild store API.


Randactyl 01/28/15 03:48 PM

I haven't really started banging on any of mine yet, but I was pleasantly surprised to log in to only one error message from an addon under my care.

The error was in Dye Station Achievement Links, had to change ZO_Dyeing to DYEING (which was originally how I thought it should have worked, but didn't).

I noticed in the source code some inconsistencies with the usage of collectible/collectable. Might consider ironing that out :)

I'm excited to see what may be possible with the champion UI, collections UI, and crown store UI.

Garkin 01/28/15 04:00 PM

Quote:

Originally Posted by SnowmanDK (Post 18451)
Only thing I have found so far is THIS

btw... is there an issue with existing version of LibMapPins-1.0 in 1.6?
I can't see any changes made to the API that should affect my Destinations addon, but there are no tooltips on ANY of the pins.

WorldMap pins have different tooltip creators in patch 1.6. Key "tooltip" is now mode (number betwen 1 and 4) instead of actual tooltip control. In other words just change "tooltip = InformationTooltip," to "tooltip = 1,".
http://www.esoui.com/forums/showthre...8442#post18442

Garkin 01/28/15 04:10 PM

In one of my addons I'm using item link in the label text:

Lua Code:
  1. zo_strformat("<<1>> (<<t:2>>)", GetString("SI_ITEMSTYLE", ITEMSTYLE_RACIAL_ORC), GetItemLinkName("|H0:item:33257:30:1:0:0:0:0:0:0:0:0:0:0:0:0:3:0:0:0:0|h|h"))
On live server is displayed "Orc (Manganese)", but on PTS just "Orc ()". Is there any change in label control?

Text is set in this code (actualy it is in LibAddonMenu-2.0, this is just simplified version):
Lua Code:
  1. local name = zo_strformat("<<1>> (<<t:2>>)", GetString("SI_ITEMSTYLE", ITEMSTYLE_RACIAL_ORC), GetItemLinkName("|H0:item:33257:30:1:0:0:0:0:0:0:0:0:0:0:0:0:3:0:0:0:0|h|h"))
  2. local label = WINDOW_MANAGER:CreateControl(nil, control, CT_LABEL)
  3. label:SetFont("ZoFontWinH4")
  4. label:SetText(name)
  5. label:SetWrapMode(TEXT_WRAP_MODE_ELLIPSIS)
  6. label:SetHeight(26)


The same goes for tooltip:
Lua Code:
  1. local tooltipText = "|H0:item:16426:1:50:0:0:0:0:0:0:0:0:0:0:0:0:3:0:0:0:0|h|h"
  2. InitializeTooltip(InformationTooltip, control, BOTTOMLEFT, 0, -2, TOPLEFT)
  3. SetTooltipText(InformationTooltip, tooltipText)
If this code is used on live server you will get "Racial Motifs 8: The Orcs", but on PTS you will get just "h".

Halja 01/28/15 04:37 PM

Chip thank you for GetAPIVersion. It is small thing but nice to have. I only had a chance to play PTS for a couple hours so far and not delved into add-on parts yet.

sirinsidiator 01/28/15 05:01 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18448)
What kind of functions would you like to see added?

A few suggestions that have gathered in my head over time:
  1. SetTradingHouseFilter currently accepts up to 8 filter arguments.
    In order to be able to implement an "all" subcategory for crafting mats in AwesomeGuildStore I would need to pass 19 arguments to get all the item types.
    A few possible solutions:
    • add 11 more arguments (sounds as bad as it probably is)
    • remove all but one and allow a table to be passed with up to 19 filter arguments (sounds equally as bad)
    • add an EQUIP_TYPE_CRAFTING for crafting items (ugly hack, but probably the easiest solution)
    • add new meta item types that allow to search for item categories (e.g. ITEM_CATEGORY_WEAPON, ITEM_CATEGORY_CRAFTING, etc.) (might be the cleanest solution but probably requires some work in the backend)
  2. New filter types for:
    • item name
    • set name
    • set boni
    • known state (for recipes and motifs)
    • per unit price range
    • stack size range
  3. New sort flag to allow sorting by per unit price.
  4. GetSearchResultPageCount()
    Returns how many pages the current search offers.
  5. GetSearchResultItemCount()
    Returns how many items are found overall with the current search.
  6. SetPendingItemPurchase and GetTradingHouseSearchResultItemInfo only accept a local index within the last searched page.
    If the search results had indices that are independent of the current page it would allow us to locally cache pages and still be able to purchase items regardless of which page of the current search we are requesting.
  7. Increase the search result limit from 100. It would save a lot of time that we loose because of the search cooldown if we could just request more at once.
    Maybe even add a function (SetSearchResultLimit) so we can set it ourselves to any value below a certain hard limit.
    A limit of 5000 results would allow downloading all items in most guild stores in 1-2 request and filtering them locally afterwards.
    This could potentially save a lot of processing power on the server and allow for much faster user interaction.

Would be nice to see any or all of them in the future :cool:

Sasky 01/29/15 02:29 AM

I wasn't able to get the main API functions to work for setting pending points or adjusting them. ClearPendingChampionPoints doesn't take any arguments, but wouldn't work from /script. I could get a dump of the points in each skill but feeding those same indices back in didn't do anything.

However, I was able to directly update the controls on the ui with something like this:
Lua Code:
  1. function AddPendingPoints(i,j,num)
  2.     CHAMPION_PERKS.constellations[i]:GetStars()[j].pendingPoints = num
  3. end

What's the correct syntax for AddPendingChampionPoints and such? Does it need to be prefixed by particular calls or is it just not working?

ZOS_ChipHilseberg 01/29/15 08:57 AM

Quote:

Originally Posted by Sasky (Post 18477)
What's the correct syntax for AddPendingChampionPoints and such? Does it need to be prefixed by particular calls or is it just not working?

The Clear, Add, and Spend functions are meant to be used together in the following way:
1) Clear the pending point storage in the client.
2) Add points that you want to spend by passing the discipline (constellation) index, skill index, and number of points to spend.
3) Call SpendPendingChampion points. If are just adding points, pass in false and the pending points will be interpreted as points to add to each skill. If you are respecing, pass in true and the pending points will be interpreted as the final point values for each skill.

These functions have no impact on the UI. They are just used to pass all of the requested points to the client.

Fyrakin 01/29/15 09:05 AM

Actually I was hoping for the Object function SetShapeType to do something usefull :rolleyes:.
At least for controlls like Scroll. Values to be passed are SHAPE_BOX and SHAPE_CIRCLE, but it is well known that this function doesn't do anything.
So, my question is - are there any plans on to make SetShapeType do anything at all?

ZOS_ChipHilseberg 01/29/15 09:43 AM

Quote:

Originally Posted by Fyrakin (Post 18480)
Actually I was hoping for the Object function SetShapeType to do something usefull :rolleyes:.
At least for controlls like Scroll. Values to be passed are SHAPE_BOX and SHAPE_CIRCLE, but it is well known that this function doesn't do anything.
So, my question is - are there any plans on to make SetShapeType do anything at all?

Shape type is only used for mouse hit detection. If shape type is circle, the hit area for the control will be a circle centered over the control center with a diameter equal to the width of the control.

Sasky 01/29/15 09:45 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18479)
The Clear, Add, and Spend functions are meant to be used together in the following way:
1) Clear the pending point storage in the client.
2) Add points that you want to spend by passing the discipline (constellation) index, skill index, and number of points to spend.
3) Call SpendPendingChampion points. If are just adding points, pass in false and the pending points will be interpreted as points to add to each skill. If you are respecing, pass in true and the pending points will be interpreted as the final point values for each skill.

These functions have no impact on the UI. They are just used to pass all of the requested points to the client.

I'll try that. However, one of the cases that I'm thinking would be useful for an addon that distributes points would be to throw all the points into pending but leave the final submit/confirm to the user. That'd need it to update the UI.

ZOS_ChipHilseberg 01/29/15 10:31 AM

Quote:

Originally Posted by Sasky (Post 18482)
I'll try that. However, one of the cases that I'm thinking would be useful for an addon that distributes points would be to throw all the points into pending but leave the final submit/confirm to the user. That'd need it to update the UI.

In that case I'd look at ZO_ChampionStar:SpendPoints and ZO_ChampionStar:RemovePoints. And if that doesn't give enough control then you can set the star's pendingPoints member and call the callbacks in ZO_ChampionStar:OnValueChanged to update the UI.

ZOS_ChipHilseberg 01/29/15 12:18 PM

Quote:

Originally Posted by Garkin (Post 18456)
On live server is displayed "Orc (Manganese)", but on PTS just "Orc ()". Is there any change in label control?

This is a result of the link format expanding to add a bit for stolen state. Stolen is now the 3rd from the last bit. Enchant Charges/Condition and instance data were pushed down to accommodate it. So it's now: ...Stolen:Enchant Charges/Condition:Instance Data. I'll add that to the patch notes.

Garkin 01/29/15 12:35 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18487)
This is a result of the link format expanding to add a bit for stolen state. Stolen is now the 3rd from the last bit. Enchant Charges/Condition and instance data were pushed down to accommodate it. So it's now: ...Stolen:Enchant Charges/Condition:Instance Data. I'll add that to the patch notes.

Ah, thanks. I didn't properly check if the item link is valid on PTS, I was using old item links from the live server.

Garkin 01/29/15 12:58 PM

There are 4 (or 5) variables leaking to global. ;)

http://www.esoui.com/forums/showpost...1&postcount=16

merlight 01/29/15 04:05 PM

There are some UI objects that are difficult to get hold of, because they're only kept in local variables.

ingame/mainmenu/mainmenu.lua
Function ZO_MainMenuManager:Initialize creates an instance of ZO_AddOnManager, and puts it in a local variable. In AddonProfiles, I override ZO_AddOnManager:OnShow with the sole purpose of getting that instance. If not global, it could at least be a member in ZO_MainMenuManager (MAIN_MENU).

ingame/campaign/campaignbrowser.lua
CAMPAIGN_BROWSER is local in this file
Again, I was able to get it, but this one required a dirty hack. As to what for, it's a not-yet-ready add-on that flattens campaign tree, so that all (Normal) campaigns appear in one list.

ingame/leaderboards/leaderboards_shared.lua
And now for something completely different. Function ZO_LeaderboardsListManager_Shared:IndexFunction, which is used to implement __index meta-method on data tables, returns dataTable[key]. As long as every accessed key either exists or is added in SetupDataTable, it works. But when someone foolish enough attempts to access dataTable.foobar, it will lead to infinite recursion. Yes, I learned that the hard way ;) The function should return rawget(dataTable, key).

ZOS_ChipHilseberg 01/30/15 03:42 PM

Quote:

Originally Posted by sirinsidiator (Post 18460)
Would be nice to see any or all of them in the future :cool:

Thanks for the list. I'll pass it along to server since most of these have server implications.

katkat42 01/30/15 06:45 PM

ITEMTYPE enums and provisioning ingredients:
With the new provisioning changes, we now have one in-game item with ITEMTYPE_SPICE, one in-game item with ITEMTYPE_FLAVORING, and alllllllll the rest have ITEMTYPE_INGREDIENT. Perhaps the following might be implemented?
ITEMTYPE_MEAT (fish, white meat, red meat, game, small game, poultry)
ITEMTYPE_FRUIT (apples, bananas, jazbay grapes, melons, tomatoes, pumpkins)
ITEMTYPE_VEGETABLE (carrots, potatoes, corn, radishes, beets, greens)
ITEMTYPE_ALCOHOL, ITEMTYPE_TEA, ITEMTYPE_TONIC similarly
And the other 12 ingredients can stay ITEMTYPE_INGREDIENT, since they're pretty generic.

I figure, since enchanting runes got subdivided, it's worth a shot, and it would make certain things in SousChef much easier :-)

BornDownUnder 01/31/15 03:01 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18440)
Feel free to post any questions or concerns about the 1.6 Addon API changes here.

I have a question which most addons authors/users would (should) have... Is there a reason for the limiting of the file name structure to 128 characters in length? It was perfectly fine before and I can't possibly see any justification for the alteration at all :(

QuadroTony 02/01/15 12:44 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18511)
Thanks for the list. I'll pass it along to server since most of these have server implications.

Hi, man!
im not really a developer, but can ZOS add to api smthing to detect all number of players in the home campaing to calculate a "gold reward position"? afaik its top 10%

like described there

http://www.esoui.com/forums/showthread.php?t=4260

ZOS_ChipHilseberg 02/02/15 09:23 AM

Quote:

Originally Posted by BornDownUnder (Post 18518)
I have a question which most addons authors/users would (should) have... Is there a reason for the limiting of the file name structure to 128 characters in length? It was perfectly fine before and I can't possibly see any justification for the alteration at all :(

Did you have an addon path that worked before 1.6 and that doesn't work now? I'm not aware of any (intentional) changes to that code.

QuadroTony 02/02/15 09:55 AM

sorry, looks like rewards for campaign works like this
- first 100 ppl det purple items
- first 10 ppl get gold items

disregard my prev question

SnowmanDK 02/03/15 02:04 PM

I have wondered if this one:
EVENT_QUEST_ADDED (integer eventCode, integer journalIndex, string questName, string objectiveName)
could get changed to something like this:
EVENT_QUEST_ADDED (integer eventCode, integer journalIndex, string questName, string objectiveName, integer questID)
so we can get the quest ID's.
Actually I would like to be able to get/use ID's for all those quest events.

BornDownUnder 02/03/15 07:01 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18593)
Did you have an addon path that worked before 1.6 and that doesn't work now? I'm not aware of any (intentional) changes to that code.

I apologize and fully retract my previous question. It seems I was mistaken completely in my troubleshooting of an addon on PtS.

I also apologize for the delay in response, am under the weather with hay-fever at present.

Dero 02/06/15 08:34 PM

what does
Code:

GetChampionPointAttributeForRank()
exactly do?

Atm it returns 0
Does it returns an integer, that describes, what the next CP will be?
Like
0 = Blue
1 = Red
2 = Green
?

And another important thing:
Can we get the Buffs/Hots/Dots and Debuffs back please?
Especially in trials its really hard to see if a buff or debuff is active or if it's not. And the current API gives only feedback on a really low number of buffs / debuffs.
For example: Poison arrow. You can see an effect on the target and you can see your hands glowing green. Everything fine, while playing solo. But if you are fighting in a big crowd like in trials or PvP you can't see if a buff is up or if its not. I know, that there are some addons wich show buffs, but these buffs are only interpreted by klicking a button with the assigned skill and they also say that there is a buff running, when you have canceled the skill or pressed it while stunned or something. i think a working buffinfo from the API would be really nice, and a lot of people would love to see this feature!

Garkin 02/06/15 09:27 PM

I will answer just the first part of your question:
Quote:

Originally Posted by Dero (Post 18720)
what does
Code:

GetChampionPointAttributeForRank()
exactly do?

Atm it returns 0
Does it returns an integer, that describes, what the next CP will be?
Like
0 = Blue
1 = Red
2 = Green
?

Return values are:
ATTRIBUTE_NONE = 0
ATTRIBUTE_HEALTH = 1
ATTRIBUTE_MAGICKA = 2
ATTRIBUTE_STAMINA = 3

So it is more like:
0 = None
1 = Red
2 = Blue
3 = Green


Here is a small piece of code from UI (center screen anounnce handler) which shows how to use this function:
Lua Code:
  1. --EsoUI\Ingame\CenterScreenAnnounce\CenterScreenAnnounceHandlers.lua, lines 735-742
  2. CSH[EVENT_CHAMPION_POINT_GAINED] = function()
  3.     local rankGained = GetPlayerChampionPointsEarned()
  4.     local pointType = GetChampionPointAttributeForRank(rankGained)
  5.     local icon = GetChampionPointAttributeIcon(pointType)
  6.     local constellationGroupName = ZO_Champion_GetConstellationGroupNameFromAttribute(pointType)
  7.     local secondLine = zo_strformat(SI_CHAMPION_POINT_TYPE, constellationGroupName)
  8.     return CSA_EVENT_COMBINED_TEXT, SOUNDS.CHAMPION_POINT_GAINED, GetString(SI_CHAMPION_POINT_EARNED), secondLine, icon, nil, nil, nil, nil, CSA_OPTION_SUPPRESS_ICON_FRAME
  9. end
  10.  
  11. --EsoUI\Ingame\ChampionPerks\ChampionPerks.lua, lines 20-29
  12. local ATTRIBUTE_TO_CONSTELLATION_GROUP_NAME =
  13. {
  14.     [ATTRIBUTE_HEALTH] = GetString(SI_CHAMPION_CONSTELLATION_GROUP_HEALTH_NAME),
  15.     [ATTRIBUTE_MAGICKA] = GetString(SI_CHAMPION_CONSTELLATION_GROUP_MAGICKA_NAME),
  16.     [ATTRIBUTE_STAMINA] = GetString(SI_CHAMPION_CONSTELLATION_GROUP_STAMINA_NAME),
  17. }
  18.  
  19. function ZO_Champion_GetConstellationGroupNameFromAttribute(attribute)
  20.     return ATTRIBUTE_TO_CONSTELLATION_GROUP_NAME[attribute]
  21. end

Dero 02/07/15 06:08 AM

Ty Garkin,
that was exactly what i was looking for.

merlight 02/07/15 07:04 AM

Yesterday I found out that CAMPAIGN_LEADERBOARDS became local. I didn't have much time to investigate, so far it seems it's only obtainable via hooking base class methods. Edit: I don't need it, as I was only hooking UpdatePlayerInfo, which was moved to a base class, so I can hook it there. But the detective work required everytime I want to hook something that's declared local is becoming tedious.

Well, reducing the amount of globals is generally a good thing, but could all those localized capitalized objects be made accessible from outside of their module? I mean ZOS code would keep using locals, but after construction also add them to a global table for add-on tackling.

Randactyl 02/08/15 01:13 AM

Travel to and Invite Guildmate to group bug
 
The "Travel to Player" and "Invite to Group" menu items are missing from the guild roster context menu. I can't test, because ZO_KeyboardGuildRosterManager is local, but I believe the issue is located in the function ZO_KeyboardGuildRosterManager:GuildRosterRow_OnMouseUp in the file guildroster_keyboard.lua.

The variable playerAlliance is used to check that the player and the target are in the same alliance, but playerAlliance is not declared within the scope of ZO_KeyboardGuildRosterManager:GuildRosterRow_OnMouseUp.

:)

Garkin 02/08/15 04:56 AM

Quote:

Originally Posted by Randactyl (Post 18733)
The "Travel to Player" and "Invite to Group" menu items are missing from the guild roster context menu. I can't test, because ZO_KeyboardGuildRosterManager is local, but I believe the issue is located in the function ZO_KeyboardGuildRosterManager:GuildRosterRow_OnMouseUp in the file guildroster_keyboard.lua.

The variable playerAlliance is used to check that the player and the target are in the same alliance, but playerAlliance is not declared within the scope of ZO_KeyboardGuildRosterManager:GuildRosterRow_OnMouseUp.

:)

Ha, you're right. There is a typo in code.

EsoUI\Ingame\Guild\Keyboard\GuildRoster_Keyboard.lua, lines 232-237:
Lua Code:
  1. if(dataIndex == playerIndex) then
  2.     ZO_AddLeaveGuildMenuItem(guildId)
  3. else
  4.     if(data.hasCharacter and data.online) then
  5.         AddMenuItem(GetString(SI_SOCIAL_LIST_SEND_MESSAGE), function() StartChatInput("", CHAT_CHANNEL_WHISPER, data.displayName) end)
  6.         if(data.alliance == playerAlliance) then --here should be self.playerAlliance instead of just playerAlliance
  7.             AddMenuItem(GetString(SI_SOCIAL_MENU_INVITE), function()

QuadroTony 02/08/15 05:02 AM

hmm - so we can fix this? or its the path to internal part of the file we cannot change, only ZOs can?

Garkin 02/08/15 05:43 AM

Quote:

Originally Posted by QuadroTony (Post 18738)
hmm - so we can fix this? or its the path to internal part of the file we cannot change, only ZOs can?

Only ZOS can. We can redefine that function, but we can't change what is in the original code.
Or to be more precise, object ZO_KeyboardGuildRosterManager is local, so we can't redefine it's methods directly - we have to find instance of this object (in this case GUILD_ROSTER_KEYBOARD) and then make a new definition of GuildRosterRow_OnMouseUp method.

QuadroTony 02/08/15 06:17 AM

and what about this? icon now always visible on pts
friends indicator


merlight 02/08/15 08:08 AM

Quote:

Originally Posted by Garkin (Post 18739)
... and then make a new definition of GuildRosterRow_OnMouseUp method.

Or amend its environment. Not entirely sure, but I think it should work (as long as the method is accessible):
Lua Code:
  1. local orgEnv = getfenv(GUILD_ROSTER_KEYBOARD.GuildRosterRow_OnMouseUp)
  2. local newEnv = setmetatable({playerAlliance = GetUnitAlliance("player")}, {__index = orgEnv})
  3. setfenv(GUILD_ROSTER_KEYBOARD.GuildRosterRow_OnMouseUp, newEnv)

Garkin 02/09/15 08:56 AM

Is there easy way to tell if you are interacting with fence or with regular merchant? Intraction type for both is INTREACTION_VENDOR.

ZOS_ChipHilseberg 02/09/15 10:30 AM

Quote:

Originally Posted by Garkin (Post 18737)
Ha, you're right. There is a typo in code.

A fix is in place for the next PTS push.

ZOS_ChipHilseberg 02/09/15 12:42 PM

Quote:

Originally Posted by merlight (Post 18497)
There are some UI objects that are difficult to get hold of, because they're only kept in local variables.

These should be global before the live 1.6 patch launches as ADD_ON_MANAGER and CAMPAIGN_BROWSER. We also fixed the infinite loop with the meta-method but that may take a little longer.

sirinsidiator 02/09/15 01:09 PM

could you by any chance also change zo_callLater to call the method after unregistering the update? because when the method throws an error, it never gets removed and will call the broken method again until I reload the ui... :D

Harven 02/10/15 04:41 AM

Hello!
A question to Chip: In update 1.5 you guys made CopyAllTextToClipboard function private. Was this really necessary? It would be great if you could bring it back to public. It would be even better if you could also extend the copy buffer to something bigger than 1023 characters. This functionality is necessary for my Book Copy addon to work.

merlight 02/10/15 07:50 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 18760)
These should be global before the live 1.6 patch launches as ADD_ON_MANAGER and CAMPAIGN_BROWSER. We also fixed the infinite loop with the meta-method but that may take a little longer.

Great. Have you reached some consensus regarding exposure of these ALL_CAPS_OBJECTS? I noticed some are being registered through SYSTEMS. Is that the place we should be getting them from in the future?

circonian 02/10/15 04:12 PM

Quote:

Originally Posted by Garkin (Post 18755)
Is there easy way to tell if you are interacting with fence or with regular merchant? Intraction type for both is INTREACTION_VENDOR.

I didn't see any API like IsAtFence()
There is a FENCE_SCENE though, you could check the current scene.

I also saw these which you might find useful, they are all from the FENCE_MANAGER

Lua Code:
  1. EVENT_MANAGER:RegisterForEvent("ZO_Fence_Manager", EVENT_OPEN_FENCE, function(eventCode) self:OnFenceOpened() end)
  2. EVENT_MANAGER:RegisterForEvent("ZO_Fence_Manager", EVENT_CLOSE_STORE, function(eventCode) self:OnFenceClosed() end)
  3.  
  4. self:FireCallbacks("FenceOpened", self.sellsUsed, self.laundersUsed)
  5. self:FireCallbacks("FenceClosed")
  6. self:FireCallbacks("FenceSellSuccess")
  7. self:FireCallbacks("FenceLaunderSuccess")
  8. self:FireCallbacks("FenceUpdated", self.totalSells, sellsUsed, self.totalLaunders, laundersUsed)
  9. self:FireCallbacks("FenceEnterSell", self.totalSells, self.sellsUsed)
  10. self:FireCallbacks("FenceEnterLaunder", self.totalLaunders, self.laundersUsed)
  11. self:FireCallbacks("FenceInventoryUpdated")

circonian 02/20/15 12:35 AM

Infmay Nil Error
 
PTS Error:


It looks like:

ZO_HUDInfamyMeter_Update(..) doesn't get called until the ZO_HUDInfamyMeter is shown.
xml Code:
  1. <TopLevelControl name="ZO_HUDInfamyMeter" hidden="true" >
  2.    <OnInitialized>
  3.       ZO_HUDInfamyMeter_Initialize(self)
  4.    </OnInitialized>
  5.    <OnUpdate>
  6.       ZO_HUDInfamyMeter_Update(time)
  7.    </OnUpdate>
  8. </TopLevelControl>

Which is the only place I see :Update(..) getting called
Lua Code:
  1. function ZO_HUDInfamyMeter_Update(time)
  2.     HUD_INFAMY_METER:Update(time)
  3. end

Which calls :OnInfamyUpdate(..)
Lua Code:
  1. function ZO_HUDInfamyMeter:Update(time)
  2.     if self.nextUpdateTime <= time and not self.hiddenExternalRequest then
  3.         self.nextUpdateTime = time + INFAMY_METER_UPDATE_DELAY_SECONDS
  4.         self:OnInfamyUpdated(UPDATE_TYPE_TICK)
  5.     end
  6. end

and finally self.oldInfamy does not get initialized until the last line of this function:
Lua Code:
  1. function ZO_HUDInfamyMeter:OnInfamyUpdated(updateType)
  2.    ...
  3.     self.oldInfamy = self.infamy
  4. end

So if this event fires before the HUDInfamyMeter gets displayed (by opening some ui panel) then self.oldInfamy is still nil
Lua Code:
  1. -- Register for events
  2.     control:RegisterForEvent(EVENT_JUSTICE_INFAMY_UPDATED, function()
  3.         local infamy = GetInfamy()
  4.         if not self.hiddenExternalRequest and infamy ~= 0 and infamy > self.oldInfamy then self:OnInfamyUpdated(UPDATE_TYPE_EVENT) end
  5.     end)

Garkin 02/20/15 08:42 AM

- Function GetChampionXPInRank(3600) returns nil. But 3600 is the last point you can get, so there has to be value for XP in rank 3600. Or this function returns not XP in specified rank, but in the next rank?

- If you have maximum champion points earned, why experience bar shows next champion point?

merlight 02/20/15 09:08 AM

Quote:

Originally Posted by Garkin (Post 18921)
- Function GetChampionXPInRank(3600) returns nil. But 3600 is the last point you can get, so there has to be value for XP in rank 3600. Or this function returns not XP in specified rank, but in the next rank?

GetChampionXPInRank(0) returns 400k, so I guess you start at rank 0 and the value is how much you need to reach the next rank (get the next point).

ZOS_ChipHilseberg 02/20/15 09:28 AM

Quote:

Originally Posted by merlight (Post 18923)
GetChampionXPInRank(0) returns 400k, so I guess you start at rank 0 and the value is how much you need to reach the next rank (get the next point).

This is correct.

merlight 02/22/15 06:18 AM

@ZOS_ChipHilseberg: Could you please add something like:
Lua Code:
  1. CALLBACK_MANAGER:FireCallbacks("ChatSystemLoaded", self)
to the end of SharedChatSystem:LoadChatFromSettings ?

Many of us wondered at least once why our d("hello world!") shouts from initialization handlers wouldn't show up. There are workarounds (buffering until chat is ready), but unless CHAT_SYSTEM is guarranteed to receive EVENT_PLAYER_ACTIVATED before any other add-on/control listening for that event (which I assume it isn't), only the dirty one is reliable (hooking LoadChatFromSettings).

sirinsidiator 02/22/15 06:25 AM

Or make d() work in a way that outputs things that are sent before chat is ready ;)

merlight 02/22/15 08:14 AM

Quote:

Originally Posted by sirinsidiator (Post 18965)
Or make d() work in a way that outputs things that are sent before chat is ready ;)

Of course, but that wouldn't be a one-liner. And, sorry for being sceptical :), if EVENT_MANAGER calls handlers in the order they were registered, I'll be fine with EVENT_PLAYER_ACTIVATED.

Garkin 02/23/15 01:28 PM

This is not originally my idea, but I think it is really useful - can we get confirmation dialog when we try to equip "bound on equip" item? It really hurts if you find out that you have accidentaly equiped wrong Ring of the Healer...

It could be optional - the same way like autoloot etc.

sirinsidiator 02/23/15 01:45 PM

And it hurts even more when customer service tells you that they haven't gotten the tools to undo it...

Garkin 02/24/15 08:46 PM

This is function in MailInbox.lua:

Lua Code:
  1. function MailInbox:ConfirmDelete(mailId)
  2.     if not IsMailReturnable(self.mailId) then
  3.         DeleteMail(mailId, true)
  4.         PlaySound(SOUNDS.MAIL_ITEM_DELETED)
  5.     end
  6. end
Is it intended that IsMailReturnable is called for self.mailId and DeleteMail for argument mailId?

Garkin 02/24/15 09:29 PM

Is it intended that you get "item repaired" alerts even in "keyboard" mode?

I believe that those alerts are from ZO_GamepadStoreManager:
Lua Code:
  1. -- part of the ZO_GamepadStoreManager:Initialize(control) function
  2.     local function OnItemRepaired(bagId, slotIndex)
  3.         if self.isRepairingAll then
  4.             if self.numberItemsRepairing > 0 then
  5.                 self.numberItemsRepairing = self.numberItemsRepairing - 1
  6.                 if self.numberItemsRepairing == 0 then
  7.                     self:RepairMessageBox()
  8.                     self.isRepairingAll = false
  9.                 end
  10.             end
  11.         else
  12.             self:RepairMessageBox(bagId, slotIndex)
  13.         end
  14.     end
  15.  
  16.     SHARED_INVENTORY:RegisterCallback("ItemRepaired", OnItemRepaired)
  17. ---
  18.  
  19. function ZO_GamepadStoreManager:RepairMessageBox(bagId, slotId)
  20.     if not bagId then
  21.         local message = zo_strformat(SI_GAMEPAD_REPAIR_ALL_SUCCESS)
  22.         ZO_AlertNoSuppression(UI_ALERT_CATEGORY_ALERT, nil, message)
  23.     else
  24.         local name = zo_strformat(SI_TOOLTIP_ITEM_NAME, GetItemName(bagId, slotId))
  25.         local message = zo_strformat(SI_GAMEPAD_REPAIR_ITEM_SUCCESS, name)
  26.         if message then
  27.             ZO_AlertNoSuppression(UI_ALERT_CATEGORY_ALERT, nil, message)
  28.         end
  29.     end
  30. end

Baertram 02/25/15 03:45 PM

Quote:

Originally Posted by Garkin (Post 19019)
This is not originally my idea, but I think it is really useful - can we get confirmation dialog when we try to equip "bound on equip" item? It really hurts if you find out that you have accidentaly equiped wrong Ring of the Healer...

It could be optional - the same way like autoloot etc.

I've added this to FCOItemSaver a while ago so you could use it for the moment to show a confirmation dialog. The only thing I did not get to work properly is the drag&drop of bindable items. I wished it would react on the "drop" to an equipment slot. But currently I can only react to the "drag" from inventories :-(

circonian 02/28/15 06:48 AM

Waypoint Bug on PTS
 
Waypoints, on the normal zone maps, removed with RemovePlayerWaypoint() get recreated when zooming back into your zone on the map.
By "normal" zone maps I mean that I could not reproduce it while in a subzone that has its own map, like a town.

With no addons installed I was able to reproduce this in cyrodil and craglorn (I didn't try anywhere else) while in a location of the "normal" zone map.

Steps to recreate:
  1. Open the map & set a waypoint in the zone.
  2. Close the map
  3. Run: /script RemovePlayerWaypoint()
  4. Open the map
  5. Right click to zoom out to the Tamriel map.
  6. Left click on your zone to zoom back in to your zone.
  7. The waypoint gets recreated.

If it helps track it down I also noticed that the bug does not occur if:
  • You remove the waypoint by hoovering your mouse over it on the map & using the hotkey to remove the waypoint.
  • You /reloadUI after you set the waypoint and before you open the map to zoom out to Tamriel & back in to your zone.
  • I could not reproduce it in subzones that have their own maps like towns.

shiva7663 03/08/15 01:33 PM

Correct API version for Update 1.6.x, but client still lists addons as out of date
 
I have noticed that newly updated addons for 1.6 are still shown as out of date even though their .txt files show a reference to the correct API version. Anyone know what's happening here? Was there some crucial change in how the client software detects addon API compliance?

The only exception I've seen so far is that Wykkyd's Gaming Suite addons are listed as current.


All times are GMT -6. The time now is 01:27 AM.

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