Skip to content

OpenRCT2 JSON Objects

zrowny edited this page May 26, 2021 · 1 revision

OpenRCT2 JSON Objects

All OpenRCT2 JSON objects have a "header" analogous to the DAT header. It contains the following fields (* indicates a required field):

id : string : required
OpenRCT2 id of the object. This should be formatted as objectsource.objecttype.objectname or similar. This value MUST be universally unique.
authors : array of string(s) : required

Array containing the authors of the object

items : string
The name of (one of) the author(s)

Examples:

[ "spacek531" ]
[ "Chris Sawyer", "Simon Foster" ]
version : string

Version of the object

Example:

"1.0"
originalId : string

For converted objects, this represents the original DAT header. The three sections are the flags, name, and checksum. This shouldn’t be used for new (not converted) objects.

Examples:

"00000000|RMCT2   |00003000"
"0A188A80|4X4     |0DB8676C"
sourceGame : string or array of strings

The source(s) of the object. Either a single string or an array containing multiple sources

Sources must be one of: "rct1", "rct1aa", "rct1ll", "rct2", "rct2ww", "rct2tt", "official", or "custom"

objectType : string

The type of the object. This affects what will go in the properties field. See the respective pages for each object type.

Must be one of: "ride", "footpath", "footpath_banner", "footpath_item", "scenery_small", "scenery_large", "scenery_wall", "scenery_group", "park_entrance", "water", "terrain_surface", "terrain_edge", "station", "music", "footpath_surface", or "footpath_railings"

images : array

A list describing the images for the object

item : object

A description of a single image

path : string
The relative path to a png file.
x : integer
The image’s x-offset.
y : integer
The image’s y-offset.
format : string
If set to "raw", this image will not be run-length encoded (rare).
keepPalette : boolean : proposed
If true, OpenRCT2 will assume the png file is already paletted correctly, and will just read the palette indexes without looking at colors.

or

item : string
The source of the image. This can be an indexed ranged into a DAT file (such as G1.DAT or an object .DAT). Otherwise, it can be a relative path to a png file (equivalent to the object form with this as the path, and everything else default).

Examples:

[
    { "path": "images/0.png", "x": 0, "y": 0 },
    { "path": "images/1.png", "x": 0, "y": 0 },
    { "path": "images/2.png", "x": 0, "y": 0 },
    { "path": "images/3.png", "x": 0, "y": 0 }
]
[ "$RCT2:OBJDATA/TLP.DAT[0..3]" ]
[ "$G1[5595]", "$G1[1663..1746]" ]
strings : object

Contains the various strings used for the object

name : object

Contains the name of the object in all the different supported languages

en-GB : string
The string in English. Add other entries for other languages
description : object
Contains a short description of the object in all the different supported languages
capacity : object
For rides, this contains text describing the capacity in all the different supported languages
{
    "id": "rct2.scenery_small.tck",
    "authors": ["Chris Sawyer", "Simon Foster"],
    "version": "1.0",
    "originalId": "0A188D81|TCK     |7C2FC2BB",
    "sourceGame": ["rct2", "rct1"],
    "objectType": "scenery_small",
    "properties": {  },
    "images": ["$RCT2:OBJDATA/TCK.DAT[0..115]"],
    "strings": {
        "name": {
            "en-GB": "Clock",
            "fr-FR": "Horloge",
            "de-DE": "Uhr",
            "es-ES": "Reloj",
            "it-IT": "Orologio",
            "nl-NL": "Klok",
            "sv-SE": "Klocka",
            "ko-KR": "시계",
            "zh-CN": "时钟",
            "zh-TW": "時鐘",
            "pt-BR": "Relógio",
            "cs-CZ": "Hodiny",
            "ja-JP": "時計",
            "pl-PL": "Zegar",
            "ru-RU": "Часы",
            "eo-OO": "Horloĝo"
        }
    }
}

This is a list of object types. See the respective pages for more information