Author Topic: Edit save file  (Read 5747 times)

Offline Gemeaux333

  • Newbie
  • *
  • Posts: 27
Edit save file
« on: May 26, 2019, 12:56:12 PM »
Is it possible ?

I have made a mistake and need to do so...

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: Edit save file
« Reply #1 on: May 26, 2019, 06:23:12 PM »
Gemeaux333,

Yes you can edit save files using a hex editor. See the attached text document that Hooman put together for the format. The document is maintained in the SVN repository in case you want to check for a newer version someday in the future.

-Brett

Offline Gemeaux333

  • Newbie
  • *
  • Posts: 27
Re: Edit save file
« Reply #2 on: May 26, 2019, 11:48:13 PM »
I meant for Outpost 1

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Re: Edit save file
« Reply #3 on: May 27, 2019, 10:31:15 AM »
Is it possible?  Yes.  Does anyone know how to do it?  Not yet.  But there's nothing stopping you from experimenting with the save file format and writing your own save editor tool.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Gemeaux333

  • Newbie
  • *
  • Posts: 27
Re: Edit save file
« Reply #4 on: May 28, 2019, 10:05:35 AM »
Well, its slightly beyond my abilities...

Offline Vagabond

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1015
Re: Edit save file
« Reply #5 on: May 28, 2019, 12:47:08 PM »
Sorry, I misread your post. Sirbomber set me straight though. Leeor would probably be the most knowledgeable on the subject.

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Re: Edit save file
« Reply #6 on: May 28, 2019, 03:49:42 PM »
Well, its slightly beyond my abilities...
It's beyond your abilities right now.  This seems like a good opportunity to pick up some new skills though.  Start small.  Make a save file.  Bulldoze a structure and save again to a different file.  Compare them both and see what changed.  Build a structure and save again.  Compare all 3 files and see what's different.  Just messing around with that will probably give you some idea of how the game stores resource totals and the status of each tile.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

Offline Gemeaux333

  • Newbie
  • *
  • Posts: 27
Re: Edit save file
« Reply #7 on: May 29, 2019, 09:44:11 AM »
Maybe...

My skills are actually more in translation/localisation and whatever relate to this...

Offline leeor_net

  • Administrator
  • Hero Member
  • *****
  • Posts: 2352
  • OPHD Lead Developer
    • LairWorks Entertainment
Re: Edit save file
« Reply #8 on: May 30, 2019, 09:22:03 PM »
I've never attempted to reverse engineer the savegame files for OP1 though I've thought about it. I tinkered around with a couple of them in a hex editor... there's a lot of plain text strings in there which is encouraging but I've never really had the time to do any sort of comparisons to see what's what, what changes, etc.

What I do remember from observing several files is there appears to be some sort of a section header or marker. I don't know exactly what it means but it's the same values that are repeated with some sort of numeric index:

dcbSC## (hex: 64 63 62 53 43) where '##' is a two digit hex value starting with 01 at the very beginning of the file.

Of note, the first five bytes of every savegame file starts with SC004 (hex: 53 43 30 30 34). Also of note is that the last 7 bytes of every savegame file is dcbSC0b. Unsure what it means other than a possible end of file (EOF) type of marker.

There are several sections with what looks like regular patterns. I'm not sure what they are but if I had to guess I'd say it has to do with the tile data itself. This is just a guess, of course. I haven't gotten any further than this.
« Last Edit: May 30, 2019, 09:26:01 PM by leeor_net »