Thread Tools Display Modes
12/10/14, 09:34 PM   #1
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Crafting Station Bug

Ug, I spent an hour trying to find a bug in an addon I'm working on & its not in my addon. Looks like a game bug, can anyone confirm?
  1. Go to a clothier crafting station
  2. Reload your UI to reset all of the games variables
  3. Open the crafting station
  4. Click on the creation tab (nothing else)
  5. Go to blacksmithing crafting station and open it.
  6. Click on the deconstruction tab (nothing else)
  7. Go back to the clothier crafting station & open it.
  8. Click on the Creation tab


It seems to happen no matter which stations you do it at as long as you only click those buttons in that order.
  Reply With Quote
12/10/14, 11:36 PM   #2
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
In my opinion this is a bug on ZOS side which was introduced in patch 1.5.6 because of changes in crafting UI.

Unfortunately this error occurs in local function, so it will be a bit difficult to fix by addon.

I'd probably try to redefine GetMaterialQuantity function, something like:
Lua Code:
  1. function ZO_SharedSmithingCreation:GetMaterialQuantity(patternIndex, materialIndex)
  2.     local quantity
  3.     if self.selectedMaterialCountCache[patternIndex] then
  4.         quantity = self.selectedMaterialCountCache[patternIndex][materialIndex]
  5.     end
  6.     if quantity == nil then
  7.         local _, _, stack = GetSmithingPatternMaterialItemInfo(patternIndex, materialIndex)
  8.         self:SetMaterialQuantity(patternIndex, materialIndex, stack)
  9.         quantity = stack
  10.     end
  11.     return quantity or 0
  12. end

Or if you want to redefine just instance of this class, you are looking for function:
Code:
SMITHING.creationPanel:GetMaterialQuantity(patternIndex, materialIndex)

Last edited by Garkin : 12/10/14 at 11:41 PM.
  Reply With Quote
12/11/14, 02:53 AM   #3
QuadroTony
Banned
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 828
i cant reproduce it without any addons! you sure about it?

US client? i use liveeu

P.S. - the same with all my addons, i have 112
no errors so far

Last edited by QuadroTony : 12/11/14 at 02:59 AM.
  Reply With Quote
12/11/14, 06:07 AM   #4
Ayantir
 
Ayantir's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2014
Posts: 1,019
Hello,

Your order list isn't good

The bug is

- Go on a smithing station (wood/blacksmith/clothier)
- Open creation tab
- leave
- Go on another smithing station of same type
- Go on creation tab
- bug

It will be reproduced with any smithing station
and yes as garkin said, we can't do anything at all

let's zos fix their bugs ?
  Reply With Quote
12/11/14, 08:52 AM   #5
ZOS_ChipHilseberg
ZOS Staff!
Premium Member
Yes this person is from ZeniMax!
Join Date: Oct 2014
Posts: 551
I'll take a look at it today to see if I can reproduce it.
  Reply With Quote
12/11/14, 09:12 AM   #6
Garkin
 
Garkin's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 832
Originally Posted by ZOS_ChipHilseberg View Post
I'll take a look at it today to see if I can reproduce it.
Everywhere, where are you using method :GetMaterialQuantity is a check if return value exists. But in the SetupFunction in :InitializeMaterialList is this check missing. There should probably be something like this:

Lua Code:
  1. local function SetupFunction(control, data, selected, selectedDuringRebuild, enabled)
  2.  
  3.     --original code here
  4.  
  5.     local currentSelectedQuantity = self:GetMaterialQuantity(data.patternIndex, data.materialIndex)
  6.     --added check if return value exists:
  7.     if not currentSelectedQuantity then
  8.         self:SetMaterialQuantity(data.patternIndex, data.materialIndex, data.min)
  9.         currentSelectedQuantity = data.min
  10.     end
  11.  
  12.    --rest of the original code
  13.  
  14. end
  Reply With Quote
12/11/14, 02:18 PM   #7
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Ayantir View Post
Hello,

Your order list isn't good

The bug is

- Go on a smithing station (wood/blacksmith/clothier)
- Open creation tab
- leave
- Go on another smithing station of same type
- Go on creation tab
- bug

It will be reproduced with any smithing station
and yes as garkin said, we can't do anything at all

let's zos fix their bugs ?
Strange if the order I listed didn't work for you, it works for me every time. That was just the sequence of events that I managed to figure out would reproduce it every time. I don't doubt there is more than one way to reproduce it. I tried to find out where it was being caused in the code, but it 'might' be in something not available to use (or I may have missed it, I couldn't find it).
  Reply With Quote
12/11/14, 02:21 PM   #8
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by QuadroTony View Post
i cant reproduce it without any addons! you sure about it?

US client? i use liveeu

P.S. - the same with all my addons, i have 112
no errors so far
Strange, I removed all addons, reloadedUI, logged completely out & back in, restarted my computer (all in case something was somehow remaining between reloadUI's). It happens every time.
  Reply With Quote
12/11/14, 02:23 PM   #9
circonian
AddOn Author - Click to view addons
Join Date: May 2014
Posts: 613
Originally Posted by Garkin View Post
In my opinion this is a bug on ZOS side which was introduced in patch 1.5.6 because of changes in crafting UI.

Unfortunately this error occurs in local function, so it will be a bit difficult to fix by addon.

I'd probably try to redefine GetMaterialQuantity function, something like:
Lua Code:
  1. function ZO_SharedSmithingCreation:GetMaterialQuantity(patternIndex, materialIndex)
  2.     local quantity
  3.     if self.selectedMaterialCountCache[patternIndex] then
  4.         quantity = self.selectedMaterialCountCache[patternIndex][materialIndex]
  5.     end
  6.     if quantity == nil then
  7.         local _, _, stack = GetSmithingPatternMaterialItemInfo(patternIndex, materialIndex)
  8.         self:SetMaterialQuantity(patternIndex, materialIndex, stack)
  9.         quantity = stack
  10.     end
  11.     return quantity or 0
  12. end

Or if you want to redefine just instance of this class, you are looking for function:
Code:
SMITHING.creationPanel:GetMaterialQuantity(patternIndex, materialIndex)
Thanks for looking into it Garkin. Even though I removed all addons, logged out & back in, its nice to know its not just me.
  Reply With Quote

ESOUI » Developer Discussions » General Authoring Discussion » Crafting Station Bug


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