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
Career BranchesCareer System CoreCareer Save System

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 Extensionscareer

Career Branches

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

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


Module Info

FieldValue
Pathextensions/career/branches.lua
Globalcareer_branches
TypeExtension

Internal State

FieldTypeDescription
M.oldAttributeNamesToNewNamestableMaps legacy branch names to new path-based names (e.g. "drift" → "bmra-drift")
M.newAttributeNamesToOldNamestableReverse mapping of oldAttributeNamesToNewNames

Public API

FunctionSignatureDescription
getBranches()Returns all branches in a dict by ID. Lazy-loads and caches from /gameplay/domains/
getBranchById(id)Alias for getBranchByPath(id)
getBranchByPath(pathId)Looks up a branch by its path-based ID. Falls back to legacy name mapping
getBranchByDomainBranchSkill(domainId, branchId, skillId)Builds a path ID from domain/branch/skill and looks up
getSortedBranches()Returns branches sorted by hierarchical order
getBranchLevel(id)Returns current level for a branch from player attributes
getBranchLevelByPath(pathId)Same as getBranchLevel but takes a pathId
getBranchXP(id)Returns current XP value for a branch
getXPNeededForLevel(id, level)Returns requiredValue for a given level
getBranchIcon(id)Returns icon string for a branch
getLevelLabel(id, level)Returns display label for a branch level
getLevelRewardMultiplier(id)Returns reward multiplier for current level of a branch
getBranchSimpleInfo(id)Returns compact info: label, level, icon, progress, max
calcBranchLevelFromValue(val, id)Calculates level from XP value. Returns level, curLvlProgress, neededForNext, prevThreshold, nextThreshold
orderAttributeKeysByBranchOrder(list)Sorts attribute keys by branch display order
orderBranchNamesKeysByBranchOrder(list)Sorts branch name keys by order
expandUnlocks(skill, level, unlocks)Expands automatic unlock entries (e.g., mission counts)
checkUnlocks()Re-evaluates unlock conditions for all branches
extractBranchPathIdFromFilePath(filePath)Extracts a branch pathId from a file system path
getOrder(key)Returns sort order for an attribute key

Hooks

HookDescription
onSaveCurrentSaveSlotSaves branch unlock state to branchUnlocks.json
onCareerModulesActivatedLoads saved unlock data
onGetUnlockFlagDefinitionsRegisters unlock flag definitions for all branch levels and certifications
onPlayerAttributesChanged(registered but defined externally)

Branch Hierarchy

Domain (e.g. "apm")
  └─ Branch (e.g. "apm-motorsport")
       └─ Skill (e.g. "apm-motorsport-timeTrials")

Each branch has: isDomain, isBranch, isSkill, parentId, parentDomain, parentBranch.


Legacy Name Mapping

oldAttributeNamesToNewNames maps old names like "drift" → "bmra-drift", "delivery" → "logistics-delivery".


Usage Example

-- Get branch level
local level = career_branches.getBranchLevel("logistics-delivery")

-- Get XP progress
local xp = career_branches.getBranchXP("logistics-delivery")

-- Calculate level from arbitrary value
local lvl, progress, needed = career_branches.calcBranchLevelFromValue(250, "logistics-delivery")

-- Get sorted branches for UI display
for _, branch in ipairs(career_branches.getSortedBranches()) do
  print(branch.name, branch.id)
end

See Also

  • career_modules_playerAttributes - XP values
  • career_modules_unlockFlags - Flag-based unlock conditions
  • gameplay_missions_missions - Mission data for automatic unlocks

Additional Exports

Functions

FunctionDescription
M.getOrder(key)No description available

Values/Properties

ExportDescription
M.calcBranchLevelFromValueValue: calcBranchLevelFromValue
M.checkUnlocksValue: checkUnlocks
M.expandUnlocksValue: expandUnlocks
M.extractBranchPathIdFromFilePathValue: extractBranchPathIdFromFilePath
M.getBranchByDomainBranchSkillValue: getBranchByDomainBranchSkill
M.getBranchByIdValue: getBranchById
M.getBranchByPathValue: getBranchByPath
M.getBranchIconValue: getBranchIcon
M.getBranchLevelValue: getBranchLevel
M.getBranchLevelByPathValue: getBranchLevelByPath
M.getBranchSimpleInfoValue: getBranchSimpleInfo
M.getBranchXPValue: getBranchXP
M.getBranchesValue: getBranches
M.getLevelLabelValue: getLevelLabel
M.getLevelRewardMultiplierValue: getLevelRewardMultiplier
M.getSortedBranchesValue: getSortedBranches
M.getXPNeededForLevelValue: getXPNeededForLevel
M.onCareerModulesActivatedValue: onCareerModulesActivated
M.onGetUnlockFlagDefinitionsValue: onGetUnlockFlagDefinitions
M.onPlayerAttributesChangedValue: onPlayerAttributesChanged
M.onSaveCurrentSaveSlotValue: onSaveCurrentSaveSlot
M.orderAttributeKeysByBranchOrderValue: orderAttributeKeysByBranchOrder
M.orderBranchNamesKeysByBranchOrderValue: orderBranchNamesKeysByBranchOrder

Campaign Rewards

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

Career System Core

M.dependencies = {'career_saveSystem', 'core_recoveryPrompt', 'gameplay_traffic'}

On this page

Module InfoInternal StatePublic APIHooksBranch HierarchyLegacy Name MappingUsage ExampleSee AlsoAdditional ExportsFunctionsValues/Properties