Download
(223 Kb)
Download
Updated: 03/03/15 04:06 PM
Pictures
File Info
Compatibility:
Update 6 (1.6.5)
Updated:03/03/15 04:06 PM
Created:12/09/14 08:36 PM
Monthly downloads:63
Total downloads:17,265
Favorites:18
MD5:
Shopkeeper (Improved, Fixed and Updated)  Popular! (More than 5000 hits)
Version: 1.0 (dOpiate Fix).7b
by: dopiate, Garkin
I've found people are avoiding this addon thinking it's the OLDER version when in truth it's as current as can be. Plus, it is THE more stable option and if you read the forums you will see NO ERRORS OR ISSUES. So that's why I dropped the "Classic" name because ....


THIS IS SHOPKEEPER

While this addon will still exist it's development has halted.

I suggest you migrate to Master Merchant

That truly is the New Shopkeeper Continued!



New Version? Always check the Change Log

--------------------News-----------------------

The tool tip value.

After quite a bit of investigating I was able to determine that the PPU (“Price Per Unit”) shown in the tool tip is not wrong. In fact, I believe it’s the most accurate representation of the true PPU that I am aware of in the game!

How does it work?

What Khaibit did was implement a formula that took into account the time in which each sale took place. So, if there were two sales, one ten days ago and one yesterday, his formula gave more weight (“importance”) to the more recent sale. Therefore the PPU is generated by using the value of gold over time and its relevance is based on sale date.

In his code were these comments:

If all sales data covers less than a day, we'll just do a plain average, nothing to weight.

For a weighted average, the latest data gets a weighting of X, where X is the number of days the data covers, thus making newest data worth more.


My guess is that his formula is based on “The Time Value of Money” – which took me by surprise.
I don’t even remember him saying that he was doing that. It’s really an impressive way to look at generating a more accurate PPU. If you look in the forums you can see I first tried to generate his tool tip PPU using multiple basic methods and every time I could not match his number. When I looked at the code I realized why. If you read that post and then see his value v. all the equations I tried you will see his is MUCH more accurate than mine were. More realistic to NOW. The game is not static and so the PPU would not be either and he addressed that issues.

This puts to rest the idea that Shopkeeper 1.0 tool tips were wrong or broken. They were neither. They were more advanced then he let us know.

-d
12.10.2014 - I changed the errors into not errors
12.11.2014 - I found and fixed an error with the font replacement
------------- please note this error was not reported but found by me reviewing my changes
------------- I am at work and can not test this fix but it should be fine
12.12.2014 - A conflict was discovered between Shopkeeper and CraftCompare
------------- Garkin was kind enough to just PM the code fix so I didn't have to wait until after work before I could
------------- test/fix it. If you don't use CraftCompare then this isn't an essential update.
12.17.2014 - Two actual bugs were fixed. The tool tip not showing in inventory or bank was fixed.
------------- dragging items to sell or mail was also fixed (all credit to Garkin for that one)
12.18.2014 - Garkin found what spoqster had suspected. There was a stack size issue.
------------- This issue only happened for items with sales in a 24 hour window.
------------- That issue was fixed and the missing font code was updated.
12.21.2014 - Somehow (I used the wrong version to zip up I guess) the Shopkeeper and CraftCompare
------------- bug fix was GONE! 100% my screw up! I hang my head in shame.
------------- Garkin provided me the code the first time he pointed it out again today.
------------- it was fixed - unfixed - now re-fixed - sorry :-(
01.24.2015 - small fixes in the offline file report
02.06.2015 - fixed issue with regular items going BOA (bind on account) but still in your sales history.
03.03.2015 - Update 6 version
03.03.2015 - Updated to correct LibAddonMenu-2.0
Archived Files (9)
File Name
Version
Size
Uploader
Date
1.0 (dOpiate Fi
222kB
dopiate
03/03/15 12:59 PM
1.0 (dOpiate Fi
219kB
dopiate
02/06/15 02:12 PM
1.0 (dOpiate Fi
219kB
dopiate
01/24/15 01:48 PM
1.0 (dOpiate Fi
219kB
dopiate
12/21/14 01:10 PM
1.0 (dOpiate Fi
219kB
dopiate
12/18/14 10:40 AM
1.0 (dOpiate Fi
218kB
dopiate
12/17/14 08:46 AM
1.0 (dOpiate Fi
218kB
dopiate
12/12/14 09:21 AM
1.0 (dOpiate Fi
218kB
dopiate
12/10/14 09:13 AM
1.0 (dOpiate Fi
218kB
dopiate
12/09/14 08:36 PM


Post A Reply Comment Options
Unread 12/15/14, 05:23 PM  
dopiate
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 677
Uploads: 11
Re: Re: Re: If you can find it - I will fix it.

Originally Posted by dopiate

Ok it would be great if you confirm it but that's pretty darn good summary for me to start with.

I have one toon that uses Shopkeeper (he actually is my BS mule) so I can test stacks myself and see what the issue it.

Here is my time frame. Just woke up, got work till 6:00, then I can test/fix it tonight.

Like I said, If there are any left over bugs or something khaibit accidentally forgot to to, I will fix it.

-d
Ok you ready - lets review this problem one step at a time.

remember I have never used Shopkeeper for Tool Tips and, as you will see below, I couldn't even manually match any of the numbers.

Ok this is simple i understand this:



1 item - 1 sale - but is the last value supposed to be price per unit or ??? I doesn't say anywhere does it?

now when we have > 1 sales it goes all over the place...



that is the same tool tip i see when I search all sales and find all 3 -- it doesn't change at all.

This was my one sale:



it's saying 3 sales in the last 10 days, ok but then the 29.48 what is that for? my per unit price was 42 - is it taking all 3 sales it found and getting the average PPU ?



total sales = 1240 / 57 units = 21.75

while there is no doubt something is mixed up -- I don't know what that last amount was intended to be?



even when I ave the PPU ave - ignoring stack size -- I get a completely different number ... 75 / 3 = 25

So we have:

Shopkeeper tool tip saying: 29.48
all 3 sales (full price) together / 57 unites: 21.75
all 3 sales (PPU) together / 3 sales: 25.00

I see what you are saying when you hover over any of the stacks it says the same 29.48 BUT it also says 3 sales in 10 days -- is it supposed to give you the PPU of each one you hover over?

Was it supposed to be like this? This is whats built into Awesome Guild Store.



I am truly at a loss as to where the 29.48 comes from or what he intended it to represent -- it's not a result of any of the ways I calculated it.

I hover over individual searches in the guild store and get the same (seemingly) random values - sometimes they match Awesome Guild Store sometimes they are way off base..

What do you want it to do? I will certainly look at the code and try to figure out what equation he is using for this but I don't understand the goal. is it all sales ave PPU or just the item you are hovering over? If so why does it tell you how many sales in how many days -- thats a contradiction -- here is total sales and then here is a PPU for ______???



Your basically going to have to tell me what you think it's supposed to be doing. Because I don't understand the point of the tool tips here (hence I never had them on in any version). To me I guess the # of sales in a certain time period is useful but what was he going for with the price afterward?

I'll look at the code in a little bit and see what he was going for but if it used to work in the old one and now in this one it doesn't then you have a huge advantage over me because I never used it.

I thought I had an idea of what you meant this morning but now? I'm not sure what that value is supposed to represent? If it was a coding mistake I SHOULD have been able to manually match that number at least one of the ways I did the PPU ave -- but I never hit his number SO I have drawn only 1 conclusion - that number is NONSENSE but I don't know what it's intention was.

My best guess is that it should be total units (for all sales) / total sales (for all sales). Which would be the 21.75 but I'm guessing.

I reviewed everything you said and my tiny example would have proved or disproved your theory and it disproved it - it did confirm whatever that prices was supposed to be is wrong (the bigger picture).

here is a hover over in the store window - all these are SINGLE items listed



same price listed - so wherever it produced that tool tip it generates a number that I was unable to re-produce.

Get back to me and I'll let you know what I find in the source.

I am completely confused as to what number he was going for!

What was right was 3 sales in 10 days. That is it.

-d
Last edited by dopiate : 12/15/14 at 05:23 PM.
Report comment to moderator  
Reply With Quote
Unread 12/15/14, 04:38 AM  
dopiate
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 677
Uploads: 11
Re: Re: If you can find it - I will fix it.

Originally Posted by spoqster

I posted on the original shopkeeper page shortly after khaibit discontinued it.

Looking at the numbers, it seemed very likely that he just fogot to divide by the stack size.

Here is my original text:
"I found one possible issue: It looks like there are inconsistencies in handling stacks.

I have confirmed the following:
- Voidstone Ore is listed at 20 in the tooltip. The value is derived from 9 stacks of 100 at 2000g each. So here the value listed is for one unit.
- Iron Ore is listed at 900 in the tooltip. The value is derived from one stack of 100 at 900g. So here the stack value is shown, not the unit value.
- Calcinium Ore is listed at 156g in the tooltip. The value is derived from two sales. One stack of 6 at 36g and another stack of 46 at 276. So here the addon does not take the stack size into account at all and only averages individual sales.
- Topgrain Hide Scraps: listed at 7.78 in the tooltip. Derived from three sales. Stack of 19 at 114g, stack of 22 at 132 gold, stack of 100 at 2000g. I don't know how you got the 7.78, but I think the average should be weighted by the number of units sold for a given price. In this case 100 units were sold at a price of 22 and 41 units were sold at a price of 6 each. So the unit price should be (100 x 22 + 41 x 6)/141 = 17.34752."

I will test and let you know if I find any remaining issues.
Ok it would be great if you confirm it but that's pretty darn good summary for me to start with.

I have one toon that uses Shopkeeper (he actually is my BS mule) so I can test stacks myself and see what the issue it.

Here is my time frame. Just woke up, got work till 6:00, then I can test/fix it tonight.

Like I said, If there are any left over bugs or something khaibit accidentally forgot to to, I will fix it.

-d
Report comment to moderator  
Reply With Quote
Unread 12/15/14, 03:05 AM  
spoqster

Forum posts: 8
File comments: 129
Uploads: 0
Re: If you can find it - I will fix it.

Originally Posted by dopiate
Originally Posted by spoqster
Did you fix the erroneous price calculations of stacks as well?
The answer is I don't know :-)

I don't use this program so until somebody tells me there is an issue I won't know to fix it.

I fixed every issue I knew about and Garkin even contributed some "better" tool tip code. The code was correct but it didn't check to make sure that other addons had correctly created a tool tip. He basically made it smarter about when to add tool tip information.

A price calculation of stacks I thought was an issue with a different version after it was continued?

My only goal here was to give users back the Shopkeeper that they were used to and make it stable.

If it's not fixed, I stand by my promise to fix all the bugs in this version.

Just give me as much info as you can and I'll set to work on fixing the math.

-d

btw, I don't use this program because I use the one in GSM, which only makes sense since I created GSM. I never used tool tips and pricing info from Shopkeeper so that code was removed (in GSM).

I posted on the original shopkeeper page shortly after khaibit discontinued it.

Looking at the numbers, it seemed very likely that he just fogot to divide by the stack size.

Here is my original text:
"I found one possible issue: It looks like there are inconsistencies in handling stacks.

I have confirmed the following:
- Voidstone Ore is listed at 20 in the tooltip. The value is derived from 9 stacks of 100 at 2000g each. So here the value listed is for one unit.
- Iron Ore is listed at 900 in the tooltip. The value is derived from one stack of 100 at 900g. So here the stack value is shown, not the unit value.
- Calcinium Ore is listed at 156g in the tooltip. The value is derived from two sales. One stack of 6 at 36g and another stack of 46 at 276. So here the addon does not take the stack size into account at all and only averages individual sales.
- Topgrain Hide Scraps: listed at 7.78 in the tooltip. Derived from three sales. Stack of 19 at 114g, stack of 22 at 132 gold, stack of 100 at 2000g. I don't know how you got the 7.78, but I think the average should be weighted by the number of units sold for a given price. In this case 100 units were sold at a price of 22 and 41 units were sold at a price of 6 each. So the unit price should be (100 x 22 + 41 x 6)/141 = 17.34752."

I will test and let you know if I find any remaining issues.
Last edited by spoqster : 12/15/14 at 03:10 AM.
Report comment to moderator  
Reply With Quote
Unread 12/13/14, 05:12 AM  
dopiate
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 677
Uploads: 11
If you can find it - I will fix it.

Originally Posted by spoqster
Did you fix the erroneous price calculations of stacks as well?
The answer is I don't know :-)

I don't use this program so until somebody tells me there is an issue I won't know to fix it.

I fixed every issue I knew about and Garkin even contributed some "better" tool tip code. The code was correct but it didn't check to make sure that other addons had correctly created a tool tip. He basically made it smarter about when to add tool tip information.

A price calculation of stacks I thought was an issue with a different version after it was continued?

My only goal here was to give users back the Shopkeeper that they were used to and make it stable.

If it's not fixed, I stand by my promise to fix all the bugs in this version.

Just give me as much info as you can and I'll set to work on fixing the math.

-d

btw, I don't use this program because I use the one in GSM, which only makes sense since I created GSM. I never used tool tips and pricing info from Shopkeeper so that code was removed (in GSM).
Report comment to moderator  
Reply With Quote
Unread 12/13/14, 04:17 AM  
spoqster

Forum posts: 8
File comments: 129
Uploads: 0
Did you fix the erroneous price calculations of stacks as well?
Report comment to moderator  
Reply With Quote
Unread 12/12/14, 08:35 PM  
stuartx13

Forum posts: 0
File comments: 3
Uploads: 0
na

thanks
Report comment to moderator  
Reply With Quote
Unread 12/12/14, 05:58 AM  
dopiate
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 677
Uploads: 11
Originally Posted by Garkin
UI error for you:
Code:
2014-12-12T00:14:08.130+01:00 |cff0000Lua Error: bad argument #1 to 'string.match' (string expected, got nil)
stack traceback:
	[C]: in function 'string.match'
	user:/AddOns/Shopkeeper/Shopkeeper_UI.lua:395: in function 'Shopkeeper:addStatsPopupTooltip'
	user:/AddOns/Shopkeeper/Shopkeeper.lua:1017: in function '(anonymous)'|r
I believe that this happens because some addon (CraftCompare) uses PopupTooltip:SetLink(...) directly instead of using ZO_PopupTooltip_SetLink(...), so PopupTooltip.lastLink doesn't exists. Even if it's not completely fault of this addon, still if you add check if PopupTooltip.lastLink exists, it will make your addon more stable.
Garkin,

Thank you for the bug report - I was unaware there were still bugs in the code.

Edit: This is now fixed.

Thanks again,

-d
Last edited by dopiate : 12/12/14 at 10:26 AM.
Report comment to moderator  
Reply With Quote
Unread 12/11/14, 10:32 PM  
Garkin
 
Garkin's Avatar
AddOn Author - Click to view AddOns

Forum posts: 832
File comments: 1097
Uploads: 33
UI error for you:
Code:
2014-12-12T00:14:08.130+01:00 |cff0000Lua Error: bad argument #1 to 'string.match' (string expected, got nil)
stack traceback:
	[C]: in function 'string.match'
	user:/AddOns/Shopkeeper/Shopkeeper_UI.lua:395: in function 'Shopkeeper:addStatsPopupTooltip'
	user:/AddOns/Shopkeeper/Shopkeeper.lua:1017: in function '(anonymous)'|r
I believe that this happens because some addon (CraftCompare) uses PopupTooltip:SetLink(...) directly instead of using ZO_PopupTooltip_SetLink(...), so PopupTooltip.lastLink doesn't exists. Even if it's not completely fault of this addon, still if you add check if PopupTooltip.lastLink exists, it will make your addon more stable.
Report comment to moderator  
Reply With Quote
Unread 12/11/14, 08:46 AM  
dopiate
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 677
Uploads: 11
Make this the in game GUI for GSA

If you are one of the people who are using my Guild Sales Assistant and would rather have the original Shopkeeper as your in game UI.

That’s perfectly fine and totally possible.

I have written a GSA no GUI version that will work with it but, you must get instruction from me to migrate your database so you don’t lose all the history in the offline database. It’s not hard but don’t just install the no GUI version without instruction or you will corrupt your data.

If there are requests to do this I will create a very detailed "how to" document.

-d
Last edited by dopiate : 12/11/14 at 09:26 AM.
Report comment to moderator  
Reply With Quote
Unread 12/10/14, 09:22 AM  
dopiate
AddOn Author - Click to view AddOns

Forum posts: 142
File comments: 677
Uploads: 11
Fixed a potential issue.

I found and fixed an error with the font replacement paths.

This was not a reported error but I found it while reviewing my changes. Unfortunately i am at work and can not test this fix. I would assume that since it was never reported that fixing shouldn't create any issues.

As I updated on the main page I also must give credit to Garkin!

I used parts of his LMP Removed Fonts code to make the fixes seamless.

It was a huge oversight to have not given him credit and to publicly thank him for everything he does.

My apologies.

-d
Report comment to moderator  
Reply With Quote
Unread 12/10/14, 12:27 AM  
timidobserver

Forum posts: 37
File comments: 299
Uploads: 0
Re: Your Rock!

Thanks for posting this. It is really appreciated.
Report comment to moderator  
Reply With Quote
Unread 12/09/14, 10:50 PM  
FreakyFreak

Forum posts: 1
File comments: 41
Uploads: 0
Thumbs up Your Rock!

Thank you for the work you put in!
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: