Skip to main content
The objectManager global provides access to installed and loaded game objects. Objects include rides, scenery, vehicles, and other park elements.

Properties

installedObjects
InstalledObject[]
Array of all objects that are installed and can be loaded into the park

Methods

getInstalledObject

Gets an installed object by its identifier.
getInstalledObject(identifier: string): InstalledObject | null
identifier
string
required
The object identifier (e.g., “rct2.ride.twist1”, “rct2.scenery.tl0”)
Returns: The installed object, or null if not found.

load (single object)

Loads an object into the current park at a specific index.
load(identifier: string, index?: number): LoadedObject | null
identifier
string
required
The object identifier to load
index
number
The index to load the object at. If not provided, an empty slot will be used. If an object exists at this index, it will be replaced (if the type matches)
Returns: The loaded object, or null if loading failed.

load (multiple objects)

Loads multiple objects into the current park.
load(identifiers: string[]): (LoadedObject | null)[]
identifiers
string[]
required
Array of object identifiers to load
Returns: Array of loaded objects (or null for each that failed to load).

unload

Unloads an object from the current park.
unload(identifier: string): void
identifier
string
required
The object identifier to unload

Types

InstalledObject

Represents an object that is installed and available to load.
identifier
string
Unique object identifier (e.g., “rct2.ride.twist1”)
legacyIdentifier
string
Legacy 8-character identifier for RCT1/RCT2 objects
type
string
Object type: “ride”, “small_scenery”, “large_scenery”, “wall”, “banner”, “footpath”, “footpath_addition”, “scenery_group”, “park_entrance”, “water”, “terrain_surface”, “terrain_edge”, “station”, “music”, “footpath_surface”, “footpath_railings”
name
string
Display name of the object
version
string
Object version
authors
string[]
List of object authors

LoadedObject

Represents an object that is currently loaded in the park.
identifier
string
Object identifier
index
number
The index where the object is loaded
type
string
Object type

Usage Examples

List All Installed Rides

// Get all installed ride objects
const rides = objectManager.installedObjects.filter(obj => obj.type === "ride");

console.log(`Found ${rides.length} installed rides:`);
rides.forEach(ride => {
    console.log(`- ${ride.name} (${ride.identifier})`);
});

Check if Object is Installed

function isObjectInstalled(identifier) {
    const obj = objectManager.getInstalledObject(identifier);
    return obj !== null;
}

if (isObjectInstalled("rct2.ride.twist1")) {
    console.log("Twist coaster is installed");
}

Load Custom Objects

// Load a specific ride
const loadedRide = objectManager.load("rct2.ride.bmvd");

if (loadedRide) {
    console.log(`Loaded ${loadedRide.identifier} at index ${loadedRide.index}`);
} else {
    console.log("Failed to load ride");
}

Load Multiple Objects

// Load several scenery objects at once
const sceneryIds = [
    "rct2.scenery.tl0",
    "rct2.scenery.tl1",
    "rct2.scenery.tl2"
];

const results = objectManager.load(sceneryIds);

results.forEach((obj, i) => {
    if (obj) {
        console.log(`Loaded ${sceneryIds[i]} successfully`);
    } else {
        console.log(`Failed to load ${sceneryIds[i]}`);
    }
});

Replace an Object

// Replace an object at a specific index
// This unloads the old object and loads the new one
const newRide = objectManager.load("custom.ride.newcoaster", 10);

if (newRide) {
    console.log(`Replaced object at index 10 with ${newRide.identifier}`);
}

Unload Objects

// Unload an object when no longer needed
objectManager.unload("rct2.ride.twist1");
console.log("Ride unloaded");

Get Object Information

// Get detailed information about an installed object
const obj = objectManager.getInstalledObject("rct2.ride.bmvd");

if (obj) {
    console.log("Object Information:");
    console.log(`Name: ${obj.name}`);
    console.log(`Type: ${obj.type}`);
    console.log(`Version: ${obj.version}`);
    console.log(`Authors: ${obj.authors.join(", ")}`);
    console.log(`Legacy ID: ${obj.legacyIdentifier}`);
}

List Objects by Type

function getObjectsByType(type) {
    return objectManager.installedObjects.filter(obj => obj.type === type);
}

// Get all scenery groups
const sceneryGroups = getObjectsByType("scenery_group");
console.log(`Found ${sceneryGroups.length} scenery groups`);

// Get all footpath types
const footpaths = getObjectsByType("footpath");
console.log(`Found ${footpaths.length} footpath types`);

Plugin: Auto-Load Required Objects

// Plugin that ensures required objects are loaded
const REQUIRED_OBJECTS = [
    "rct2.ride.bmvd",
    "rct2.scenery.tl0",
    "rct2.footpath.tarmac"
];

function ensureObjectsLoaded() {
    const toLoad = [];
    
    REQUIRED_OBJECTS.forEach(id => {
        const obj = objectManager.getInstalledObject(id);
        if (obj) {
            toLoad.push(id);
        } else {
            console.log(`Warning: Required object ${id} is not installed`);
        }
    });
    
    if (toLoad.length > 0) {
        const results = objectManager.load(toLoad);
        console.log(`Loaded ${results.filter(r => r !== null).length}/${toLoad.length} objects`);
    }
}

// Load objects when park opens
context.subscribe("map.load", () => {
    ensureObjectsLoaded();
});

Notes

  • Object identifiers follow the format source.type.id (e.g., “rct2.ride.twist1”)
  • Loading objects may fail if the object type doesn’t match the index slot
  • Unloading objects that are in use may cause issues; ensure nothing in the park uses the object first
  • Some objects are built-in and cannot be unloaded
In multiplayer, only the server can load and unload objects. Changes will be synchronized to all clients.
  • Context API - Subscribe to map.load events
  • Map API - Interact with placed objects in the park
  • Rides API - Work with loaded ride instances

Build docs developers (and LLMs) love