Skip to main content
OpenRCT2 uses a chunk-based save file format that supports compression and versioning. This document describes the structure of save files.
All strings in save files are null-terminated UTF-8.

Data Types

Array32

Variable-length array with 32-bit metadata:
length
uint32
Number of elements in the array
element-size
uint32
Size of each element in bytes. A value of 0 indicates varying size (e.g., for strings)
data
blob
Raw array data

String Table

Localized string container:
lcode
string
Language code (e.g., “en-GB”, “de-DE”)
value
string
Translated string value

File Structure

The file begins with a header containing metadata:
magic
uint32
Magic number identifying the file format
target-version
uint32
Target version of OpenRCT2 for this save file
min-version
uint32
Minimum OpenRCT2 version required to load this file
num-chunks
uint32
Number of data chunks in the file
uncompressed-size
uint64
Total size of uncompressed data
compression
uint32
Compression algorithm used (0 = none, 1 = gzip, etc.)
sha1
byte[20]
SHA-1 hash of the uncompressed data for integrity verification

Chunk Index

Following the header is an index of all chunks:
id
uint32
Chunk type identifier
offset
uint64
Byte offset from start of file to chunk data
length
uint64
Length of chunk data in bytes

Chunk Types

Authoring

Metadata about who created the save file:
engine
string
Engine version string (e.g., “openrct2 v0.1.2 (Linux)”)
authors
string[]
List of author names
notes
string
Custom notes or description
date-started
timestamp
When the park was first created
date-modified
timestamp
When the save was last modified

Objects

List of custom objects used in the park:
type
uint16
Object type (ride, scenery, etc.)
id
string
Unique object identifier
version
string
Object version string

Scenario

Scenario information and objectives:
category
uint32
Scenario category (beginner, challenging, expert, etc.)
name
string-table
Localized scenario name
park-name
string-table
Localized park name
details
string-table
Localized scenario description
objective-type
uint32
Type of objective (guest count, park rating, etc.)
objective-year
uint16
Year by which objective must be completed
objective-guests
uint32
Target number of guests (for guest count objective)
objective-rating
uint16
Target park rating
objective-ride-excitement
uint16
Minimum ride excitement rating required
objective-ride-length
uint16
Minimum ride length required
objective-park-value
money32
Target park value
objective-ride-profit
money32
Target profit from rides
objective-shop-profit
money32
Target profit from shops
completed-company-value
money32
Company value when objective was completed
completed-name
string
Name recorded when objective was completed

General

General game state:
ticks
uint32
Game ticks elapsed since park opened
elapsed-months
uint32
Number of months elapsed in-game
current-day
uint16
Current day of the month (0-based)
rand
uint32[2]
Random number generator state (two 32-bit values)
initial-cash
money32
Starting cash amount
guest-initial-cash
money16
Amount of cash guests spawn with
guest-initial-hunger
uint8
Initial hunger level for new guests (0-255)
guest-initial-thirst
uint8
Initial thirst level for new guests (0-255)
guest-spawns
xyzd32
Guest spawn point coordinates and direction
land-price
money32
Cost per tile to purchase land
construction-rights-price
money32
Cost per tile to purchase construction rights

Interface

Interface state (viewport position, last selections):
main-viewport.x
uint16
Viewport X coordinate
main-viewport.y
uint16
Viewport Y coordinate
main-viewport.zoom
uint8
Viewport zoom level (0 = closest, higher = further)
main-viewport.rotation
uint8
Viewport rotation (0-3)
last-entrance-style
uint32
Last selected entrance style

Climate

Weather and climate information:
climate
uint8
Climate type (cool & wet, warm, hot & dry, etc.)
climate-update-timer
uint16
Timer for next climate update
current.weather
uint8
Current weather condition
current.temperature
uint8
Current temperature
current.effect
uint8
Current weather effect
current.gloom
uint8
Current gloominess level
current.rain-level
uint8
Current rain intensity
The next weather state has the same structure as current and is used for smooth weather transitions.

Park

Park management data:
name
string-id
Park name (string ID reference)
cash
money32
Current cash balance
loan
money32
Current loan amount
loan-max
money32
Maximum loan available
interest
uint16
Interest rate on loan (basis points)
flags
uint64
Park flags (open/closed, forbid marketing, etc.)
entrance-fee
money32
Park entrance fee
rating
uint16
Current park rating (0-999)
rating-casualty-penalty
uint16
Penalty applied to rating from casualties
current-expenditure
money32
Expenditure in current period
current-profit
money32
Profit in current period
total-admissions
uint32
Total number of guests who have entered the park
income-from-admissions
money32
Total revenue from entrance fees
handyman-colour
uint8
Uniform color for handymen
mechanic-colour
uint8
Uniform color for mechanics
security-colour
uint8
Uniform color for security guards
campaigns.weeks-left
uint16
Weeks remaining for active marketing campaigns
campaigns.ride-index
uint32
Ride being marketed in campaign
research-funding
uint8
Research funding level (0-3)
research-enabled
uint32
Bitfield of enabled research categories
research-progress-stage
uint8
Current research stage
research-progress
uint16
Research progress toward next item
research-last-item
uint32
Last item researched
research-next-item
uint32
Next item to be researched
rating-warning-days
uint16
Days until park rating warning expires
peep-warning-throttle
uint8[16]
Throttle timers for various peep warnings

History

Historical data for charts:
rating-history
uint16[]
Park rating history by period
guests-history
uint32[]
Guest count history by period
cash-history
money32[]
Cash balance history by period
weekly-profit-history
money32[]
Weekly profit history
park-value-history
money32[]
Park value history by period
expenditure-history
money32[][]
Expenditure history by category and period

Tiles

Map tile data:
map-size
xy32
Map dimensions (width and height in tiles)
tile-elements
tile-element[]
Array of all tile elements (see Tile Elements)

Other Chunks

Additional chunk types include:
  • Inventions: Research/invention progress
  • Things: Dynamic entities (guests, staff, vehicles)
  • Rides: Ride data and statistics
  • Banners: Banner text and configuration
  • Animations: Active animations
  • Staff: Staff member data
  • Strings: Custom string table
  • Editor: Editor state (if in scenario editor)
  • Derived: Calculated values (park size, company value)

Tile Elements

Base Element

All tile elements share a common base structure:
type
uint8
Element type (surface, path, track, scenery, wall, entrance, banner)
flags
uint8
Element flags (ghost, last tile, etc.)
base-z
uint8
Base height of element (in units of 8)
clear-z
uint8
Clearance height (highest point of element)

Surface Element

Terrain tile:
slope
uint8
Terrain slope/shape
water-height
uint8
Water surface height (0 if no water)
ownership
uint8
Land ownership flags
grass-length
uint8
Grass length (for grass surfaces)
surface-object-id
uint8
Surface terrain type object
edge-object-id
uint8
Edge terrain type object

Footpath Element

Path/queue tile:
object-id
uint16
Footpath object type
edges
uint8
Bitfield of connected edges
flags2
uint8
Additional path flags (is queue, is sloped, etc.)
addition
uint16
Path addition object (lamp, bin, etc.)
addition-status
uint8
Addition state (broken, vandalised, etc.)
station-index
uint8
Station index (if queue path)
ride-index
uint32
Ride index (if queue path)

Track Element

Ride track piece:
type
uint16
Track piece type (flat, 25° up, brakes, etc.)
sequence
uint8
Sequence number within multi-tile track piece
style
uint8
Track style (wooden, steel, inverted, etc.)
station-index
uint8
Station index (if station piece)
colour
uint8
Track color scheme
flags
uint8
Track flags (is station, on-ride photo, etc.)

Track Element (Maze)

Maze ride has a different structure:
type
uint16
Track type (always maze)
maze-entry
uint16
Bitfield of maze walls and entry points

Entrance Element

Ride or park entrance:
object-id
uint16
Entrance object type
footpath-object-id
uint16
Associated footpath type
ride-index
uint32
Ride index (0xFFFFFFFF for park entrance)
station-index
uint8
Station index
type
uint8
Entrance part (front, middle, back)

Scenery Element

Small scenery item:
object-id
uint32
Scenery object ID
age
uint8
Scenery age (for aging/withering)
colours
uint8[2]
Primary and secondary colors

Large Scenery Element

Large scenery structure:
object-id
uint32
Large scenery object ID
colour
uint8[3]
Three color values

Wall Element

Wall/fence piece:
object-id
uint32
Wall object ID
colours
uint8[3]
Three color values
animation
uint8
Animation frame (for animated walls)
banner-index
uint32
Associated banner index (if wall has banner)
Banner (sign):
object-id
uint16
Banner object type
index
uint32
Banner index (references banner text in Strings chunk)
flags
uint8
Banner flags
position
uint8
Position on tile edge

Index Limits

Maximum values for various indices:
Ride index:          uint32 (4,294,967,295)
Banner index:        uint32 (4,294,967,295)
Station index:       uint8  (255)
These are theoretical limits. Practical limits may be lower due to performance considerations and memory constraints.

Working with Save Files

Loading

  1. Read and validate header
  2. Verify SHA-1 hash
  3. Decompress data if compressed
  4. Read chunk index
  5. Load chunks in dependency order
  6. Validate cross-references

Saving

  1. Collect all game state
  2. Write chunks
  3. Build chunk index
  4. Compress data (optional)
  5. Calculate SHA-1 hash
  6. Write header
OpenRCT2 supports both uncompressed and compressed save files. Compression significantly reduces file size but increases save/load time.

See Also

Architecture

Learn about OpenRCT2’s codebase structure

Contributing

Contribute to OpenRCT2 development

Build docs developers (and LLMs) love