File: save-format.md

package info (click to toggle)
openrct2 0.4.3%2Bds-1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 67,880 kB
  • sloc: cpp: 549,527; ansic: 1,322; sh: 441; python: 269; xml: 180; php: 34; makefile: 19
file content (255 lines) | stat: -rw-r--r-- 6,613 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# File

All strings are null terminated UTF-8.

Array32:
  length:       uint32
  element-size: uint32
  data:         blob

  An element-size of 0 indicates varying. E.g. for strings.

string-table:   []
  lcode:        string      (E.g. "en-GB")
  value:        string

## File

Header:
  magic:                uint32
  target-version:       uint32
  min-version:          uint32
  num-chunks:           uint32
  uncompressed-size:    uint64
  compression:          uint32
  sha1:                 byte[20]

Chunks:
  id:                   uint32
  offset:               uint64
  length:               uint64

## Chunks

Authoring:
  engine:               string              E.g. "openrct2 v0.1.2 (Linux)"
  authors:              string[]
  notes:                string
  date-started:         timestamp
  date-modified:        timestamp

Objects:                object[]
  type:                 uint16
  id:                   string
  version:              string

Scenario:
  category:                     uint32
  name:                         string-table
  park-name:                    string-table
  details:                      string-table
  objective-type:               uint32
  objective-year:               uint16
  objective-guests:             uint32
  objective-rating:             uint16
  objective-ride-excitement:    uint16
  objective-ride-length:        uint16
  objective-park-value:         money32
  objective-ride-profit:        money32
  objective-shop-profit:        money32
  completed-company-value:      money32
  completed-name:               string

General:
  ticks:                        uint32
  elapsed-months:               uint32
  current-day:                  uint16
  rand:                         uint32[2]
  initial-cash:                 money32
  guest-initial-cash:           money16
  guest-initial-hunger:         uint8
  guest-initial-thirst:         uint8
  guest-spawns:                 xyzd32
  land-price:                   money32
  construction-rights-price:    money32

Interface:
  main-viewport:
    x:                          uint16
    y:                          uint16
    zoom:                       uint8
    rotation:                   uint8
  last-entrance-style:          uint32

Climate:
    climate:                uint8
    climate-update-timer:   uint16
    current:
      weather:              uint8
      temperature:          uint8
      effect:               uint8
      gloom:                uint8
      rain-level:           uint8
    next:
      (same as above)

Park:
  name:                     string-id
  cash:                     money32
  loan:                     money32
  loan-max:                 money32
  interest:                 uint16
  flags:                    uint64
  entrance-fee:             money32
  rating:                   uint16
  rating-casualty-penalty:  uint16
  current-expenditure:      money32
  current-profit:           money32
  total-admissions:         uint32
  income-from-admissions:   money32
  handyman-colour:          uint8
  mechanic-colour:          uint8
  security-colour:          uint8
  campaigns:
    weeks-left:             uint16
    ride-index:             uint32
  research-funding:         uint8
  research-enabled:         uint32
  research-progress-stage:  uint8
  research-progress:        uint16
  research-last-item:       uint32
  research-next-item:       uint32

  rating-warning-days:      uint16
  peep-warning-throttle:    uint8[16]
  awards:


History:
  rating-history:           uint16[]
  guests-history:           uint32[]
  cash-history:             money32[]
  weekly-profit-history:    money32[]
  park-value-history:       money32[]
  expenditure-history:      money32[][]

Inventions:
  

Tiles:
  map-size:                 xy32
  tile-elements:            tile-element[]

Things:

Rides:

Banners:

Animations:

Staff:

Strings:                    string[]

Editor:
  step:                     uint8

Derived:
  park-size:                uint32
  guests-in-park:           uint32
  guests-heading-for-park:  uint32
  company-value:            money32
  park-value:               money32


## Tile Element

tile-element-base:
  type:                     uint8
  flags:                    uint8
  base-z:                   uint8
  clear-z:                  uint8

surface-element:
  slope:                    uint8
  water-height:             uint8
  ownership:                uint8
  grass-length:             uint8
  surface-object-id:        uint8
  edge-object-id:           uint8
  (spare: 6)

footpath-element:
  object-id:                uint16
  edges:                    uint8
  flags2:                   uint8
  addition:                 uint16
  addition-status:          uint8
  station-index:            uint8
  ride-index:               uint32
  (spare: -2)

track-element:
  type:                     uint16          (straight, 25 deg up, brakes etc.)
  sequence:                 uint8
  style:                    uint8           (wooden, intamin, b&m etc.)
  station-index:            uint8
  colour:                   uint8
  flags:                    uint8           (station / on-ride)
  (spare: 5)

track-element (maze):
  type:                     uint16
  maze-entry:               uint16
  (spare: 8)

entrance-element:
  object-id:                uint16
  footpath-object-id:       uint16
  ride-index:               uint32
  station-index:            uint8
  type:                     uint8
  (spare: 2)

scenery-element:
  object-id:                uint32
  age:                      uint8
  colours:                  uint8[2]
  (spare: 5)

scenery-large-element:
  object-id:                uint32
  colour:                   uint8[3]

wall-element:
  object-id:                uint32
  colours:                  uint8[3]
  animation:                uint8
  banner-index:             uint32
  (spare: 0)

banner-element:
  object-id:                uint16
  index:                    uint32
  flags:                    uint8
  position:                 uint8
  (spare: 4)


## Limits

Ride index:                     uint32
Banner index:                   uint32
Station index:                  uint8

Ride object index:              uint16
Terrain (surface) object index: uint8
Terrain (edge) object index:    uint8
Entrance object index:          uint16 (can be for each type if necessary)
Footpath object index:          uint16
Footpath addition object index: uint16
Scenery object index:           uint32
Scenery (large) object index:   uint32
Wall object index:              uint32
Banner object index:            uint16