RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

server/commands - Camera & Input Commandsge_utils - Game Engine Utility Functionsmain.lua - GE Lua Entry Point & Game Loopmap.lua - Navigation Graph (AI Road Map)screenshot.lua - Screenshot Systemserver/server - Level Loading & Game ServerserverConnection - Client-Server Connection Manager`setSpawnpoint` - Default Spawn Point Persistence`simTimeAuthority` - Simulation Time & Bullet Time Control`spawn` - Vehicle Spawning & Safe Placement`suspensionFrequencyTester` - Suspension Natural Frequency Analysis
Campaign SystemCampaign LoaderCampaign ComicsCampaign DealerCampaign ExplorationCampaign Photo SafariCampaign Rewards

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 Extensionscampaign

Campaign Rewards

Processes and distributes rewards from campaign scenarios - items, vehicles, and player choices.

Processes and distributes rewards from campaign scenarios - items, vehicles, and player choices.


Module Info

FieldValue
Pathextensions/campaign/rewards.lua
Globalcampaign_rewards
TypeExtension

Public API

FunctionSignatureDescription
iterateRewardsConst(player, callback)Iterates all inventory rewards for a player via callback(key, value)
getRewards(scenarioKey, scenarioData, scenarioResult, medal)Extracts reward data from scenario result. Filters by medal rank if given
processRewards(scenarioKey, scenarioData, scenarioResult, medal)Processes & distributes rewards: adds items to inventory, handles user choice items
processUserSelection(scenarioKey, selectionIndex)Finalizes a pending user choice reward - adds selection to inventory, sends rest to dealer
getScenarioReward(scenarioData, eventName)(Stub) Returns scenario reward data for an event name. Currently commented out

State

FieldTypeDescription
M.pendingUserChoicestableKeyed by scenarioKey - stores pending choice arrays waiting for player selection

Reward Flow

scenarioResult → getRewards() → processRewards()
                                   ├─ direct rewards → core_inventory.addItem()
                                   └─ choice rewards → M.pendingUserChoices[key]
                                                           └─ processUserSelection(key, idx)
                                                                ├─ selected → core_inventory.addItem()
                                                                └─ others  → campaign_dealer.addToStock()

Usage Example

-- Process scenario completion rewards
local rewards = campaign_rewards.processRewards(
  "scenario_race01",
  scenarioData,
  {failed = false},
  "gold"
)

-- Handle user vehicle choice (index 2 selected)
campaign_rewards.processUserSelection("scenario_race01", 2)

See Also

  • core_inventory - Item storage
  • campaign_dealer - Auto dealer stock
  • statistics_statistics - Medal ranking helpers

Additional Exports

  • M.getRewards - (undocumented)
  • M.getScenarioReward - (undocumented)
  • M.iterateRewardsConst - (undocumented)
  • M.processRewards - (undocumented)
  • M.processUserSelection - (undocumented)

Campaign Photo Safari

Photo safari mission system for campaign exploration. Players drive to locations, enter photo mode, and capture specific objects within camera constraints.

Career Branches

Manages the career progression hierarchy: domains → branches → skills. Loads branch definitions from `/gameplay/domains/`, computes levels, XP, unlocks, and ordering.

On this page

Module InfoPublic APIStateReward FlowUsage ExampleSee AlsoAdditional Exports