Modding:Save File Format: Difference between revisions

From the Dyson Sphere Program Wiki
imported>76561198054818918
(Array size correction in FactoryProductionStat.)
imported>76561198045853337
mNo edit summary
 
(24 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{WIP}}
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>.


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\.
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 36: 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.
    int32 numDysonSpheres
     [galaxyStarCount] {
     [numDysonSpheres] {
         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 178: Line 181:
     int32 numTotal:  Saved as 7.  Reads more or less, but only stores up to 7, and enforces abs.
     int32 numTotal:  Saved as 7.  Reads more or less, but only stores up to 7, and enforces abs.
     int64 total[numCount]
     int64 total[numCount]
    int32 itemId
}
}


Line 188: Line 190:
     float position_y
     float position_y
     float position_z
     float position_z
     float uPosition_x
     double uPosition_x
     float uPosition_y
     double uPosition_y
     float uPosition_z
     double uPosition_z
     float uRotation_x
     float uRotation_x
     float uRotation_y
     float uRotation_y
Line 204: Line 206:
     int32 inhandItemCount
     int32 inhandItemCount
     Mecha
     Mecha
     StorageComponent package[10]
     StorageComponent package
     PlayerNavigation
     PlayerNavigation
     int32 sandCount
     int32 sandCount
Line 218: Line 220:
     double reactorEnergy
     double reactorEnergy
     int32 reactorItemId
     int32 reactorItemId
     StorageComponent reactorStorage[4]
     StorageComponent reactorStorage
     StorageComponent warpStorage
     StorageComponent warpStorage
     double walkPower
     double walkPower
Line 401: Line 403:
     VeinData veinPool[veinCursor - 1]
     VeinData veinPool[veinCursor - 1]
     int32 veinRecycle[veinRecycleCursor]
     int32 veinRecycle[veinRecycleCursor]
     veinAnimPool[veinCursor] {
     veinAnimPool[veinCursor - 1] {
         float time
         float time
         float prepare_length
         float prepare_length
Line 423: 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 630: Line 632:
     int32 numBelts
     int32 numBelts
     int32 numInputPaths
     int32 numInputPaths
     chunks[chunkCount] {
     uint8 buffer[bufferLength]
        int32
    int32 chunks[chunkCount * 3]
        int32
        int32
    }
     [bufferLength] {
     [bufferLength] {
         float pointPos_x
         float pointPos_x
Line 663: Line 662:
     int32 tankCursor
     int32 tankCursor
     int32 tankRecycleCursor
     int32 tankRecycleCursor
     TankComponent tankPool[tankCursor]
     TankComponent tankPool[tankCursor - 1]
     int32 tankRecycle[tankRecycleCursor]
     int32 tankRecycle[tankRecycleCursor]
}
}
Line 712: Line 711:
     int32 accRecycleCursor
     int32 accRecycleCursor
     PowerAccumulatorComponent accPool[accCursor - 1]
     PowerAccumulatorComponent accPool[accCursor - 1]
     int32 accRecycle
     int32 accRecycle[accRecycleCursor]
     int32 exchangerCapacity
     int32 exchangerCapacity
     int32 excCursor
     int32 excCursor
Line 1,156: Line 1,155:
     int32 idleDroneCount
     int32 idleDroneCount
     int32 workDroneCount
     int32 workDroneCount
     int32 numWorkDrones
     int32: Used for allocating array sizes for workDroneDatas and workDroneOrders, and not uses for read in the arrays.
     DroneData workDroneDatas[numWorkDrones]
     DroneData workDroneDatas[workDroneCount]
     LocalLogisticOrder workDroneOrders[numWorkDrones]
     LocalLogisticOrder workDroneOrders[workDroneCount]
     int32 idleShipCount
     int32 idleShipCount
     int32 workShipCount
     int32 workShipCount
     uint64 idleShipIndices
     uint64 idleShipIndices
     uint64 workShipIndices
     uint64 workShipIndices
     int32: Used for allocating array sizes for workShipDatas, shipRenderers, shipUIRenderers, workShipOrders, but not uses for read in the arrays.
     int32: Used for allocating array sizes for workShipDatas, shipRenderers, shipUIRenderers, workShipOrders, and not uses for read in the arrays.
     ShipData workShipDatas[workShipCount]
     ShipData workShipDatas[workShipCount]
     RemoteLogisticOrder workShipOrders[workShipCount]
     RemoteLogisticOrder workShipOrders[workShipCount]
Line 1,294: Line 1,293:
     int32 monsterCursor
     int32 monsterCursor
     int32 monsterRecycleCursor
     int32 monsterRecycleCursor
     MonsterComponent monsterPool[monsterCursor]
     MonsterComponent monsterPool[monsterCursor - 1]
    int32 monsterRecycle[monsterRecycleCursor]
}
}


Line 1,338: Line 1,338:
         int32 layerCount
         int32 layerCount
         int32 numDysonSphereLayer
         int32 numDysonSphereLayer
         [numDysonSphereLayer] {
         [numDysonSphereLayer - 1] {
             int32 dysonSphereLayerIndex
             int32 dysonSphereLayerIndex
             DysonSphereLayer (dysonSphereLayerIndex != 0)
             DysonSphereLayer (dysonSphereLayerIndex != 0)
Line 1,359: 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,393: Line 1,393:
         int32 orbitCapacity
         int32 orbitCapacity
         int32 orbitCursor
         int32 orbitCursor
         SailOrbit orbits[orbitCursor]
         SailOrbit orbits[orbitCursor - 1]
         int32 numExpiryOrder: Must match sailCapacity or the game will crash.
         int32 numExpiryOrder: Must match sailCapacity or the game will crash.
         int32 expiryCursor
         int32 expiryCursor
Line 1,588: Line 1,588:
     int32 numVertcps
     int32 numVertcps
     int32 vertcps[numVertcps]
     int32 vertcps[numVertcps]
     int32 numVertRecycle
     int32 vertRecycleArraySize
     int32 vertRecycle[numVertRecycle]
    int32 vertRecycleCursor
     int32 vertRecycle[vertRecycleCursor]
}
}


Line 1,601: Line 1,602:
     float t
     float t
     float uSpeed
     float uSpeed
     float uPos_x
     double uPos_x
     float uPos_y
     double uPos_y
     float uPos_z
     double uPos_z
     float uRot_x
     float uRot_x
     float uRot_y
     float uRot_y
Line 1,632: Line 1,633:


</syntaxhighlight>
</syntaxhighlight>
{{Modding Navbox}}
[[Category:Modding]]

Latest revision as of 13:04, 15 June 2021

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\.

Return to Modding Hub.

A save file parser in C++ written to the specification below is available on GitHub: github.com/GreyHak/dsp-save-parser.

float oilSpeedMultiplier = 4E-05f

GameSave
{
    "VFSAVE"
    int64 fileStreamLength
    int32 saveFileFormatNumber = 4
    int32 majorGameVersion
    int32 minorGameVersion
    int32 releaseGameVersion
    int64 gameTick
    int64 nowTicks
    int32 sizeOfPngFile
    uint8 screenShotPngFile[sizeOfPngFile]
    GameData
}

GameData
{
    int32 version = 2
    string gameName
    GameDesc
    int64 gameTick
    GamePrefsData preferences (version >= 1)
    GameHistoryData
    uint8_bool hidePlayerModel (version >= 2)
    uint8_bool disableController (version >= 2)
    GameStatData statistics
    int32 planetId
    Player mainPlayer
    int32 factoryCount
    GalacticTransport
    PlanetFactory[factoryCount]
    int32 galaxyStarCount: Must equal GameDesc::starCount or the game will crash.
    [galaxyStarCount] {
        int32 dysonSphereDataIsAvailableFlag: Must be 0 or 1 or the game will crash.
        DysonSphere (dysonSphereDataIsAvailableFlag == 1)
    }
}

GameDesc
{
    int32 version = 2
    int32 galaxyAlgo
    int32 galaxySeed
    int32 starCount
    int32 playerProto
    float resourceMultiplier (version >= 2)
    int32 numThemeIds (version >= 1)
    int32 themeIds[numThemeIds] (version >= 1)
}

GamePrefsData
{
    int32 version = 2
    double cameraUPos_x
    double cameraUPos_y
    double cameraUPos_z
    float cameraURot_x
    float cameraURot_y
    float cameraURot_z
    float cameraURot_w
    int32 reformCursorSize (version >= 1)
    int32 numReplicatorMultipliers (version >= 1)
    replicatorMultipliers[numReplicatorMultipliers] (version >= 1) {
        int32 key
        int32 value
    }
    uint8_bool detailPower
    uint8_bool detailVein
    uint8_bool detailSpaceGuide
    uint8_bool detailSign
    uint8_bool detailIcon
    int32 numTutorialShowing (version >= 2)
    int32 tutorialShowing[numTutorialShowing] (version >= 2)
}

GameHistoryData
{
    int32 version = 2
    int32 numRecipeUnlocked
    int32 recipeUnlocked[numRecipeUnlocked]
    int32 numTutorialUnlocked (version >= 2)
    int32 tutorialUnlocked[numTutorialUnlocked] (version >= 2)
    int32 numFeatureKeys
    int32 featureKeys[numFeatureKeys]
    int32 numTechState
    TechState[numTechState] {
        int32 techProtoIndex
        uint8_bool TechState_unlocked
        int32 TechState_curLevel
        int32 TechState_maxLevel
        int64 TechState_hashUploaded
        int64 TechState_hashNeeded
    }
    uint8_bool autoManageLabItems
    int32 currentTech
    int32 numTechQueue (version >= 1)
    int32 techQueue[numTechQueue] (version >= 1)
    int32 universeObserveLevel
    float solarSailLife
    float solarEnergyLossRate
    uint8_bool useIonLayer
    int32 inserterStackCount
    float logisticDroneSpeed
    float logisticDroneSpeedScale
    int32 logisticDroneCarries
    float logisticShipSailSpeed
    float logisticShipWarpSpeed
    float logisticShipSpeedScale
    uint8_bool logisticShipWarpDrive
    int32 logisticShipCarries
    float miningCostRate
    float miningSpeedScale
    int32 storageLevel
    int32 labLevel
    int32 techSpeed
    float dysonNodeLatitude
    int64 universeMatrixPointUploaded
    uint8_bool missionAccomplished
}

GameStatData
{
    int32 version = 0
    int32 numTechHashedHistory
    int32 techHashedHistory[numTechHashedHistory]
    ProductionStatistics
}

ProductionStatistics
{
    int32 version = 0
    int32 numFactoryStatPool
    FactoryProductionStat factoryStatPool[numFactoryStatPool]
    int32 numFirstCreateIds
    int32 firstCreateIds[numFirstCreateIds]
    int32 numFavoriteIds
    int32 favoriteIds[numFavoriteIds]
}

FactoryProductionStat
{
    int32 version = 1
    int32 productCapacity
    int32 productCursor
    ProductStat productPool[productCursor - 1]
    int32 numPowerPool, max 5
    PowerStat powerPool[numPowerPool]
    int32 numProductIndices
    int32 productIndices[numProductIndices]
    int64 energyConsumption (version >= 1)
}

ProductStat
{
    int32 version = 0
    int32 numCount:  Saved as 7200.  Reads more or less, but only stores up to 7200, and enforces abs.
    int32 count[numCount]
    int32 numCursor:  Saved as 12.  Reads more or less, but only stores up to 12.
    int32 cursor[numCount]
    int32 numTotal:  Saved as 14.  Reads more or less, but only stores up to 14, and enforces abs.
    int32 total[numCount]
    int32 itemId
}

PowerStat
{
    int32 version = 0
    int32 numEnergy:  Saved as 3600.  Reads more or less, but only stores up to 3600, and enforces abs.
    int64 energy[numCount]
    int32 numCursor:  Saved as 6.  Reads more or less, but only stores up to 6.
    int32 cursor[numCount]
    int32 numTotal:  Saved as 7.  Reads more or less, but only stores up to 7, and enforces abs.
    int64 total[numCount]
}

Player
{
    int32 version = 1
    int32 planetId: Ignored on read
    float position_x
    float position_y
    float position_z
    double uPosition_x
    double uPosition_y
    double uPosition_z
    float uRotation_x
    float uRotation_y
    float uRotation_z
    float uRotation_w
    int32 EMovementState movementState (Walk, Drift, Fly, Sail)
    float warpState
    uint8_bool warpCommand
    double uVelocity_x
    double uVelocity_y
    double uVelocity_z
    int32 inhandItemId
    int32 inhandItemCount
    Mecha
    StorageComponent package
    PlayerNavigation
    int32 sandCount
}

Mecha
{
    int32 version = 0
    double coreEnergyCap
    double coreEnergy
    double corePowerGen
    double reactorPowerGen
    double reactorEnergy
    int32 reactorItemId
    StorageComponent reactorStorage
    StorageComponent warpStorage
    double walkPower
    double jumpEnergy
    double thrustPowerPerAcc
    double warpKeepingPowerPerSpeed
    double warpStartPowerPerSpeed
    double miningPower
    double replicatePower
    double researchPower
    double droneEjectEnergy
    double droneEnergyPerMeter
    int32 coreLevel
    int32 thrusterLevel
    float miningSpeed
    float replicateSpeed
    float walkSpeed
    float jumpSpeed
    float maxSailSpeed
    float maxWarpSpeed
    float buildArea
    MechaForge
    MechaLab
    int32 droneCount
    float droneSpeed
    int32 droneMovement
    MechaDrone[droneCount]
}

StorageComponent
{
    int32 version = 1
    int32 id
    int32 entityId
    int32 previous (version >= 1)
    int32 next (version >= 1)
    int32 bottom (version >= 1)
    int32 top (version >= 1)
    int32 EStorageType type (0:Default 1:Fuel 9:Filtered)
    int32 gridSize
    int32 bans (version >= 1)
    grids[gridSize] {
        int32 itemId
        int32 filter
        int32 count
        int32 stackSize
    }
}

MechaForge
{
    int32 version = 0
    int32 numTasks
    ForgeTask tasks[numTasks]
}

ForgeTask
{
    int32 version = 0
    int32 recipeId
    int32 count
    int32 tick
    int32 tickSpend
    int32 numItem
    int32 numProduct
    [numItem] {
        int32 itemIds
        int32 itemCounts
        int32 served
    }
    [numProduct] {
        int32 productIds
        int32 productCounts
        int32 produced
    }
    int32 parentTaskIndex
}

MechaLab
{
    int32 version = 0
    int32 numItemPoints
    itemPoints[numItemPoints] {
        int32 key
        int32 value
    }
}

MechaDrone
{
    int32 version = 0
    int32 stage
    float position_x
    float position_y
    float position_z
    float target_x
    float target_y
    float target_z
    float forward_x
    float forward_y
    float forward_z
    float speed
    int32 movement
    int32 targetObject
    float progress
    float initialVector_x
    float initialVector_y
    float initialVector_z
}

PlayerNavigation
{
    int32 version = 0
    uint8_bool navigating
    int32 naviAstroId
    double naviTarget_x
    double naviTarget_y
    double naviTarget_z
    uint8_bool useFly
    uint8_bool useSail
    uint8_bool useWarp
    int32 ENaviStage stage (None, Departure, OriginOrbit, AccOrbit, Space, DestOrbit, Approaching)
    double flyThreshold
    double sailThreshold
    double warpThreshold
    double maxSailSpeed
}

GalacticTransport
{
    int32 version = 0
}

PlanetFactory
{
    int32 version = 1
    int32 planetId
    PlanetData
    int32 entityCapacity
    int32 entityCursor
    int32 entityRecycleCursor
    EntityData entityPool[entityCursor - 1]
    entityAnimPool[entityCursor - 1] {
        float time
        float prepare_length
        float working_length
        uint32 state
        float power
    }
    entitySignPool[entityCursor - 1] {
        uint32 signType
        uint32 iconType
        uint32 iconId0
        uint32 iconId1
        uint32 iconId2
        uint32 iconId3
        float count0
        float count1
        float count2
        float count3
        float x
        float y
        float z
        float w
    }
    int32 entityConnPool[entityCursor * 16 - 16]
    int32 entityRecycle[entityRecycleCursor]
    int32 prebuildCapacity
    int32 prebuildCursor
    int32 prebuildRecycleCursor
    PrebuildData prebuildPool[prebuildCursor - 1]
    int32 prebuildConnPool[prebuildCursor * 16 - 16]
    int32 prebuildRecycle[prebuildRecycleCursor]
    int32 vegeCapacity
    int32 vegeCursor
    int32 vegeRecycleCursor
    VegeData vegePool[vegeCursor - 1]
    int32 vegeRecycle[vegeRecycleCursor]
    int32 veinCapacity
    int32 veinCursor
    int32 veinRecycleCursor
    VeinData veinPool[veinCursor - 1]
    int32 veinRecycle[veinRecycleCursor]
    veinAnimPool[veinCursor - 1] {
        float time
        float prepare_length
        float working_length
        uint32 state
        float power
    }
    CargoContainer
    CargoTraffic
    FactoryStorage
    PowerSystem
    FactorySystem
    PlanetTransport
    MonsterSystem
    PlatformSystem (version >= 1)
}

PlanetData
{
    int32 modDataByteCount
    uint8 modData[modDataByteCount]
    int32 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
    veinGroups[numVeinGroups] {
        int32 EVeinType type (None, Iron, Copper, Silicium, Titanium, Stone, Coal, Oil, Fireice, Diamond, Fractal, Crysrub, Grat, Bamboo, Mag)
        float pos_x
        float pos_y
        float pos_z
        int32 count: Read, but then set to zero
        int64 amount: Read, but then set to zero
    }
}

EntityData
{
    uint8 version = 0
    int32 id
    int16 protoId
    int16 modelIndex
    float pos_x
    float pos_y
    float pos_z
    float rot_x
    float rot_y
    float rot_z
    float rot_w
    int32 beltId
    int32 splitterId
    int32 storageId
    int32 tankId
    int32 minerId
    int32 inserterId
    int32 assemblerId
    int32 fractionateId
    int32 ejectorId
    int32 siloId
    int32 labId
    int32 stationId
    int32 powerNodeId
    int32 powerGenId
    int32 powerConId
    int32 powerAccId
    int32 powerExcId
    int32 monsterId
}

PrebuildData
{
    uint8 version = 0
    int32 id
    int16 protoId
    int16 modelIndex
    float pos_x
    float pos_y
    float pos_z
    float rot_x
    float rot_y
    float rot_z
    float rot_w
    float pos2_x
    float pos2_y
    float pos2_z
    float rot2_x
    float rot2_y
    float rot2_z
    float rot2_w
    int32 upEntity
    int16 pickOffset
    int16 insertOffset
    int32 recipeId
    int32 filterId
    int32 refCount
    int32 refArr[refCount]
}

VegeData
{
    uint8 version = 0
    int32 id
    int16 protoId
    int16 modelIndex
    int16 hp
    float pos_x
    float pos_y
    float pos_z
    float rot_x
    float rot_y
    float rot_z
    float rot_w
    float scl_x
    float scl_y
    float scl_z
}

VeinData
{
    uint8 version = 0
    int32 id
    int16 EVeinType (see above)
    int16 modelIndex
    int16 groupIndex
    int32 amount
    int32 productId
    float pos_x
    float pos_y
    float pos_z
    int32 minerCount
    int32 minerId0
    int32 minerId1
    int32 minerId2
    int32 minerId3
}

CargoContainer
{
    int32 version = 0
    int32 poolCapacity
    int32 cursor
    int32 recycleBegin
    int32 recycleEnd
    cargoPool[cursor] {
        int32 item
        float position_x
        float position_y
        float position_z
        float rotation_x
        float rotation_y
        float rotation_z
        float rotation_w
    }
    int32 recycleIds[poolCapacity]
}

CargoTraffic
{
    int32 version = 0
    int32 beltCursor
    int32 beltCapacity
    int32 beltRecycleCursor
    int32 splitterCursor
    int32 splitterCapacity
    int32 splitterRecycleCursor
    int32 pathCursor
    int32 pathCapacity
    int32 pathRecycleCursor
    BeltComponent beltPool[beltCursor - 1]
    int32 beltRecycle[beltRecycleCursor]
    SplitterComponent splitterPool[splitterCursor - 1]
    int32 splitterRecycle[splitterRecycleCursor]
    [pathCursor - 1] {
        int32 cargoPathIndex
        CargoPath pathPool (cargoPathIndex != 0)
    }
    int32 pathRecycle[pathRecycleCursor]
}

BeltComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 speed
    int32 segPathId
    int32 segIndex
    int32 segPivotOffset
    int32 segLength
    int32 outputId
    int32 backInputId
    int32 leftInputId
    int32 rightInputId
}

SplitterComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 beltA
    int32 beltB
    int32 beltC
    int32 beltD
    int32 input0
    int32 input1
    int32 input2
    int32 input3
    int32 output0
    int32 output1
    int32 output2
    int32 output3
    uint8_bool inPriority
    uint8_bool outPriority
    int32 outFilter
}

CargoPath
{
    int32 version = 0
    int32 id
    int32 capacity
    int32 bufferLength
    int32 chunkCapacity
    int32 chunkCount
    int32 updateLen
    uint8_bool closed
    int32 outputPathIdForImport
    int32 outputIndex
    int32 numBelts
    int32 numInputPaths
    uint8 buffer[bufferLength]
    int32 chunks[chunkCount * 3]
    [bufferLength] {
        float pointPos_x
        float pointPos_y
        float pointPos_z
        float pointRot_x
        float pointRot_y
        float pointRot_z
        float pointRot_w
    }
    int32 belts[numBelts]
    int32 inputPaths[numInputPaths]
}

FactoryStorage
{
    int32 version = 0
    int32 storageCursor
    int32 storageCapacity
    int32 storageRecycleCursor
    [storageCursor - 1] {
        int32 storagePoolIndex
        int32 size (storagePoolIndex != 0)
        StorageComponent storagePool (storagePoolIndex != 0)
    }
    int32 storageRecycle[storageRecycleCursor]
    int32 tankCapacity
    int32 tankCursor
    int32 tankRecycleCursor
    TankComponent tankPool[tankCursor - 1]
    int32 tankRecycle[tankRecycleCursor]
}

TankComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 lastTankId
    int32 nextTankId
    int32 belt0
    int32 belt1
    int32 belt2
    int32 belt3
    uint8_bool isOutput0
    uint8_bool isOutput1
    uint8_bool isOutput2
    uint8_bool isOutput3
    int32 fluidStorageCount
    int32 currentCount
    int32 fluidId
    uint8_bool outputSwitch
    uint8_bool inputSwitch
    uint8_bool isBottom
}

PowerSystem
{
    int32 version = 0
    int32 generatorCapacity
    int32 genCursor
    int32 genRecycleCursor
    PowerGeneratorComponent genPool[genCursor - 1]
    int32 genRecycle[genRecycleCursor]
    int32 nodeCapacity
    int32 nodeCursor
    int32 nodeRecycleCursor
    PowerNodeComponent nodePool[nodeCursor - 1]
    int32 nodeRecycle[nodeRecycleCursor]
    int32 consumerCapacity
    int32 consumerCursor
    int32 consumerRecycleCursor
    PowerConsumerComponent consumerPool[consumerCursor - 1]
    int32 consumerRecycle[consumerRecycleCursor]
    int32 accumulatorCapacity
    int32 accCursor
    int32 accRecycleCursor
    PowerAccumulatorComponent accPool[accCursor - 1]
    int32 accRecycle[accRecycleCursor]
    int32 exchangerCapacity
    int32 excCursor
    int32 excRecycleCursor
    PowerExchangerComponent excPool[excCursor - 1]
    int32 excRecycle[excRecycleCursor]
    int32 networkCapacity
    int32 netCursor
    int32 netRecycleCursor
    [netCursor] {
        int32 powerNetworkIncludedFlag
        PowerNetwork netPool (powerNetworkIncludedFlag == 1)
    }
    int32 netRecycle[netRecycleCursor]
}

PowerGeneratorComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 networkId
    uint8_bool photovoltaic
    uint8_bool wind
    uint8_bool gamma
    int64 genEnergyPerTick
    int64 useFuelPerTick
    int16 fuelMask
    int64 fuelEnergy
    int16 curFuelId
    int16 fuelId
    int16 fuelCount
    int64 fuelHeat
    int32 catalystId
    int32 catalystPoint
    int32 productId
    float productCount
    int64 productHeat
    float warmup
    float ionEnhance
    float x
    float y
    float z
}

PowerNodeComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 networkId
    uint8_bool isCharger
    int32 workEnergyPerTick
    int32 idleEnergyPerTick
    int32 requiredEnergy
    float powerPoint_x
    float powerPoint_y
    float powerPoint_z
    float connectDistance
    float coverRadius
}

PowerConsumerComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 networkId
    float plugPos_x
    float plugPos_y
    float plugPos_z
    int64 requiredEnergy
    int64 servedEnergy
    int64 workEnergyPerTick
    int64 idleEnergyPerTick
}

PowerAccumulatorComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 networkId
    int64 inputEnergyPerTick
    int64 outputEnergyPerTick
    int64 curEnergy
    int64 maxEnergy
}

PowerExchangerComponent
{
    int32 version = 1
    int32 id
    int32 entityId
    int32 networkId
    int16 emptyCount
    int16 fullCount
    float targetState
    float state
    int64 energyPerTick
    int64 curPoolEnergy
    int64 poolMaxEnergy
    int32 emptyId
    int32 fullId
    int32 belt0 (version >= 1)
    int32 belt1 (version >= 1)
    int32 belt2 (version >= 1)
    int32 belt3 (version >= 1)
    uint8_bool isOutput0 (version >= 1)
    uint8_bool isOutput1 (version >= 1)
    uint8_bool isOutput2 (version >= 1)
    uint8_bool isOutput3 (version >= 1)
    int32 outputSlot (version >= 1)
    int32 inputSlot (version >= 1)
    int32 outputRectify (version >= 1)
    int32 inputRectify (version >= 1)
}

PowerNetwork
{
    int32 version = 0
    int32 id
    int32 numNodes
    int32 numConsumers
    int32 numGenerators
    int32 numAccumulators
    int32 numExchangers
    PowerNetworkStructures::Node[numNodes]
    int32 consumers[numConsumers]
    int32 generators[numGenerators]
    int32 accumulators[numAccumulators]
    int32 exchangers[numExchangers]
}

PowerNetworkStructures::Node
{
    int32 version = 0
    int32 id
    float x
    float y
    float z
    float connDistance2
    float coverRadius2
    int32 genId
    int32 accId
    int32 excId
    int32 numConnIdsForLoad
    int32 numLineIdsForLoad
    int32 numConsumers
    int32 connIdsForLoad[numConnIdsForLoad]
    int32 lineIdsForLoad[numLineIdsForLoad]
    int32 consumers[numConsumers]
}

FactorySystem
{
    int32 version = 0
    int32 minerCapacity
    int32 minerCursor
    int32 minerRecycleCursor
    MinerComponent minerPool[minerCursor - 1]
    int32 minerRecycle[minerRecycleCursor]
    int32 inserterCapacity
    int32 inserterCursor
    int32 inserterRecycleCursor
    InserterComponent inserterPool[inserterCursor - 1]
    int32 inserterRecycle[inserterRecycleCursor]
    int32 assemblerCapacity
    int32 assemblerCursor
    int32 assemblerRecycleCursor
    AssemblerComponent assemblerPool[assemblerCursor - 1]
    int32 assemblerRecycle[assemblerRecycleCursor]
    int32 fractionateCapacity
    int32 fractionateCursor
    int32 fractionateRecycleCursor
    FractionateComponent fractionatePool[fractionateCursor - 1]
    int32 fractionateRecycle[fractionateRecycleCursor]
    int32 ejectorCapacity
    int32 ejectorCursor
    int32 ejectorRecycleCursor
    EjectorComponent ejectorPool[ejectorCursor - 1]
    int32 ejectorRecycle[ejectorRecycleCursor]
    int32 siloCapacity
    int32 siloCursor
    int32 siloRecycleCursor
    SiloComponent siloPool[siloCursor - 1]
    int32 siloRecycle[siloRecycleCursor]
    int32 labCapacity
    int32 labCursor
    int32 labRecycleCursor
    LabComponent labPool[labCursor - 1]
    int32 labRecycle[labRecycleCursor]
}

MinerComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 pcId
    int32 EMinerType type (None, Water, Vein, Oil)
    int32 speed
    int32 time
    int32 period
    int32 insertTarget
    int32 EWorkState workstate (Idle, Running, Outputing, Lack, Full)
    int32 veinCount
    int32 veins[veinCount]
    int32 currentVeinIndex
    int32 minimumVeinAmount
    int32 productId
    int32 productCount
    uint32 seed
}

InserterComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 pcId
    int32 EInserterStage stage (Picking, Sending, Inserting, Returning)
    int32 speed
    int32 time
    int32 stt
    int32 delay
    int32 pickTarget
    int32 insertTarget
    uint8_bool careNeeds
    uint8_bool canStack
    int16 pickOffset
    int16 insertOffset
    int32 filter
    int32 itemId
    int32 stackCount
    int32 stackSize
    float pos2_x
    float pos2_y
    float pos2_z
    float rot2_x
    float rot2_y
    float rot2_z
    float rot2_w
    int16 t1
    int16 t2
}

AssemblerComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 pcId
    uint8_bool replicating
    uint8_bool outputing
    int32 speed
    int32 time
    int32 recipeId
    (recipeId > 0) {
        int32 ERecipeType recipeType (0:None 1:Smelt 2:Chemical 3:Refine 4:Assemble 5:Particle 6:Exchange 7:PhotonStore 8:Fractionate 15:Research)
        int32 timeSpend
        int32 numRequires
        int32 requires[numRequires]
        int32 numRequireCounts
        int32 requireCounts[numRequireCounts]
        int32 numServed
        int32 served[numServed]
        int32 numNeeds
        int32 needs[numNeeds]
        int32 numProducts
        int32 products[numProducts]
        int32 numProductCounts
        int32 productCounts[numProductCounts]
        int32 numProduced
        int32 produced[numProduced]
    }
}

FractionateComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 pcId
    int32 belt0
    int32 belt1
    int32 belt2
    uint8_bool isOutput0
    uint8_bool isOutput1
    uint8_bool isOutput2
    uint8_bool isWorking
    float produceProb
    int32 need
    int32 product
    int32 needCurrCount
    int32 productCurrCount
    int32 oriProductCurrCount
    int32 progress
    uint8_bool isRand
    uint8_bool fractionateSuccess
    int32 needMaxCount
    int32 productMaxCount
    int32 oriProductMaxCount
    uint32 seed
}

EjectorComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 planetId
    int32 pcId
    int32 direction
    int32 time
    uint8_bool fired
    int32 chargeSpend
    int32 coldSpend
    int32 bulletId
    int32 bulletCount
    int32 orbitId
    float pivotY
    float muzzleY
    float localPosN_x
    float localPosN_y
    float localPosN_z
    float localAlt
    float localRot_x
    float localRot_y
    float localRot_z
    float localRot_w
    float localDir_x
    float localDir_y
    float localDir_z
}

SiloComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 planetId
    int32 pcId
    int32 direction
    int32 time
    uint8_bool fired
    int32 chargeSpend
    int32 coldSpend
    int32 bulletId
    int32 bulletCount
    int32 autoIndex
    uint8_bool hasNode
    float localPos_x
    float localPos_y
    float localPos_z
    float localRot_x
    float localRot_y
    float localRot_z
    float localRot_w
}

LabComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    int32 pcId
    int32 nextLabId
    uint8_bool replicating
    uint8_bool outputing
    int32 time
    int32 hashBytes
    uint8_bool researchMode
    int32 recipeId
    int32 techId
    (not researchMode and recipeId > 0) {
        int32 timeSpend
        int32 numRequires
        int32 requires[numRequires]
        int32 numRequireCounts
        int32 requireCounts[numRequireCounts]
        int32 numServed
        int32 served[numServed]
        int32 numNeeds
        int32 needs[numNeeds]
        int32 numProducts
        int32 products[numProducts]
        int32 numProductCounts
        int32 productCounts[numProductCounts]
        int32 numProduced
        int32 produced[numProduced]
    }
    (researchMode) {
        int32 numMatrixPoints
        int32 matrixPoints[numMatrixPoints]
        int32 numMatrixServed
        int32 matrixServed[numMatrixServed]
        int32 numNeeds
        int32 needs[numNeeds]
    }
}

PlanetTransport
{
    int32 version = 0
    int32 stationCursor
    int32 stationCapacity
    int32 stationRecycleCursor
    [stationCursor - 1] {
        int32 stationIndex
        StationComponent stationPool (stationIndex != 0)
    }
    int32 stationRecycle[stationRecycleCursor]
}

StationComponent
{
    int32 version = 2
    int32 id
    int32 gid
    int32 entityId
    int32 planetId
    int32 pcId
    int32 gene
    float droneDock_x
    float droneDock_y
    float droneDock_z
    float shipDockPos_x
    float shipDockPos_y
    float shipDockPos_z
    float shipDockRot_x
    float shipDockRot_y
    float shipDockRot_z
    float shipDockRot_w
    uint8_bool isStellar
    int32 nameIsIncludedFlag (0 or 1)
    string name (nameIsIncludedFlag > 0)
    int64 energy
    int64 energyPerTick
    int64 energyMax
    int32 warperCount
    int32 warperMaxCount
    int32 idleDroneCount
    int32 workDroneCount
    int32: Used for allocating array sizes for workDroneDatas and workDroneOrders, and not uses for read in the arrays.
    DroneData workDroneDatas[workDroneCount]
    LocalLogisticOrder workDroneOrders[workDroneCount]
    int32 idleShipCount
    int32 workShipCount
    uint64 idleShipIndices
    uint64 workShipIndices
    int32: Used for allocating array sizes for workShipDatas, shipRenderers, shipUIRenderers, workShipOrders, and not uses for read in the arrays.
    ShipData workShipDatas[workShipCount]
    RemoteLogisticOrder workShipOrders[workShipCount]
    int32 numStorage
    StationStore[numStorage]
    (version >= 1) {
        int32 numSlots
        slots[numSlots] {
            int32 dir
            int32 beltId
            int32 storageIdx
            int32 counter
        }
    }
    int32 localPairProcess
    int32 remotePairProcess
    int32 nextShipIndex
    uint8_bool isCollector
    int32 numCollectionIds
    int32 collectionIds[numCollectionIds]
    int32 numCollectionPerTick
    float collectionPerTick[numCollectionPerTick]
    int32 numCurrentCollections
    float currentCollections[numCurrentCollections]
    int32 collectSpeed
    double tripRangeDrones (version >= 2)
    double tripRangeShips (version >= 2)
    uint8_bool includeOrbitCollector (version >= 2)
    double warpEnableDist (version >= 2)
    uint8_bool warperNecessary (version >= 2)
    int32 deliveryDrones (version >= 2)
    int32 deliveryShips (version >= 2)
}

DroneData
{
    int32 version = 0
    float begin_x
    float begin_y
    float begin_z
    float end_x
    float end_y
    float end_z
    int32 endId
    float direction
    float maxt
    float t
    int32 itemId
    int32 itemCount
    int32 gene
}

LocalLogisticOrder
{
    int32 version = 0
    int32 otherStationId
    int32 thisIndex
    int32 otherIndex
    int32 itemId
    int32 thisOrdered
    int32 otherOrdered
}

ShipData 
{
    int32 version = 0
    int32 stage
    int32 planetA
    int32 planetB
    double uPos_x
    double uPos_y
    double uPos_z
    float uVel_x
    float uVel_y
    float uVel_z
    float uSpeed
    float warpState
    float uRot_x
    float uRot_y
    float uRot_z
    float uRot_w
    float uAngularVel_x
    float uAngularVel_y
    float uAngularVel_z
    float uAngularSpeed
    double pPosTemp_x
    double pPosTemp_y
    double pPosTemp_z
    float pRotTemp_x
    float pRotTemp_y
    float pRotTemp_z
    float pRotTemp_w
    int32 otherGId
    int32 direction
    float t
    int32 itemId
    int32 itemCount
    int32 gene
    int32 shipIndex
    int32 warperCnt
}

RemoteLogisticOrder 
{
    int32 version = 0
    int32 otherStationGId
    int32 thisIndex
    int32 otherIndex
    int32 itemId
    int32 thisOrdered
    int32 otherOrdered
}

StationStore 
{
    int32 version = 0
    int32 itemId
    int32 count
    int32 localOrder
    int32 remoteOrder
    int32 max
    int32 ELogisticStorage localLogic (None, Supply, Demand)
    int32 ELogisticStorage remoteLogic
}

MonsterSystem
{
    int32 version = 0
    int32 monsterCapacity
    int32 monsterCursor
    int32 monsterRecycleCursor
    MonsterComponent monsterPool[monsterCursor - 1]
    int32 monsterRecycle[monsterRecycleCursor]
}

MonsterComponent
{
    int32 version = 0
    int32 id
    int32 entityId
    float walkSpeed
    float point0_x
    float point0_y
    float point0_z
    float point1_x
    float point1_y
    float point1_z
    float point2_x
    float point2_y
    float point2_z
    int32 direction
    float stopTime
    float t
    float stopCurrentTime
    int32 EMonsterState monsterState (Null, Stopped, Wandering)
    float stepDistance
}

PlatformSystem
{
    int32 version = 0
    int32 reformDataByteCount
    uint8 reformData[reformDataByteCount]: If count exceeds a limit, count is read, but only the limit is used.
    int32 reformOffsetsByteCount
    uint32 reformOffsets[reformOffsetsByteCount]: If count exceeds a limit, count is read, but only the limit is used.
}

DysonSphere
{
    int32 version = 2
    (version >= 1) {
        int32 randSeed
        DysonSwarm
        int32 = 1212: File will be rejected if the value is not 1212
        int32 layerCount
        int32 numDysonSphereLayer
        [numDysonSphereLayer - 1] {
            int32 dysonSphereLayerIndex
            DysonSphereLayer (dysonSphereLayerIndex != 0)
        }
        int32 rocketCapacity
        int32 rocketCursor
        int32 rocketRecycleCursor
        DysonRocket rocketPool[rocketCursor - 1]
        int32 rocketRecycle[rocketRecycleCursor]
        int32 autoNodeCount
        int32 numAutoNodes
        [numAutoNodes] {
            int32 autoNodeIncludedFlag
            int32 layerId (autoNodeIncludedFlag > 0)
            int32 nodeId (autoNodeIncludedFlag > 0)
        }
    }
    (version >= 2) {
        int32 nrdCapacity
        int32 nrdCursor
        int32 nrdRecycleCursor
        DysonNodeRData nrdPool[nrdCursor - 1]
        int32 nrdRecycle[nrdRecycleCursor]
    }
}

DysonSwarm
{
    int32 version = 4
    (version >= 1) {
        int32 randSeed
        int32 sailCapacity
        int32 sailCursor
        int32 sailRecycleCursor
        sailPoolForSave[sailCursor] {
            float st
            float px
            float py
            float pz
            float vx
            float vy
            float vz
            float gs
        }
        sailInfos[sailCursor] {
            uint32 orbit
            uint32 node (version >= 3)
            uint32 kill (version >= 3)
            float posr_x (version >= 4)
            float posr_y (version >= 4)
            float posr_z (version >= 4)
        }
        int32 sailRecycle[sailRecycleCursor]
        int32 orbitCapacity
        int32 orbitCursor
        SailOrbit orbits[orbitCursor - 1]
        int32 numExpiryOrder: Must match sailCapacity or the game will crash.
        int32 expiryCursor
        int32 expiryEnding
        [numExpiryOrder] {
            int64 time
            int32 index
        }
        (version >= 2) {
            int32 numAbsorbOrder: Must match sailCapacity or the game will crash.
            int32 absorbCursor
            int32 absorbEnding
            absorbOrder[numAbsorbOrder] {
                int64 time
                int32 index
                int32 layer
                int32 node
            }
        }
        int32 bulletCapacity
        int32 bulletCursor
        int32 bulletRecycleCursor
        SailBullet bulletPool[bulletCursor - 1]
        int32 bulletRecycle[bulletRecycleCursor]
    }
}

SailOrbit
{
    int32 version = 0
    int32 id
    float radius
    float rotation_x
    float rotation_y
    float rotation_z
    float rotation_w
    float up_x
    float up_y
    float up_z
    int32 count
    uint8_bool enabled
}

SailBullet
{
    int32 version = 0
    int32 id
    float t
    float maxt
    int32 state
    float rBegin_x
    float rBegin_y
    float rBegin_z
    float rEnd_x
    float rEnd_y
    float rEnd_z
    float lBegin_x
    float lBegin_y
    float lBegin_z
    float uEndVel_x
    float uEndVel_y
    float uEndVel_z
    double uBegin_x
    double uBegin_y
    double uBegin_z
    double uEnd_x
    double uEnd_y
    double uEnd_z
}

DysonSphereLayer
{
    int32 version = 0
    int32 id
    float orbitRadius
    float orbitRotation_x
    float orbitRotation_y
    float orbitRotation_z
    float orbitRotation_w
    float orbitAngularSpeed
    float currentAngle
    float currentRotation_x
    float currentRotation_y
    float currentRotation_z
    float currentRotation_w
    float nextRotation_x
    float nextRotation_y
    float nextRotation_z
    float nextRotation_w
    int32 gridMode
    int32 nodeCapacity
    int32 nodeCursor
    int32 nodeRecycleCursor
    [nodeCursor - 1] {
        int32 dysonNodeIndex
        DysonNode (dysonNodeIndex != 0)
    }
    int32 nodeRecycle[nodeRecycleCursor]
    int32 frameCapacity
    int32 frameCursor
    int32 frameRecycleCursor
    [frameCursor - 1] {
        int32 dysonFrameIndex
        DysonFrame (dysonFrameIndex != 0)
    }
    int32 frameRecycle[frameRecycleCursor]
    int32 shellCapacity
    int32 shellCursor
    int32 shellRecycleCursor
    [shellCursor - 1] {
        int32 dysonShellIndex
        DysonShell (dysonShellIndex != 0)
    }
    int32 shellRecycle[shellRecycleCursor]
}

DysonNode
{
    int32 version = 4
    int32 id
    int32 protoId
    int32 layerId
    uint8_bool use
    uint8_bool reserved
    float pos_x
    float pos_y
    float pos_z
    int32 sp
    int32 spMax
    int32 spOrdered
    int32 cpOrdered (version >= 3)
    int32 rid (version >= 2)
    int32 frameTurn
    int32 shellTurn (version >= 1)
    int32 _spReq
    int32 _cpReq (version >= 4)
}

DysonFrame
{
    int32 version = 0
    int32 id
    int32 protoId
    int32 layerId
    uint8_bool reserved
    int32 nodeId
    int32 nodeId2
    uint8_bool euler
    int32 spA
    int32 spB
    int32 spMax
}

DysonShell
{
    int32 version = 0
    int32 id
    int32 protoId
    int32 layerId
    int32 randSeed
    int32 numPolygon
    polygon[numPolygon] {
        float item_x
        float item_y
        float item_z
    }
    int32 numDysonNode
    int32 nodeId[numDysonNode]: Must be an existing ID or the game will crash.
    int32 vertexCount
    int32 triangleCount
    int32 numVerts
    verts[numVerts] {
        float x
        float y
        float z
    }
    int32 numPqArr
    pqArr[numPqArr] {
        int32 x
        int32 y
    }
    int32 numTris
    int32 tris[numTris]
    int32 numVAdjs
    int32 vAdjs[numVAdjs]
    int32 numVertAttr
    int32 vertAttr[numVertAttr]
    int32 numVertsq
    int32 vertsq[numVertsq]
    int32 numVertsqOffset
    int32 vertsqOffset[numVertsqOffset]
    int32 numNodecps
    int32 nodecps[numNodecps]
    int32 numVertcps
    int32 vertcps[numVertcps]
    int32 vertRecycleArraySize
    int32 vertRecycleCursor
    int32 vertRecycle[vertRecycleCursor]
}

DysonRocket
{
    int32 version = 0
    int32 id
    int32 nodeLayerId
    int32 nodeId
    int32 planetId
    float t
    float uSpeed
    double uPos_x
    double uPos_y
    double uPos_z
    float uRot_x
    float uRot_y
    float uRot_z
    float uRot_w
    float uVel_x
    float uVel_y
    float uVel_z
    float launch_x
    float launch_y
    float launch_z
}

DysonNodeRData
{
    int32 version = 0
    int32 id
    int32 layerId
    float pos_x
    float pos_y
    float pos_z
    float angularVel
    float layerRot_x
    float layerRot_y
    float layerRot_z
    float layerRot_w
}


🍪 We use cookies to keep session information to provide you a better experience.