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
Crash Test BoundariesCrash Test CountdownCrash Test ScoringCrash Test Task ListCrash Test Scenario Manager

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 ExtensionsgameplaycrashTest

Crash Test Task List

Reference for `gameplay_crashTest_crashTestTaskList`, which manages the in-game task list UI for crash test missions, showing step objectives and their completion status.

Reference for gameplay_crashTest_crashTestTaskList, which manages the in-game task list UI for crash test missions, showing step objectives and their completion status.


Overview

This extension builds and updates task list entries displayed to the player during crash test missions. Each step becomes a task with a label describing the objective and a subtext with specific requirements (speed, damage, etc.).


Exports

FunctionSignatureDescription
setCrashTestDataAndInit(crashTestData)Initialize the task list with all step data
onNewCrashTestStep(stepData)Mark a step as the active task
onCrashTestStepFailed(stepData)Mark a step as failed
finishedCurrentTask(stepData)Mark a step as completed
reset()Clear all tasks from the UI
onExtensionUnloaded()Cleanup on extension unload

Internals

Task Label Building

Labels are generated based on the step's objective:

  • "Simple crash" → "Step N: Crash into the marked target(s)"
  • "Crash target vehicle into target area" → "Step N: Redirect the target into the highlighted area"

Task Subtext Building

Subtexts combine speed requirements and damage conditions:

  • Speed: "At 80 km/h" (translated to user's unit preference)
  • Damage conditions like "Minimize damage", "At least Moderate damage", "Maximize damage"

How It Works

  1. setCrashTestDataAndInit() stores the step data, sets the header, and shows the first task
  2. As steps progress, onNewCrashTestStep() activates each step in the task list
  3. finishedCurrentTask() marks steps as done (green checkmark)
  4. onCrashTestStepFailed() marks steps as failed (red X)
-- Initialize with sanitized step data
gameplay_crashTest_crashTestTaskList.setCrashTestDataAndInit(sanitizedStepsData)

-- When a step is completed
gameplay_crashTest_crashTestTaskList.finishedCurrentTask(currentStepData)

-- When a step fails
gameplay_crashTest_crashTestTaskList.onCrashTestStepFailed(currentStepData)

GUI Hooks Used

HookPurpose
SetTasklistHeaderSets the header: "Crash analysis steps"
SetTasklistTaskCreates/updates individual task entries
M.finishedCurrentTask(stepData)
M.onCrashTestStepFailed(stepData)
M.onExtensionUnloaded()
M.onNewCrashTestStep(stepData)
M.reset()
M.setCrashTestDataAndInit(crashTestData_)

Each task uses type = "goal" and is identified by the player vehicle ID for that step.


Key Behaviors

  • Only the first task is shown on initialization; subsequent tasks appear as steps progress
  • Task IDs are derived from the player vehicle ID (stepData.plVehId)
  • The attention flag highlights the current active task
  • Clearing a task sets clear = true on the SetTasklistTask trigger

See Also

  • crashTestBoundaries - Crash Test Boundary Checking - Related reference
  • crashTestCountdown - Crash Test Countdown Timer - Related reference
  • crashTestScoring - Crash Test Score Calculation - Related reference
  • Gameplay Systems Guide - Guide

Crash Test Scoring

Reference for `gameplay_crashTest_crashTestScoring`, which calculates and aggregates scores for crash test mission steps based on time, speed, damage, and impact location accuracy.

Crash Test Scenario Manager

Reference for `gameplay_crashTest_scenarioManager`, the main orchestrator for crash test missions. Manages multi-step crash test scenarios including vehicle setup, AI control, crash detection, scoring

On this page

OverviewExportsInternalsTask Label BuildingTask Subtext BuildingHow It WorksGUI Hooks UsedKey BehaviorsSee Also