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

WIP Save Editor discussion

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

  1. Phaze

    Phaze Pangalactic Porcupine

    Oh pfff how the hell did I not see that? It's definitely 16 bytes though. I've also seen it start at 0x0E before in one of my saves, at least I'm fairly certain. I'll need to go back and look at the backups I made.
  2. Ephemerality

    Ephemerality Scruffy Nerf-Herder

    @Gear For the unknown_color_shift section you've got, at least for my human character, the last set of replaces are for undy color (handy since you can't pick it from the creation screen!)

    First 6 bytes are the file type string: SBPFV1
    Next 4 unknown. In all my saves they are always 00 00 01 A2?
    Next 2 unknown?
    Next 1 always seems to be 01, possibly meaning 1 character in the file? 1 UDID?
    Next 16 are the UDID, same as filename.
    Name with length byte.
    Race with length byte.
    The word "hair" with length byte.
    Hair type with length byte.
    Set of color-replacement strings with length byte. I saw a "fluff" section in the avian file as well.

    Sleep is getting in the way of going any further! D:
  3. Gear

    Gear Subatomic Cosmonaut

    Thanks for the info on the replacement, I figured it was for the body parts. It seems each race had a unique number of replacements.

    As of now I have my script successfully parsing all the data up to the Inventories (equipped, hot bar, etc,). My next task is decoding some of the byte values for signed floats, I'll probably post a request for data files so I can start testing multiple races and progression points
  4. Sarzael

    Sarzael Oxygen Tank

    How do you edit to obtain an Distress Beacon?
  5. ThisGuy

    ThisGuy Intergalactic Tourist

    At this point, if you have to ask it is likely too complex.

    I've managed to successfully add a few items to my inventory - but its a tedious process at this point. You'll need to open your save in a hex editor, figure out where your inventory starts, and where the byte-length values are stored for the file as well as the length of the item name in bytes.

    If you need an easier way to get yourself a Distress Beacon - in Starbound/assets/recipes/starter you can easily add new recipes or change existing ones. Recipes are plain text files, go nuts.
  6. Pentarctagon

    Pentarctagon Over 9000!!!

    They have something to do with the file size, but it isn't actually the file size. For example, I started with BD 22 and a save file size of 7854 bytes:
    after removing a stone hoe it became BD 1A with a file size of 7846 (both minus 8)
    after removing an old chest is became BD 0F with a file size of 7835 (both minus 11)
    adding the old chest back reverted it to BD 1A and 7846
    adding the stonehoe back reverted it to BD 22 and 7854
  7. Ephemerality

    Ephemerality Scruffy Nerf-Herder

    Yeah, I ran into the same sort of situation so at first I had assuming it was file size and later realized that it wasn't quite right.

    It's also worth noting that my UDID in my original file (the one I've been playing consistently) is now at byte 0x0E instead of 0D... not really sure when that happened, and I can't see any obvious meaning of the extra byte.
    Last edited: Dec 9, 2013
  8. McSimp

    McSimp Orbital Explorer

    I've been working on the player save format too, and I've only got a couple of chunks at the end of the file to do still.

    At the moment I'm just defining everything in an 010 Editor binary template (similar to a C header) which you can find at https://github.com/McSimp/starbound-research/blob/master/PlayerFile.bt

    I've tried to use the same names as are used inside the game's binary so hopefully it'll be easier to figure out what changes are made in the next patch.
  9. Gear

    Gear Subatomic Cosmonaut

    That looks a lot more organized than my PHP mess so far, i still have to organize things into classes.

    I've made a lot of hacky-decisions when it comes to the header as i'm very rough on the way some of the floats and signed integers are stored.

    I still feel i'm a noob when it comes to processing byte data, any tips on how those 04 and 02 variant are stored and/or read?
  10. demiant

    demiant Astral Cartographer

    Hey, cant we just ask developers about the player file format? :D
  11. demiant

    demiant Astral Cartographer

    I think that the world editor would be easier to understand, and could be much more useful!
  12. Ephemerality

    Ephemerality Scruffy Nerf-Herder

    Very nice! My current progress is in all C#, but this helps fill in the gaps (I've been using 010 as well). I hadn't considered that they were using VLQs for the lengths until this morning and suddenly everything made sense...
  13. Gear

    Gear Subatomic Cosmonaut

    I knew there was something going on with the length bytes, i just didnt know the name of it until i read @McSimp's document. Now i can better parse/write it better.
  14. AureliusO

    AureliusO Aquatic Astronaut

    Hey all, just wanted to say thanks, especially for the insight into the VLQ storage type! Is there any chance that we could get a mailing list going for this kind of thing, maybe a google group? That might be a nifty way to keep the discussion clean. If you guys are interested I could get one going.
  15. McSimp

    McSimp Orbital Explorer

    Variant type 2 is just a plain old double (or a double precision floating point number, 64-bits wide). For reading the VLQ values there's a function called "VLQUValue" near the top of the file.

    Sure, it'd be great if more people could share their discoveries!
  16. AureliusO

    AureliusO Aquatic Astronaut

    FYI, according to chat, we will be getting format that is established and well documented:
  17. Ephemerality

    Ephemerality Scruffy Nerf-Herder

    Not sure if you finished flushing out the rest of your template or not, but I added a bit to the end. I also changed the definition of the techcontroller just to bypass it, The TechController section seems to have a bunch of vars that are used in the techs (like dashTapLast on the Energy Dash tech)...
    The end stuff are repeats of items in your inventory, I guess? Not sure why...
    typedef struct {
        VLQU DatastreamSize;
        unsigned char unk1[VLQUValue(DatastreamSize)];
    } TechController;
    typedef struct {
        unsigned char Header[6];
        int VersionNumber; // Hard coded as 418 at the moment
        VLQU DatastreamSize;
        UUID PlayerUUID;
        HumanoidIdentity Identity;
        StatusEntityParameters StatusEntityParms;
        Status PlayerStatus;
        UTF8Str Description;
        double PlayTime;
        PlayerInventory Inventory;
        PlayerBlueprintLibrary BlueprintLibrary;
        TechController TechControllerConfig;
        ItemDescriptor Helmet;
        ItemDescriptor Chest;
        ItemDescriptor Pants;
        ItemDescriptor VanityHelm; //maybe
        ItemDescriptor VanityPants; //maybe
        ItemDescriptor VanityChest;
        ItemDescriptor Unknown1;
        ItemDescriptor Unknown2;
        ItemDescriptor Unknown3;
        ItemDescriptor Unknown4;
    } StarSave;
    Not that any of this will be too useful when the binary JSON format comes out =)
  18. Gear

    Gear Subatomic Cosmonaut

    Good to know about the binary json.

    Half of my project is also a web-based editor, i'll just swap out the parser when that change gets made!
  19. Phaze

    Phaze Pangalactic Porcupine

    I thought the items at the end of the file were recipes you've unlocked?
  20. Gear

    Gear Subatomic Cosmonaut

    For anyone following this thread, check out the first version of my reader http://c4isbad.com/starreader/

    If you get any errors let me know your player UUID (the file name), i'm currently saving the files to the webserver for debugging purposes!

Share This Page