Analysis attempt of all trades in my savefile

Please post any spoilers for X4: Foundations here.

Moderator: Moderators for English X Forum

Post Reply
Browser_ice
Posts: 485
Joined: Sun, 5. Feb 06, 17:15
x4

Analysis attempt of all trades in my savefile

Post by Browser_ice » Sat, 20. Apr 19, 00:41

Hi, I have been trying to analyse all the buying and selling trade offers stored in my savefile. It is an attempt to see where are the profits and trends.

I managed to extract them and loaded them into Notepad++ to remove the unnecessary stuff and loaded it into LibreOffice Calc for analysis.

I wanted to do graphs for all or each wares but due to the amount of data, it is taking for ever. Therefore I had to resort to a simpler way until I can get what I want.

The total amount of data rows for buying trades is 228,658 and for the selling trades, 127,773. The ODS file is 19Meg.

[added comment] Since every new game is randomly generated, this is strickly related to my current game session and may not represent anybody else's game session.[/added comment]

Here are screenshots of each trade kinds summaries:

http://pasteall.org/pic/show.php?id=e6a ... 8d5cbcd587

http://pasteall.org/pic/show.php?id=933 ... adcf19bf55

I had a few surprises when I looked at them.

Any ideas on what I could use to do a trend analysis that won't take an hour ?

I was thinking about writing my own software to do it (Java or something else). That would be my first programming attempt. Haven't done any programming in 20 years and I used to know a dozen languages. I would just have to commit doing it .... :gruebel:


{Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked - Terre}
Steam X-Superbox, XR, playing X4
WIndows-10
Intel I7-3770
16Gb Memory
Nvgidia GTX-1060

User avatar
Dirk-Jan
Posts: 470
Joined: Tue, 13. Apr 04, 12:38
x4

Re: Analysis attempt of all trades in my savefile

Post by Dirk-Jan » Tue, 23. Apr 19, 12:33

I was thinking about that but got stuck at the first step: getting the game log into a txt file. Would you be willing to share how you did that?
X4: Let's do this!
(ASUS Sabertooth X99S; i7 5930@3.5; 24GB RAM; RX 580; playing latest vanilla steam version with Split Vendetta on Win10/64, "the young gun''; mogul/captain)
{playing since X-BTF}

Browser_ice
Posts: 485
Joined: Sun, 5. Feb 06, 17:15
x4

Re: Analysis attempt of all trades in my savefile

Post by Browser_ice » Tue, 23. Apr 19, 20:22

I used Notepad++ to open the savefile and isolate the <economylog>. ... </economylog> section into a new text file

I then isolated only the buying and selling trades (not the summary)

Then using OpenOffice Calc, I divided that text into columns. I had to move a few columns as some records did not have all the variables as others.

I then sorted out based on trade type (buying or selling), wares and time. I used a few Calc Database commands to get the totals.

Initially I wanted to draw graphs but it was just toooooo loooonnngggg due to too many records.
Steam X-Superbox, XR, playing X4
WIndows-10
Intel I7-3770
16Gb Memory
Nvgidia GTX-1060

Imperial Good
Moderator (English)
Moderator (English)
Posts: 4760
Joined: Fri, 21. Dec 18, 18:23
x4

Re: Analysis attempt of all trades in my savefile

Post by Imperial Good » Wed, 24. Apr 19, 10:31

One can also parse save files into DOM form using some simple hacked together Java code. This can allow one to programmatically filter records and potentially output data in a more user friendly or condensed way.

Simple analysis might not be too useful unless you also take into consideration the factions involved. This is because HOP economy is isolated and one generally does not want to touch HAT or SCA trade offers due to the pirating risk. It may also incorrectly detect Xenon construction orders for Energy Cells, Ore and Silicon.

User avatar
Dirk-Jan
Posts: 470
Joined: Tue, 13. Apr 04, 12:38
x4

Re: Analysis attempt of all trades in my savefile

Post by Dirk-Jan » Thu, 25. Apr 19, 14:30

Browser_ice wrote:
Tue, 23. Apr 19, 20:22
I used Notepad++ to open the savefile and isolate the <economylog>. ... </economylog> section into a new text file

I then isolated only the buying and selling trades (not the summary)

Then using OpenOffice Calc, I divided that text into columns. I had to move a few columns as some records did not have all the variables as others.

I then sorted out based on trade type (buying or selling), wares and time. I used a few Calc Database commands to get the totals.

Initially I wanted to draw graphs but it was just toooooo loooonnngggg due to too many records.
Thanks for sharing
X4: Let's do this!
(ASUS Sabertooth X99S; i7 5930@3.5; 24GB RAM; RX 580; playing latest vanilla steam version with Split Vendetta on Win10/64, "the young gun''; mogul/captain)
{playing since X-BTF}

Post Reply

Return to “X4: Foundations - Spoilers”