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
Locations DetectorMission ManagerMissionsMission Screen UIPOI TestProgressMission Start TriggerUnlocks
Career ConditionsGeneric ConditionsMission ConditionsVehicle Conditions

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 Extensionsgameplaymissionsunlocksconditions

Mission Conditions

Reference for mission-progress-based unlock condition types used by the mission unlock system.

Reference for mission-progress-based unlock condition types used by the mission unlock system.


Condition Types

missionPassed

Requires another mission to have been passed (at least 1 default star earned).

FieldTypeDescription
missionIdstringTarget mission ID
progressKeystringProgress key: "default", "any", "", or specific key
M.missionPassed = {
  info = 'The user has to have passed another mission.',
  editorFunction = "displayMissionCondition",
  getLabel = function(self)
    return F.getTargetLabel(self.missionId, self.progressKey, 'pass')
  end,
  conditionMet = function(self)
    return F.checkAggregateWithKey(self.missionId, self.progressKey, 'passed')
  end
}

missionCompleted

Requires another mission to have been completed (all default + bonus stars earned).

FieldTypeDescription
missionIdstringTarget mission ID
progressKeystringProgress key: "default", "any", "", or specific key
M.missionFunctionvalue-
M.missionCompleted = {
  info = 'The user has to have completed another mission.',
  editorFunction = "displayMissionConditionWithProgressKey",
  getLabel = function(self)
    return F.getTargetLabel(self.missionId, self.progressKey, 'complete')
  end,
  conditionMet = function(self)
    return F.checkAggregateWithKey(self.missionId, self.progressKey, 'completed')
  end
}

Helper Functions (F)

checkAggregateWithKey

F.checkAggregateWithKey = function(id, progressKey, field)
  -- Resolves progressKey:
  --   "default" / nil / "" → mission.defaultProgressKey
  --   "any" → checks ALL progress keys
  --   other → specific key
  -- Returns true if aggregate[field] is truthy for any resolved key
end

getTargetLabel

F.getTargetLabel = function(id, progressKey, verb)
  -- Returns localized label based on progressKey:
  --   default → "missions.missions.unlock.{verb}.default" + {name}
  --   any     → "missions.missions.unlock.{verb}.any" + {name}
  --   other   → "missions.missions.unlock.{verb}.custom" + {name, setting}
end

Key Behaviors

  • These are the primary conditions used in startCondition to create mission chains/dependencies
  • passed checks aggregate.passed (true if bestType is "passed" or "completed")
  • completed checks aggregate.completed (true if bestType is "completed")
  • When progressKey = "any", iterates all progress keys - useful for missions with multiple configurations
  • Missing missions log an error but return false
  • Used by gameplay_missions_unlocks.getMissionsForCondition() to build forward/backward dependency links

See Also

  • unlocks/conditions/careerConditions - Career Branch & League Conditions - Related reference
  • unlocks/conditions/genericConditions - Generic Logic Conditions - Related reference
  • unlocks/conditions/vehicleConditions - Vehicle-Based Conditions - Related reference
  • Gameplay Systems Guide - Guide

Generic Conditions

Reference for generic logic condition types used by the mission unlock system.

Vehicle Conditions

Reference for vehicle-based unlock condition types used by the mission unlock system.

On this page

Condition TypesmissionPassedmissionCompletedHelper Functions (F)checkAggregateWithKeygetTargetLabelKey BehaviorsSee Also