mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-15 16:16:10 +09:00
using gdx's preferred way to generate world json
This commit is contained in:
@@ -27,59 +27,56 @@ Following code is an example savegame JSON files.
|
||||
|
||||
#### world1.json
|
||||
|
||||
File is named as `"world"+world_index+".json"`
|
||||
File is named as `"world"+world_index+".json"`.
|
||||
The fields are auto-generated by GDX's JSON serialiser.
|
||||
|
||||
```
|
||||
{
|
||||
worldname: "New World",
|
||||
comp: <null, "gzip">,
|
||||
worldName: "New World",
|
||||
worldIndex: 1,
|
||||
width: 8192,
|
||||
height: 2048,
|
||||
spawnx: 4096,
|
||||
spawny: 248,
|
||||
genver: 4, /* generator version in integer */
|
||||
time_t: <in-game TIME_T of this world>,
|
||||
terr: {
|
||||
spawnX: 4096,
|
||||
spawnY: 248,
|
||||
creationTime: 1629857065,
|
||||
lastPlayTime: 1629857065,
|
||||
totalPlayTime: 0,
|
||||
layerTerrain: {
|
||||
h: "a441b15fe9a3cf56661190a0b93b9dec7d04127288cc87250967cf3b52894d11",
|
||||
b: <Ascii85-encoded gzipped terrain layerdata>
|
||||
b: <Ascii85-encoded gzipped terrain layerdata>,
|
||||
x: 8192,
|
||||
y: 2048
|
||||
},
|
||||
wall: {
|
||||
layerWall: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped wall layerdata>
|
||||
b: <Ascii85-encoded gzipped wall layerdata>,
|
||||
x: 8192,
|
||||
y: 2048
|
||||
},
|
||||
tdmg: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped terrain damage in JSON>
|
||||
wallDamages:{},
|
||||
terrainDamages: {},
|
||||
fluidTypes: {}
|
||||
fluidFills: {},
|
||||
wirings: {},
|
||||
wiringGraph: {},
|
||||
gravitation: {y:9.8}
|
||||
globalLight: {
|
||||
r:0.8826928,
|
||||
g:0.8901961,
|
||||
b:0.9055425,
|
||||
a:0.93691504
|
||||
},
|
||||
wdmg: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped wall damage in JSON>
|
||||
},
|
||||
flut: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped fluidTypes in JSON>
|
||||
},
|
||||
fluf: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped fluidFills in JSON>
|
||||
},
|
||||
wire: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped wirings in JSON>
|
||||
},
|
||||
wirg: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped wiringGraph in JSON>
|
||||
},
|
||||
tmap: {
|
||||
h: <SHA-256 hash of 'b'>,
|
||||
b: <Ascii85-encoded gzipped tilenumber-to-tilename map in JSON>
|
||||
}
|
||||
averageTemperature: 288,
|
||||
generatorSeed: 0,
|
||||
worldTime: 27874,
|
||||
tileNumberToNameMap: {}
|
||||
}
|
||||
```
|
||||
|
||||
#### actors.json
|
||||
|
||||
The fields are auto-generated by GDX's JSON serialiser.
|
||||
|
||||
```
|
||||
{
|
||||
<actor id>: { actor serialised in JSON },
|
||||
|
||||
Reference in New Issue
Block a user