m
no edit summary
imported>76561198054818918 m (This version has been used to successfully parse a .dsv file. Removing WIP.) |
imported>76561198045853337 mNo edit summary |
||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
This page defines the Dyson Sphere Program save file format .dsv. On Windows by default save files are stored in %USERPROFILE%\Documents\Dyson Sphere Program\Save\. | This page defines the Dyson Sphere Program save file format .dsv. On Windows by default save files are stored in <code>%USERPROFILE%\Documents\Dyson Sphere Program\Save\</code>. | ||
Return to [[Modding:Modding|Modding Hub]]. | |||
A save file parser in C++ written to the specification below is available on GitHub: [https://github.com/GreyHak/dsp-save-parser github.com/GreyHak/dsp-save-parser]. | |||
<syntaxhighlight lang="csharp"> | <syntaxhighlight lang="csharp"> | ||
float oilSpeedMultiplier = 4E-05f | |||
GameSave | GameSave | ||
{ | { | ||
Line 34: | Line 40: | ||
PlanetFactory[factoryCount] | PlanetFactory[factoryCount] | ||
int32 galaxyStarCount: Must equal GameDesc::starCount or the game will crash. | int32 galaxyStarCount: Must equal GameDesc::starCount or the game will crash. | ||
[galaxyStarCount] { | |||
[ | |||
int32 dysonSphereDataIsAvailableFlag: Must be 0 or 1 or the game will crash. | int32 dysonSphereDataIsAvailableFlag: Must be 0 or 1 or the game will crash. | ||
DysonSphere (dysonSphereDataIsAvailableFlag == 1) | DysonSphere (dysonSphereDataIsAvailableFlag == 1) | ||
Line 420: | Line 425: | ||
uint8 modData[modDataByteCount] | uint8 modData[modDataByteCount] | ||
int32 numVeinAmounts | int32 numVeinAmounts | ||
int64 veinAmounts[numVeinAmounts] | int64 veinAmounts[numVeinAmounts]: The index is the EVeinType. This contains the total of the veinGroups's amounts which is also the total of the VeinData::amounts. | ||
int32 numVeinGroups | int32 numVeinGroups | ||
veinGroups[numVeinGroups] { | veinGroups[numVeinGroups] { | ||
Line 657: | Line 662: | ||
int32 tankCursor | int32 tankCursor | ||
int32 tankRecycleCursor | int32 tankRecycleCursor | ||
TankComponent tankPool[tankCursor] | TankComponent tankPool[tankCursor - 1] | ||
int32 tankRecycle[tankRecycleCursor] | int32 tankRecycle[tankRecycleCursor] | ||
} | } | ||
Line 1,354: | Line 1,359: | ||
int32 nrdCursor | int32 nrdCursor | ||
int32 nrdRecycleCursor | int32 nrdRecycleCursor | ||
DysonNodeRData nrdPool[nrdCursor] | DysonNodeRData nrdPool[nrdCursor - 1] | ||
int32 nrdRecycle[nrdRecycleCursor] | int32 nrdRecycle[nrdRecycleCursor] | ||
} | } | ||
Line 1,628: | Line 1,633: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{Modding Navbox}} | |||
[[Category:Modding]] |