[Tool] Save game Editor & CAT\DAT explorer\extracter v0.1.21 (2015-02-02)

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

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

How would you like to get the application and updates:

(current) As a Click-Once application, the application is user bound and auto updates
37
36%
As a Click-Once application (with a selectable install dir), the application is user bound and auto updates (Under the hood the application would create a symlink from the Click-once install dir to the destination dir, not sure if this is possible)
8
8%
In a zip downloadable from the internet
44
42%
In a installer with a selectable install path
15
14%
 
Total votes: 104

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

Post by w.evans »

Sorry for the wall of text, but trying to load a file got an error message upon clicking "Open" or double-clicking the file to open it. Thought that it might help to post the whole thing here. (Is there a better way to do this reporting in the future?)


************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at X_Rebirth_Save_Game_Editor.DataStructure.ClusterData..ctor(XmlNode clusterNode) in c:\Users\***\Desktop\XRebirth repo\X_Rebirth_Save_Game_Editor\Source\X_Rebirth_Save_Game_Editor\X_Rebirth_Save_Game_Editor\DataStructure\ClusterData.cs:line 30
at X_Rebirth_Save_Game_Editor.DataStructure.GalaxyData..ctor(XmlNode galaxyNode) in c:\Users\***\Desktop\XRebirth repo\X_Rebirth_Save_Game_Editor\Source\X_Rebirth_Save_Game_Editor\X_Rebirth_Save_Game_Editor\DataStructure\GalaxyData.cs:line 26
at X_Rebirth_Save_Game_Editor.SaveGameEditor.LoadNewSaveGame(String savePath) in c:\Users\***\Desktop\XRebirth repo\X_Rebirth_Save_Game_Editor\Source\X_Rebirth_Save_Game_Editor\X_Rebirth_Save_Game_Editor\SaveGameEditor.cs:line 70
at X_Rebirth_Save_Game_Editor.SaveGameEditor..ctor(String savePath) in c:\Users\***\Desktop\XRebirth repo\X_Rebirth_Save_Game_Editor\Source\X_Rebirth_Save_Game_Editor\X_Rebirth_Save_Game_Editor\SaveGameEditor.cs:line 43
at X_Rebirth_Save_Game_Editor.Form1.ofd_FileOk(Object sender, CancelEventArgs e) in c:\Users\***\Desktop\XRebirth repo\X_Rebirth_Save_Game_Editor\Source\X_Rebirth_Save_Game_Editor\X_Rebirth_Save_Game_Editor\Form1.cs:line 94
at System.Windows.Forms.FileDialog.OnFileOk(CancelEventArgs e)
at System.Windows.Forms.FileDialog.HandleVistaFileOk(IFileDialog dialog)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18444 built by: FX451RTMGDR
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
X_Rebirth_Save_Game_Editor
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Utils/XR%20modding/X_Rebirth_Save_Game_Editor/X_Rebirth_Save_Game_Editor.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.18408 built by: FX451RTMGREL
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34238 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.34234 built by: FX452RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

edit: the c:\users\<name> paths looked like they belonged to your personal computer, so replaced them with "***" because that's really none of our business.
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

nemesis1982 wrote:Well just posted 0.1 I can't stress enough that this is a pre alpha. Gotta go to sleep now ;)
Thnx for all the feedback so far. If anyone could give it a test drive and give some feedback it would be greatly appreciated.
Gave it a really quick test drive, it didn't like me :P

[ external image ]
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

NZ-Wanderer wrote: ... it didn't like me :P
it didn't like me neither. :cry:
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

It did not like me either but I have given the OP some pointers as to where I believe they may be going wrong and I think they are on the case.
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

Roger L.S. Griffiths wrote:It did not like me either but I have given the OP some pointers as to where I believe they may be going wrong and I think they are on the case.
Glad someone knows what's happening :)
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.
nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 »

Hey guys, I was a bit zealous and rushed the release.

I'll add error handling today so I can detect where it goes wrong.

I'll also be testing with a new save to see what happens.

Later on I might ask some of you for your saves, for testing purposes ;)
User avatar
YorrickVander
Posts: 2774
Joined: Tue, 29. Oct 13, 21:59
x4

Post by YorrickVander »

Will be happy to oblige. I also have a legacy save from v1.25 if you want deliberate testing of that. I think some save structure has changed over the last year.
X Rebirth - A Sirius Cybernetics Corporation Product

Split irritate visiting pilot with strange vocal patterns.
nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 »

@YorrickVander: For now I'll be focusing on 3.0 and up. I might add legacy support later on.
User avatar
Nikola515
Posts: 3193
Joined: Fri, 4. May 12, 07:40
x4

Post by Nikola515 »

Nice :D

Is there any way you can add:

1)Add station to sector or empty zone (for player or NPC). I want to add some NPC stations to DV to make it more complete.

2) Add crew to Skunk (I hate looking for specialists all the time) :wink:

3) Add recourse to zone.

4) Add ship.
It's not world hunger because we can't feed poor,it's because there will never be enough to feed the rich .....
nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 »

@Nikola: I'll add it to list. Thnx for the input. Working on a stable version now after which I'll update the main page.

The station add and ship functions will have to wait till I'm a bit more familiar with the XML structure. Friday was the first time I actually opened the save game XML file so I'll start small ;)

what is a recourse?
User avatar
Nikola515
Posts: 3193
Joined: Fri, 4. May 12, 07:40
x4

Post by Nikola515 »

nemesis1982 wrote:@Nikola: I'll add it to list. Thnx for the input. Working on a stable version now after which I'll update the main page.

The station add and ship functions will have to wait till I'm a bit more familiar with the XML structure. Friday was the first time I actually opened the save game XML file so I'll start small ;)

what is a recourse?
Thanks in advance :)

Resources(sorry my English is bad :oops: ) like Ore,Ice,Plasma..... It is pretty much for mining. I noticed some zones like in DV/Bleak Pebble have everything in them (Ion, Crystals , Nividum etc...) but they are not there when in zone (you can only see Ore when you are in that zone) and you can only mine there when you are off zone. If you can make something like that would be nice :)
It's not world hunger because we can't feed poor,it's because there will never be enough to feed the rich .....
nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 »

@Nikola515: Your english is fine mate. Didn't even think about that. I'll defenitly add that as well.
UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader »

Nikola515 wrote:
nemesis1982 wrote:@Nikola: I'll add it to list. Thnx for the input. Working on a stable version now after which I'll update the main page.

The station add and ship functions will have to wait till I'm a bit more familiar with the XML structure. Friday was the first time I actually opened the save game XML file so I'll start small ;)

what is a recourse?
Thanks in advance :)

Resources(sorry my English is bad :oops: ) like Ore,Ice,Plasma..... It is pretty much for mining. I noticed some zones like in DV/Bleak Pebble have everything in them (Ion, Crystals , Nividum etc...) but they are not there when in zone (you can only see Ore when you are in that zone) and you can only mine there when you are off zone. If you can make something like that would be nice :)
no need to look this up in the Savegame - the size of Region is not stored there (although it is possibile to modify it via save imo, but doing this is probably a project comparable to a save editor on its own)

problem here is that the Region overlaps a Zone it is not intended to be in slightly: (Asteroids and Nebula are not defined in a Zone Level but on Sector Level in the Cluster, often centered on a Zone - but Neighbour Zones may overlap a Region slightly, so the problem is not that the Ressource cannt be mined but that it shouldnt show up there at all)

Code: Select all

        . -- ~~~ -- .
    .-~ Circle-Region ~-.
   /  +---------------+  \
  /   | Square - Zone |   \
 |    |               |    |
 |    |               |    |
 |    |               |    |
  \   |               |   /
   \  +---------------+  /
    `-.            +--.-'----------+
        ~- . ___ . +~ Zone not     +
                   | intended to   |
                   | be in this    |
                   | Region        |
                   +---------------+
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 ;)
User avatar
Nikola515
Posts: 3193
Joined: Fri, 4. May 12, 07:40
x4

Post by Nikola515 »

Thanks for info :)
It's not world hunger because we can't feed poor,it's because there will never be enough to feed the rich .....
w.evans
Posts: 2963
Joined: Tue, 18. Nov 14, 16:23
x4

Post by w.evans »

Hi nemesis1982,

could you please add a feature that would solve the problem detailed here?

http://forum.egosoft.com/viewtopic.php?t=375877

Something that could cut macros cleanly from a save file?
nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 »

New version: https://dl.dropboxusercontent.com/u/406 ... v0.1.1.zip

This one has error handling (not much in error recovery yet though) and error logging. It includes a few libraries which require .net 3.5 to run though.

@w.evans: Could you elaborate? If you can give me clear description I might be able to accomodate your needs. Maybe even today. Doesn't look like it's to much work.

Basicly it's just removing all elements with a certain macro right?
User avatar
alexalsp
Posts: 1896
Joined: Fri, 18. Jul 14, 05:28
x4

Post by alexalsp »

This editor is only for the original game without the mod?

I can not open files saved games with the mod. :(
User avatar
Sam L.R. Griffiths
Posts: 10522
Joined: Fri, 12. Mar 04, 19:47
x4

Post by Sam L.R. Griffiths »

alexalsp wrote:This editor is only for the original game without the mod?

I can not open files saved games with the mod. :(
Are you talking about the Teladi Outpost DLC? If so, that may explain some of the problems.

@OP: Those error trapping libraries you are referring to are a bit of overkill for the issues I was getting at in our PM conversation. There really is no need for them if you make no assumptions about the XML structure when trying to serialise it out of the DOM into your internal custom representation(s).

Essentially, when converting from XML DOM to internal representation the DOM should dictate what gets created and if a part of the XML structure appears to be missing a default value object should be created in it's stead (if created at all). In addition, unexpected objects/nodes/attributes in XML can generally be ignored (but in this context it would be wise to preserve them as-is to avoid game save corruption).

It is all part of generic XML processing 101 IME, making assumptions that something is going to be defined in a specific order or even at all in an XML file is the first step to XML processing hell. :wink:
Lenna (aka [SRK] The_Rabbit)

"Understanding is a three edged sword... your side, their side... and the Truth!" - J.J. Sheriden, Babylon 5 S4E6 T28:55

"May god stand between you and harm in all the dark places you must walk." - Ancient Egyption Proverb

"When eating an elephant take one bite at a time" - Creighton Abrams
nemesis1982
Posts: 812
Joined: Wed, 29. Oct 08, 12:10
x4

Post by nemesis1982 »

@alexalsp: Can you clarify? It's not clear to me what the problem is. You cannot open the file in the editor or you cannot open the file saved with editor in game.

As for mods. I run teladi outpost but the editor shouldn't be reliable on it. Further more I have have a few save games with a number of mods installed.

Could you provide the save game and the logging file? I'll see waht I can do.

@Roger: I just use them for logging ;) I know it's old but it's what I'm used to :P

Just added error and exception handling haven't changed anything to the structure.
User avatar
NZ-Wanderer
Posts: 1627
Joined: Thu, 5. Aug 04, 01:57
x4

Post by NZ-Wanderer »

nemesis1982 wrote:Later on I might ask some of you for your saves, for testing purposes ;)
Here ya go, latest save I made :)

https://www.dropbox.com/s/u2oeuxngb63gn ... 9.zip?dl=0

Zipped up good, went from 53,792,627 down to 3,914,643

Just don't try running it in rebirth, with the number of mods I use it would make your rebirth melt :P
Link to the list of Mods working in X4-Foundations and also Link to the list of Mods working in X-Rebirth

NOTE: I play with a modded game, so any reports I make outlining suggestions/problems/bugs/annoyances, are made with mods installed and running.

Return to “X Rebirth - Scripts and Modding”