ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Crafting Station Bug (https://www.esoui.com/forums/showthread.php?t=2512)

circonian 12/10/14 09:34 PM

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.

Garkin 12/10/14 11:36 PM

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)

QuadroTony 12/11/14 02:53 AM

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

Ayantir 12/11/14 06:07 AM

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 ?

ZOS_ChipHilseberg 12/11/14 08:52 AM

I'll take a look at it today to see if I can reproduce it.

Garkin 12/11/14 09:12 AM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 17782)
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

ZOS_ChipHilseberg 12/11/14 02:02 PM

We were able to reproduce it. A fix will likely be in the next patch.

circonian 12/11/14 02:18 PM

Quote:

Originally Posted by Ayantir (Post 17777)
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).

circonian 12/11/14 02:21 PM

Quote:

Originally Posted by QuadroTony (Post 13791)
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.

circonian 12/11/14 02:23 PM

Quote:

Originally Posted by Garkin (Post 13757)
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.

circonian 12/11/14 02:29 PM

Quote:

Originally Posted by ZOS_ChipHilseberg (Post 17789)
We were able to reproduce it. A fix will likely be in the next patch.

Thanks for looking into it Chip !

Garkin 01/13/15 06:59 AM

Quote:

Originally Posted by Garkin (Post 17783)
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

This code was added to EsoUI source in patch 1.5.8. ;-)

Baertram 01/15/15 07:20 AM

You can call yourself official unoffical ZOS developer now ^^

ZOS_ChipHilseberg 01/15/15 08:58 AM

With the amount of effort Garkin puts into add-ons and the add-on community he was already an unofficial ZOS developer =P.

Baertram 01/15/15 01:48 PM

True, skip the "now" from my last post then ;-)

Garkin 01/25/15 11:28 AM

By the way do you know what causes current crafting staions bug (material quantity resets to its default value)? It's a typo in this added code ("currentSelectedQuality" instead of "currentSelectedQuantity"):

Lua Code:
  1. local currentSelectedQuantity = self:GetMaterialQuantity(data.patternIndex, data.materialIndex)
  2.  
  3. if currentSelectedQuality == nil then --here
  4.     self:SetMaterialQuantity(data.patternIndex, data.materialIndex, data.min)
  5.     currentSelectedQuantity = data.min
  6. end

Easy solution for this issue is creating global variable currentSelectedQuality and update it every time when you call GetMaterialQuantity method:
Lua Code:
  1. local originalGetMaterialQuantity = ZO_SharedSmithingCreation.GetMaterialQuantity
  2. function ZO_SharedSmithingCreation:GetMaterialQuantity(...)
  3.     currentSelectedQuality = originalGetMaterialQuantity(self, ...)
  4.     return currentSelectedQuality
  5. end

ZOS_ChipHilseberg 01/26/15 09:08 AM

This typo will be fixed in the next patch.

QuadroTony 01/29/15 10:40 AM

btw Garkin mby you know it MultiCraft addon bug, or related not only to multicraft, but some errors in the game itself?

Quote:

- this bug happends every time
- its because i hit Cancel while process previous crafting alchemy routine
- or because of MultiCraft addon
- look at the glowing around reagents, looks like it stuck from previous routine, when ingredients glowing one by one to make one potion
- reloadui helps

i can change the combinations, but i cannot craft it. also i cannot craft by hotkey too. And if i close the addon, original UI locked with gray colors
Happends after one craft route, im using MultiCraft addon







Baertram 01/31/15 05:55 PM

The gray color means that the item is locked by the game's UI. Probaly MultiCraft called the function to craft a potion and if you cancel it the items won't get unlocked again. It's the same as dragging an item from your iventory somwhere else but you would never drop it. The item will be grayed out as long as you drag it.
You need to relog (/reloadui alone won't help).

To test if it is MultiCraft:
Try to disable MultiCraft and do the same to craft your potions, and hit cancel then. Are the items still grayed out?

QuadroTony 01/31/15 06:58 PM

we figure out it already)) need some additional fixes to multicraft :)


Quote:

The "craft completed" animation and sound is still running/playing while the next potion is crafted. If you interrupt it, the animation is stucked and the buttons are hidden.

The solution is to call this in the EVENT_CRAFTING_STATION_INTERACT.


All times are GMT -6. The time now is 06:48 AM.

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