Welcome to Keen Software House Forums! Log in or Sign up to interact with the KSH community.
  1. You are currently browsing our forum as a guest. Create your own forum account to access all forum functionality.

Thinking of a new external tool for BPs

Discussion in 'Modding' started by Pontiac, May 18, 2020.

Thread Status:
This last post in this thread was made more than 31 days old.
  1. Pontiac Apprentice Engineer

    Messages:
    109
    I've done a quick search around the net to see if I can find out how to make my own SBC blueprints, but haven't found a direct translation.

    I know the files aren't encrypted as I can plainly see that the names of the blocks are shown, but looking at the files in Notepad++ I note that these look to be almost record style files that indicate the name of the block and some of its properties.

    Is there any documentation I can read through on how to make my own SBC file outside of Space Engineers?

    What I want to do is have an external program generate very basic shapes to put into a blueprint that I can then project into a Survival game. For instance a cube, sphere, flat circle, etc, all of different sizes that I need.

    For example, if I had a 30x30x1 floor, I can run my app, set properties like the color, block to use, dimensions and what I want to construct as, and the program would generate the required SBCs.

    Thanks

    [Edit]
    I found this: https://www.spaceengineerswiki.com/Save_file_sbc

    But it basing its claims on that the SBC file are plain XML files, which is not what I'm seeing in Notepad++. In my case, the file is clearly a binary file of some sort, with spatterings of block names (LargeBlockArmorBlock for example).
     
    Last edited: May 18, 2020
  2. Digi Senior Engineer

    Messages:
    2,393
    You probably have the compress option enabled in settings, which means you have to open the files with a zipping program (like 7-zip) if you wanna read it.

    The game should be able to read it both zipped or not zipped though, so not really a problem for your generator.

    As for generating it, the serializers are MyObjectBuilder_ShipBlueprintDefinition for the main structure and MyObjectBuilder_CubeGrid for the grid structure... and block types are exactly what you see in the game's data folder for cubeblock definitions but with the MyObjectBuilder_ prefix attached to them.

    You can ask stuff more back-and-forth on the keen discord at #modding-programming btw.
     
  3. Pontiac Apprentice Engineer

    Messages:
    109
    Hey Digi;

    I went to the modding forum, and had some help from someone and between the two of us, we're not finding the option to stop the compression, which, I don't think is really compression by any standard means as ANY compression algo I've seen (And I've seen a lot) SHOULDN'T contain plain text block names like I'm seeing.

    https://mega.nz/file/2MQDQK7B#-9QMaUgZdTq2VS43OF3TPIFv0WUBzNHaEmEez2b4LOA

    This is a link to a zip file that contains the three files found in my "remote/Blueprints/cloud/20x20.1-Red Platform" directory.

    Can you tell me where exactly the option is to turn off the compression? I've checked the settings from the main menu, while editing the game preferences, and while the game is loaded and I'm not seeing anything that mentions compression. Are Blueprints always compressed? Was there once upon a time that option to toggle compression but has since been removed and defaulted to always compress bearing in mind the fact that we can save stuff to the workshop?

    If SE is able to read standard XML is there a guide on how the blueprints are constructed at the XML level? Is there a way to "decompress" the SBC files that are in that link above at the command line? I'm only looking for structure to see how a basic 20x20x1 grid can be made, and then I can go from there.
     
  4. Digi Senior Engineer

    Messages:
    2,393
    As I already said, they're zip.
    https://i.imgur.com/QPgxrrm.png
    https://i.imgur.com/o5yHTER.png

    The sbcB5 is a binary cache generated from the sbc. If you want to edit the .sbc then you need to delete the .sbcB5 for the .sbc to be loaded instead of the binary cache.

    As for compression option, check your SpaceEngineers.cfg for CompressSaveGames if it's still true and set it false. They removed the option from the GUI apparently (was in options->game).
    EDIT: oh "cloud", they probably always compress the ones going to cloud.

    There's no guide that I know of, I did however point you to their serialization objects.
     
  5. Pontiac Apprentice Engineer

    Messages:
    109
    So the muddy waters got a bit clearer.

    When I went to open bp.sbc a few days ago with 7zip, it told me it didn't know what the file was. It COULD have been SE having exclusive rights to the file and denying 7Zip access so I got a bad error message or something, I don't know, but I absolutely could not open the file. With SE shut down (Because, technically, "working" right now) I could open the file with 7zip. I now see the XML I need to see if I can code something up to generate the files. Thanks. Step in the right direction.

    And thanks for the tip on getting rid of the sbcB5 file. That would have driven me nuts if SE reads that before the SBC. Something I'll build into my app. (Haven't decided if it'll be a Windows App or a web page app. Still need to figure out how to "walk the grid" to get everything built the right way.)
     
Thread Status:
This last post in this thread was made more than 31 days old.