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
Notebook Tests

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 Extensionsgameplayrallynotebooktest

Notebook Tests

Unit tests for notebook structured data serialization and deserialization. Validates that structured pacenote fields survive round-trip save/load.

Unit tests for notebook structured data serialization and deserialization. Validates that structured pacenote fields survive round-trip save/load.


Extension Name

gameplay_notebook_test_testNotebook

Usage

-- Run from game Lua console:
extensions.unload("gameplay_notebook_test_testNotebook")
extensions.load("gameplay_notebook_test_testNotebook")
gameplay_notebook_test_testNotebook.testAll()

Exports

FunctionSignatureDescription
M.testAll()Runs all notebook tests

Test Cases

testStructured_deserialize

Loads a test notebook (test_v3_1.notebook.json) and verifies that corner_degrees is -42 on the first pacenote's structured fields.

testStructured_serialize

  1. Loads the test notebook
  2. Modifies corner_degrees to 55 on the first pacenote
  3. Saves to an output file
  4. Re-loads the original file - verifies it still has -42 (not mutated)
  5. Re-loads the output file - verifies it has 55 (properly saved)

Internals

Test Infrastructure

-- Simple assertEqual with pass/fail counting
local assertCounts = { total = 0, passed = 0, failed = 0 }

local function assertEqual(message, actual, expected)
  -- Increments counters, logs pass/fail, errors on failure
end

Notebook Loading

local function loadNotebook(notebookFname)
  local json = jsonReadFile(notebookFname)
  local notebook = require('/lua/ge/extensions/gameplay/rally/notebook/path')()
  notebook:setFname(notebookFname)
  notebook:onDeserialized(json)
  return notebook
end

Test Data Files

  • Input: /gameplay/missions/driver_training/rallyStage/aip-test3/rally/notebooks/test_v3_1.notebook.json
  • Output: /gameplay/missions/driver_training/rallyStage/aip-test3/rally/notebooks/test_v3_1_out.notebook.json

See Also

  • Gameplay Systems Guide - Guide

Visual Compositor

Generates visual pacenote icon data for the HUD display. Converts structured pacenote attributes (corner severity, modifiers, cautions) into icon descriptions consumed by the CEF UI layer.

Cuts Recording

Loads recce cut recordings and their associated speech-to-text transcripts from JSONL files. Cuts are waypoint markers where the co-driver made voice recordings during reconnaissance.

On this page

Extension NameUsageExportsTest CasestestStructured_deserializetestStructured_serializeInternalsTest InfrastructureNotebook LoadingTest Data FilesSee Also