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

Notebook Path

Core class representing a rally notebook - the container for pacenotes, codrivers, and all rally authoring data. Manages saving/loading from JSON, codriver selection, audio mode, pacenote generation,

Core class representing a rally notebook - the container for pacenotes, codrivers, and all rally authoring data. Manages saving/loading from JSON, codriver selection, audio mode, pacenote generation, distance call autofill, debug drawing, and text/visual compositors.


Constructor

local Notebook = require('gameplay/rally/notebook/path')
local nb = Notebook(name)

Public API (Key Methods)

Lifecycle

MethodSignatureReturnsDescription
save(fname?)booleanSaves notebook to JSON file
reload()nilReloads from current filename
setFname(newFname)nilSets the file path

Codrivers

MethodSignatureReturnsDescription
selectedCodriver()objectReturns active codriver from mission settings
selectedCodriverLanguage()stringLanguage of active codriver
useCodriver(codriver)nilSets active codriver by pk in mission settings
getCodriverByPk(pk)object|nilFinds codriver by persistent key
getCodriverByName(name)object|nilFinds codriver by name
getFirstCodriver()objectReturns first codriver in sorted list
getLanguages()tableReturns unique languages with associated codrivers

Pacenotes

MethodSignatureReturnsDescription
hasAnyPacenotes()booleanTrue if notebook has pacenotes
deleteAllPacenotes()nilRemoves all pacenotes
appendPacenotes(pacenotes)nilAdds pacenotes from serialized data
generatePacenotes(corners)nilCreates pacenotes from detected corners
autofillDistanceCalls()nilComputes between-pacenote distance calls
cacheCompiledPacenotes()nilPre-compiles all pacenotes for playback
sortPacenotesByName()nilSorts pacenotes by numeric name suffix
cleanupPacenoteNames()nilRe-indexes pacenote names sequentially

Audio

MethodSignatureReturnsDescription
getAudioMode()enumNotebook-level audio mode
setAudioMode(mode)nilSets audio mode
getTextCompositor()objectReturns language-specific text compositor
getVisualCompositor2()objectReturns visual compositor for HUD

Drawing

MethodSignatureReturnsDescription
drawDebugNotebook(toolsState, opacity)nilDraws all pacenotes with selection context
drawDebugNotebookForPartitionAllSnaproad(toolsState, opacity)nilDraws for snaproad partitioning mode

Mission Integration

MethodSignatureReturnsDescription
getMissionDir()string|nilExtracts mission directory from notebook path
getMissionId()string|nilExtracts mission ID (e.g., "gridmap_v2/rallyStage/test")
missionSettings()objectReturns (cached) MissionSettings instance

Internals

File Format (v3)

{
  name = "Primary",
  version = "3",
  description = "",
  authors = "",
  created_at = timestamp,
  updated_at = timestamp,
  audioMode = enum,
  codrivers = { ... },      -- serialized sortedList
  pacenotes = { ... },      -- serialized sortedList
  systemPacenotes = { ... } -- auto-generated from text compositor
}

Autofill Distance Calls

Iterates sorted pacenotes, computing driveline distance between consecutive CE→CS waypoints:

  • Short distances → shorthand text (e.g., "into", "and")
  • Normal distances → numeric string (e.g., "50")
  • Respects isolate and ignoreDistanceCalls flags
  • Uses autofill_blocker sentinel to prevent auto-fill

Pacenote Generation

generatePacenotes(corners) pipeline:

  1. Clears existing pacenotes
  2. Creates pacenote + CS/CE waypoints for each non-straight corner
  3. Sets waypoint normals from snaproad if available
  4. Sorts and cleans up names
  5. Autofills distance calls

Drawing Modes

  • No selection: All pacenotes as rainbow-colored spheres
  • Selected: Full detail on selected + background context for neighbors
  • Partitioned: All pacenotes with adjacent styling for snaproad editing

Version Migration

V2→V3 upgrade converts notes[lang].note from string to {freeform, structured} object and runs autofill.


How It Works

  1. Notebook is the top-level container loaded from *.notebook.json
  2. Contains codrivers (language/voice configs) and pacenotes (notes + waypoints)
  3. Active codriver determines language for text/audio composition
  4. Text compositor converts structured fields → human-readable note strings
  5. Visual compositor generates HUD display data from structured fields
  6. System pacenotes (countdown, damage, etc.) are auto-generated from compositor config

Usage Example

local Notebook = require('gameplay/rally/notebook/path')
local nb = Notebook("My Rally")
nb:setFname("/path/to/primary.notebook.json")
nb:save()

-- Load and use
nb:reload()
local codriver = nb:selectedCodriver()
local lang = nb:selectedCodriverLanguage()

-- Generate pacenotes from corners
nb:generatePacenotes(detectedCorners)
nb:autofillDistanceCalls()
nb:cacheCompiledPacenotes()
nb:save()

See Also

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

Pacenote Waypoint

Class representing a waypoint within a pacenote. Each pacenote has typically two waypoints: a Corner Start (CS) and Corner End (CE). Waypoints define 3D positions with normals for intersection planes

Structured Pacenote Data

Class holding the structured (machine-readable) data for a single pacenote. Stores field values from the schema (corner severity, direction, length, modifiers, etc.) and handles serialization with leg

On this page

ConstructorPublic API (Key Methods)LifecycleCodriversPacenotesAudioDrawingMission IntegrationInternalsFile Format (v3)Autofill Distance CallsPacenote GenerationDrawing ModesVersion MigrationHow It WorksUsage ExampleSee Also