Save game exporter/importer tool

The place to discuss scripting and game modifications for X Rebirth.

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

Post Reply
jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Save game exporter/importer tool

Post by jth » Sun, 23. Aug 15, 16:02

I could do with something that will export and import lumps of a savegame to help with debugging other peoples problems with my mods and to help create testing environments. Without any cut and paste by the end user.

By lumps I mean objects of type station, ship and NPC

Entire savegames are a bit on the large side to post and people are extremely loath to let me have theirs for testing. So far zero takers :( All I actually need is the say 600 lines worth that is a station so that I can pop it into one of my savegames and test it.

I have looked at the XML editors out there but they don't seem to export lumps of text in Egosoft savegame format. The data that I want is also buried dozens of connections down and a pig to browse for via a GUI. Although obviously you can search for things.

An XRebirth browser hierachy starting with sectors and zones or player objects is what I really want and + signs by game objects. I don't think that this exists and is going to be a major effort to produce and maintain.

There are savegame editors out there but not with object import/export

I think that there might be room for something simpler to bridge the gap between manual savegame editing and a XRebirth capable browser with savegame export/import capability.

I am thinking about writing something simple that reads XRebirth savegame files as text with tags rather than xml and can then save objects as little files. It would probably be a command line tool initially.

Some form of selection filter say class and owner and then create a folder and drop the xml that is those objects as a file into the folder. Give them some sort of meaningful file names and pop precisely where they connect to into a comment line. Then finally zip up the contents of the folder.

Later on maybe produce an import tool to take one or more of the single object files and pop it/them into a different savegame.

Is there anything out there that does this ?

What do you think ?

jth

w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans » Sun, 23. Aug 15, 16:18

Hey jth, you could try Roger L.S. Griffith's Visual XML Editor. Haven't used it much, so I don't know if it has extraction capability, but it does have the ability to list xml files with a hierarchy like you described.

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Sun, 23. Aug 15, 17:31

w.evans wrote:Hey jth, you could try Roger L.S. Griffith's Visual XML Editor. Haven't used it much, so I don't know if it has extraction capability, but it does have the ability to list xml files with a hierarchy like you described.
I had a brief play with that yesterday and it does have a hierarchy but no import/export and I couldn't see any user objects. That might just be me looking in the wrong place. The hierarchy is done from the raw xml point of view and the Canteran sectors are buried a long long way down in the connections in the savegame structure :(

I also looked at a couple of other browsers, Jedit and XML marker. XML Marker gave a very similar viewpoint to Visual XML Editor and had the user objects at the end of very long branches in the tree. Its search did find objects properly but again it didn't give you a + symbol next to an XRebirth object which is fair enough as it doesn't understand the meaning of XRebirth savegames. Notepad++ at least has + symbols for hiding code and does a better job. I turned on the indenting of the file in XML Marker and most of it vanished into the distance off the right hand side of the page. No save in XRebirth format button either actually no save button at all :(

What all three of these tools brought home to me was that the XML view was upside down with the bits I wanted a dozen or so levels down. I wanted a top level that said Stations and then the ability to traverse my way to the required station. A kind of XRebirth overlay with import/export in savegame format.

EDIT To get one of the xml viewers to play with XRebirth savegame format would mean writing a plugin for one of them and frankly Notepad++ might be the best one but its a bit out of my league whereas a text filtering and exporting script should be a lot easier to do.

jth

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sun, 23. Aug 15, 18:08

what kind of errors do you want to debug? if its something related to aiscripts/md then using <debug_text/> in the right places may be a better approach..

also XR-Savegames can be compressed extremely good - simply zipping them reduces their Size from about 60 MB to 3 MB (quick test using my current test save)

and i think XR also understands indented xml for savegames, so no need to remove the indention after editing - just save it to an xml file.
if not stated otherwise everything i post is licensed under WTFPL

Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter ;)

I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help ;)

jth
Posts: 296
Joined: Tue, 3. Jan 06, 23:31
x3

Post by jth » Sun, 23. Aug 15, 18:47

UniTrader wrote:what kind of errors do you want to debug? if its something related to aiscripts/md then using <debug_text/> in the right places may be a better approach..

also XR-Savegames can be compressed extremely good - simply zipping them reduces their Size from about 60 MB to 3 MB (quick test using my current test save)

and i think XR also understands indented xml for savegames, so no need to remove the indention after editing - just save it to an xml file.
The kinds of errors reported are generally one liners along the lines of "your mod doesn't work" :(

Both mods have extensive debug_text logging in them and there are instructions in the readme.txt to get a log file. The big problem comes in seperating the wood from the trees in there. The final step in the instructions which says to filter the debug.txt file generally doesn't get done. So what is posted back sometimes doesn't help at all. At which point I ask for a savegame .... but don't get one.

Without savegames its very difficult to spot cases which I hadn't thought of and which the mod doesn't cope with. I have found that it can take me three or four hours to duplicate the setup of the end user enough to replicate an issue.

I think that you must be more trustable than me to actually get a savegame sent to you :)

Whereas a single object exporter might be more acceptable to the end users and could help some of the manual savegame editors out there.

I would also like to get the size of my test savegames right down as I seem to spend half my life waiting for them to load. I thought that exporting a couple of stations and some ships into an empty game would do the trick nicely. Also been thinking of deleting Omicron Lyrae in the test setup ....

jth

Post Reply

Return to “X Rebirth - Scripts and Modding”