limoka / DSP-Mods

An example how to add a custom model with your mesh and animations
MIT License
32 stars 10 forks source link

Reading blueprints #34

Closed jdkandersson closed 2 years ago

jdkandersson commented 2 years ago

Hi,

Thanks for helping with mods! I was wondering whether you have any understanding of the format of the blueprints that Dyson SPhere Program produces? Since the release of the Dyson SPhere blueprints I was thinking that it would be great to find a way to generate Dyson Sphere design programmatically, but I am stuck on how to interpret the text file that Dysoh Sphere Program generates. A simple example with a single node is the following text:

DYBP:0,637786448054971981,0.9.24.11209,1,15"H4sIAAAAAAAAC2NgYGBwAGImBghgBGIWKA0B/+fzuD6cKuhaZsLsJociw8AgB6UdkMSR2QBK5m9KXgAAAA=="9653AFB83D42C9EA98AD2EC1A16589F8

limoka commented 2 years ago

The format is as follows. First there is a simple plaintext header that contains few things: DYBP:0, 637786448054971981, 0.9.24.11209, 1, 15

After that in brackets is base64 encoded data, that was GZipped. Binary data that was zipped was saved using Import and Export functions of DysonBlueprintData class. That you will need to check in code. At the end is a MD5F (Their modified version of MD5, see that in source code or here) hash of everything before last bracket.

To inspect game code and figure out how data is stored in the main part you need to install tool called dnSpy and open game's Assembly-CSharp.dll located at Dyson Sphere Program\DSPGAME_Data\Managed. After opening it look for a class called DysonBlueprintData and it's methods Export and Import.