API ReferenceGE Extensionsgameplaymissionsunlocksconditions
Career Conditions
Reference for career-specific unlock condition types used by the mission unlock system.
Reference for career-specific unlock condition types used by the mission unlock system.
Condition Types
branchLevel
Requires the player to reach a specific level in a career branch.
| Field | Type | Description |
|---|---|---|
branchId | string | Career branch path identifier |
level | number | Required minimum level |
M.branchLevel = {
info = 'The user has to have a certain level in a career branch.',
editorFunction = "displayBranchLevel",
getLabel = function(self)
return {
txt = "missions.missions.unlock.attributeLevel.atLeast",
context = {
branchName = career_branches.getBranchByPath(self.branchId).name,
level = self.level
}
}
end,
conditionMet = function(self)
-- Always met if career is not active
return (not career_career) or (not career_career.isActive()) or (not career_branches)
or career_branches.getBranchLevelByPath(self.branchId) >= self.level
end
}league
Requires a specific league to be unlocked.
| Field | Type | Description |
|---|---|---|
leagueId | string | League identifier |
M.league = {
info = "The user has to have a league unlocked.",
editorFunction = "displayLeague",
getLabel = function(self) return "League" end,
conditionMet = function(self)
if not career_career.isActive() or not career_modules_branches_leagues then
return false
end
return career_modules_branches_leagues.isLeagueUnlocked(self.leagueId)
end
}Key Behaviors
branchLevelreturnstruewhen career is not active (non-career mode bypasses career conditions)leaguereturnsfalsewhen career is not active (leagues are career-only)- Both conditions are used in
startConditionandvisibleConditionof mission definitions branchLevelusescareer_branches.getBranchLevelByPath()for level comparison- Used by
gameplay_missions_unlocks.conditionMet()for recursive condition evaluation
See Also
- unlocks/conditions/genericConditions - Generic Logic Conditions - Related reference
- unlocks/conditions/missionConditions - Mission Progress Conditions - Related reference
- unlocks/conditions/vehicleConditions - Vehicle-Based Conditions - Related reference
- Gameplay Systems Guide - Guide