Skip to content

Flex Lookup Types

Game version: 1.32a

← Moddable tables index · Documentation index

Library table: Flex Lookup Types (ID 338)  ·  S&S Editor slot: 2  ·  Template: 2 flex_lookup_types.csv

The Lookup table the engine uses when rendering text for stories/decisions/stratagems/story-logic/ character logs. A text renderer queries it by NAME (and optional VALUE) — written <LOOKUPNAME=4> or just <LOOKUPNAME> — and the matching row's text is substituted. Use a unique, library-prefixed NAME ($-wrapped) so it doesn't collide with vanilla lookups (vanilla names live in StringList 266).

Scope & logic

flex_lookup scope (see Logic Scopes — what's available where).

Logic-bearing columns (build-time scope-checked): if, priority_check

Columns

Column names + count are read from the live template (the game's own headers); descriptions are curated.

Col Name Description
0 Lookup Type Name Lookup Type Name — e.g. Fred_Mohawk or $Attack$ ($-wrapped so the library name is appended on import).
1 From Value >= From Value (>=) — row applies when the parsed VALUE is >= this (ignored if no VALUE).
2 Too value <= To Value (<=) — row applies when the parsed VALUE is <= this (ignored if no VALUE).
3 IF Logic Optional IF Logic — row applies when blank or this tests >0.
4 Optional random seed type Optional randomize-seed type — when no VALUE is parsed and several rows share the NAME, fixes the random pick. Values: blank = fully random each time; 1 = seed = gameID + round + regimeID; 2 = seed = gameID + round + zoneID; 3 = seed = gameID + round + charID; 4 = seed = gameID + round + orgID; 11 = seed = gameID + regimeID; 12 = seed = gameID + zoneID; 13 = seed = gameID + charID; 14 = seed = gameID + orgID
5 Text Text — what this lookup renders.
6 Priority CHECK logic Priority CHECK logic — when several rows share the NAME, the highest priority value wins (blank = unused).
7 Stringlist ID Stringlist ID — optional: <1 = don't use; >0 pulls text from that StringList instead (then cols 1-6 are ignored).
8 Value column Value column — when using a StringList (col 7), find the row whose this-column holds the parsed VALUE.
9 return column Return column — the column of the matched StringList row whose text is returned.
10 Extra Col Read 2nd column — optional extra filter column on the StringList (blank/0 = ignore; pairs with col 11).
11 Extra Val 2nd column must have value — the value the col-10 column must hold (blank/0 = ignore).

Notes

  • If col 7 > 0 the StringList path (cols 7-11) is used and cols 1-6 are ignored; if col 7 < 1, cols 7-11 are ignored.

  • Engine-generated lookups available at start of turn: NATION, NATIONAL, NATIONLEADER.


This doc was generated from extracting data from Shadow Empire version 1.32a on 2026-06-05 06:56 UTC.