API ReferenceGE Extensionsgameplaymissionsunlocksconditions
Generic Conditions
Reference for generic logic condition types used by the mission unlock system.
Reference for generic logic condition types used by the mission unlock system.
Condition Types
never
Always evaluates to false.
M.never = {
conditionMet = function(c) return false end,
getLabel = function(c) return 'Never' end
}missing
Fallback for invalid/unknown condition types. Always evaluates to true.
M.missing = {
conditionMet = function(c) return true end,
getLabel = function(c) return 'missions.missions.unlock.missing' end
}always
Always evaluates to true. Has hidden = true so it doesn't show in the UI.
M.always = {
conditionMet = function(c) return true end,
getLabel = function(c) return 'missions.missions.unlock.always' end,
hidden = true
}multiAnd
Boolean AND - returns true only if all nested conditions are met.
M.multiAnd = {
editorFunction = "displayNestedCondition",
conditionMet = function(c)
local nested = {}
local met = true
for _, cond in ipairs(c.nested or {}) do
local cMet = gameplay_missions_unlocks.conditionMet(cond)
met = met and cMet.met
table.insert(nested, cMet)
end
return met, nested
end
}multiOr
Boolean OR - returns true if any nested condition is met. Returns true if no nested conditions exist.
M.multiOr = {
editorFunction = "displayNestedCondition",
conditionMet = function(c)
local nested = {}
local met = false
if not next(c.nested or {}) then return true, {} end
for _, cond in ipairs(c.nested or {}) do
local cMet = gameplay_missions_unlocks.conditionMet(cond)
met = met or cMet.met
table.insert(nested, cMet)
end
return met, nested
end
}Key Behaviors
missingacts as a safe fallback - returns true so unknown conditions don't block missionsalwaysis the default condition for missions with no explicit start/visible conditionsmultiAnd/multiOrrecurse throughgameplay_missions_unlocks.conditionMet(), building a nested result tree- Empty
multiOrevaluates totrue(no conditions = no restrictions) - Both
multiAndandmultiOrreturn the nested evaluation results for UI display - These are the only condition types that support the
nestedfield in condition data
See Also
- unlocks/conditions/careerConditions - Career Branch & League Conditions - Related reference
- unlocks/conditions/missionConditions - Mission Progress Conditions - Related reference
- unlocks/conditions/vehicleConditions - Vehicle-Based Conditions - Related reference
- Gameplay Systems Guide - Guide