Quantcast
Download
(46 Kb)
Download
Updated: 03/28/17 10:23 PM
Pictures
File Info
Compatibility:
Homestead (2.7)
Updated:03/28/17 10:23 PM
Created:05/20/16 11:36 AM
Monthly downloads:28
Total downloads:793
Favorites:3
MD5:
Guild Sales Quota
Version: 2.7.4
by: ziggr [More]
Does your guild enforce a sales quota? Use Master Merchant to see top sellers? If so, you can do all this from within Master Merchant and do not need this add-on.

But if you also want to record sales to a spreadsheet, that's where this add-on comes in.

This add-on scans Master Merchant sales history, summarizes gold totals for your guild's sellers and buyers over last week, then writes that to a SavedVariables file. It can then convert that SavedVariables file to a comma-separated-value file suitable for import into a spreadsheet.

Optional: integrates with Shissu's Guild Tools to fetch each member's join date. This integration helps guild masters give new members a bit of a grace period before enforcing sales quotas.

Column list:
  • guild name
  • saved time range begin
  • saved time range end
  • player account @name
  • sold: gold earned in the guild trader last week
  • bought: gold spent in the guild trader last week
  • is a guild member? Many buyers aren't members.
  • is a newbie? Anyone who joined in the last 10 days. (optional, requires Shissu's Guild Tools)
  • joined: when did they join the guild (optional, requires Shissu's Guild Tools)
  • columns to help you audit which sales contributed to the total for the reported week: sales count, first/last sales time, buyer, amount.

Instructions:
  1. Click "Save Data Now" button. Add-on will scan Master Merchant and guild membership lists.
  2. Log out (or relog). ESO will then save data, writing SavedVariables/GuildSalesQuota.lua.
  3. From a terminal window, run
    % cd ~/Documents/Elder Scrolls Online/live/AddOns/GuildSalesQuota
    % lua GuildSalesQuota_to_csv.lua
    (Or drag and drop GuildSalesQuota_to_csv.lua onto lua52.exe) This creates SavedVariables/GuildSalesQuota.csv
  4. Import GuildSalesQuota.csv into a spreadsheet.

GuildSalesQuota_to_csv.lua requires that you have downloaded and installed a standalone Lua interpreter, presumably from lua.org.

--Z
2.7.4 2017-03-28
  • Recently added "rank" column now includes rank names for all ranks, whether custom or default. Thank you to Ayantir's GMen and Rushinator for the pointers.

2.7.3 2017-03-28
  • Add "rank" column. Custom rank titles included, so you get "3 Veteran" instead of just "3". But non-custom rank titles, I have no idea how to get from the ZOS API, so you're stuck with "1" instead of "1 Guildmaster". Sorry.

2.7.2 2017-02-18
  • Bugfix: delay Master Merchant calls until after M.M. has a chance to fully initialize. Avoids "attempt to index a nil value
    stack traceback:" crash in call to MasterMerchant:ActiveSettings(). Thank you @Rushinator for reporting it and helping me test the fix.

2.7.1 2017-02-17
  • Remove GuildGoldDeposits integration. Too inaccurate to be useful. Easier to track deposits/raffle tickets elsewhere.
  • Add "Date Options" dropdown menu to match Master Merchant's list of date options, so that you can export Today, Yesterday, This Week, Last Week, All History, or other date ranges. Larger time scales might exceed Lua memory or SavedVariables limits.

2.6.4 2016-12-20
  • Add 5 hours of slop for GuildGoldDeposits integration, so that gold deposits/raffle ticket purchases made for Sunday raffles will still count towards last week's quota. Yes this implies that a single ticket purchase during the slop range will erroneously meet TWO week's quotas. It's either this or you have to tell the add-on which exact ticket purchase was the cutoff. That's no fun.

2.6.3 2016-10-28
  • Add sale_ct, first/last sale columns, to help with auditing. With this data you can go to Master Merchant, filter on the seller, and identify exactly which sales contributed to the reported week's total.

2.6.2 2016-10-18
  • Add "is_newbie", "joined", and "gold_deposited" columns

2.6.1 2016-10-05
  • Increment API version for ESO 2.6 (One Tamriel). No other changes.

2.5.1 2016-08-06
  • Increment API version for ESO 2.5 (Shadows of the Hist).
  • Fix nil value error for players with multiple ESO accounts.
    Code:
    lua: GuildSalesQuota_to_csv.lua:138: attempt to index a nil value (global 'guild_name')
    stack traceback:
        GuildSalesQuota_to_csv.lua:138: in main chunk
        [C]: in ?

2.4.1 2016-05-31
  • Increment API version for ESO 2.4 (Dark Brotherhood). No other changes.

2.3.11.1 2016-05-20
Initial release.
Optional Files (0)


Archived Files (10)
File Name
Version
Size
Author
Date
2.7.3
46kB
ziggr
03/28/17 05:58 PM
2.7.2
45kB
ziggr
02/18/17 06:27 PM
2.7.1
45kB
ziggr
02/17/17 06:20 PM
2.6.4
45kB
ziggr
12/20/16 09:24 PM
2.6.3
45kB
ziggr
10/28/16 02:02 PM
2.6.2
44kB
ziggr
10/18/16 11:24 PM
2.6.1
42kB
ziggr
10/05/16 07:58 PM
2.5.1
42kB
ziggr
08/06/16 05:10 PM
2.4.1
42kB
ziggr
05/31/16 08:02 PM
2.3.11.1
42kB
ziggr
05/20/16 11:36 AM


Post A Reply Comment Options
Unread 03/28/17, 10:25 PM  
ziggr
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 49
Uploads: 5
Re: Re: 2.7.3 now includes

Originally Posted by Rushinator
As for getting the Rank Names, you can take a look at the addon GMen.
Aha! GetFinalGuildRankName() is the answer. Done.

Version 2.7.4 now includes all guild names, whether custom or default.

Thank you for the pointer.
Last edited by ziggr : 03/28/17 at 10:25 PM.
Report comment to moderator  
Reply With Quote
Unread 03/28/17, 08:16 PM  
Rushinator

Forum posts: 0
File comments: 21
Uploads: 0
Re: 2.7.3 now includes

Originally Posted by ziggr
Originally Posted by Rushinator
I would like to request (if possible) for the addon to also extract the ranks for each member.
Version 2.7.3 just uploaded, now includes a "rank" column. Includes rank number and name for any customized ranks. Includes just the rank number for any ZOS-supplied default ranks (such as "Guildmaster" for all the guilds I'm in.). I don't know how to get rank names for default ranks.
Great! Thank you! This will make my process a little bit easier since I'll be able to get Ranks and sales data from just one addon now.

As for getting the Rank Names, you can take a look at the addon GMen. It was how I have been getting ranks before now. It required me opening up the lua file in excel and copying the data from there so it required some work to actually get the useable data out of it in the format I wanted BUT the addon does extract the default names for each rank.

Hopefully it will give you an idea on how to do the same for your addon.

GMen: http://www.esoui.com/downloads/info1...terDumper.html
Report comment to moderator  
Reply With Quote
Unread 03/28/17, 06:02 PM  
ziggr
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 49
Uploads: 5
2.7.3 now includes "rank" column

Originally Posted by Rushinator
I would like to request (if possible) for the addon to also extract the ranks for each member.
Version 2.7.3 just uploaded, now includes a "rank" column. Includes rank number and name for any customized ranks. Includes just the rank number for any ZOS-supplied default ranks (such as "Guildmaster" for all the guilds I'm in.). I don't know how to get rank names for default ranks.
Report comment to moderator  
Reply With Quote
Unread 02/20/17, 03:48 PM  
ziggr
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 49
Uploads: 5
Re: CSV Sold/Bought totals seem to be incorrect

Originally Posted by jr.returns
Since the last update the CSV sold/bought column values seem to be multiplied by 2. Is this a bug with the mod or with the data source?
1. Delete SavedVariables/GuildSalesQuota.lua and try again (do this while ESO is not running). The new Date Range setting might have caused duplicate data within saved variables.

2. If you still get duplicate data, zip and upload your SavedVariables folder somewhere. I'll need all your MMnnData.lua files as well as GuildSalesQuota.lua and GuildSalesQuota.csv. I'll have a better chance at seeing what's broken if I can see the original Master Merchant data and what GuildSalesQuota did with it.

--Z
Report comment to moderator  
Reply With Quote
Unread 02/20/17, 12:08 PM  
jr.returns

Forum posts: 0
File comments: 5
Uploads: 0
CSV Sold/Bought totals seem to be incorrect

Firstly this is great mode.

Since the last update the CSV sold/bought column values seem to be multiplied by 2. Is this a bug with the mod or with the data source?
Report comment to moderator  
Reply With Quote
Unread 02/18/17, 04:37 PM  
Rushinator

Forum posts: 0
File comments: 21
Uploads: 0
Originally Posted by ziggr
Try this replacement: GuildSalesQuota.lua
I just pushed it to GitHub. It delays calls into Master Merchant and might avoid your crash. Let me know if it does, and I'll publish it as 2.7.2.
IT WORKED! I replaced the lua files contents with what you linked to and everything worked like a charm. No errors and I could change the time ranges in the UI.

All set now! Thank you
Last edited by Rushinator : 02/18/17 at 04:38 PM.
Report comment to moderator  
Reply With Quote
Unread 02/17/17, 10:14 PM  
ziggr
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 49
Uploads: 5
Try this replacement: GuildSalesQuota.lua
I just pushed it to GitHub. It delays calls into Master Merchant and might avoid your crash. Let me know if it does, and I'll publish it as 2.7.2.

Originally Posted by Rushinator
Thank you for the response it was very helpful!

Got an error below with newest update and I tried re-installing the addon as well as deleting the saved variables file but the issue persists.

Code:
user:/AddOns/MasterMerchant/MasterMerchant_Util.lua:468: attempt to index a nil value
stack traceback:
	user:/AddOns/MasterMerchant/MasterMerchant_Util.lua:468: in function 'MasterMerchant:ActiveSettings'
	user:/AddOns/MasterMerchant/MasterMerchant_Guild.lua:150: in function 'MMGuild:new'
	user:/AddOns/GuildSalesQuota/GuildSalesQuota.lua:375: in function 'GuildSalesQuota.FetchMMDateRanges'
Hrm. MasterMerchant:ActiveSettings() should not be crashing with a nil pointer error. Looks like either MasterMerchant itself, or MasterMerchant.acctSavedVariables, is not set.

Code:
    MasterMerchant_Util.lua:465-470
465 -- A simple utility function to return which set of settings are active,
466 -- based on the allSettingsAccount option setting.
467 function MasterMerchant:ActiveSettings()
468   return ((self.acctSavedVariables.allSettingsAccount and self.acctSavedVariables) or
469           self.savedVariables)
470 end
But MasterMerchant:Initialize() sets acctSavedVariables. So if MasterMerchant properly initialized, it shouldn't crash.
Code:
     MasterMerchant.lua:2453-2456
2345 -- Init function
2346 function MasterMerchant:Initialize()
...  
2453   -- Populate savedVariables
2454   self.savedVariables = ZO_SavedVars:New('ShopkeeperSavedVars', 1, GetDisplayName(), Defaults)
2455   self.acctSavedVariables = ZO_SavedVars:NewAccountWide('ShopkeeperSavedVars', 1, GetDisplayName(), acctDefaults)
2456   self.systemSavedVariables = ZO_SavedVars:NewAccountWide('ShopkeeperSavedVars', 1, nil, {}, nil, 'MasterMerchant')
Is Master Merchant itself loaded and working and providing price averages?

My current hypothesis is that the crash is a load order problem where GuildSalesQuota initializes before MasterMerchant, which would be bad. I'll see if I can defer my queries into MM until later in the init cycle, or force ESO to load MM before GSQ...

--Z
Last edited by ziggr : 02/17/17 at 10:32 PM.
Report comment to moderator  
Reply With Quote
Unread 02/17/17, 09:37 PM  
Rushinator

Forum posts: 0
File comments: 21
Uploads: 0
Thank you for the response it was very helpful!

Got an error below with newest update and I tried re-installing the addon as well as deleting the saved variables file but the issue persists.

I also noticed the Guild Sales Quota lua file has changed, which I had previously been using to set custom ranges for export BUT I see with the new update that its unnecessary Hopefully I can solve this error and get to using the new option!

user:/AddOns/MasterMerchant/MasterMerchant_Util.lua:468: attempt to index a nil value
stack traceback:
user:/AddOns/MasterMerchant/MasterMerchant_Util.lua:468: in function 'MasterMerchant:ActiveSettings'
user:/AddOns/MasterMerchant/MasterMerchant_Guild.lua:150: in function 'MMGuild:new'
user:/AddOns/GuildSalesQuota/GuildSalesQuota.lua:375: in function 'GuildSalesQuota.FetchMMDateRanges'
user:/AddOns/GuildSalesQuota/GuildSalesQuota.lua:358: in function 'GuildSalesQuota:CreateSettingsWindow'
user:/AddOns/GuildSalesQuota/GuildSalesQuota.lua:275: in function 'GuildSalesQuota:Initialize'
user:/AddOns/GuildSalesQuota/GuildSalesQuota.lua:256: in function 'GuildSalesQuota.OnAddOnLoaded'
Last edited by Rushinator : 02/17/17 at 09:42 PM.
Report comment to moderator  
Reply With Quote
Unread 02/17/17, 06:22 PM  
ziggr
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 49
Uploads: 5
Originally Posted by Rushinator
Also, I was wondering if it would be possible to add other time range options in addition to "last week" such as the "last 30 days" or "this week"
Added in 2.7.1, just uploaded.
Report comment to moderator  
Reply With Quote
Unread 01/19/17, 07:44 PM  
ziggr
AddOn Author - Click to view AddOns

Forum posts: 3
File comments: 49
Uploads: 5
Originally Posted by Rushinator
I would like to request (if possible) for the addon to also extract the ranks for each member.
Hm. Certainly possible. I'll keep it in mind. Until then, there might be other roster management add-ons that export this data, which you can then join in Google sheets via vlookup() or something similar.

Originally Posted by Rushinator
I was wondering if it would be possible to add other time range options in addition to "last week" such as the "last 30 days" or "this week"
Quite possible. You can do this in code today, pick any of Master Merchant's time ranges. See GuildSalesQuota:CalcLastWeeksTS() and change "fourStart"/"fourEnd" to "oneStart"/"oneEnd" or whatever:

Code:
function GuildSalesQuota:CalcLastWeekTS()
                        -- Let MM calculate start/end times for "Last Week"
    local mmg = MMGuild:new("_not_really_a_guild")
    self.last_week_begin_ts = mmg.fourStart    ← HERE
    self.last_week_end_ts   = mmg.fourEnd      ← HERE
    ...
MM sets those constants in MasterMerchant_Guild.lua, MMGuild:New(). I leave it to you to pore over that code and decide which time range you desire.

I'll think about adding a UI knob within GuildSalesQuota to let you change this without editing Lua source code.
Report comment to moderator  
Reply With Quote
Unread 01/19/17, 03:50 AM  
Rushinator

Forum posts: 0
File comments: 21
Uploads: 0
Hi! First off I love the addon! I've been able to do a lot with the data it gives me.

I would like to request (if possible) for the addon to also extract the ranks for each member. This would be very useful for me as it would allow me (combined with sales/gold deposit data) to automatically see who needs a promotion or demotion thanks to some formulas I wrote in google sheets. Currently I go member by member so this would be great to have and would save me a lot of time!

Also, I was wondering if it would be possible to add other time range options in addition to "last week" such as the "last 30 days" or "this week" (even though the data would be incomplete it would let me update my sheet more often). If this is a UI issue, I would be perfectly happy with just knowing where to change it in Notepad++ (I don't know if that is a viable alternative).

Thank you again!
Last edited by Rushinator : 01/19/17 at 06:28 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: