OPS format documentation?

  • jacksonmj
    14th Nov 2013 Developer 0 Permalink

    Possibly because it has never occurred to us (or at least, not to me) that anyone might want to make 3rd-party save file reader/writer software by reimplementing everything from scratch instead of reusing the existing C++ functions with some form of binding to the language of your choice.

     

    There's savask's neural network save classifier which reads save files using its own functions in Haskell, though I think it does use an existing library for BSON parsing. But if I were making a save classifier I'd do feature extraction in C++ using the existing functions, before passing the values to whatever I want to use for the neural network (though that would probably also be C++).

     

    boxmein is making a webpage that documents some things, such as the parts and partsPos format, which I'm sure he will post a link for in this thread once it's finished.

     

     

    Edit: and to answer your question about the length value, that's the length of the embedded document with name "origin", i.e. just the origin = { ... stuff ... } bit, not the whole save file.

    Edited 7 times by jacksonmj. Last: 14th Nov 2013
  • Videogamer555
    15th Nov 2013 Member 0 Permalink
    Still that's wrong. Starting from the first byte after the length field for the embedded document, and selecting 0x82 bytes (as indicated by that length field), I get this:
    .majorVersion.Y....minorVersion......buildNum......snapshotId......releaseType.....R..platform.....WIN32..builtType.....SSE2...wat

    Notice how it cuts into the next data name which SHOULD be:
    waterEEnabled

    Seems that your BSON writer is a bit buggy.
  • jacksonmj
    15th Nov 2013 Developer 0 Permalink

    Reading the specification carefully:

     

    document ::= int32 e_list "\x00"
    "The int32 is the total number of bytes comprising the document"


    It looks like this number includes all the things listed under document ::= , including the length and the terminating 0 byte (so start counting at the beginning of the length field). Sorry if that wasn't clear from my answer.

  • Videogamer555
    15th Nov 2013 Member 0 Permalink
    Still what are the formats of the particle array and the particle position array? Also what about the wall array?
  • boxmein
    15th Nov 2013 Former Staff 0 Permalink
    http://boxmein.mniip.com/tptelements/references/OPS-reference.html
    Please note any inconsistencies or falsehoods so I can fix them.
    This page should be up to date as the save format changes.
    Edited once by boxmein. Last: 15th Nov 2013