Flag Instructions & Key Namespaces¶
Game version: 1.32a
← Documentation index · Per-scope availability →
Shadow Empire's event/story/perk logic strings contain tokens the engine substitutes at runtime.
There are two kinds, both catalogued here straight from the engine source (EventRelatedClass.cs):
- Flag instructions — bare uppercase tokens set via
SetData(...)(e.g.ZONEID,REGIMEID,CHARID,TARGETWAR,ORGID,ROUND).93in total. - Key namespaces —
NAME.<key>lookups resolved against a backing StringList table (e.g.ZONEKEY.danger,REGKEY.$myKey$,TECH.<techid>).68in total.
Availability is scope-dependent. A token only resolves when the engine has set it for the current context.
ZONEID/ZONEKEY.*exist only in a zone-scoped story (instance_type3); in a global story they resolve to0or crash. The scopes page lists exactly what is available where, and the mod builder fails the build when a scope-exclusive token is used in the wrong scope. The table→scope mapping is indata/scopes/table_scopes.yml; non-story scopes (stratagem, regime-feat, …) indata/scopes/scopes_curated.yml.
Flag instructions¶
The Story scopes column says which story instance_type scopes set the flag: all (unconditional)
= every story; a named scope (e.g. zone) = only that one (a scope-exclusive flag); — = not set
by the story engine (it comes from another context, e.g. a prior exe(...) or a RESULT).
| Flag | Story scopes | Set in |
|---|---|---|
ASSETID |
— | Flag Instructions (table 169) |
CHARID |
all (unconditional) | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Hardcoded_Gui_Call_Popup, +7 more |
CHARNAME |
all (unconditional) | Hardcoded_Gui_CardPlay, Hardcoded_Gui_Call_Popup, Helper_DoStoryLogic, +3 more |
CULTURE |
diplomatic | Helper_ExecuteRegimeFeatEffects, ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, +2 more |
CULTUREID |
diplomatic | Helper_ExecuteRegimeFeatEffects, ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, +2 more |
DEBUG |
— | ExecMakeStoryGeneration |
DIFF |
all (unconditional) | ExecHardcodedStory_BasicStory |
FACTIONID |
— | Flag Instructions (table 169) |
HISID |
unit, unit_commander | Hardcoded_Gui_CardMapSelect, ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, +1 more |
LANDSCAPE |
— | ExecMakeSurvivors |
LENGTHY |
— | Helper_ModelChoiceCost |
MEMORY_AIR_CHOICE1 |
— | ExecHardcodedDecision_SetModelObjective |
MEMORY_AIR_CHOICE2 |
— | ExecHardcodedDecision_SetModelObjective |
MEMORY_AIR_CHOICE3 |
— | ExecHardcodedDecision_SetModelObjective |
MEMORY_AIR_CHOICE4 |
— | ExecHardcodedDecision_SetModelObjective |
MEMORY_AIR_CHOICE5 |
— | ExecHardcodedDecision_SetModelObjective |
MEMORY_AIR_CHOICE6 |
— | ExecHardcodedDecision_SetModelObjective |
MEMORY_AIR_CHOICE7 |
— | ExecHardcodedDecision_SetModelObjective |
MODELID |
— | Hardcoded_Gui_Model_Popup, Helper_ModelChoiceCost, Helper_NewModel |
MODELTYPE |
— | ExecHardcodedDecision_SetModelObjective, Helper_NewModel, Helper_GetViableNewAirModel |
MODELTYPEID |
— | Helper_ModelChoiceCost, Helper_NewModel |
NATION |
— | Helper_Lookup_SetForRegime, Helper_MakeOpenDecisions |
NATIONAL |
— | Helper_Lookup_SetForRegime |
NATIONALLEADER |
— | Helper_Lookup_SetForRegime |
NATIONLEADER |
— | Helper_Lookup_SetForRegime |
ORGID |
org | Hardcoded_Gui_CardMapSelect, ExecMakeStoryGeneration, ExecMakeGiveActionCards, +7 more |
ORGNAME |
org | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
OTHERREGIMEID |
— | Flag Instructions (table 169) |
OTHERZONEID |
— | Flag Instructions (table 169) |
PROD |
— | ExecMakeProduction, ExecMakeAssetPresentation |
REGID |
all (unconditional) | ExecMakeLoadGameEarly, Hardcoded_Gui_CardPlay, Hardcoded_Gui_Call_Popup, +24 more |
REGIMEID |
all (unconditional) | ExecMakeUnitUpkeepCheck, ExecMakeProduction, ExecMakeAssetPresentation, +41 more |
REGIMENAME |
all (unconditional) | Hardcoded_Gui_CardPlay, ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, +1 more |
RESULT |
— | Hardcoded_Gui_CardPlay, ExecHardcodedDecision_BasicStory, ExecMakeCloseTurn |
RIVER |
— | ExecMakeSurvivors |
ROLL |
all (unconditional) | ExecHardcodedStory_BasicStory |
ROUND |
all (unconditional) | ExecMakeUnitUpkeepCheck, ExecMakeProduction, ExecMakeAssetPresentation, +37 more |
SIZE |
— | Helper_ModelChoiceCost, Helper_NewModel |
SOURCEAI |
— | Hardcoded_Gui_CardPlay |
SOURCEREGIMEID |
diplomatic | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, +4 more |
SOURCEREGIMENAME |
diplomatic | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
SOURCEREGIMESLOT |
diplomatic | Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, Helper_DoStoryLogic, +3 more |
SOURCEZONEID |
diplomatic | Helper_ExecuteRegimeFeatEffects, ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, +1 more |
SOURCEZONENAME |
diplomatic | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
TARGETAI |
— | Hardcoded_Gui_CardPlay |
TARGETCHARID |
— | Hardcoded_Gui_CardMapSelect |
TARGETCHARNAME |
all (unconditional) | Hardcoded_Gui_CardPlay, ExecHardcodedStory_BasicStory |
TARGETCULTURE |
diplomatic | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, +3 more |
TARGETCULTUREID |
diplomatic | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, +3 more |
TARGETLANDBORDER |
— | Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, ExecMakeStoryGeneration |
TARGETLEADER |
diplomatic | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
TARGETMAJOR |
diplomatic | Hardcoded_Gui_CardMapSelect, Helper_ExecuteRegimeFeatEffects, Helper_DoStoryLogic, +3 more |
TARGETNATION |
diplomatic | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
TARGETNATIONAL |
diplomatic | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
TARGETNATIONALLEADER |
diplomatic | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
TARGETNATIONLEADER |
diplomatic | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory |
TARGETNATIONNAME |
diplomatic | Hardcoded_Gui_CardPlay, ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, +1 more |
TARGETREGIMEAIID |
diplomatic | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, +3 more |
TARGETREGIMEID |
diplomatic | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, +4 more |
TARGETREGIMENAME |
all (unconditional) | Hardcoded_Gui_CardPlay, Helper_DoStoryLogic, ExecMakeStoryGeneration, +2 more |
TARGETREGIMESLOT |
diplomatic | Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, Helper_DoStoryLogic, +3 more |
TARGETSUBCULTURE |
diplomatic | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, +3 more |
TARGETWAR |
diplomatic | Hardcoded_Gui_CardMapSelect, Hardcoded_Gui_CardPlay, Helper_ExecuteRegimeFeatEffects, +4 more |
TEMP1 |
— | Flag Instructions (table 169) |
TEMP10 |
— | Flag Instructions (table 169) |
TEMP11 |
— | Flag Instructions (table 169) |
TEMP12 |
— | Flag Instructions (table 169) |
TEMP13 |
— | Flag Instructions (table 169) |
TEMP14 |
— | Flag Instructions (table 169) |
TEMP15 |
— | Flag Instructions (table 169) |
TEMP16 |
— | Flag Instructions (table 169) |
TEMP17 |
— | Flag Instructions (table 169) |
TEMP18 |
— | Flag Instructions (table 169) |
TEMP19 |
— | Flag Instructions (table 169) |
TEMP2 |
— | Flag Instructions (table 169) |
TEMP20 |
— | Helper_UnitFightsVariable |
TEMP21 |
— | Flag Instructions (table 169) |
TEMP3 |
— | Flag Instructions (table 169) |
TEMP4 |
— | Flag Instructions (table 169) |
TEMP5 |
— | Flag Instructions (table 169) |
TEMP6 |
all (unconditional) | ExecHardcodedStory_BasicStory |
TEMP7 |
— | Flag Instructions (table 169) |
TEMP8 |
— | Flag Instructions (table 169) |
TEMP9 |
— | Flag Instructions (table 169) |
TRADEID |
trade | ExecMakeStoryGeneration, ExecHardcodedDecision_BasicStory, ExecHardcodedStory_BasicStory, +1 more |
TURN |
— | ExecMakeStoryGeneration |
UNITNAME |
unit, unit_commander | ExecMakeStoryGeneration, ExecHardcodedStory_BasicStory, Helper_MakeOpenDecisions |
VALUE |
— | Helper_NewModel |
X |
— | Hardcoded_Gui_Zone3_Bottom |
Y |
— | Hardcoded_Gui_Zone3_Bottom |
ZONE |
— | Hardcoded_Gui_Zone3_Bottom |
ZONEID |
zone | ExecMakeProduction, ExecMakeAssetPresentation, ExecMakeSurvivors, +15 more |
ZONENAME |
all (unconditional) | Hardcoded_Gui_CardPlay, Helper_DoStoryLogic, ExecMakeStoryGeneration, +2 more |
Key namespaces¶
KEY format shows how the key is written (<prop> = a named property, <id> = a numeric library id).
Anchor is the flag instruction whose value selects the row — the namespace is available exactly where
its anchor is (global = always). Table is the backing StringList ID.
| Namespace | KEY format | Anchor | Table | Available in | Example keys |
|---|---|---|---|---|---|
CHARKEY |
CHARKEY.<prop> |
CHARID | 340 | all (unconditional) | (numeric id) |
CHARPROFILE |
CHARPROFILE.<prop> |
CHARID | 197 | all (unconditional) | (numeric id) |
CHARREL |
CHARREL.<id> |
CHARID | 196 | all (unconditional) | (numeric id) |
CHARSTAT |
CHARSTAT.<id> |
CHARID | 196 | all (unconditional) | (numeric id) |
CHASTAT |
CHASTAT.<id> |
global | — | all scopes | (numeric id) |
COLZONE |
COLZONE.<id> |
ZONEID | 132 | zone | (numeric id) |
CONSTR |
CONSTR.<id> |
global | — | all scopes | (numeric id) |
CULTUREKEY |
CULTUREKEY.<prop> |
CULTUREID | 308 | diplomatic | combat, zeroPop, nodip, fertility, tradition, nonHuman, … (+9) |
CUR |
CUR.<id> |
global | — | all scopes | (numeric id) |
DEC |
DEC.<id> |
global | — | all scopes | (numeric id) |
DEL |
DEL.<id> |
global | — | all scopes | (numeric id) |
EXPORTTARIFFKEY |
EXPORTTARIFFKEY.<id> |
SOURCEREGIMEID | 297 | diplomatic | (numeric id) |
FACTIONSTAT |
FACTIONSTAT.<id> |
FACTIONID | 200 | — | (numeric id) |
FACTIONSUPPORT |
FACTIONSUPPORT.<id> |
FACTIONID | 200 | — | (numeric id) |
FIREP |
FIREP.<id> |
global | — | all scopes | (numeric id) |
FLAG |
FLAG.<id> |
global | — | all scopes | (numeric id) |
GAMEKEY |
GAMEKEY.<prop> |
global | 156 | all scopes | syndicate_round, cult_round, corp_round |
GASPPM |
GASPPM.<prop> |
global | 102 | all scopes | (numeric id) |
IMPORTTARIFFKEY |
IMPORTTARIFFKEY.<id> |
SOURCEREGIMEID | 297 | diplomatic | (numeric id) |
IPR |
IPR.<id> |
global | — | all scopes | (numeric id) |
KEY |
KEY.<id> |
global | — | all scopes | (numeric id) |
LVIII |
LVIII.<id> |
global | — | all scopes | (numeric id) |
MODEL |
MODEL.<prop> |
REGIMEID | 228 | all (unconditional) | (numeric id) |
NAT |
NAT.<id> |
global | — | all scopes | (numeric id) |
OOB |
OOB.<prop> |
REGIMEID | 238 | all (unconditional) | (numeric id) |
ORGKEY |
ORGKEY.<prop> |
ORGID | 186 | org | (numeric id) |
ORGTYPE |
ORGTYPE.<prop> |
REGIMEID | 184 | all (unconditional) | (numeric id) |
OTHERREGIMEKEY |
OTHERREGIMEKEY.<prop> |
OTHERREGIMEID | 210 | — | (numeric id) |
OTHERREGIMESTAT |
OTHERREGIMESTAT.<id> |
OTHERREGIMEID | 143 | — | (numeric id) |
OTHERZONEKEY |
OTHERZONEKEY.<prop> |
OTHERZONEID | 160 | — | (numeric id) |
PEOPLE |
PEOPLE.<id> |
global | — | all scopes | (numeric id) |
RANDOMKEY |
RANDOMKEY.<prop> |
global | 86 | all scopes | (numeric id) |
REGIMEFEAT |
REGIMEFEAT.<prop> |
REGIMEID | 388 | all (unconditional) | (numeric id) |
REGIMEKEY |
REGIMEKEY.<prop> |
REGIMEID | 210 | all (unconditional) | mthX, mthY, majorAiOffensiveMode, majorAiOffensiveModeFixed, pathWar_Offensive, pathWar_Defensive, … (+66) |
REGIMESTAT |
REGIMESTAT.<id> |
REGIMEID | 143 | all (unconditional) | (numeric id) |
REGKEY |
REGKEY.<prop> |
REGIMEID | 210 | all (unconditional) | mthX, mthY, majorAiOffensiveMode, majorAiOffensiveModeFixed, pathWar_Offensive, pathWar_Defensive, … (+66) |
REGLAW |
REGLAW.<prop> |
REGIMEID | 573 | all (unconditional) | (numeric id) |
REGREGKEY |
REGREGKEY.<prop> |
SOURCEREGIMEID | 275 | diplomatic | (numeric id) |
REGZONEKEY |
REGZONEKEY.<prop> |
REGIMEID | 288 | all (unconditional) | (numeric id) |
REP |
REP.<id> |
global | — | all scopes | (numeric id) |
REPL |
REPL.<id> |
global | — | all scopes | (numeric id) |
RES |
RES.<id> |
global | — | all scopes | (numeric id) |
RET |
RET.<id> |
global | — | all scopes | (numeric id) |
REVREGREGKEY |
REVREGREGKEY.<prop> |
TARGETREGIMEID | 275 | diplomatic | (numeric id) |
SMALL |
SMALL.<id> |
global | — | all scopes | (numeric id) |
SOURCEZONEKEY |
SOURCEZONEKEY.<prop> |
SOURCEZONEID | 160 | diplomatic | pop, worker, city, radTreatmentPoints, provocation, radCleansingPoints, … (+92) |
STAT |
STAT.<prop> |
MODELID | 229 | — | (numeric id) |
STORYIMOD |
STORYIMOD.<id> |
TARGETREGIMEAIID | 408 | diplomatic | (numeric id) |
STORYMOD |
STORYMOD.<id> |
TARGETREGIMEAIID | 407 | diplomatic | (numeric id) |
STRAT |
STRAT.<id> |
global | — | all scopes | (numeric id) |
TARGETCHARKEY |
TARGETCHARKEY.<prop> |
TARGETCHARID | 340 | — | (numeric id) |
TARGETCHARPROFILE |
TARGETCHARPROFILE.<prop> |
TARGETCHARID | 197 | — | (numeric id) |
TARGETCHARSTAT |
TARGETCHARSTAT.<id> |
TARGETCHARID | 196 | — | (numeric id) |
TARGETCULTUREKEY |
TARGETCULTUREKEY.<prop> |
TARGETCULTUREID | 308 | diplomatic | (numeric id) |
TARGETREGIMEFEAT |
TARGETREGIMEFEAT.<prop> |
TARGETREGIMEID | 388 | diplomatic | (numeric id) |
TARGETREGIMEKEY |
TARGETREGIMEKEY.<prop> |
TARGETREGIMEID | 210 | diplomatic | (numeric id) |
TARGETREGIMESTAT |
TARGETREGIMESTAT.<id> |
TARGETREGIMEID | 143 | diplomatic | (numeric id) |
TARGETREGKEY |
TARGETREGKEY.<prop> |
TARGETREGIMEID | 210 | diplomatic | (numeric id) |
TECH |
TECH.<prop> |
REGIMEID | 187 | all (unconditional) | (numeric id) |
TEMP |
TEMP.<id> |
global | — | all scopes | (numeric id) |
TRADEKEY |
TRADEKEY.<prop> |
TRADEID | 550 | trade | (numeric id) |
TRADEREGKEY |
TRADEREGKEY.<prop> |
TRADEID | 549 | trade | (numeric id) |
TRADERSTAT |
TRADERSTAT.<id> |
TRADEID | 252 | trade | (numeric id) |
VALUE |
VALUE.<id> |
global | — | all scopes | (numeric id) |
ZONEKEY |
ZONEKEY.<prop> |
ZONEID | 160 | zone | pop, worker, city, radTreatmentPoints, provocation, radCleansingPoints, … (+92) |
ZONEORDERROUND |
ZONEORDERROUND.<id> |
ZONEID | 289 | zone | (numeric id) |
ZONEORDERSTAT |
ZONEORDERSTAT.<id> |
ZONEID | 289 | zone | (numeric id) |
ZONESTAT |
ZONESTAT.<id> |
ZONEID | 123 | zone | (numeric id) |
This doc was generated from extracting data from Shadow Empire version 1.32a on 2026-06-05 06:56 UTC.