Thread Tools Display Modes
07/14/17, 02:06 PM   #21
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Rhyono View Post
Thanks, that is what I needed. Still trying to fix the rest of the code now, though...

Also: Clockwork is a lie. It's in the books area, the items exist in the data, but the style and achievement do not.

Whoever transcribed the style names to GetItemStyleName() used the constants verbatim. E.g. Celestial is now called Craglorn which is...not good.

Is Mimic being in the valid style list as "Universal" intentional? If so, I'm going to have to write a work around to make that non-style not appear in CraftStore.
Universal is meant to be in ther, yes. The names have been bugged and will be fixed.
  Reply With Quote
07/14/17, 02:49 PM   #22
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Mundus stone bug

I go and get the Lady mundus stone, the next time I log in I have no mundus stone effect at all and have to go and get it again. I will do a /bug report
  Reply With Quote
07/14/17, 04:10 PM   #23
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,566
Originally Posted by Weolo View Post
I go and get the Lady mundus stone, the next time I log in I have no mundus stone effect at all and have to go and get it again. I will do a /bug report
That bug should get fixed next week: https://forums.elderscrollsonline.co...omment_4332086
  Reply With Quote
07/15/17, 02:58 PM   #24
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
I've updated http://wiki.esoui.com/StyleItemIndex

If your addon deals with smithing (+wood / clothing) or style knowledge, you should rewrite it.
  Reply With Quote
07/16/17, 09:21 AM   #25
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Originally Posted by Ayantir View Post
I've updated http://wiki.esoui.com/StyleItemIndex

If your addon deals with smithing (+wood / clothing) or style knowledge, you should rewrite it.
Nice one Ayantir
I think your dynamic list code could be tweaked slightly.
I am happy to do this but wanted to get your opinion first.

Looking at how ZOS do it in "function ZO_SharedSmithingCreation:RefreshStyleList()" they loop using GetNumValidItemStyles() instead of GetHighestItemStyleId(). And they get the ID from the index, ItemStyleId from GetValidItemStyleId(itemStyleIndex)

How about this:
Lua Code:
  1. for itemStyleIndex = 1, GetNumValidItemStyles() do
  2.     local itemStyleId = GetValidItemStyleId(itemStyleIndex)
  3.     if itemStyleId > 0 then
  4.         local styleItemLink = GetItemStyleMaterialLink(itemStyleId)
  5.         local _, _, meetsUsageRequirement = GetItemLinkInfo(styleItemLink)
  6.         if meetsUsageRequirement then
  7.             d(zo_strformat("<<1>> : <<2>> (<<3>>)", itemStyleId, styleItemLink, GetItemStyleName(itemStyleId)))
  8.         end
  9.     end
  10. end

Maybe even remove GetItemLinkInfo(styleItemLink) completely

Last edited by Weolo : 07/16/17 at 09:24 AM.
  Reply With Quote
07/16/17, 09:49 AM   #26
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
It basically lead to the same thing.

GetNumValidItemStyles() only returns craftable styles in an indexlist.

So basically :

styleItemIndex styleId 59 (hollowjack) == itemStyleId 53

Your code is correct, after for meetsUsageRequirement, for me, it's basically always true for a style in the loop of GetNumValidItemStyles() and with GetValidItemStyleId() > 0 ..

But I'll keep GetHighestItemStyleId() because this one contains non craftable styles and they can be interesting. (I've added the list and the code snippet).
ex : 10 Unique, 18 Bandit, 32 Maormer, 37 Reach Winter, 38 Tsaesci, 55 Worm Cult

Also, this lead to ANOTHER index which will also confuse everyone.
We had before ITEMSTYLES_ constants and styleItemIndex
Now styleItemIndex is renamed into itemStyleId (or styleId depends where it's used).. so i'm not fan of GetNumValidItemStyles.. it's maybe proper but it's another table of correspondance..

Last edited by Ayantir : 07/16/17 at 10:02 AM.
  Reply With Quote
07/16/17, 10:54 AM   #27
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
New Styles

For anyone wanting the details and item ids of the 3 new motifs

Crafting Motif 50: Telvanni
itemStyleId = 51
Learn All Motif = 121332
AXES = 121333
BELTS = 121334
BOOTS = 121335
BOWS = 121336
CHESTS = 121337
DAGGERS = 121338
GLOVES = 121339
HELMETS = 121340
LEGS = 121341
MACES = 121342
SHIELDS = 121343
SHOULDERS = 121344
STAVES = 121345
SWORDS = 121346
Crown Crafting Motif = 121347

Crafting Motif 51: Hlaalu
itemStyleId = 49
Learn All Motif = 129994
AXES = 129995
BELTS = 129996
BOOTS = 129997
BOWS = 129998
CHESTS = 129999
DAGGERS = 130000
GLOVES = 130001
HELMETS = 130002
LEGS = 130003
MACES = 130004
SHIELDS = 130005
SHOULDERS = 130006
STAVES = 130007
SWORDS = 130008
Crown Crafting Motif = 130009

Crafting Motif 52: Redoran
itemStyleId = 48
Learn All Motif = 130010
AXES = 130011
BELTS = 130012
BOOTS = 130013
BOWS = 130014
CHESTS = 130015
DAGGERS = 130016
GLOVES = 130017
HELMETS = 130018
LEGS = 130019
MACES = 130020
SHIELDS = 130021
SHOULDERS = 130022
STAVES = 130023
SWORDS = 130024
Crown Crafting Motif = 130025
  Reply With Quote
07/18/17, 10:41 AM   #28
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
The trait material icons for Hlaalu, Redoran, and Telvanni still do not load at crafting stations.
I am going to assume this is a known bug but will /bug report is anyway
  Reply With Quote
07/25/17, 10:20 AM   #29
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Originally Posted by Weolo View Post
The trait material icons for Hlaalu, Redoran, and Telvanni still do not load at crafting stations.
I am going to assume this is a known bug but will /bug report is anyway
I just checked with the v3.1.2 patch and the material icons for these 3 styles is still not loading.

  Reply With Quote
07/25/17, 10:51 AM   #30
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
dds are generally pushed very late in the client. I generally dump textures at the very end of the pts
  Reply With Quote
07/25/17, 01:26 PM   #31
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Weolo View Post
I just checked with the v3.1.2 patch and the material icons for these 3 styles is still not loading.

I sent this along to the systems designers to fix.
  Reply With Quote
07/26/17, 10:52 AM   #32
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
I made a template character after v3.1.2 and my class skills were level 1 and my crafting skills ranged from level 1 to 15 after visiting the crafting stations.
Is that right?

I also just made a new template character today; 26th; and the class skills were correct at lvl 50 but I had no crafting skills.

It may have been a bug on the one character not having the class skills maxed but neither of them had any crafting skills or points.

Last edited by Weolo : 07/26/17 at 11:33 AM.
  Reply With Quote
08/15/17, 10:20 AM   #33
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
SavedVariables

Anyone else noticing something a bit weird with SavedVariables?
I am seeing some settings not be remembered unless the user quits the game and loads it back up again.
When logging out and switching characters some values were not remembered from the character you came from.
  Reply With Quote
08/15/17, 04:12 PM   #34
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
SavedVariables

Before the HotR DLC my addon was saving settings just fine in to a SavedVariables file but now it is doing this:

- I log in to a character who can research 2 items
- Do a /reloadui to force a settings save
- Check my SavedVariables file and it correctly shows it has stored a value of 2

If I log out to the character selection screen, or quit the game, and then check the file again this setting has changed back to 1.

What could be causing a setting which used to work now not be saved?

If it makes any difference the setting would have been 1 in the file before the DLC.
  Reply With Quote
08/16/17, 09:31 AM   #35
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
Originally Posted by Weolo View Post
Before the HotR DLC my addon was saving settings just fine in to a SavedVariables file but now it is doing this:

- I log in to a character who can research 2 items
- Do a /reloadui to force a settings save
- Check my SavedVariables file and it correctly shows it has stored a value of 2

If I log out to the character selection screen, or quit the game, and then check the file again this setting has changed back to 1.

What could be causing a setting which used to work now not be saved?

If it makes any difference the setting would have been 1 in the file before the DLC.
Have you observed this happening with any other SavedVars not related to researching? What about SavedVars in vanilla UI, are they having the same behavior?
  Reply With Quote
08/16/17, 11:08 AM   #36
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Originally Posted by ZOS_DanBatson View Post
Have you observed this happening with any other SavedVars not related to researching? What about SavedVars in vanilla UI, are they having the same behavior?
I have not had the chance to check other addons, I was focusing too much on my addon
Today I will remove all other addons, SavedVariable files and just log in to a couple of my characters and see what sticks.

That's if the game comes back up today, some exploit being fixed :$

Last edited by Weolo : 08/16/17 at 12:34 PM.
  Reply With Quote
08/16/17, 04:00 PM   #37
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Event_non_combat_bonus_changed

I have figured out what is bugged, I was not expecting this..
There is a problem with the new event EVENT_NON_COMBAT_BONUS_CHANGED, it fires on logout to character selection screen and I guess at quit game also.

I hope I am correct in assuming this event should only fire when playing on your character when the skills are changed and not when going to the character selection screen or quitting the game.

Brand new example addon and code:

Name: TestAddon
SavedVariables file: TestAddon
Test value: TestAddon.settings.test.something

Steps:
1. Pick a character and log in
2. /reloadui
3. Check SV file
4. TestAddon.settings.test.something = "First"
5. Log out to character selection screen
6. Check SV file
7. TestAddon.settings.test.something = "Non Combat"

TestAddon.lua:
Lua Code:
  1. local function OnNonCombatBonusChanged(eventCode, nonCombatBonusType)
  2.     TestAddon.settings.test.something = "Non Combat"
  3. end
  4. local function DefaultSettings()
  5.     local defaults = {
  6.         test = {}
  7.     }
  8.     return defaults
  9. end
  10. local function OnPlayerActivated()
  11.     if TestAddon.player_activated then return end
  12.     TestAddon.player_activated = true
  13.     EVENT_MANAGER:UnregisterForEvent("TestAddon", EVENT_PLAYER_ACTIVATED)
  14.    
  15.     TestAddon.settings.test.something = "First"
  16. end
  17. local function OnLoaded(eventType, addonName)
  18.     if addonName ~= "TestAddon" then return end
  19.     TestAddon.settings = ZO_SavedVars:NewAccountWide("TestAddonSettings", 1, nil, DefaultSettings())
  20.     EVENT_MANAGER:RegisterForEvent("TestAddon", EVENT_PLAYER_ACTIVATED, OnPlayerActivated)
  21.     EVENT_MANAGER:RegisterForEvent("TestAddon", EVENT_NON_COMBAT_BONUS_CHANGED, OnNonCombatBonusChanged)
  22. end
  23.  
  24. TestAddon = {
  25.     player_activated = false
  26. }
  27. EVENT_MANAGER:RegisterForEvent("TestAddon", EVENT_ADD_ON_LOADED, OnLoaded)

TestAddon.txt
Code:
## Title: TestAddon
## APIVersion: 100020
## SavedVariables: TestAddonSettings
## Version: 1.0

TestAddon.lua
SavedVariables File TestAddon.lua After reloadui
Lua Code:
  1. TestAddonSettings =
  2. {
  3.     ["Default"] =
  4.     {
  5.         ["@Weolo"] =
  6.         {
  7.             ["$AccountWide"] =
  8.             {
  9.                 ["version"] = 1,
  10.                 ["test"] =
  11.                 {
  12.                     ["something"] = "First",
  13.                 },
  14.             },
  15.         },
  16.     },
  17. }

SavedVariables File TestAddon.lua After log out to character selection screen
Lua Code:
  1. TestAddonSettings =
  2. {
  3.     ["Default"] =
  4.     {
  5.         ["@Weolo"] =
  6.         {
  7.             ["$AccountWide"] =
  8.             {
  9.                 ["version"] = 1,
  10.                 ["test"] =
  11.                 {
  12.                     ["something"] = "Non Combat",
  13.                 },
  14.             },
  15.         },
  16.     },
  17. }
  Reply With Quote
08/16/17, 05:04 PM   #38
Enodoc
AddOn Author - Click to view addons
Join Date: Aug 2014
Posts: 52
LUA Error

Anyone able to assist with the cause of a couple of UI Errors?

Code:
Checking type on argument interfaceColorType failed in GetInterfaceColor_lua
 stack traceback:
 [C]: in function 'GetInterfaceColor'
 EsoUI/Libraries/Utility/ZO_ColorDef.lua:46: in function 'ZO_ColorDef.FromInterfaceColor'
 user:/AddOns/CyrodiilAlert/CyrodiilAlert.lua:134: in function 'CA.Initialise'
This is line 134:
Lua Code:
  1. CA.colGrn = ZO_ColorDef:FromInterfaceColor(INTERFACE_COLOR_TYPE_KEEP_TOOLTIP,KEEP_TOOLTIP_COLOR_ACCESSIBLE)

Code:
user:/AddOns/CyrodiilAlert/CyrodiilAlert.lua:210: attempt to index a nil value
 stack traceback:
 user:/AddOns/CyrodiilAlert/CyrodiilAlert.lua:210: in function 'CA.InitKeeps'
 EsoUI/Libraries/Globals/globalapi.lua:195: in function '(anonymous)'
This is line 210:
Lua Code:
  1. local initText = zo_strformat(CA.colOng:Colorize(GetString(SI_CYRODIIL_ALERT_INIT_TEXT)))

I haven't changed these lines for months and as far as I can remember it was all working fine on PTS. Based on the ESOUI Wiki, line 134 should be fine, as ZO_ColorDef:FromInterfaceColor still exists, as do the constants INTERFACE_COLOR_TYPE_KEEP_TOOLTIP and KEEP_TOOLTIP_COLOR_ACCESSIBLE, and I don't know what is nil in 210 as CA.colOng is defined in line 138 as
Lua Code:
  1. CA.colOng = ZO_ColorDef:New(0.84,0.4,0.05,1)
and the string SI_CYRODIIL_ALERT_INIT_TEXT is defined in my lang file:
Lua Code:
  1. ZO_CreateStringId("SI_CYRODIIL_ALERT_INIT_TEXT", "Cyrodiil Alert Initialized")

Any insight would be greatly appreciated!

Thanks
  Reply With Quote
08/16/17, 05:06 PM   #39
ZOS_DanBatson
ZOS Staff!
 
ZOS_DanBatson's Avatar
Yes this person is from ZeniMax!
Join Date: Jul 2015
Posts: 171
Originally Posted by Weolo View Post
I have figured out what is bugged, I was not expecting this..
There is a problem with the new event EVENT_NON_COMBAT_BONUS_CHANGED, it fires on logout to character selection screen and I guess at quit game also.

I hope I am correct in assuming this event should only fire when playing on your character when the skills are changed and not when going to the character selection screen or quitting the game.
I see the issue, I'll look into it. Thanks for the detailed info!
  Reply With Quote
08/16/17, 05:11 PM   #40
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
@Enodoc either go with
Lua Code:
  1. ZO_ColorDef.FromInterfaceColor(colorType, fieldValue)
Using the dot instead, or just use this instead, which I think is better
Lua Code:
  1. ZO_ColorDef:New(GetInterfaceColor(colorType, fieldValue))

So for you that would be
Lua Code:
  1. ZO_ColorDef:New(GetInterfaceColor(INTERFACE_COLOR_TYPE_KEEP_TOOLTIP,KEEP_TOOLTIP_COLOR_ACCESSIBLE))
  Reply With Quote

ESOUI » Developer Discussions » Tutorials & Other Helpful Info » 3.1 Update

Thread Tools
Display Modes

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

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