analysing a save file - a method that i used

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

kuertee
EGOSOFT
EGOSOFT
Posts: 817
Joined: Sun, 14. Dec 03, 13:05
x4

analysing a save file - a method that i used

Post by kuertee »

i just remembered that (a few weeks ago while integrating some of my mods to SWI) i figured out an easy way to analyse the save file.
for any modder interested, here's how i managed to get an idea of what's in the save file. of course, you'll need to know what you're looking for to really analyse it.
anyway, here the steps i took to break apart the save file into managable chunks:

1. extract the xml from the save file
2. split it at each "script" node with this: http://www.firstobject.com/xml-splitter ... -video.htm
3. each separate file will contain an active script that contains all its data including sub cues, libraries and instances

results with the save (about 90Mb zipped!) that i looked at:
i. largest script file is 47MB: <script id="102" name="NPC_State_Machines">
ii. next largest is 36MB: <script> - no id. i don't know what this is but it looks like it holds temp vars of cues. e.g. "$MISSION_NO_VARIANT" has several entries.
iii. the following largest files are faction logic script files.
iv. there are 49k separate files and the bulk of them are 3kb and smaller. And it looks like these are separate ship orders (attack or trade).

it exports MANY, MANY small files. Windows Explorer will be less responsive.
you'll need a couple of gigs of HD space for this operation to be safe: 1gig for the extracted XML, and another gig for the separate files.
add another gig just to be safe.
so 3gigs of had space.

Return to “X4: Foundations - Scripts and Modding”