Save game editing

General discussion about the game.
ChickenBandit
Posts: 15
Joined: Mon Sep 17, 2012 4:40 pm

Re: Save game editing

Postby ChickenBandit » Tue Sep 18, 2012 1:06 am

Found oxygen, it's pretty simple. The 64 after each FF FF FF FF in that one long series of them represents the amount of oxygen in any given chamber. I'll try and figure which chamber is which later, after I do doors and everything else :)
Last edited by ChickenBandit on Tue Sep 18, 2012 1:07 am, edited 1 time in total.
raskolnik
Posts: 13
Joined: Sun Sep 16, 2012 8:28 pm

Re: Save game editing

Postby raskolnik » Tue Sep 18, 2012 1:07 am

Well, this has certainly taken off since my initial stumbling around the save file. Nice work to everyone, and just let me know if there's anything that I can contribute. Otherwise I'll just stay out of the way....
ChickenBandit
Posts: 15
Joined: Mon Sep 17, 2012 4:40 pm

Re: Save game editing

Postby ChickenBandit » Tue Sep 18, 2012 1:16 am

I'm having trouble making sense of power levels, see this:

http://i.imgur.com/gGSkb.png

The one on the right is the default power allocation, the one on the left is with one extra point stuck into engines.

EDIT: going to take a break to, y'know, actually play the game :)
Last edited by ChickenBandit on Tue Sep 18, 2012 1:28 am, edited 1 time in total.
Scratch
Posts: 5
Joined: Sat Sep 15, 2012 10:59 am

Re: Save game editing

Postby Scratch » Tue Sep 18, 2012 1:28 am

ChickenBandit wrote:
Scratch wrote:Very nice work.

Anyone found the data for resources?


As in fuel, missiles, scrap, etc.? Nope, going to get to that one eventually though.


Having a quick look myself, no obvious references though. Must be more deeply encoded.
arhimmel
Posts: 9
Joined: Mon Sep 17, 2012 11:25 pm

Re: Save game editing

Postby arhimmel » Tue Sep 18, 2012 1:49 am

with my code ive gotten pretty far. it no longer breaks when the game is played for a while then saved.

but im not sure of the next step. I can decode everything up to the crews stats.

anyone knows what follows? is it the ship stats?

ps. once ive decoded the whole sav file format, i plan on refactoring my code so its more objected oriented and then work on actually writing the editor parts.
ChickenBandit
Posts: 15
Joined: Mon Sep 17, 2012 4:40 pm

Re: Save game editing

Postby ChickenBandit » Tue Sep 18, 2012 2:10 am

arhimmel wrote:with my code ive gotten pretty far. it no longer breaks when the game is played for a while then saved.

but im not sure of the next step. I can decode everything up to the crews stats.

anyone knows what follows? is it the ship stats?

ps. once ive decoded the whole sav file format, i plan on refactoring my code so its more objected oriented and then work on actually writing the editor parts.


I'm pretty sure it's power allocation. If you look at this screenshot http://i.imgur.com/gGSkb.png, the stuff highlighted are some numbers from shifting power around, directly above is the last crew member.

EDIT: Also, all of the FF FF FF FF 64 series are oxygen levels, not sure for which chambers though.

EDIT2: Also door controls comes after oxygen. Look at all my past posts in here and you'll see.
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: Save game editing

Postby swixel » Tue Sep 18, 2012 2:55 am

Fairly sure I've got this right ...

First six 32bit ints (longs if you want; words if you don't) are:

Code: Select all

00 - Version (2) -- this is an assumption
04 - Unknown - is NOT difficulty
08 - Ships Defeated
0C - Jumps in sector
10 - Scrap collected
1C - Crew recruited


Following this ...

Code: Select all

long     Ship name length
string   Ship name
long     Shipe type length
string   Ship type


The next is an unknown binary (always 1?)

Following this we've got achievement progress... but before then we have two binaries.

Code: Select all

long     Do we have achievements (1 = true)

# If we do:
long     Number of progress/achievements
long     Name length
string   Name
long     Progress (count)

# Else: nothing, skip this
arhimmel
Posts: 9
Joined: Mon Sep 17, 2012 11:25 pm

Re: Save game editing

Postby arhimmel » Tue Sep 18, 2012 3:34 am

all of that looks very similar to what i have. my code prints all the fields we have decoded.

i have only tried it with kestrel save games
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: Save game editing

Postby swixel » Tue Sep 18, 2012 5:07 am

arhimmel wrote:all of that looks very similar to what i have. my code prints all the fields we have decoded.

i have only tried it with kestrel save games


Yeah, I'm working from a combination of RAM and the binary at this point... it's a little slower, I'll grant you.

Frodyne wrote:

Code: Select all

Int32   0000 0000 ? - No idea what this does
Int32   Health
Int32   X coordinate
Int32   Y coordinate
Int32   Room
Int32   Room tile (0-3)
Int32   0100 0000 ? - No idea what this does



Just a minor update ...

The first unknown here is "Is it a drone?" (1 = true)

The second appears to be either a null pointer (its memory address appears to becomes one), or something to do with animations. Given the version check at the top, I'd say set it to one and assume it's one. If it's not one, store it and use it.

-----

File structure is something like:

Header (version)
General stats (as before)
Score related (including achievements)
Ship (including crew and droids)
GUI? (save with a store window open, interesting ...)
Star Map
Additional ship information (weapons, etc.) if an int is set to 1 -- which ship I don't know/care about, tbh.
Boss (byte array, I'm not sure what it does, but you need to have hugged the boss's face with a laser first)



Note: Rooms appear to be drawn from the "blueprint" file. Here's the complexity, we'll need that for editors, so it's parser time.
Jessen
Posts: 14
Joined: Sat Sep 15, 2012 2:30 am

Re: Save game editing

Postby Jessen » Tue Sep 18, 2012 8:41 am

using whats made, i can determin the experience levels for the skills of your crew, but i'm not quite sure on it myself...it may be that the numbers are in different places depending on the race of the crew member, but i'm not 100% sure.