1. Please be advised of a few specific rules and rule exceptions for this section.

WIP Save Editor discussion

Discussion in 'Other' started by ThisGuy, Dec 6, 2013.

Thread Status:
This thread has not been replied to for more than 90 days.

WIP Save Editor discussion

Discussion in 'Other' started by ThisGuy, Dec 6, 2013.

  1. After losing to a boss one too many times, and not feeling like farming for parts, I've been poking around the save files. It seems that your inventory begins after your character info (beard, hair, etc). So here's what I've learned so far, can anyone expand on this?

    Info from my saves:

    Inventory starts at offset 619, after 4E 2F 28
    Page two starts after another 28

    Items have this format: 0700 #1 itemname #2 0700
    #1 = ID number? #2 = Stack count

    "0700" are the bytes that separate between items

    Do we have a complete item list yet? Anyone know item ID #s?
      Last edited: Dec 6, 2013
    • If we manage to open the playerCodex.db file in Navicat, well, much more we can do.
      • You not need a playerCodex.db.
        Yor local character files is located here: Steam\SteamApps\common\Starbound\player
        • Yes and some stuff I can't see because Notepad++ "blocks" it with a black square and some text on it.
          • you should convert the hex into UTF-8 example:
            U+0007 <control> character
            U+0000 <control> character
            U+000A <control> character
            U+0070 LATIN SMALL LETTER P character
            U+006C LATIN SMALL LETTER L character
            U+0061 LATIN SMALL LETTER A character
            U+006E LATIN SMALL LETTER N character
            U+0074 LATIN SMALL LETTER T character
            U+0066 LATIN SMALL LETTER F character
            U+0069 LATIN SMALL LETTER I character
            U+0062 LATIN SMALL LETTER B character
            U+0072 LATIN SMALL LETTER R character
            U+0065 LATIN SMALL LETTER E character
            U+003B SEMICOLON character ( ; )


            58 in hexa is 3A

              Attached Files:

              Last edited: Dec 6, 2013
            • note that the .metadata file contains the uuid/timestamp that must match to the last edited time of your .player.

              "uuid" : "MYUUID",
              "timestamp" : 1386366367904

              Timestamp is in two parts -
              386366367 Unix time,
              904 time in milliseconds.

              Convert unix time using wolfram alpha:
              http://www.wolframalpha.com/input/?i=1386366367 unix time

              which is: 9:46:07 pm UTC | Friday, December 6, 2013

              We can then rewrite the .player file dates using microsoft's powershell cmd utility(or unix's touch):

              powershell $(Get-Item MYUUID.player).creationtime=$(Get-Date "2013-12-06T21:46:07.904")
              powershell $(Get-Item MYUUID.player).lastaccesstime=$(Get-Date "2013-12-06T21:46:07.904")
              powershell $(Get-Item MYUUID.player).lastwritetime=$(Get-Date "2013-12-06T21:46:07.904")

              (change MYUUID to match uuid in metadata file)

              • How can I make notepad++ convert it to UTF-8?
                • I wrote this in another thread so I'll quote it here:

                  Blank items look like 07 00 00 01

                  I've successfully edited my save file many times for adding items I didn't have, setting the amount of an item I had, changing my weapons DPS and Level, etc.. The locations of some things will change because of the length of certain blocks. If someone who has more time can work through it, I would say it should be easy to write a parser at least.
                  • @RockyTV - If you're using notepad++, change encoding to UTF-8 (like sunship suggested) - read up on the codes you see there if you don't know what they mean AND/OR just open it in a hex editor and have a look. Do you know what's in playerCodex.db? I'd think it's the codex notes (the journal entry things), but I'm not sure.

                    @sunship - interesting that the timestamps have to match, I hadn't thought of that. I did manage to change my character's name successfully without paying attention to timestamps (didn't change the length of the save file however).

                    I've begun work on a basic save editor in python, so far it can only change my name to something with the same number of characters. I can't reliably insert new items or even change existing items (lots of that generic item stuff).

                    In hex, the item format so far as I can tell is: 07 00 ## itemname $$
                    in UTC-8 the format is ...............................: BEL NUL ## itemname $$

                    Where $$ is the stack count and ## is the item id # or maybe item category?

                    Here's an excerpt from my test save
                    Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
                    000002D0                07 00 0B 72 6F 61 73 74 62 61 6E      ...roastban
                    000002E0  61 6E 61 02 07 00 0B 62 61 6E 61 6E 61 62 72 65  ana....bananabre
                    000002F0  61 64 03 07 00 0E 62 61 6E 61 6E 61 63 72 65 61  ad....bananacrea
                    00000300  6D 70 69 65 02 07 00 00 01                      mpie.....
                    • @ThisGuy ## is the length of the item name's string. See post above yours.
                      • Damn, while I was posting. Great news, thanks for the info dude. :)
                        • @RockyTV Don't bother with Notepad++, I think it'll incorrectly attribute low hex numbers as control codes, just use a hex editor http://mh-nexus.de/en/hxd/

                          @ThisGuy Actually I don't think the timestamps do anything - I messed up the structure of my player file and got way ahead of myself...
                          • Hey guys, i've been working on a script to parse the player save file, was searching around for anyone doing anything similar. Here's a screencap of what i'm successfully parsing so far. [​IMG]
                            • @Gear I spoke with some devs in IRC, don't bother with the .player files as they're going to be completely redone shortly.
                              • either way its been a fun challenge for me
                                • @Gear - nice work, looks great so far.

                                  @dozn - Yeah, I expected some changes to come along, like gear said, it's a fun challenge.

                                  In the meantime, I'm simply making recipes for items I need to get my hands on. Superior brain -- crafted from 15 inferior brains and some glass, will do for now.
                                  • Hah, are you doing that in PHP? I started pretty much the same thing but I don't have as much time as I used to for these things. It's cool to see you made some significant progress!

                                    Any idea what the 16 randomly changing bytes near the beginning of the file are? I've only got a rudimentary understanding so far, but I was wondering if maybe it was just garbage or some kind of checksum?
                                    • @Phaze might be some sort of checksum or random hash, but I havent figured if it does anything yet
                                      Yeah I'm doing it in php, I plan to turn it into a web based editor if I can!
                                      • Pentarctagon

                                        Pentarctagon Over 9000!!!

                                        Did you mean the first 13? The uuid starts at 0x0D.
                                        • Some Commentary on Items, The item format is:

                                          [Name Size Byte]
                                          [Item Count Byte (02 = 1 item, 01 = no item)]
                                          [Size of Data Array]

                                          * the 07 byte represents an upcoming associative array, the byte immediately after is the expected array size
                                          ** 06 is a normal ol indexed array
                                          Thread Status:
                                          This thread has not been replied to for more than 90 days.

                                          Share This Page