Rides are attractions in the park. Access them through the map object or by ID.
Accessing Rides
// Get all rides
const allRides = map.rides;
// Get ride by ID
const ride = map.getRide(0);
// Get number of rides
console.log(`Total rides: ${map.numRides}`);
Basic Properties
The unique ID/index of the ride.console.log(`Ride ID: ${ride.id}`);
The generated or custom name of the ride.ride.name = 'Awesome Coaster';
console.log(`Ride: ${ride.name}`);
The type of the ride represented as the internal built-in ride type ID.console.log(`Ride type: ${ride.type}`);
Whether the ride is a ride, shop, or facility.
Can be: "ride", "stall", "facility"if (ride.classification === 'ride') {
console.log('This is a ride attraction');
}
The object metadata for this ride.console.log(`Object: ${ride.object.name}`);
console.log(`Description: ${ride.object.description}`);
Status
The current status of the ride.
Can be: "closed", "open", "testing", "simulating"console.log(`Status: ${ride.status}`);
Various flags related to the operation of the ride.console.log(`Flags: ${ride.flags}`);
The operation mode of the ride.ride.mode = 0; // Change operation mode
Flags related to how trains depart.
Timing
The minimum time a train will wait at the station before departing.ride.minimumWaitingTime = 10;
The maximum time a train will wait at the station before departing.ride.maximumWaitingTime = 60;
Ratings
The excitement metric (2 decimal point fixed integer).
For example, 652 equals 6.52.console.log(`Excitement: ${(ride.excitement / 100).toFixed(2)}`);
The intensity metric (2 decimal point fixed integer).console.log(`Intensity: ${(ride.intensity / 100).toFixed(2)}`);
The nausea metric (2 decimal point fixed integer).console.log(`Nausea: ${(ride.nausea / 100).toFixed(2)}`);
The satisfaction rating from 0 to 100.console.log(`Satisfaction: ${ride.satisfaction}%`);
Financial
The admission price for the ride and the price of the on-ride photo, or the cost of each item of the stall.ride.price[0] = 500; // Set ride price to £5.00
console.log(`Price: £${(ride.price[0] / 10).toFixed(2)}`);
The running cost of the ride billed every fortnight.
Multiply by 16 to get cost per hour (~1 year).const yearCost = ride.runningCost * 16;
console.log(`Annual cost: £${(yearCost / 10).toFixed(2)}`);
The total profit of the ride over its lifetime.console.log(`Total profit: £${(ride.totalProfit / 10).toFixed(2)}`);
The value of the ride.console.log(`Value: £${(ride.value / 10).toFixed(2)}`);
Statistics
The total number of customers the ride has served since it was built.console.log(`Total customers: ${ride.totalCustomers}`);
The date in months when the ride was built.
Subtract from date.monthsElapsed to get the age.const ageInMonths = date.monthsElapsed - ride.buildDate;
console.log(`Age: ${ageInMonths} months`);
How old the ride is in months.console.log(`Age: ${ride.age} months`);
The percentage of downtime from 0 to 100.console.log(`Downtime: ${ride.downtime}%`);
The max speed in miles per hour.console.log(`Max speed: ${ride.maxSpeed} mph`);
The average speed in miles per hour.console.log(`Avg speed: ${ride.averageSpeed} mph`);
The ride time in seconds.const minutes = Math.floor(ride.rideTime / 60);
const seconds = ride.rideTime % 60;
console.log(`Ride time: ${minutes}:${seconds.toString().padStart(2, '0')}`);
Total length of the ride in meters.
Use context.formatString('{LENGTH}', ride.rideLength) to convert to localized units.console.log(`Length: ${ride.rideLength}m`);
The max positive vertical Gs.console.log(`Max positive G: ${ride.maxPositiveVerticalGs.toFixed(2)}`);
The max negative vertical Gs.console.log(`Max negative G: ${ride.maxNegativeVerticalGs.toFixed(2)}`);
The max lateral Gs.console.log(`Max lateral G: ${ride.maxLateralGs.toFixed(2)}`);
The total airtime in seconds.console.log(`Airtime: ${ride.totalAirTime}s`);
The number of drops.console.log(`Drops: ${ride.numDrops}`);
The number of lift hills.console.log(`Lift hills: ${ride.numLiftHills}`);
Highest drop height in height units.
Use context.formatString('{HEIGHT}', ride.highestDropHeight) to convert to meters/feet.console.log(`Highest drop: ${ride.highestDropHeight} units`);
Chain Lift
The currently set chain lift speed in miles per hour.
Use context.formatString('{VELOCITY}', ride.liftHillSpeed) for localized value.ride.liftHillSpeed = 8; // Set to 8 mph
The max chain lift speed for this ride in mph.console.log(`Max lift speed: ${ride.maxLiftHillSpeed} mph`);
The min chain lift speed for this ride in mph.console.log(`Min lift speed: ${ride.minLiftHillSpeed} mph`);
Vehicles
The head vehicle IDs associated with the ride, one for each train.console.log(`Trains: ${ride.vehicles.length}`);
ride.vehicles.forEach((vehicleId, i) => {
const vehicle = map.getEntity(vehicleId);
console.log(`Train ${i + 1}: ${vehicle.status}`);
});
The colour for each vehicle when the ride opens.
Modifying this won’t change currently running trains.ride.vehicleColours[0] = {
body: 10,
trim: 20,
tertiary: 30
};
Appearance
The track colour schemes for the ride.ride.colourSchemes[0] = {
main: 5,
additional: 10,
supports: 15
};
The style used for the station, entrance, and exit building.
The music track to play at each station.
Stations
Information about each station.ride.stations.forEach((station, i) => {
console.log(`Station ${i + 1}:`);
console.log(` Start: (${station.start.x}, ${station.start.y}, ${station.start.z})`);
console.log(` Length: ${station.length}`);
});
Each station has:
start - Start coordinates (CoordsXYZ)
length - Length of the station
entrance - Entrance coordinates and direction (CoordsXYZD)
exit - Exit coordinates and direction (CoordsXYZD)
Maintenance
How often the ride should be inspected by a mechanic.ride.inspectionInterval = 2; // Inspect every 20 minutes
The current breakdown of the ride.
Can be: “brakes_failure”, “control_failure”, “doors_stuck_closed”, “doors_stuck_open”, “restraints_stuck_closed”, “restraints_stuck_open”, “safety_cut_out”, “vehicle_malfunction”if (ride.breakdown) {
console.log(`Breakdown: ${ride.breakdown}`);
}
setBreakdown()
Sets a breakdown on a ride.
The type of breakdown to set.
ride.setBreakdown('brakes_failure');
fixBreakdown()
Fixes a ride and clears the breakdown.
ride.fixBreakdown();
console.log('Ride fixed!');
Usage Examples
function displayRideInfo(ride) {
console.log(`=== ${ride.name} ===`);
console.log(`Type: ${ride.classification}`);
console.log(`Status: ${ride.status}`);
console.log(`Ratings:`);
console.log(` Excitement: ${(ride.excitement / 100).toFixed(2)}`);
console.log(` Intensity: ${(ride.intensity / 100).toFixed(2)}`);
console.log(` Nausea: ${(ride.nausea / 100).toFixed(2)}`);
console.log(`Satisfaction: ${ride.satisfaction}%`);
console.log(`Total Customers: ${ride.totalCustomers}`);
console.log(`Age: ${ride.age} months`);
console.log(`Value: £${(ride.value / 10).toFixed(2)}`);
}
Find Best Rides
function findBestRides() {
const rides = map.rides
.filter(r => r.classification === 'ride')
.sort((a, b) => b.excitement - a.excitement);
console.log('=== Top 5 Rides by Excitement ===');
rides.slice(0, 5).forEach((ride, i) => {
console.log(`${i + 1}. ${ride.name}: ${(ride.excitement / 100).toFixed(2)}`);
});
}
Auto-Fix Broken Rides
context.subscribe('interval.day', () => {
map.rides.forEach(ride => {
if (ride.breakdown) {
console.log(`Auto-fixing ${ride.name}`);
ride.fixBreakdown();
}
});
});
Profit Report
function profitReport() {
const rides = map.rides.filter(r => r.classification === 'ride');
let totalProfit = 0;
rides.forEach(ride => {
totalProfit += ride.totalProfit;
});
console.log('=== Profit Report ===');
console.log(`Total profit: £${(totalProfit / 10).toFixed(2)}`);
const sorted = rides.sort((a, b) => b.totalProfit - a.totalProfit);
sorted.slice(0, 5).forEach(ride => {
console.log(`${ride.name}: £${(ride.totalProfit / 10).toFixed(2)}`);
});
}
Set All Ride Prices
function setPrices() {
map.rides.forEach(ride => {
if (ride.classification === 'ride') {
const excitement = ride.excitement / 100;
ride.price[0] = Math.floor(excitement * 100); // Price based on excitement
console.log(`${ride.name}: £${(ride.price[0] / 10).toFixed(2)}`);
}
});
}