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

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

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 legacy migration.


Constructor

local Structured = require('gameplay/rally/notebook/structured')
local s = Structured()

Public API

MethodSignatureReturnsDescription
init()nilInitializes all fields to schema defaults
onDeserialized(data)nilLoads from saved data with legacy migrations
onSerialize()tableReturns the fields table

Internals

Fields

The self.fields table maps field names to values, initialized from Schema.initDefaultFields:

{
  cornerSeverity = -1,       -- -1 to 100 (severity rating)
  cornerDirection = 0,       -- -1=left, 0=straight, 1=right
  cornerLength = 50,         -- 0-100 normalized
  cornerRadiusChange = 50,   -- 0-100 normalized
  cornerSquare = false,      -- special square corner type
  caution = 0,               -- 0=none, 1/2/3=caution levels
  modDontCut = false,
  modNarrows = false,
  modWater = false,
  modBumpy = false,
  modBump = false,
  modJump = false,
  modCrest = false,
  finishLine = false
}

Legacy Migrations (onDeserialized)

Legacy ValueMigration
cornerSeverity == 0→ -1 (unset)
cornerLength == 0 or 20→ 50 (normal)
cornerRadiusChange == 0 or 20→ 50 (normal)
modCaution / modCaution1→ caution = 1
modCaution2→ caution = 2
modCaution3→ caution = 3
modBumps→ modBumpy = true

Type Coercion

During deserialization, number and enum schema types are forced through tonumber() to handle string-encoded values from JSON.


How It Works

  1. Each pacenote contains one Structured instance at pacenote.structured
  2. Fields represent the machine-readable description of the corner/note
  3. The text compositor reads these fields to generate human-readable note strings
  4. The visual compositor reads these fields to generate HUD display elements
  5. Legacy data from older notebook versions is automatically migrated on load

Usage Example

local Structured = require('gameplay/rally/notebook/structured')
local s = Structured()

-- Set corner data
s.fields.cornerSeverity = 40
s.fields.cornerDirection = 1  -- right
s.fields.cornerLength = 30    -- short-ish
s.fields.modCrest = true

-- Serialize
local data = s:onSerialize()
-- { cornerSeverity=40, cornerDirection=1, cornerLength=30, modCrest=true, ... }

-- Deserialize (with legacy migration)
local s2 = Structured()
s2:onDeserialized(data)

See Also

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

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,

System Pacenotes

Legacy module for defining static co-driver pacenotes (countdown, finish, damage, first-note intro/outro). **Entirely commented out** - system pacenotes are now defined in compositor config files inst

On this page

ConstructorPublic APIInternalsFieldsLegacy Migrations (onDeserialized)Type CoercionHow It WorksUsage ExampleSee Also