Thread Tools Display Modes
07/10/17, 08:14 AM   #1
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
3.1 Update

Hello there,

As we know, the next update of game will be launched this week on PTS (consider the opening today or tomorrow).

So the old new update thread. Please leave any comment, or issues you may encounter while doing your updates.

Now, back to business, so some placeholders :


Last edited by Ayantir : 07/14/17 at 01:11 PM.
  Reply With Quote
07/11/17, 11:51 AM   #2
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
This compatibility function is broken

GetSmithingStyleItemInfo() in addoncompatibilityaliases.lua

Lua Code:
  1. function GetSmithingStyleItemInfo(itemStyleId)
  2.     local styleItemLink = GetItemStyleMaterialLink(validItemStyleId)
  3.     local alwaysHideIfLocked = GetItemStyleInfo(validItemStyleId)
  4.     local name = GetItemLinkName(styleItemLink)
  5.     local icon, sellPrice, meetsUsageRequirement = GetItemLinkInfo(styleItemLink)
  6.     local quality = GetItemLinkQuality(styleItemLink)
  7.     return name, icon, sellPrice, meetsUsageRequirement, itemStyleId, quality, alwaysHideIfLocked
  8. end

Vvariable validItemStyleId does not exist on the 2nd and 3rd lines so styleItemLink and alwaysHideIfLocked are always blank
  Reply With Quote
07/11/17, 04:40 PM   #3
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Weolo View Post
This compatibility function is broken

GetSmithingStyleItemInfo() in addoncompatibilityaliases.lua

Lua Code:
  1. function GetSmithingStyleItemInfo(itemStyleId)
  2.     local styleItemLink = GetItemStyleMaterialLink(validItemStyleId)
  3.     local alwaysHideIfLocked = GetItemStyleInfo(validItemStyleId)
  4.     local name = GetItemLinkName(styleItemLink)
  5.     local icon, sellPrice, meetsUsageRequirement = GetItemLinkInfo(styleItemLink)
  6.     local quality = GetItemLinkQuality(styleItemLink)
  7.     return name, icon, sellPrice, meetsUsageRequirement, itemStyleId, quality, alwaysHideIfLocked
  8. end

Vvariable validItemStyleId does not exist on the 2nd and 3rd lines so styleItemLink and alwaysHideIfLocked are always blank
This has been fixed.
  Reply With Quote
07/11/17, 11:59 AM   #4
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Just a little note for others, item style constants such as ITEMSTYLE_GLASS etc are on the way out. They will work for now as they are in the addoncompatibilityaliases.lua file but I am checking to see how to code without them with the PTS patch.
Will let you know what I figure out
  Reply With Quote
07/11/17, 01:16 PM   #5
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
use styleItemIndex? but I do agree all addons are coded with the ITEMSTYLE constant.
  Reply With Quote
07/11/17, 02:12 PM   #6
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
StyleItemIndex is great for dynamic lists, but the constants always made it easier for holding my own information on it. I'm surprised they are doing away with them so soon after cleaning them up in the last update.
  Reply With Quote
07/11/17, 04:50 PM   #7
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
Originally Posted by Rhyono View Post
StyleItemIndex is great for dynamic lists, but the constants always made it easier for holding my own information on it. I'm surprised they are doing away with them so soon after cleaning them up in the last update.
We often have to choose between using enumerations and using ids when making a system. Enums are great for writing code against because it makes checks against specific values easy. However, adding to an enumeration requires a programmer to make a code change, and then the new client needs to propagate through several branches before finally reaching the designer who can make use of it. If we use ids, changes do not require any programmer support, but it becomes hard to program against unless you want code like itemStyleId == 5. We've been thinking over some ways to have the best of both worlds, and our favorite option right now is adding a string identifier that can be used to fetch an id. These strings would not be localized and would probably look a lot like the enum values. The designers could fill them out and we would keep them as stable as possible so code could fetch ids using them, or use them for equality checks, etc. But we're open to other ideas.
  Reply With Quote
07/12/17, 01:27 AM   #8
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by ZOS_ChipHilseberg View Post
These strings would not be localized and would probably look a lot like the enum values. The designers could fill them out and we would keep them as stable as possible so code could fetch ids using them, or use them for equality checks, etc. But we're open to other ideas.
Maybe let you inspire from the Enum of C# (not necessarily copy 1:1): Create a ZO_Enum sub-class with some meta methods like :GetNames, :Parse :GetName :GetDisplayName.
Instead of creating millions of global constants, an Enum class like ITEM_STYLE, ITEM_TRAIT, ABILITY.
In Lua there is close to no difference reading a continous index based list and an ID based hash-table:
Lua Code:
  1. for value,name in pairs(ITEM_STYLE) do
  2.   what ever
  3. end

The Enum classes may get auto-generated from work-sheets of your designers.

You may allow us to override and/or extend these Enum instances for things like :GetNameWithQualityColor.
  Reply With Quote
07/12/17, 03:32 AM   #9
Shinni
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 167
@Ayantir, you might want to put the .txt in your post:
https://forums.elderscrollsonline.co...change-log-pts


@Chip
3D Controls
3D controls with no parent that are positioned using world coordinates now update their position automatically when you cross a boundary. We also added two APIs to help convert between Gui Render 3D positions and World positions:

GuiRender3DPositionToWorldPosition(renderX, renderY, renderZ) – worldX, worldY, worldZ.
WorldPositionToGuiRender3DPosition(worldX, worldY, worldZ) – renderX, renderY, renderZ.
Thanks a lot! This is great.
  Reply With Quote
07/12/17, 10:06 AM   #10
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Cool changes but it does mean I have some learning and re-writting to do, all good

I will be trying to make use of these

Code:
GetItemStyleName(styleId) – styleName
GetItemStyleMaterialLink(styleId, LinkStyle) – link
GetNumValidItemStyles() – numStyles
GetValidItemStyleId(index) – styleId
Will try these out, hopefully I can take out some of my code in place of them

Code:
GetSkillLineIndicesFromSkillId(skillId) – SkillType, skillIndex.
GetSkillLineIndicesFromSkillLineId(skillLineId) – SkillType, skillIndex.
Also the GetNonCombatBonus() function looks very handy

Code:
NON_COMBAT_BONUS_BLACKSMITHING_BOOSTER_BONUS
NON_COMBAT_BONUS_BLACKSMITHING_CRAFT_PERCENT_DISCOUNT
NON_COMBAT_BONUS_BLACKSMITHING_EXTRACT_LEVEL
NON_COMBAT_BONUS_BLACKSMITHING_HIRELING_LEVEL
NON_COMBAT_BONUS_BLACKSMITHING_LEVEL
NON_COMBAT_BONUS_BLACKSMITHING_RESEARCH_LEVEL
NON_COMBAT_BONUS_BLACKSMITHING_SHOW_NODES
Maybe I can finally detect when the research skill is changed
  Reply With Quote
07/12/17, 07:31 PM   #11
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
Was GetSmithingStyleItemLink supposed to be removed? If so, could someone point me in the direction of its replacement?
  Reply With Quote
07/13/17, 11:05 AM   #12
Weolo
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 79
Originally Posted by Rhyono View Post
Was GetSmithingStyleItemLink supposed to be removed? If so, could someone point me in the direction of its replacement?
Did that used to give you a link to the style material?
If so this is the kind of thing
Lua Code:
  1. for itemStyleIndex = 1, GetNumValidItemStyles() do
  2.     local validItemStyleId = GetValidItemStyleId(itemStyleIndex)
  3.     if validItemStyleId > 0 then
  4.         local styleItemLink = GetItemStyleMaterialLink(validItemStyleId, LINK_STYLE_DEFAULT)
  5.     end
  6. end
  Reply With Quote
07/13/17, 08:22 PM   #13
Rhyono
AddOn Author - Click to view addons
Join Date: Sep 2016
Posts: 659
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.

Last edited by Rhyono : 07/13/17 at 09:10 PM.
  Reply With Quote
07/14/17, 02:06 PM   #14
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   #15
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   #16
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
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/16/17, 09:49 AM   #17
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   #18
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   #19
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   #20
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

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


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