RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Gameplay AchievementGameplay CityDiscoverForce FieldGarage ModeMarker InteractionParking SystemGameplay Playmode MarkersGameplay PoliceGameplay RallyGameplay Rally LoopGameplay Raw POIsGameplay Skidpad TestSpeed Trap LeaderboardsSpeed Traps and CamerasGameplay StatisticsTaxi Ride SystemTraffic SystemVehicle PerformanceWalking
Rally Audio ManagerRally Camera Path PlayerRally ClientRally Cut CaptureRally EnumsRally Extension HelperRally GeometryRally ManagerRecce ManagerRecce AppRecce SettingsRally Settings ManagerSnap-to-RoadTraffic Exclusion ZonesRally UtilityRally Vehicle CaptureRally Vehicle Tracker
Rally CodriverRally Mission SettingsRally PacenotePacenote GeneratorPacenote WaypointNotebook PathStructured Pacenote DataSystem PacenotesWaypoint Types

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionsgameplayrallynotebook

Rally Codriver

Class representing a rally co-driver within a notebook. Each codriver has a name, language, voice setting, and unique persistent key (pk). Codrivers determine which language and voice are used for pac

Class representing a rally co-driver within a notebook. Each codriver has a name, language, voice setting, and unique persistent key (pk). Codrivers determine which language and voice are used for pacenote audio playback.


Constructor

local Codriver = require('gameplay/rally/notebook/codriver')
local cd = Codriver(notebook, name, forceId)
ParameterTypeDescription
notebookobjectParent notebook instance
namestring?Display name (defaults to "Codriver {id}" or default codriver name)
forceIdnumber?Override auto-generated ID

Public API

MethodSignatureReturnsDescription
init(notebook, name, forceId)nilSets up codriver with defaults from rallyUtil
onSerialize()tableReturns serializable data (oldId, name, language, voice, pk)
onDeserialized(data, oldIdMap)nilRestores codriver from saved data

Internals

Fields

FieldTypeDefaultDescription
idnumberautoUnique ID within notebook
namestring"Codriver {id}"Display name
languagestringrallyUtil.default_codriver_languageLanguage code
voicestringrallyUtil.default_codriver_voiceVoice identifier
pkstringrallyUtil.randomId()Persistent key (survives re-indexing)
sortOrdernumber999999Sort position in codriver list

Serialization

If the notebook has no codrivers, the first one created uses rallyUtil.defaultCodriverName. The pk field is generated on creation and preserved through serialize/deserialize cycles. Legacy data without pk gets a new random ID on deserialization.


How It Works

  1. Created by the notebook's sortedList system via notebook.codrivers:create()
  2. Each codriver defines a language + voice combination for pacenote TTS
  3. The active codriver is selected via missionSettings using the codriver's pk
  4. Serialized into the notebook JSON file alongside pacenotes

Usage Example

-- Create a new codriver in a notebook
local cd = notebook.codrivers:create("My Codriver")
cd.language = "english"
cd.voice = "voice_01"

-- Use this codriver
notebook:useCodriver(cd)

-- Serialize
local data = cd:onSerialize()
-- { oldId=1, name="My Codriver", language="english", voice="voice_01", pk="abc123" }

See Also

  • Rally Mission Settings - Related reference
  • Rally Pacenote - Related reference
  • Pacenote Generator - Related reference
  • Gameplay Systems Guide - Guide

Staged Countdown Utilities

Shared utility functions for the staged countdown system. Provides debug drawing helpers (plane visualization, vehicle-to-plane distance, vehicle point), vehicle freeze/unfreeze controls, and ImGui de

Rally Mission Settings

Class managing per-mission rally settings stored as a JSON file alongside mission data. Handles notebook filename selection, codriver selection, and persistence. Auto-creates defaults if the settings

On this page

ConstructorPublic APIInternalsFieldsSerializationHow It WorksUsage ExampleSee Also