Download
(28 Kb)
Download
Updated: 08/26/20 07:28 AM
Pictures
File Info
Compatibility:
Stonethorn (6.1.5)
Greymoor (6.0.5)
Harrowstorm (5.3.5)
Dragonhold (5.2.5)
Scalebreaker (5.1.5)
Elsweyr (5.0.5)
Updated:08/26/20 07:28 AM
Created:07/25/20 01:53 PM
Monthly downloads:48
Total downloads:4,674
Favorites:5
MD5:
Categories:Bags, Bank, Inventory, Data Mods
CraftBagger
Version: 1.07.03
by: Cuhlen [More]
CraftBagger


The CraftBagger addon is an Elder Scrolls Online utility with a singular purpose: To export the contents of your craftbag(s) to disk so that the data can be pulled into Excel or other tools for analysis.

This addon uses the following optional libraries:
NOTE: This was designed for Windows PCs, though if your computer can run Powershell, it should work as well. (Powershell is available for MAC and Linux). If you DO get this to work on a mac or linux machine, please let me know!

As a crafter in Elder Scrolls Online, I am always looking for resources. I have target amounts of things that I wish to manufacture in order to meet whatever profit goal I currently have, and determining how many resources I need is a monumental effort to do manually. This is why this addon was created. Instead of manually picking through my craft bag in game and keeping track in excel of how many of each item I have and what their cost is, with CraftBagger, I can export that data and then easily import it into Excel.

CraftBagger has two components; the lua based addon code which will cause Elder Scrolls Online to dump your craft bag contents (across all accounts) to a 'saved variables' file. The second component is a command line based powershell script that will parse the non-standard output of the saved variables .lua file and save the contents as .CSV files (one per account).

Elder Scrolls Online does not allow addons to create their own files, so CraftBagger is unable to export your craft bag contents directly to CSV. Because of this, using CraftBagger is a multi-step process:

  • enter the command /savecraftbag from the in-game chat window.
    This will dump your craft bag to a saved variable.
  • enter the command /reloadui, or simply logout (or wait up to 3 minutes).
    This will cause Elder Scrolls Online to save the 'saved variables' to disk.
  • execute the batch file 'run.cmd' from your AddOns\CraftBagger folder, located in %HOMEDRIVE%%HOMEPATH%\Documents\Elder Scrolls Online\live\AddOns\CraftBagger
This will create a CraftBagger-{AccountName}.csv file in this folder. You can then import that CSV file into excel or your spreadsheet software of choice. (It will create one file per account, assuming each account has contents in the craftbag)

If you have the library 'LibPrice' installed, then the csv file will contain 'suggested price' information, pulled from which ever pricing addon you use (Master Merchant, Tamriel Trade Center, Arkadius Trade Tools). As of v7.01, these are the only three pricing addons supported.


Windows Help
Windows sometimes knows when you download a file from the internet and sets a security flag on the file to block it from being executed. If you get a warning about running files from the internet, you may have to unblock the .ps1 and .cmd files. To do so, from windows explorer right click on the CraftBaggerCSVExport.ps1 script and select 'properties', then check the 'Unblock' box in the bottom 'security' section of the dialog. Do the same for the run.cmd file.



Windows should stop blocking you from executing the script now.

Creating a Desktop Shortcut
Unfortunately, Windows does not support easily 'pinning' a batch file (.cmd or .bat) to your start menu or taskbar. However, there is a workaround that will allow you to create a desktop shortcut to running the run.cmd file.

Step 1: Right-click on an empty space on your desktop, select 'New', and then click on 'Shortcut'


Step 2: Enter the following text:
cmd /c "%HOMEDRIVE%%HOMEPATH%\Documents\Elder Scrolls Online\live\AddOns\CraftBagger\run.cmd"



Step 3: Give the shortcut a name and click on 'finish'


This will put an icon on your desktop so now all you have to do is click on the icon to refresh the CSV.


DateTime Appended to CSV file
As of v1.07.0 there are two options in the CraftBagger settings window in-game that control how the CSV file is created. By default, a csv file is created unique to each account, but this file is overwritten each time you run the batch file (or run the powershell script). There are two settings that allow you to append a date/time stamp to the filename instead of overwriting it. The first of this is "Append DateTime stamp to CSV". This is a TRUE/FALSE value that controls if the file is overwritten (FALSE), or if TRUE, appends a date/time stamp. The second setting 'Date Time Format String' gives you control over the specific date/time stamp format that is used. This string must be a powershell date/time format string. For more information, see: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/get-date?view=powershell-7

NOTE: If you remove the TIME from the format string, then only the date portion will be included in the filename. This may cause your file to be overwritten if you output more than one file per day per account.


The powershell script will read your chosen settings from the saved variables file and create the csv accordingly. You can also override the settings on the command line when running the powershell script directly, please see the included powershell help file for more information.

NOTE: If you provide AppendDateTime or DateTimeFormatStr arguments directly on the powershell command line, these values will override anything contained within the game settings.



Credits

I have reviewed the lua script for several addons to see how a particular addon implemented something. I want to give credit here to the most influential.

CombatMetrics by Solinur for assistance with settings configurations.

MiniMap by Fyrakin for inspiration with debug output coloring and displaying the add-on version at load.

Tamriel Trade Center by Cyxui for convincing me that an addon requiring a separate executable could work.

I want to especially thank Sirinsidiator & Seerah for LibAddonMenu and Ziggr for LibPrice
1.07.03 Update for Stonethorn expansion
1.07.02 fixes (again) an issue with quantities being read incorrectly.
1.07.01 improved results from libPrice and added addOn startup message
1.07.00 include support for date/time stamp on exported csv file, added in-game settings options. Fixed bug with quantity
1.06.02 updated run.cmd script to include homepath
1.06 updated the run.cmd script to work properly when ran as a shortcut
1.05 still trying to get minion to see it - changing category
1.04 updated manifest file to fix minion issue
1.03 first release
Optional Files (0)


Archived Files (8)
File Name
Version
Size
Uploader
Date
1.07.02
28kB
Cuhlen
08/23/20 12:00 PM
1.07.01
28kB
Cuhlen
08/22/20 08:40 AM
1.07.00
27kB
Cuhlen
08/15/20 05:09 PM
1.06.02
26kB
Cuhlen
08/03/20 10:11 AM
1.06
26kB
Cuhlen
07/28/20 02:18 PM
1.05
26kB
Cuhlen
07/27/20 04:07 PM
1.04
26kB
Cuhlen
07/27/20 02:18 PM
1.03
24kB
Cuhlen
07/27/20 05:27 AM


Post A Reply Comment Options
Unread 04/12/22, 02:47 AM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Re: Csv file broken?

Originally Posted by Kittenstix
When i run the run.cmd the output csv file says

IsReadOnly ¦IsFixedSize ¦IsSynchronized ¦Keys ¦Values ¦SyncRoot ¦Count
False¦False¦False ¦System Collections Hashtable +KeyCollection ¦System Collections Hashtable + ValueeCollection ¦System Object ¦3

Every line down the chart
What is going wrong?

Edit: the saved variable lua is perfectly readable so it's not that.
Well, first off - sorry this has taken so long to get back to you on. I'm honestly at a loss as to why this is happening, I'm not seeing that behavior in my testing. The one thing that comes to mind is that it may be that something in your inventory is not exporting as expected.

If you are still seeing this behavior and want me to have a look at it, I'll need you to send me the 'CraftBagger.lua' file from %HOMEDRIVE%%HOMEPATH%\Documents\Elder Scrolls Online\live\SavedVariables
Report comment to moderator  
Reply With Quote
Unread 02/28/21, 11:48 AM  
Kittenstix

Forum posts: 0
File comments: 1
Uploads: 0
Csv file broken?

When i run the run.cmd the output csv file says

IsReadOnly ¦IsFixedSize ¦IsSynchronized ¦Keys ¦Values ¦SyncRoot ¦Count
False¦False¦False ¦System Collections Hashtable +KeyCollection ¦System Collections Hashtable + ValueeCollection ¦System Object ¦3

Every line down the chart
What is going wrong?

Edit: the saved variable lua is perfectly readable so it's not that.
Last edited by Kittenstix : 02/28/21 at 11:49 AM.
Report comment to moderator  
Reply With Quote
Unread 09/30/20, 04:39 PM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Originally Posted by Akopian Atrebates
I use ttc and sometimes MM or ATT depending on . . . well, whatever is working best.

Anyway, I have getting suggested prices from MM and I am trying to extract more of purchasing price model for determining how much resources will cost. So I would prefer to have the TTC prices. Any idea how I can choose what shows up as the "suggested price?" Am I missing something?
I've considered adding an option to allow you to choose which, or which order of prices (from which mod) you prefer, but this is the first request I've had for it.

I'll see if I can't work it into the next version.

One other thought, 'libPrice', which I use for pricing data, hasn't been updated since mid-2019 - I may have to work out another plan for pricing.
Report comment to moderator  
Reply With Quote
Unread 09/24/20, 02:23 AM  
Akopian Atrebates

Forum posts: 9
File comments: 230
Uploads: 0
I use ttc and sometimes MM or ATT depending on . . . well, whatever is working best.

Anyway, I have getting suggested prices from MM and I am trying to extract more of purchasing price model for determining how much resources will cost. So I would prefer to have the TTC prices. Any idea how I can choose what shows up as the "suggested price?" Am I missing something?
Report comment to moderator  
Reply With Quote
Unread 08/25/20, 05:31 PM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Originally Posted by Kayrne
I used it multiple times yesterday and everything works fine right now
Good to know, thanks for the update.
Report comment to moderator  
Reply With Quote
Unread 08/25/20, 11:21 AM  
Kayrne

Forum posts: 0
File comments: 8
Uploads: 0
Originally Posted by Cuhlen
Originally Posted by Kayrne
Heyho,

Now I am getting wierd .csv exports. Like the quantity of some Items are not correct and so on.

I uploaded the saved variable and the csv export from this saved variable:
https://easyupload.io/m/tyzc1z

greetings
Yep, you're right. I found a few discrepancies in your data. This bug was supposed to have been fixed in 1.07, but apparently I introduced a regression in the latest version.

This should fix it. Please try the latest version (1.07.02). Sorry about that!
I used it multiple times yesterday and everything works fine right now
Report comment to moderator  
Reply With Quote
Unread 08/23/20, 12:01 PM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Originally Posted by Kayrne
Heyho,

Now I am getting wierd .csv exports. Like the quantity of some Items are not correct and so on.

I uploaded the saved variable and the csv export from this saved variable:
https://easyupload.io/m/tyzc1z

greetings
Yep, you're right. I found a few discrepancies in your data. This bug was supposed to have been fixed in 1.07, but apparently I introduced a regression in the latest version.

This should fix it. Please try the latest version (1.07.02). Sorry about that!
Report comment to moderator  
Reply With Quote
Unread 08/22/20, 10:45 PM  
Kayrne

Forum posts: 0
File comments: 8
Uploads: 0
Heyho,

Now I am getting wierd .csv exports. Like the quantity of some Items are not correct and so on.

I uploaded the saved variable and the csv export from this saved variable:
https://easyupload.io/m/tyzc1z

greetings
Report comment to moderator  
Reply With Quote
Unread 08/20/20, 10:35 AM  
Kayrne

Forum posts: 0
File comments: 8
Uploads: 0
Originally Posted by Cuhlen
Originally Posted by Kayrne
Hi,

so i had the time today to test it and the name of the .csv is still the same.

I also reinstalled the addon. I do not know if i can give you more info.
But please feel free to ask if I can do something :/

greetings
The default behavior is NOT to append the date time. Did you enable that feature in the addon settings?

Also, once you enable the feature, you have to rerun /savecraftbag, reload the ui (or logout), and re-run the powershell script, either from powershell itself, or from the batch file.

If you did all that and it's still not working ... can you post the 'CraftBagger.lua' file from %HOMEDRIVE%%HOMEPATH%\Documents\Elder Scrolls Online\live\SavedVariables ?
Ahhhh sorry I did not see that it is necessary to enable it in the options :x

It is working completely fine!
Thanks again
Report comment to moderator  
Reply With Quote
Unread 08/19/20, 03:30 PM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Originally Posted by Kayrne
Hi,

so i had the time today to test it and the name of the .csv is still the same.

I also reinstalled the addon. I do not know if i can give you more info.
But please feel free to ask if I can do something :/

greetings
The default behavior is NOT to append the date time. Did you enable that feature in the addon settings?

Also, once you enable the feature, you have to rerun /savecraftbag, reload the ui (or logout), and re-run the powershell script, either from powershell itself, or from the batch file.

If you did all that and it's still not working ... can you post the 'CraftBagger.lua' file from %HOMEDRIVE%%HOMEPATH%\Documents\Elder Scrolls Online\live\SavedVariables ?
Report comment to moderator  
Reply With Quote
Unread 08/19/20, 11:31 AM  
Kayrne

Forum posts: 0
File comments: 8
Uploads: 0
Hi,

so i had the time today to test it and the name of the .csv is still the same.

I also reinstalled the addon. I do not know if i can give you more info.
But please feel free to ask if I can do something :/

greetings
Report comment to moderator  
Reply With Quote
Unread 08/16/20, 09:14 PM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Originally Posted by Kayrne
Thank you very much!
No problem, let me know how it works out for you.
Report comment to moderator  
Reply With Quote
Unread 08/16/20, 01:28 PM  
Kayrne

Forum posts: 0
File comments: 8
Uploads: 0
Thank you very much!
Report comment to moderator  
Reply With Quote
Unread 08/15/20, 05:10 PM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Originally Posted by Kayrne
Hi,

great addon and i was looking for this kind of addon for a long time!

I have a simple request or question for your addon:
Is it possible to add the date and time code to the .csv?
So the .csv would not be overwritten

Thank you very much

greetings
This feature has been included in 1.07
Report comment to moderator  
Reply With Quote
Unread 08/13/20, 02:28 PM  
Cuhlen
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 11
Uploads: 1
Originally Posted by Kayrne
Originally Posted by Cuhlen
Originally Posted by Kayrne
Hi,

great addon and i was looking for this kind of addon for a long time!

I have a simple request or question for your addon:
Is it possible to add the date and time code to the .csv?
So the .csv would not be overwritten

Thank you very much

greetings
I can look into making that an option. For my use, I like binding it as a data source in excel, which would not work if the file name was different with every export, but sure.. i'll look into it.
Ok Interesting. What do you do in excel with this data?

Right now I want to you use your addon to create a statistic of needed ressources for doing crafting dailies. So therefore I wanted to have different files but ofc I can save them manually.
So if it makes too much trouble it is no problem

Primarily, I use it to determine if crafting something is going to be profitable (enough) to warrant my running all over creation trying to find enough resources. I have the exported CSV file setup as a data source in excel, so when I refresh it from the game, all I have to do is run the batch file and hit the refresh button in excel to pull in the new data.



Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: