aux

aux

1M Downloads

Exporting Aux data.

Opened this issue ยท 1 comments

commented

Hello again,

Could you explain how is Aux data stored in Aux-Addon.lua file in SavedVariables folder? I was thinking about importing Aux data into a spreadsheet in order to make some price graphs and automate some crafting cost calculations. I know all the aux data is stored in that one .lua file so I figured out it must be possible to make some kind of macro fort excel/google spreadsheets that would automatically import that data. In order to be able to do that I need to understand the structure of that saved data.

For example when I search for "medium leather" I find 3 lines:

[1374] = "medium leather",
["medium leather"] = 2319,
[2319] = "Medium Leather#1#0#Trade Goods#Trade Goods##20#Interface\\Icons\\INV_Misc_LeatherScrap_05",

Then when I search for "2319", among other results, I find something like that:
["2319:0"] = "1465164000#51#225#110@1465077600;75@1464991200;63@1464904800;57@1464818400",

I assume this is the line that stores the price data for medium leather. Could you tell me how should one interpret it? Or maybe you already did some experiments in regard to exporting Aux data to excel/google spreadsheets?

Cheers,
Matt

commented

Note that all such records use the persistence interface and you can always find the schema somewhere in the code. In this case from history.lua: local history_schema = {'record', '#', {next_push='number'}, {daily_min_buyout='number'}, {daily_max_price='number'}, {data_points={'list', ';', {'record', '@', {market_value='number'}, {time='number'}}}}}
next_push is a time value (seconds since epoch, obtained through time() in lua) which denotes the end of the day the daily data belongs to. then comes the daily data, min buyout and max price (copper), then comes a list of historical data points. Historical data points each contain a price (copper) and time (again, seconds since epoch) of the day they when they were taken, separated by '@'.