Files
OpenMaidEngine/vm-map/globals.toml
2026-07-23 09:34:23 -04:00

2024 lines
82 KiB
TOML

# vm-map/globals.toml -- CANONICAL living global-variable registry (hand-edited).
# Generated artifacts (build/globals.json, docs/global-reference.md) come from this file via
# tools/globals_build.py --build. Do not edit those. Skeletons are appended by
# tools/story_flags.py --bootstrap; enrich each entry as we investigate.
# See docs/superpowers/specs/2026-07-07-globals-registry-and-story-flags-design.md.
[meta]
note = "Curated global addresses override the auto shape-inference map (build/global-var-map.json)."
[[global]]
address = "0x8c877"
name = "current_item_id"
category = "index-pointer"
type = "int"
value_domain = "ITINIT item id; 0 means none"
usage = "Shared item-id argument/selection slot. Item menus and gameplay scripts write a chosen item id, use it to index ITINIT arrays, and dispatch through item_handler_script_id; ITMES compares it against all 287 item ids to select the matching player-facing title and description."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8c879"
name = "item_sort_key"
category = "data-table"
type = "int[1000]"
value_domain = "mostly unique multiples of 10; 10..6390"
usage = "ITINIT field for all 287 populated item ids. CHMENU, IMPROVE, and INFOIT pass this array as the primary key to op 0x12f's stable index sort, establishing it as the catalog/display ordering key. The runtime lookup base is one cell before ITINIT's first write because item ids are one-based."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8cc61"
name = "item_random_tier"
category = "data-table"
type = "int[1000]"
value_domain = "0..6"
usage = "ITINIT field for all 287 items. ADDRANDOMITEM and LOSTRANDOMITEM bucket eligible item ids by this value before choosing a random gain/loss; IMPROVE compares it with the current progression rank. This is the random-item availability/rarity tier, distinct from item_category."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8d049"
name = "item_category"
category = "data-table"
type = "int[1000]"
value_domain = "{0,1,2,4,8,9,10..17,19..23}"
usage = "ITINIT field for all 287 items and ITMES's top-level behavior dispatch. Observed groups: 0 innate attacks, 1 key/story items, 2 consumables, 4 stat stones, 8 synthesis materials, 9 coins, 10..17 weapon families, 19 boots, 20 armor, 21 shields, 22 accessories, and 23 capture ropes."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8dc01"
name = "item_icon_id"
category = "data-table"
type = "int[1000]"
value_domain = "1..360"
usage = "ITINIT field for all 287 items. READICON sorts and indexes this array to select icon atlas entries; ALCHEMY, CHMENU, IMPROVE, and INFOIT use the same value for item-row presentation."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa6a71"
name = "item_handler_script_id"
category = "data-table"
type = "int[1000]"
value_domain = "12699 (0x319b, ITMES.BIN) in the shipped table"
usage = "ITINIT field for all 287 items. Item menus look up this value and feed it directly to call-script; the packed id 0x319b resolves to ITMES.BIN, the shared per-item behavior/description dispatcher."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8dfe9"
name = "item_attack_element"
category = "data-table"
type = "int[1000]"
value_domain = "1..8 (physical, universal, fire, ice, lightning, earth, holy, dark)"
usage = "Populated for 107 weapons/attacks. Values exactly match the AFINIT attack-attribute string table at GStr[0x2690 + value] and the Japanese item descriptions; combat scope/parameter code consumes the same array."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8e3d1"
name = "item_defense_element"
category = "data-table"
type = "int[1000]"
value_domain = "1..12 (AFINIT defense-attribute enum)"
usage = "Populated for the 13 shields. Values match descriptions such as physical, universal, holy, dark, spirit, and divinity defense; DRAWTIP renders them through AFINIT's defense string table at GStr[0x26a4 + value]."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa6689"
name = "item_weapon_class"
category = "data-table"
type = "int[1000]"
value_domain = "1..21"
usage = "Populated for 104 weapons/innate attacks. Stable values identify weapon families (1 unarmed, 2 staff, 3 claw, 4 dagger, 5 sword, 6 chain blade, 7 spear, 8 axe, 9 bow, 11 blade boots; later values are monster/natural attack classes). CALCDMG consumes it."
source = "investigation"
confidence = "high"
[[global]]
address = "0x9f159"
name = "item_granted_skill_id"
category = "data-table"
type = "int[1000]"
value_domain = "SKINIT skill id 1..227"
usage = "Populated for 85 equipment items. Values cross-resolve to SKINIT (for example flying bracelet=1 Flying, transfer bracelet=21 Transfer, thief key=22 Lockpick, ropes=156 Capture Attack); CALCREVISE applies the linked skill and UI scripts display it."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8d431"
name = "item_min_range"
category = "data-table"
type = "int[1000]"
value_domain = "1 when populated"
usage = "Populated for the 12 bows/ranged innate attacks whose descriptions say range 2. CALCSCOPE reads it as the first range bound; the paired maximum is item_max_range."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8d819"
name = "item_max_range"
category = "data-table"
type = "int[1000]"
value_domain = "2 when populated"
usage = "Populated for the same 12 ranged items as item_min_range. CALCSCOPE reads it as the second range bound, matching every description's range-2 annotation."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8e7b9"
name = "item_character_whitelist"
category = "data-table"
type = "int[1000][5]"
columns = { "0" = "allowed_character_id_1", "1" = "allowed_character_id_2", "2" = "allowed_character_id_3", "3" = "allowed_character_id_4", "4" = "allowed_character_id_5" }
value_domain = "EBINIT character ids; up to five per item"
usage = "Sparse ITINIT row-major table with stride 5. CHMENU rejects an item when column 0 is populated and the selected party slot's character id is absent from the row. Unique accessories 471/472 allow one character each, while crossover accessories 480..485 allow character ids 2, 3, and 4. Unused trailing columns remain zero."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8ff29"
name = "item_sex_restriction_mask"
category = "data-table"
type = "int[1000]"
value_domain = "bit mask; shipped ITINIT populates value 4 on two items"
usage = "Sparse ITINIT equipment restriction. CHMENU uses unit_sex_category as a bit index and rejects an item when that bit is absent from this mask. Both populated items carry only bit 2; EBINIT value 2 is female, and ITMES explicitly describes item 419 as female-only."
source = "investigation"
confidence = "high"
[[global]]
address = "0x906f9"
name = "item_status_delta_levels"
category = "data-table"
type = "int[1000][30]"
columns = { "2" = "hp_drain", "3" = "sp_drain", "4" = "fs_drain", "5" = "curse", "6" = "charm", "7" = "confusion", "8" = "paralysis", "9" = "poison", "10" = "water_flow", "11" = "fear" }
value_domain = "condition delta -5..5; zero means absent"
usage = "Sparse ITINIT row-major table consumed by USEITEM and CALCILL when applying an item's effects. Positive values inflict or drain; -5 removes a condition (for example paralysis-removal item 108 stores -5 in column 8). Confirmed columns are 2 HP drain, 3 SP drain, 4 FS drain, 5 curse, 6 charm, 7 confusion, 8 paralysis, 9 poison, 10 water-flow, and 11 fear."
source = "investigation"
confidence = "high"
[[global]]
address = "0x97c29"
name = "item_equipped_status_levels"
category = "data-table"
type = "int[1000][30]"
columns = { "9" = "poison", "11" = "fear", "13" = "regeneration", "14" = "exaltation" }
value_domain = "condition strength 1..5; zero means absent"
usage = "Sparse ITINIT row-major table added to a unit's 30-column condition state by CALCREVISE. Item descriptions identify populated columns 9 poison, 11 fear, 13 regeneration, and 14 exaltation; these are passive equipped effects, distinct from item_status_delta_levels."
source = "investigation"
confidence = "high"
[[global]]
address = "0x9f541"
name = "item_stat_modifiers"
category = "data-table"
type = "int[1000][14]"
columns = { "0" = "accuracy", "1" = "evasion", "2" = "physical_attack", "3" = "physical_defense", "4" = "magic_attack", "5" = "magic_defense", "6" = "speed", "7" = "luck", "8" = "critical_chance", "9" = "capture_power", "10" = "movement", "11" = "max_hp", "12" = "max_sp", "13" = "max_fs" }
value_domain = "signed additive stat values; observed -15..200"
usage = "ITINIT row-major equipment modifiers added directly to the unit's 14-column stat record by CALCREVISE. Descriptions and consumers establish columns 0 accuracy, 1 evasion, 2 physical attack, 3 physical defense, 4 magic attack, 5 magic defense, 6 speed, 7 luck, 8 critical chance, 9 capture power, 10 movement, 11 max HP, 12 max SP, and 13 max FS. CALCBTPARAM adds columns 7 and 8 into the action's critical percentage, and CALCDMG compares the clamped result with a random-modulo-100 roll."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa2bf1"
name = "item_tuning_curve_ids"
category = "data-table"
type = "int[1000][10]"
columns = { "0" = "accuracy", "1" = "evasion", "2" = "physical_attack", "3" = "physical_defense", "4" = "magic_attack", "5" = "magic_defense", "6" = "speed", "7" = "luck", "8" = "critical_chance", "9" = "capture_power" }
value_domain = "curve ids 1..18; zero means the field cannot be tuned"
usage = "ITINIT row-major table selecting an equipment-growth curve for each of the ten tunable fields. TUNE, IMPROVE, DRAWTIP, and CALCREVISE combine each nonzero curve id with the item's corresponding tuning level and index the shared curve-value table at 0xab6fa. Columns align with item_stat_modifiers columns 0..9."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa5301"
name = "item_resource_recovery_amounts"
category = "data-table"
type = "int[1000][3]"
columns = { "0" = "hp", "1" = "sp", "2" = "fs" }
value_domain = "recovery amount; zero means absent"
usage = "Sparse ITINIT row-major consumable table. USEITEM applies columns 0, 1, and 2 to the matching three-column unit resource record; descriptions prove these are HP, SP, and FS respectively (for example item 101 stores HP 30, and item 107 stores 999/99/99 for full recovery)."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa62a1"
name = "item_essence_recovery_amount"
category = "data-table"
type = "int[1000]"
value_domain = "50 in the shipped table"
usage = "Sparse ITINIT consumable field. Item 106, Blood Price Healing Hand, describes essence recovery 50 and stores 50 here; USEITEM follows the dedicated essence-recovery path and scales the value before updating the selected unit."
source = "investigation"
confidence = "high"
[[global]]
address = "0x65ce"
name = "skill_acquired_flags"
category = "data-table"
type = "int[300]"
value_domain = "0/1 by SKINIT skill id"
usage = "Persistent acquired-skill flags. ADDSKILL sets the selected skill after resolving the unit's equipped-skill slots; FORT checks the flag before granting a skill; CHMENU combines it with skill_change_catalog_eligible to build the available skill-change catalog."
source = "investigation"
confidence = "high"
[[global]]
address = "0x5660b"
name = "skill_info_revealed_flags"
category = "data-table"
type = "int[300]"
value_domain = "0/1 by SKINIT skill id"
usage = "Persistent skill-information visibility flags. ADDSKILL sets the selected skill, BTL marks every equipped skill when it is observed in combat, and INFOIT suppresses a skill's icon/handler-driven details until this flag is nonzero. This is broader than skill_acquired_flags."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa6e59"
name = "current_skill_id"
category = "index-pointer"
type = "int"
value_domain = "SKINIT skill id; 0 means none"
usage = "Shared skill-id argument/selection slot. Skill menus and combat scripts write the chosen skill id and use it to index SKINIT arrays; SKMES compares it against all 131 skill ids to select the matching player-facing title and description."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa6e5a"
name = "skill_sort_key"
category = "data-table"
type = "int[300]"
value_domain = "mostly unique values 10..2002"
usage = "SKINIT field populated for 129 of 131 skills. ADDEXP, ADDSKILL, CHMENU, INFOIT, and SETCH combine it with skill_category to construct deterministic skill-list ordering keys; higher-level sort operations consume the resulting indices."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa6f86"
name = "skill_category"
category = "data-table"
type = "int[300]"
value_domain = "1..7"
usage = "SKINIT category for all 131 skills. The records establish 1 movement/exploration, 2 defense/special attack, 3 utility/passive, 4 combat passive, 5 physical special, 6 offensive magic, and 7 healing magic. Combat and menu scripts dispatch directly on these values."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa70b2"
name = "skill_change_catalog_eligible"
category = "data-table"
type = "int[300]"
value_domain = "0/1; 11 eligible skills in shipped SKINIT"
usage = "SKINIT inclusion flag for CHMENU's fourth (skill-change) catalog. CHMENU scans all 300 ids, keeps only nonzero rows, sorts acquired rows ahead of unavailable rows using skill_category and skill_sort_key, and copies the acquired prefix into catalog row 3. Eligible ids are 1, 2, 112, 130..133, 210, 228, 230, and 231."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa71de"
name = "skill_min_range_encoded"
category = "data-table"
type = "int[300]"
value_domain = "1..2; stored minimum range plus one"
usage = "Populated for the 94 active skills. CALCSCOPE and CALCREVISE subtract one before using it as the lower range bound; SELACT and DRAWTIP use the same encoded bound."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa730a"
name = "skill_max_range_encoded"
category = "data-table"
type = "int[300]"
value_domain = "1..10; stored maximum range plus one"
usage = "Populated for the same 94 active skills as skill_min_range_encoded. CALCSCOPE subtracts one to obtain the upper bound, exactly matching descriptions such as range 3 -> stored 4 and range 9 -> stored 10."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa7436"
name = "skill_attack_element"
category = "data-table"
type = "int[300]"
value_domain = "1..8 (physical, universal, fire, ice, lightning, earth, holy, dark)"
usage = "Populated for 60 elemental attacks and spells. Values match the Japanese descriptions and the same eight-value attack-element enum used by item_attack_element; CALCSCOPE, CALCBTPARAM, and SELACT consume it."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa7562"
name = "skill_status_levels"
category = "data-table"
type = "int[300][30]"
columns = { "1" = "instant_death", "6" = "charm", "7" = "confusion", "8" = "paralysis", "9" = "poison", "10" = "water_flow", "11" = "fear" }
value_domain = "condition strength 1..4; zero means absent"
usage = "Sparse SKINIT row-major condition table consumed by CALCILL when applying a skill's effects to the target unit. Skill names and descriptions identify columns 1 instant death, 6 charm, 7 confusion, 8 paralysis, 9 poison, 10 water-flow, and 11 fear; the column layout matches item_status_delta_levels."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa988a"
name = "skill_icon_id"
category = "data-table"
type = "int[300]"
value_domain = "51..56"
usage = "SKINIT icon id for all 131 skills. CHMENU and INFOIT translate it into the shared icon atlas; the six ids group movement, defense, utility, passive, physical-special, and magic icons."
source = "investigation"
confidence = "high"
[[global]]
address = "0xa99b6"
name = "skill_combat_stat_deltas"
category = "data-table"
type = "int[300][10]"
columns = { "0" = "accuracy", "1" = "evasion", "2" = "physical_attack", "3" = "physical_defense", "4" = "magic_attack", "5" = "magic_defense", "6" = "speed", "7" = "luck", "8" = "critical_chance", "9" = "capture_power" }
value_domain = "signed combat parameter deltas; observed -99..999"
usage = "Sparse SKINIT row-major table applied by CALCBTPARAM for the selected action. Descriptions and combat consumers establish columns 0 accuracy, 1 evasion, 2 physical attack, 3 physical defense, 4 magic attack, 5 magic defense, 6 speed, 7 luck, 8 critical chance, and 9 capture power. Column 7 is unpopulated in shipped SKINIT; CALCBTPARAM adds any luck and critical modifiers into the critical percentage that CALCDMG rolls after the hit check."
source = "investigation"
confidence = "high"
[[global]]
address = "0xaa56e"
name = "skill_resource_deltas"
category = "data-table"
type = "int[300][3]"
columns = { "0" = "hp_recovery", "1" = "sp_cost" }
value_domain = "column 0 recovery 20..50; column 1 cost -20..-2"
usage = "Sparse SKINIT resource table used throughout skill selection and resolution. Column 0 is HP recovery for the three healing spells; column 1 is the negative SP cost for all 95 active skills, exactly matching each description. Column 2 is unpopulated in the shipped table."
source = "investigation"
confidence = "high"
[[global]]
address = "0xaa8f2"
name = "skill_proc_chance_percent"
category = "data-table"
type = "int[300]"
value_domain = "10..100 percent"
usage = "Probability for 14 passive skills. CALCDMG compares random-modulo 100 against this value; examples include Re-action 20, Double Action 100, Counter 10, and Resurrection 50."
source = "investigation"
confidence = "high"
[[global]]
address = "0xaaa1e"
name = "skill_battle_animation_id"
category = "data-table"
type = "int[300]"
value_domain = "BTANINIT animation ids 9..808"
usage = "Populated for 101 combat skills. BTL and CALCDMG place this value in the battle-animation selector before calling BTANINIT; most skills reuse their own id, while related skills deliberately share an animation and passive reactions use ids 801..808."
source = "investigation"
confidence = "high"
[[global]]
address = "0xaab4a"
name = "skill_handler_script_id"
category = "data-table"
type = "int[300]"
value_domain = "12746 (0x31ca, SKMES.BIN) in the shipped table"
usage = "SKINIT field for all 131 skills. CHMENU and INFOIT look it up and pass it directly to call-script; packed id 0x31ca resolves to SKMES.BIN, the shared per-skill text/behavior dispatcher."
source = "investigation"
confidence = "high"
[[global]]
address = "0x66716"
name = "unit_voice_asset_ids"
category = "data-table"
type = "int[1000][30]"
columns = { "24" = "level_up" }
value_domain = "SYS4INI OGG asset ids; populated columns 0, 1, and 3..24"
usage = "EBINIT per-unit voice bank for 116 voiced characters and variants. Resolving the values through SYS4INI yields character OGG clips (for example Lily's row is LILA1381..1406); BTL and FIELD select mostly unresolved battle/map reaction slots, while SHOWGROW proves column 24 is the level-up reaction."
source = "investigation"
confidence = "high"
[[global]]
address = "0x6dc46"
name = "unit_status_art_asset_ids"
category = "data-table"
type = "int[1000][3]"
columns = { "0" = "healthy", "1" = "wounded", "2" = "critical" }
value_domain = "SYS4INI CS*.AGF asset ids"
usage = "Three-variant status/menu illustration table for 25 principal characters. The ids resolve to 456x420 CS character art; DRAWCHP selects column 0 above 50% HP, column 1 at 26..50%, and column 2 at 25% or below, then loads the art into the status-panel texture slot."
source = "investigation"
confidence = "high"
[[global]]
address = "0x6e7fe"
name = "unit_map_sprite_asset_ids"
category = "data-table"
type = "int[1000][5]"
columns = { "0" = "normal_compact", "1" = "normal_directional", "2" = "alternate_compact", "3" = "alternate_directional", "4" = "special_compact" }
value_domain = "SYS4INI CP*.AGF asset ids"
usage = "Five-context unit sprite-sheet table for 251 units. Even columns 0/2/4 are compact CP*AA-style presentations for normal, alternate-condition, and special-condition states; columns 1/3 are the matching normal/alternate full directional CP*AB sheets used by FIELD. INFOCH/INFOEN and DRAWENP reuse the compact representation."
source = "investigation"
confidence = "high"
[[global]]
address = "0x6fb86"
name = "unit_battle_sprite_asset_id"
category = "data-table"
type = "int[1000]"
value_domain = "SYS4INI CB*.AGF asset ids"
usage = "Battle figure for 248 units. Values resolve to transparent full-body CB character/monster art; BTL loads the selected combatant's figure and INFOEN uses the same asset for the enemy detail view."
source = "investigation"
confidence = "high"
[[global]]
address = "0x6ff6e"
name = "unit_battle_portrait_asset_ids"
category = "data-table"
type = "int[1000][2]"
columns = { "0" = "large_bust", "1" = "compact_face" }
value_domain = "SYS4INI CA*.AGF asset ids"
usage = "Paired battle portrait assets: column 0 is the larger CA*A bust where available, and column 1 is the compact CA*D face portrait. BTL, DRAWENP, and EVOLVE select these assets for combat and unit-growth presentation."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7073e"
name = "unit_battle_cutin_asset_ids"
category = "data-table"
type = "int[1000][2]"
columns = { "0" = "cropped_action", "1" = "full_frame" }
value_domain = "SYS4INI CIC*/CIN*.AGF asset ids"
usage = "Paired 800-pixel-wide battle cut-ins for 64 named characters. The values resolve to CIC cropped/action and CIN full-frame illustrations; BTL is the sole consumer."
source = "investigation"
confidence = "high"
[[global]]
address = "0x712f6"
name = "unit_enemy_info_listed"
category = "data-table"
type = "int[1000]"
value_domain = "0/1"
usage = "EBINIT eligibility flag for 183 enemy-information entries. INFOEN stable-sorts all unit ids, retains only rows whose value is nonzero, and then gates each retained entry's revealed state through the encounter/profile table."
source = "investigation"
confidence = "high"
[[global]]
address = "0x72296"
name = "unit_boss_class"
category = "data-table"
type = "int[1000]"
value_domain = "signed special/boss class -4..4; zero means ordinary unit"
usage = "Nonzero only for 112 bosses, special encounters, and map hazards. CALCDMG grants the boss adjustment, CALCILL uses it for condition immunity, and FIELD/MAGIC/USEMAGIC use it in special-unit targeting rules. Magnitude tracks increasing boss class; the distinction between positive and negative classes remains unresolved."
source = "investigation"
confidence = "med"
[[global]]
address = "0x7267e"
name = "unit_canonical_id"
category = "data-table"
type = "int[1000]"
value_domain = "EBINIT canonical unit id 2..80"
usage = "Maps 106 alternate, boss, brainwashed, EX, and enemy variants back to their canonical character or recruitable archetype. For example all Estelle bosses map to 12, brainwashed Sylphine maps to 5, and ordinary/EX orcs map to recruitable orc 52. Setup, menus, inventory, dismissal, and combat normalize through this id."
source = "investigation"
confidence = "high"
[[global]]
address = "0x72a66"
name = "unit_capturable"
category = "data-table"
type = "int[1000]"
value_domain = "0/1"
usage = "Capture eligibility for 74 ordinary enemy archetypes. SELACT and FIELD allow the capture skill only when this flag is nonzero and the acting unit's capture power meets the target-level check; successful resolution displays the explicit 'Captured the enemy' message."
source = "investigation"
confidence = "high"
[[global]]
address = "0x72e4e"
name = "unit_roster_state_flag_base_index"
category = "data-table"
type = "int[1000]"
value_domain = "relative index 921..951 into the persistent flag bank at 0x6d3; four consecutive flags per mapped unit"
usage = "Persistent roster-state block for seven recruitable heroines. SALLY's first three unit actions mark offsets 1, 2, and 0 respectively; UNITECH marks the offset selected by its recruitment mode; DELCH, REMOVECH, SALLY, and EXILE mark offset 3 when the unit is removed or released. The values are relative indices into the shared flag bank, not absolute global addresses."
source = "investigation"
confidence = "high"
[[global]]
address = "0x73236"
name = "unit_sally_action_unlock_requirements"
category = "data-table"
type = "int[1000][4]"
value_domain = "-1 means unconditional, 0 means unavailable, positive values 1744..1915 are one-based indices into the flag bank at 0x6d3"
usage = "Availability requirements for SALLY's first four per-unit actions. While constructing the action mask, SALLY keeps a positive entry only when flag_bank[value - 1] equals 1, keeps -1 as unconditional, and clears an action whose entry is zero. The table covers the seven principal recruitable heroines plus 29 summonable archetypes."
source = "investigation"
confidence = "high"
[[global]]
address = "0x741d6"
name = "unit_sally_event_ids"
category = "data-table"
type = "int[1000][8]"
value_domain = "SCJUMP event/decision ids 1200..1366; zero means no scripted event for that action"
usage = "Eight-slot event table for SALLY's unit actions. A populated slot is copied to scjump_decision_out and translated through the SCJUMP resource table at 0x87a57 into next_script_resource_id, handing control to the corresponding scene. Principal heroines populate all eight actions; other eligible units populate the three form-dependent event slots. EXILE also tests slot 7 when deciding whether a unit can be released."
source = "investigation"
confidence = "high"
[[global]]
address = "0x76116"
name = "unit_roster_variant_ids"
category = "data-table"
type = "int[1000][2]"
columns = { "0" = "normal", "1" = "brainwashed" }
value_domain = "EBINIT unit ids; column 0 normal/recruitable form, column 1 brainwashed heroine form"
usage = "Roster-form mapping for 36 recruitable units. Column 0 maps the summonable archetypes and principal heroines to their normal unit id; column 1 maps seven heroines to EBINIT ids 21..27, whose names explicitly identify their brainwashed states. SALLY replaces the selected party unit with the action-selected form, and UNITECH recruitment modes 3/4 select the same two columns."
source = "investigation"
confidence = "high"
[[global]]
address = "0x768e6"
name = "unit_sex_magic_bonus_item_id"
category = "data-table"
type = "int[1000]"
value_domain = "ITINIT item ids 101..710"
usage = "Item awarded by SALLY after the three form-dependent intimate-event actions for 22 eligible units. SALLY passes the value directly to USEITEM and then displays the selected character name followed by the literal message 'sex magic bonus' and the resolved item description. Principal heroines yield planetary stones; the remaining rows resolve to recovery items and rare materials."
source = "investigation"
confidence = "high"
[[global]]
address = "0x76cce"
name = "unit_essence_yield"
category = "data-table"
type = "int[1000]"
value_domain = "5..99"
usage = "Essence returned by SALLY's unit-conversion/release actions for 187 units. The normal path adds this value to current essence and the special path adds five times it, clamps to the essence cap, then applies the corresponding alignment adjustment; it is distinct from unit_deployment_cost_base."
source = "investigation"
confidence = "high"
[[global]]
address = "0x770b6"
name = "unit_summon_unlock_flag_index"
category = "data-table"
type = "int[1000]"
value_domain = "global unlock indices 1952..1981"
usage = "Summoning-stone/unlock flag index for the 29 recruitable monster archetypes. SUMMON and SALLY subtract one and test the corresponding cell in the shared flag bank at 0x6d3 before listing or advancing the unit; GAMESTART uses presence of this mapping when restoring party slots."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7749e"
name = "unit_summon_knowledge_threshold"
category = "data-table"
type = "int[1000]"
value_domain = "3..10; zero means no repeatable summon progression"
usage = "Per-archetype familiarity threshold for 19 summonable units. SUMMON divides accumulated progress by it for the displayed percentage and treats zero-threshold units as limited to one copy; SALLY awards the corresponding summoning item and 'deepened understanding' message when accumulated progress reaches the threshold."
source = "investigation"
confidence = "high"
[[global]]
address = "0x77886"
name = "unit_summon_point_cost"
category = "data-table"
type = "int[1000]"
value_domain = "6..999 points"
usage = "Point cost for the 29 summonable unit archetypes. SUMMON compares it with the current point pool, emits 'Insufficient points' on failure, subtracts it on success, and displays the same number in each catalog row."
source = "investigation"
confidence = "high"
[[global]]
address = "0x78c0e"
name = "unit_starting_equipment_item_id"
category = "data-table"
type = "int[1000]"
value_domain = "ITINIT item ids 203..451"
usage = "Fixed equipment for 22 named/boss unit records. Values cross-resolve to weapons, shields, armor, and accessories in ITINIT. SETEN equips the item instead of unit_default_attack_item_id, UNITECH grants it on first recruitment, and INFOEN derives the displayed defense element from it when applicable."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7ab4e"
name = "unit_auto_level_scale_divisor"
category = "data-table"
type = "int[1000]"
value_domain = "1 in the shipped table; zero disables automatic scaling"
usage = "Default level-scaling divisor for 192 enemy definitions. SETEN uses a scenario override when supplied, otherwise divides the difference between scenario level and unit_starting_level by this value, adds the result to the runtime level, and clamps it to unit_level_cap."
source = "investigation"
confidence = "high"
[[global]]
address = "0x83406"
name = "unit_experience_reward"
category = "data-table"
type = "int[1000]"
value_domain = "10..100 base experience"
usage = "Base experience award for 164 enemy records. BTL scales this value by the victor/defeated level difference and difficulty mode, stores the result in the ADDEXP input channel, and invokes ADDEXP for the winning unit."
source = "investigation"
confidence = "high"
[[global]]
address = "0x837ee"
name = "unit_drop_item_ids"
category = "data-table"
type = "int[1000][8]"
columns = { "0" = "drop_1_item_id", "1" = "drop_2_item_id", "2" = "drop_3_item_id", "3" = "drop_4_item_id", "4" = "drop_5_item_id", "5" = "drop_6_item_id", "6" = "drop_7_item_id", "7" = "drop_8_item_id" }
value_domain = "ITINIT item ids 1..711; shipped rows populate columns 0..4"
usage = "Enemy drop table. Values cross-resolve to ITINIT items (for example treasure puttetto drops bronze/silver/gold coins and planet stones); BTL rolls and awards the rows, while INFOEN displays the possible drops."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8572e"
name = "unit_drop_chance_percent"
category = "data-table"
type = "int[1000][8]"
columns = { "0" = "drop_1_percent", "1" = "drop_2_percent", "2" = "drop_3_percent", "3" = "drop_4_percent", "4" = "drop_5_percent", "5" = "drop_6_percent", "6" = "drop_7_percent", "7" = "drop_8_percent" }
value_domain = "1..100 percent; columns align with unit_drop_item_ids"
usage = "Per-slot drop chance paired with unit_drop_item_ids. BTL draws random-modulo 100 for each populated slot and awards the item when the result is below this value; only columns 0..4 are populated in shipped EBINIT."
source = "investigation"
confidence = "high"
[[global]]
address = "0x8766e"
name = "unit_large_battle_sprite"
category = "data-table"
type = "int[1000]"
value_domain = "0/1"
usage = "Presentation flag for 33 large demons, dragons, gods, and their variants. BTL and INFOEN use it to anchor the CB battle figure at the lower screen edge and omit the ordinary-unit framing treatment required by smaller sprites."
source = "investigation"
confidence = "high"
[[global]]
address = "0x70f0e"
name = "unit_sort_key"
category = "data-table"
type = "int[1000]"
value_domain = "mostly unique values 10..2070"
usage = "EBINIT ordering key populated for 248 units. CHMENU, EXILE, SALLY, INFOEN, and SUMMON pass this array to op 0x12f's stable index sort or combine it with a unit id to build menu ordering keys, mirroring item_sort_key and skill_sort_key."
source = "investigation"
confidence = "high"
[[global]]
address = "0x716de"
name = "unit_icon_id"
category = "data-table"
type = "int[1000]"
value_domain = "1..103"
usage = "EBINIT icon selector populated for all 277 units. READICON returns it for unit ids; CHMENU, DRAWCHP, EXILE, SALLY, and SUMMON convert the value into icon-atlas page and cell coordinates."
source = "investigation"
confidence = "high"
[[global]]
address = "0x71ac6"
name = "unit_species_category"
category = "data-table"
type = "int[1000]"
value_domain = "1..3"
usage = "Broad EBINIT species/allegiance category for 198 units: value 1 covers humans and allied heroines, 2 covers demons including Emilio and Lily as well as many demonic monsters, and 3 covers other monsters, dragons, and elementals. CHMENU uses it for equipment restrictions, CALCDMG for category-sensitive effects, and INFOCH/INFOEN for display."
source = "investigation"
confidence = "med"
[[global]]
address = "0x71eae"
name = "unit_sex_category"
category = "data-table"
type = "int[1000]"
value_domain = "1 male, 2 female, 3 sexless"
usage = "EBINIT sex category for 251 units. Named character records establish the three values; CHMENU tests it against item_sex_restriction_mask, while INFOCH and INFOEN use the same category in unit presentation."
source = "investigation"
confidence = "high"
[[global]]
address = "0x77c6e"
name = "unit_defense_element"
category = "data-table"
type = "int[1000]"
value_domain = "1..12 (AFINIT defense-attribute enum)"
usage = "EBINIT defensive affinity for 250 units. DRAWENP renders it through the same twelve-value defense-attribute vocabulary as item_defense_element; CALCBTPARAM, BTRTN, and route scripts consume it during battle resolution."
source = "investigation"
confidence = "high"
[[global]]
address = "0x78056"
name = "unit_default_attack_item_id"
category = "data-table"
type = "int[1000]"
value_domain = "ITINIT innate-attack item ids 901..943"
usage = "EBINIT default attack for 250 units. Every populated value cross-resolves to ITINIT's innate-attack records; SELACT, BTL, CALCBTPARAM, CALCDMG, and CHMENU use it when no equipped weapon overrides the unit's natural attack."
source = "investigation"
confidence = "high"
[[global]]
address = "0x78826"
name = "unit_weapon_item_category"
category = "data-table"
type = "int[1000]"
value_domain = "-1 unrestricted, otherwise item categories 10..19"
usage = "EBINIT weapon/equipment-family restriction for 179 units. CHMENU compares an item's item_category directly with this value when deciding whether the selected unit can equip it; Lily's forms store -1 for unrestricted handling."
source = "investigation"
confidence = "high"
[[global]]
address = "0x78ff6"
name = "unit_starting_skill_ids"
category = "data-table"
type = "int[1000][4]"
columns = { "0" = "skill_slot_1", "1" = "skill_slot_2", "2" = "skill_slot_3", "3" = "skill_slot_4" }
value_domain = "SKINIT skill ids 1..249; zero means empty"
usage = "EBINIT four-slot starting skill record. The shipped table populates the first three columns. SETEN, UNITECH, and SALLY copy the row into each runtime unit's skill list; GAMESTART, FORT, FIELD, and DRAWENP inspect the same ids, all of which cross-resolve to SKINIT."
source = "investigation"
confidence = "high"
[[global]]
address = "0x79f96"
name = "unit_deployment_cost_base"
category = "data-table"
type = "int[1000]"
value_domain = "5..99"
usage = "Base deployment/command cost for 204 units. SETCH, SETEN, and ADDEXP copy it plus the per-unit adjustment at 0x57357 into runtime cost 0x5f0bb; SALLY checks the prospective total against party capacity, while FIELD/READY add it to and REMOVECH subtracts it from the deployed-cost aggregate."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7a37e"
name = "unit_starting_level"
category = "data-table"
type = "int[1000]"
value_domain = "1..99"
usage = "EBINIT initial level for 242 units. Lily's three forms store levels 1, 20, and 40. SETEN and SALLY copy or compare it while constructing a runtime unit, and UNITECH uses it when synchronizing form and character state."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7a766"
name = "unit_level_cap"
category = "data-table"
type = "int[1000]"
value_domain = "1..99"
usage = "EBINIT maximum level for 243 units. ADDEXP permits level growth only while the runtime level is below this field, and SETEN uses it as the default upper bound when no scenario-specific enemy cap is supplied."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7af36"
name = "unit_base_stats"
category = "data-table"
type = "int[1000][14]"
columns = { "0" = "accuracy", "1" = "evasion", "2" = "physical_attack", "3" = "physical_defense", "4" = "magic_attack", "5" = "magic_defense", "6" = "speed", "7" = "luck", "8" = "critical_chance", "9" = "capture_power", "10" = "movement", "11" = "max_hp", "12" = "max_sp", "13" = "max_fs" }
value_domain = "nonnegative base stat values; populated columns 2..7 and 10..13"
usage = "EBINIT fourteen-column base-stat record copied wholesale into each runtime unit by SETEN, UNITECH, and SALLY. Its layout matches item_stat_modifiers: columns 2 physical attack, 3 physical defense, 4 magic attack, 5 magic defense, 6 speed, 7 luck, 10 movement, 11 max HP, 12 max SP, and 13 max FS; accuracy/evasion and other unpopulated columns begin at zero."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7e5e6"
name = "unit_stat_growth_rates"
category = "data-table"
type = "int[1000][14]"
columns = { "0" = "accuracy", "1" = "evasion", "2" = "physical_attack", "3" = "physical_defense", "4" = "magic_attack", "5" = "magic_defense", "6" = "speed", "7" = "luck", "8" = "critical_chance", "9" = "capture_power", "10" = "movement", "11" = "max_hp", "12" = "max_sp", "13" = "max_fs" }
value_domain = "per-level hundredths; populated columns 2..7 and 11..13"
usage = "EBINIT per-level growth record with the same fourteen-column layout as unit_base_stats. ADDEXP adds each rate to a fractional accumulator, divides by 100 to award whole stat points, and retains the remainder; SETEN and UNITECH apply the same rates when materializing units above their starting level."
source = "investigation"
confidence = "high"
[[global]]
address = "0x0"
name = "system_flow_request"
category = "choice-output"
type = "int"
value_domain = "0..5"
usage = "Return-mode request shared by TITLE/GAMESTART and SYSTEM4. The natural New Game path writes 1 immediately after GAMESTART's TUNE call; TITLE returns and SYSTEM4 routes value 1 into its ADV scene loop. Values 2/3/5 route to FORT/FIELD/CAMP; other writers use the same system-level request channel."
source = "investigation"
confidence = "high"
depends_on = ["0x699", "0x62ccf"]
[[global]]
address = "0x699"
name = "next_script_resource_id"
category = "choice-output"
type = "int"
value_domain = "raw SYS4INI id or 0"
usage = "SYSTEM4's computed child-script resource id. On the normal ADV path SYSTEM4 copies G[0x87a57][scjump_decision_out] here, substitutes raw id 0x22 (SC0000.BIN) when zero, executes call-script through this cell at offset 0x477, then clears it after the child returns."
source = "investigation"
confidence = "high"
depends_on = ["0x62ccf"]
[[global]]
address = "0x3234"
name = "chapter_mode"
category = "story-flag"
type = "int"
value_domain = "1..9"
usage = "Progression chapter/mode selector. SCJUMP's top-level switch keys on it; branch-read by progression scripts (FIELD etc.), not directly by SC/SP scenes."
source = "investigation"
confidence = "high"
depends_on = ["0x62ccf"]
[[global]]
address = "0xa57"
name = "lily_form_a"
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "Lily current-form flag A. Exactly one of form A/B/C is 1; gates form-specific voiced dialogue (seeding 0xa57=1 -> SC0000 186->229 lines). Set externally (menu/save), no static writer."
source = "investigation"
confidence = "high"
depends_on = ["0xa58", "0xa59"]
[[global]]
address = "0xa58"
name = "lily_form_b"
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "Lily current-form flag B. See lily_form_a."
source = "investigation"
confidence = "high"
depends_on = ["0xa57", "0xa59"]
[[global]]
address = "0xa59"
name = "lily_form_c"
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "Lily current-form flag C. See lily_form_a."
source = "investigation"
confidence = "high"
depends_on = ["0xa57", "0xa58"]
[[global]]
address = "0x6c1"
name = "adv_chrome_enabled"
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "Inherited SYSTEM4 UI-boot flag. Standard ADV scripts register the five visible SO001 control-strip pointer rectangles only while nonzero; zero skips directly to the three off-screen keyboard/pad records. The Phase-A single-scene Godot bootstrap seeds the native observed value 1."
source = "investigation"
confidence = "high"
depends_on = ["0x6c9", "0x6ca", "0x6cb", "0x6cc", "0x6cd"]
[[global]]
address = "0x62425"
name = "adv_hide_window_enabled"
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "Native ADV-scheduler permission for the standard Hide Window action. After op 0x199 enters the registered yield-A handler, every standard ADV scene calls HIDEWIN.BIN only while this value is nonzero. No script writes it and the complete boot-to-SC0000 VM-write capture does not contain it, so it is native-owned inherited state rather than saved-game or script boot data. The Godot scene bootstrap mirrors the original enabled value 1."
source = "investigation"
confidence = "high"
depends_on = ["0x6c1"]
[[global]]
address = "0x2e49"
name = "character_voice_suppressed"
category = "data-table"
type = "int[13]"
value_domain = "13 cells of {0,1}; 0 enables that character's voice, 1 suppresses it"
usage = "Base of the per-character voice enable/suppress settings. INITCONFIG zero-fills all 13 cells and registers each with the shared profile service; LOADCONFIG restores them. CONFIG indexes the table to preview a character voice and write 0/1. ROOM reads cell 0 before assigning its selected greeter's greeting/farewell voice ids, so the port's former scalar interpretation of zero-int-range (writing 13 into the base cell) suppressed those voices on every natural boot. This names the script-visible setting array without choosing a persistence backend for op 0x1a2/0x1a3."
source = "investigation"
confidence = "high"
depends_on = []
[[global]]
address = "0x6c9"
name = "adv_hover_history"
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "Pointer-hover flag for the standard ADV History button at (684,572). Its op 0x90 enter/leave callbacks set 1/0; the shared SO001 redraw shows the History tooltip plus generic hover overlay while set."
source = "investigation"
confidence = "high"
depends_on = ["0x6ca", "0x6cb", "0x6cc", "0x6cd"]
[[global]]
address = "0x6ca"
name = "adv_hover_auto_message"
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "Pointer-hover flag for the standard ADV Auto-message button at (706,572). See adv_hover_history."
source = "investigation"
confidence = "high"
depends_on = ["0x6c9"]
[[global]]
address = "0x6cb"
name = "adv_hover_message_skip"
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "Pointer-hover flag for the standard ADV all-message Skip button at (728,572). See adv_hover_history."
source = "investigation"
confidence = "high"
depends_on = ["0x6c9"]
[[global]]
address = "0x6cc"
name = "adv_hover_read_message_skip"
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "Pointer-hover flag for the standard ADV read-message-only Skip button at (750,572). See adv_hover_history."
source = "investigation"
confidence = "high"
depends_on = ["0x6c9"]
[[global]]
address = "0x6cd"
name = "adv_hover_hide_window"
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "Pointer-hover flag for the standard ADV Hide-window button at (772,572). See adv_hover_history."
source = "investigation"
confidence = "high"
depends_on = ["0x6c9"]
[[global]]
address = "0x62ccf"
name = "scjump_decision_out"
category = "choice-output"
type = "int"
value_domain = "?"
usage = "One of SCJUMP's output/decision globals (progression state machine writes it). Related to chapter_mode."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0xeff75"
name = "current_entity_index_hi"
category = "index-pointer"
type = "int"
value_domain = "row index"
usage = "High-purity current-entity row index (purity 0.95 in the auto shape map); dominant 2D-table row selector."
source = "inference"
confidence = "med"
depends_on = []
[[global]]
address = "0x152616"
name = "current_entity_index"
category = "index-pointer"
type = "int"
value_domain = "row index"
usage = "Primary current-entity row index (RECOVER-confirmed; purity 0.51, 363 row-index uses)."
source = "investigation"
confidence = "med"
depends_on = []
[[global]]
address = "0x6be"
name = ""
category = "ui-toggle"
type = "int"
value_domain = "{0,1}"
usage = "ADV message-window / text-render state in the 0x6bx-0x6cx chrome cluster (passed to render helpers u0041F9C0/u00415F70 alongside 0x6c3). NOT a story flag — high scene-reach is from the shared render chrome. Branch-read in 146 scenes."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0x6c3"
name = ""
category = "ui-toggle"
type = "int"
value_domain = "?"
usage = "ADV message-window / text-render state in the 0x6bx-0x6cx chrome cluster (`mov 0x6c3,<val>` then `u00415F70(0x6c3)` right after draw-texture; paired with 0x6be). NOT a story flag. Branch-read in 136 scenes."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0xa68"
name = ""
category = "choice-output"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 11 scenes / 12 scripts; compared against [0, 1]; writers=['SC0740.BIN', 'SC1580.BIN', 'SC1590.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0xa99"
name = "game_started"
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "New-game/playthrough gate: set to 1 by GAMESTART.BIN, then tested `==1` in story scenes (SC0200/SC0490, e.g. `0xa99==1 AND stat>3`). Marks that the game proper has begun. INFERENCE from the GAMESTART writer — confirm exact semantics before relying on it."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0xd92"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 29 scenes / 29 scripts; compared against [1]; writers=none (external/native?)."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x3231"
name = "game_mode"
category = "story-flag"
type = "int"
value_domain = "1..9"
usage = "Game-mode/phase selector in the 0x3231-0x3234 progression-state cluster (chapter_mode is 0x3234). Enum 1..9, written by the gameplay scripts (AIM/ALCHEMY/BTL/BUNKI), branch-read in 136 scenes. Distinct from chapter; likely current sub-mode/screen. INFERENCE — confirm with a listing/sweep before relying on the exact meaning."
source = "inference"
confidence = "med"
depends_on = ["0x3234"]
[[global]]
address = "0x3238"
name = ""
category = "unknown"
type = "int"
value_domain = "{0,1}"
usage = "Config/settings global (CONFIG.BIN/INITCONFIG.BIN writer, scene-reach 0) — NOT a scene story flag; miner over-tagged it. Branch-read in 5 scripts; compared against [1]."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0x3275"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 136 scenes / 143 scripts; compared against [0]; writers=['CAMP.BIN', 'DEBUGADV.BIN', 'DEBUGADV2.BIN', 'FIELD.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x3301"
name = ""
category = "unknown"
type = "int"
value_domain = "one of {1, 2}"
usage = "Config/settings global (INITCONFIG.BIN writer, scene-reach 0) — NOT a scene story flag; miner over-tagged it. Branch-read in 6 scripts; compared against [1, 2]."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0x3303"
name = ""
category = "unknown"
type = "int"
value_domain = "{0,1}"
usage = "Config/settings global (CONFIG.BIN/INITCONFIG.BIN writer, scene-reach 0) — NOT a scene story flag; miner over-tagged it. Branch-read in 8 scripts; compared against [1]."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0x3304"
name = ""
category = "unknown"
type = "int"
value_domain = "{0,1}"
usage = "Config/settings global (CONFIG.BIN/INITCONFIG.BIN writer, scene-reach 0) — NOT a scene story flag; miner over-tagged it. Branch-read in 13 scripts; compared against [1]."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0x6718"
name = "selected_party_slot"
category = "index-pointer"
type = "int"
value_domain = "0..99"
usage = "Current/selected slot in the 100-entry party-unit arrays. UNITECH chooses a free slot here before populating it; CHMENU replaces it with the selected sorted roster slot, then uses it to index party_slot_flags, party_slot_character_id, and companion per-slot tables. A natural New Game enters SC0000 with slot 2 selected."
source = "investigation"
confidence = "high"
depends_on = ["0x673c", "0x67a0"]
[[global]]
address = "0x673c"
name = "party_slot_flags"
category = "data-table"
type = "int[100]"
value_domain = "bitfield"
usage = "Per-party-slot state flags for slots 0..99. UNITECH creates the initial unit by setting slot 2 to 0x13; CALCARR counts slots whose flags intersect 0x6, and CHMENU includes slots with bit 1 set. Exact meanings of the remaining bits are not yet classified."
source = "investigation"
confidence = "high"
depends_on = ["0x6718", "0x67a0"]
[[global]]
address = "0x67a0"
name = "party_slot_character_id"
category = "data-table"
type = "int[100]"
value_domain = "character/unit definition id or 0"
usage = "Character/unit definition id stored for each party slot. UNITECH writes character id 2 into initial slot 2 on a natural New Game; CHMENU reads this table for every active party_slot_flags entry when constructing its roster."
source = "investigation"
confidence = "high"
depends_on = ["0x6718", "0x673c"]
[[global]]
address = "0x671b"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {999}"
usage = "TODO: confirm. Branch-read in 0 scenes / 5 scripts; compared against [999]; writers=['ALCHEMY.BIN', 'DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x671e"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {5, 6}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [5, 6]; writers=['USEMAGIC.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x6722"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 1, 5, 99}"
usage = "TODO: confirm. Branch-read in 13 scenes / 18 scripts; compared against [0, 1, 5, 99]; writers=['GAMESTART.BIN', 'SALLY.BIN', 'SC0010.BIN', 'SC0140.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x6724"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 25, 50, 99}"
usage = "TODO: confirm. Branch-read in 4 scenes / 10 scripts; compared against [0, 25, 50, 99]; writers=['DEBUGADV2.BIN', 'DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x7679"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 1, 4, 8, 16, 256, 512, 1024}"
usage = "TODO: confirm. Branch-read in 0 scenes / 4 scripts; compared against [0, 1, 4, 8, 16, 256, 512, 1024]; writers=['FIELD.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x767a"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 4 scripts; compared against [0]; writers=['DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN', 'FIELD.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x767b"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 136 scenes / 150 scripts; compared against [0, 1]; writers=['DEBUGADV2.BIN', 'DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x767d"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 1, 2, 3}"
usage = "TODO: confirm. Branch-read in 0 scenes / 9 scripts; compared against [0, 1, 2, 3]; writers=['CAMP.BIN', 'DEBUGADV2.BIN', 'DEBUGMAP.BIN', 'DEBUGMAP2.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x204f4"
name = ""
category = "unknown"
type = "int"
value_domain = "small int"
usage = "Map/field display state (FIELD.BIN writer; used in DRAWCHP draw call u00422460 and `div 0x204f4/3`). A numeric display parameter, NOT a story flag. Branch-read in 2 scenes."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0x204f5"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {1, 2, 4, 8, 16, 32, 64}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [1, 2, 4, 8, 16, 32, 64]; writers=['FIELD.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x204f7"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {1, 2, 4, 6}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [1, 2, 4, 6]; writers=['DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN', 'GAMESTART.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x2052e"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 1, 2, 3}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [0, 1, 2, 3]; writers=['FIELD.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x20530"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 14 scenes / 22 scripts; compared against [0]; writers=['DEBUGADV2.BIN', 'DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x20534"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 10, 100, 999}"
usage = "TODO: confirm. Branch-read in 14 scenes / 24 scripts; compared against [0, 10, 100, 999]; writers=['DEBUGADV2.BIN', 'DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x53ef4"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [0]; writers=['CAMP.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x55e37"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [0]; writers=['EVOLVE.BIN', 'STUDY.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x55e38"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 1, 2}"
usage = "TODO: confirm. Branch-read in 0 scenes / 9 scripts; compared against [0, 1, 2]; writers=['CHMENU.BIN', 'INFO.BIN', 'INFOAF.BIN', 'INFOCH.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x55e39"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 1, 4}"
usage = "TODO: confirm. Branch-read in 0 scenes / 8 scripts; compared against [0, 1, 4]; writers=['ALCHEMY.BIN', 'EVOLVE.BIN', 'MAGIC2.BIN', 'SELSTAGE.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x55e3a"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 136 scenes / 143 scripts; compared against [0]; writers=['FORT.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x617fd"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 25, 50}"
usage = "TODO: confirm. Branch-read in 0 scenes / 6 scripts; compared against [0, 25, 50]; writers=['GAMESTART.BIN', 'TUNE.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x62428"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [0]; writers=['CALLBACK_WINDOW.BIN', 'DEBUG.BIN', 'DEBUGADV.BIN', 'DEBUGADV2.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x62439"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 6 scripts; compared against [0]; writers=['CHMENU.BIN', 'INFOAF.BIN', 'INFOCH.BIN', 'INFOEN.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x6249e"
name = ""
category = "unknown"
type = "int"
value_domain = "0..7"
usage = "Graphics-subsystem state in the 0x624xx gfx-object range (set via `mov 0x6249e,<n>` alongside `mov 0x62450,<slot>`). Likely a draw/slot parameter, NOT a story flag. Branch-read in 78 scenes."
source = "inference"
confidence = "low"
depends_on = []
[[global]]
address = "0x624be"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 8 scripts; compared against [0]; writers=['MENU.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x62ccc"
name = "scjump_decision_out2"
category = "choice-output"
type = "int"
value_domain = "small enum"
usage = "Adjacent to scjump_decision_out (0x62ccf) in the 0x62ccc-0x62ccf progression decision-output cluster; same 136-scene reach, written by CAMP/CLOSE/DEBUGADV. INFERENCE from adjacency — confirm meaning before relying on it."
source = "inference"
confidence = "low"
depends_on = ["0x62ccf"]
[[global]]
address = "0x6642c"
name = "route_branch"
category = "story-flag"
type = "int"
value_domain = "0..7"
usage = "Route/branch selector: sole writer is BUNKI.BIN (分岐 = branching), enum 0..7, branch-read in 36 scenes. Selects a story branch/route. INFERENCE from the BUNKI writer + enum — confirm exact routes via a listing/sweep."
source = "inference"
confidence = "med"
depends_on = []
[[global]]
address = "0x665d3"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {1, 2, 4, 8, 32, 64, 128, 65536}"
usage = "TODO: confirm. Branch-read in 0 scenes / 4 scripts; compared against [1, 2, 4, 8, 32, 64, 128, 65536]; writers=['ALCHEMY.BIN', 'BUNKI.BIN', 'DEBUGADV.BIN', 'EVOLVE.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x665d6"
name = ""
category = "story-flag"
type = "int"
value_domain = "?"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against []; writers=['MES.BIN', 'SBUNKI.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x665d7"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {1, 3}"
usage = "TODO: confirm. Branch-read in 0 scenes / 5 scripts; compared against [1, 3]; writers=['ADDSKILL.BIN', 'SBUNKI.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x66714"
name = ""
category = "story-flag"
type = "int"
value_domain = "?"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against []; writers=['DEBUGBTL.BIN', 'FIELD.BIN', 'RTN_M051.BIN', 'RTN_M052.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0xab8e7"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 10, 15, 20, 25, 30, 35, 40}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [0, 10, 15, 20, 25, 30, 35, 40]; writers=['CALCCC.BIN', 'CCINIT.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0xaba5c"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 136 scenes / 149 scripts; compared against [0, 1]; writers=['DEBUGADV.BIN', 'DEBUGADV2.BIN', 'SC0000.BIN', 'SC0010.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0xaba5e"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {2}"
usage = "TODO: confirm. Branch-read in 0 scenes / 5 scripts; compared against [2]; writers=['DEBUGMAP.BIN', 'DEBUGMAP2.BIN', 'DEBUGMAP3.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0xcc9f3"
name = ""
category = "story-flag"
type = "int"
value_domain = "?"
usage = "TODO: confirm. Branch-read in 0 scenes / 6 scripts; compared against []; writers=['CALCSCOPE.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0xccc21"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 4 scripts; compared against [0]; writers=['CHMENU.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0xeff77"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 2, 3}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [0, 2, 3]; writers=['BTRTN.BIN', 'MVRTN.BIN', 'RTN_B001.BIN', 'RTN_B002.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x152617"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 4 scripts; compared against [0]; writers=['CLOSE.BIN', 'FIELD.BIN', 'INFOEN.BIN', 'READY.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x152618"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {1, 2, 4, 7}"
usage = "TODO: confirm. Branch-read in 0 scenes / 3 scripts; compared against [1, 2, 4, 7]; writers=['FIELD.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x1560e7"
name = ""
category = "story-flag"
type = "int"
value_domain = "one of {0, 1, 2, 3, 4, 5, 6, 7}"
usage = "TODO: confirm. Branch-read in 0 scenes / 4 scripts; compared against [0, 1, 2, 3, 4, 5, 6, 7]; writers=['MAGIC.BIN', 'SELACT.BIN', 'SUMMON.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x15a094"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 6 scripts; compared against [0]; writers=['ALCHEMY.BIN', 'EVOLVE.BIN', 'SELSTAGE.BIN', 'STUDY.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x15a095"
name = ""
category = "story-flag"
type = "int"
value_domain = "{0,1}"
usage = "TODO: confirm. Branch-read in 0 scenes / 6 scripts; compared against [0]; writers=['INFO.BIN', 'INFOCH.BIN', 'MENU.BIN']."
source = "auto-shape"
confidence = "med"
depends_on = []
[[global]]
address = "0x4dfbc"
name = "scjump_progress_a"
category = "counter"
type = "int"
value_domain = "progress index"
usage = "Dominant SCJUMP switch input (1609 comparison reads) — a per-chapter story-progress counter/position the progression machine branches on. INFERENCE from SCJUMP usage; confirm exact meaning via a listing/playthrough."
source = "inference"
confidence = "med"
depends_on = []
[[global]]
address = "0x2052e"
name = "scjump_progress_b"
category = "counter"
type = "int"
value_domain = "progress index"
usage = "Second SCJUMP switch input (1223 comparison reads) — progression counter/position. INFERENCE from SCJUMP usage."
source = "inference"
confidence = "med"
depends_on = []
[[global]]
address = "0x152618"
name = "scjump_progress_c"
category = "counter"
type = "int"
value_domain = "progress index"
usage = "Third SCJUMP switch input (530 comparison reads) — progression counter/position. INFERENCE from SCJUMP usage."
source = "inference"
confidence = "med"
depends_on = []
[[global]]
address = "0xe6c5d"
name = "scjump_progress_d"
category = "counter"
type = "int"
value_domain = "progress index"
usage = "SCJUMP switch input (168 comparison reads) — progression counter/position. INFERENCE from SCJUMP usage."
source = "inference"
confidence = "med"
depends_on = []
[[global]]
address = "0x26f1"
name = "object_type_names"
category = "string-table"
type = "string[100]"
value_domain = "OBINIT object definition names for ids 1..46"
usage = "OBINIT writes the authoritative object names. FIELD, SETOBJ, and DRAWOBJ use STINIT's object type id to select these definitions; extract_init joins the names to stage object placements."
source = "investigation"
confidence = "high"
[[global]]
address = "0x2755"
name = "object_type_descriptions"
category = "string-table"
type = "string[100]"
value_domain = "optional OBINIT player-facing object behavior/effect descriptions for ids 1..46"
usage = "OBINIT writes the short object descriptions displayed by the field object-information path. extract_init joins populated descriptions to STINIT object placements by type id."
source = "investigation"
confidence = "high"
[[global]]
address = "0x27b9"
name = "stage_victory_condition_1"
category = "string-table"
type = "string"
value_domain = "first player-facing victory-condition line for the loaded stage"
usage = "STINIT writes one value for each of its 74 stage records. AIM renders this line first in the victory-condition section, and FIELD copies it into the current mission-condition display."
source = "investigation"
confidence = "high"
[[global]]
address = "0x27ba"
name = "stage_victory_condition_2"
category = "string-table"
type = "string"
value_domain = "optional second player-facing victory-condition line; empty when unused"
usage = "STINIT writes one value for each of its 74 stage records. AIM renders nonempty values after stage_victory_condition_1, and FIELD copies the slot into the current mission-condition display."
source = "investigation"
confidence = "high"
[[global]]
address = "0x27bb"
name = "stage_defeat_condition_1"
category = "string-table"
type = "string"
value_domain = "first player-facing defeat-condition line for the loaded stage"
usage = "STINIT writes one value for each of its 74 stage records. AIM renders this line first in the defeat-condition section, and FIELD copies it into the current mission-condition display."
source = "investigation"
confidence = "high"
[[global]]
address = "0x27bc"
name = "stage_defeat_condition_2"
category = "string-table"
type = "string"
value_domain = "optional second player-facing defeat-condition line; empty when unused"
usage = "STINIT writes one value for each of its 74 stage records. AIM renders nonempty values after stage_defeat_condition_1, and FIELD copies the slot into the current mission-condition display."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7302"
name = "stage_bgm_id"
category = "data-table"
type = "int"
value_domain = "{0,11..18}; 0 disables stage BGM"
usage = "STINIT's per-stage scalar loaded for all 74 records. FIELD passes the value directly to play-bgm when starting the stage."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe730c"
name = "stage_turn_limit"
category = "data-table"
type = "int"
value_domain = "{0,10,15,30,50,60,70,75,80,100}; 0 means no limit"
usage = "STINIT's per-stage turn limit. DRAWCHP presents the value in the stage information, while FIELD compares the current turn against it when checking stage completion."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe730d"
name = "stage_turn_limit_outcome"
category = "data-table"
type = "int"
value_domain = "{0,1}; 0 defeat on expiry, 1 forced-retreat clear on expiry"
usage = "STINIT mode paired with stage_turn_limit. Stage 1 stores 0 and describes 50-turn expiry as defeat; stage 2 stores 1 and explicitly describes 15-turn expiry as a forced-retreat clear."
source = "investigation"
confidence = "high"
[[global]]
address = "0x32f1"
name = "difficulty_index"
category = "index-pointer"
type = "int"
value_domain = "{0,1,2}"
usage = "GAMESTART's three-way difficulty selection. SETEN uses the zero-based index to select difficulty stat adjustments; FIELD indexes three-column stage-enemy arrays with it, and SETOBJ tests it against each object's difficulty mask."
source = "investigation"
confidence = "high"
[[global]]
address = "0x152617"
name = "current_stage_enemy_spawn_slot"
category = "index-pointer"
type = "int"
value_domain = "0..29; slot 0 is ADDEN's synthesized special-unit path"
usage = "Current STINIT enemy-template slot. FIELD selects slots 1..29 while materializing stage units, SETEN records the slot on the runtime entity and reads every parallel enemy buffer through it, and ADDEN uses slot 0 for its special generated unit."
source = "investigation"
confidence = "high"
[[global]]
address = "0x6d3"
name = "story_event_flags"
category = "data-table"
type = "int[]"
value_domain = "mostly {0,1}"
usage = "Shared one-based story/event flag bank. Progression, recruitment, item, and stage logic read or write individual cells; STINIT object prerequisite ids are decremented by one before SETOBJ tests this array."
source = "investigation"
confidence = "high"
[[global]]
address = "0x7684"
name = "stage_clear_state"
category = "data-table"
type = "int[]"
value_domain = "{0,1}; 1 means the stage has been cleared"
usage = "Persistent per-stage completion state indexed by stage id. STAGECLEAR sets the current stage cell to 1, while FORT, SELSTAGE, and FIELD use zero versus one to distinguish an uncleared mission from a cleared replay."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7303"
name = "stage_target_clear_turns"
category = "data-table"
type = "int"
value_domain = "0..50; 0 disables turn-performance scaling"
usage = "STINIT's target/par turn count. STAGECLEAR divides elapsed turns by this value to derive a performance multiplier; when replaying an already-cleared ordinary stage, FIELD also uses it as the forced-retreat turn limit."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7304"
name = "stage_clear_performance_bonus"
category = "data-table"
type = "int"
value_domain = "0..20"
usage = "Base stage-clear reward increment. STAGECLEAR multiplies it by the turn-performance percentage derived from stage_target_clear_turns, divides by 100, and adds the result to the capped persistent reward counter at 0x6719. The counter's player-facing resource name remains unresolved."
source = "investigation"
confidence = "med"
[[global]]
address = "0xe730b"
name = "stage_replay_rules_disabled"
category = "data-table"
type = "int"
value_domain = "{0,1}; 1 preserves the original mission rules after clear"
usage = "FIELD's already-cleared-stage override gate. For a cleared stage with value 0, FIELD replaces the mission with an all-party retreat objective and a stage_target_clear_turns forced-retreat limit; value 1 suppresses that replay conversion and related revisit handling."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7311"
name = "stage_map_texture_asset_overrides"
category = "data-table"
type = "int[20]"
value_domain = "SYS4INI resource id when positive, 0 disables the slot, -1 selects the shared fallback asset"
usage = "Twenty current-stage map texture slots. FIELD loads positive resource ids into tiled surface slots 0x52+index, skips zero, and substitutes the shared per-index fallback for -1; DRAWMAP selects and draws those surfaces through the terrain-to-texture-slot map."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7325"
name = "stage_object_tile_x"
category = "data-table"
type = "int[50]"
value_domain = "map tile X coordinate, 1..25 in the shipped stages"
usage = "X coordinate for each current-stage object slot. DRAWOBJ converts it to centered map-space pixels; FIELD and CALCOCC use it with stage_object_tile_y for object interaction and occupancy."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7357"
name = "stage_object_tile_y"
category = "data-table"
type = "int[50]"
value_domain = "map tile Y coordinate, 1..800 in the shipped stages"
usage = "Y coordinate for each current-stage object slot. DRAWOBJ converts it to centered map-space pixels; FIELD and CALCOCC use it with stage_object_tile_x for object interaction and occupancy."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7389"
name = "stage_object_type_id"
category = "data-table"
type = "int[50]"
value_domain = "object definition id 1..46"
usage = "Object-definition id for each current-stage object slot. SETOBJ decides whether the slot exists, while DRAWOBJ and FIELD use the id to select shared object graphics, dimensions, animation, collision, and behavior metadata."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe741f"
name = "stage_object_reinforcement_interval_turns"
category = "data-table"
type = "int[50]"
value_domain = "positive turn interval, 5..80 in the shipped stages; zero disables scheduled spawning"
usage = "Per-object reinforcement schedule. FIELD compares the current turn and the object's runtime spawn count against this interval to calculate due weighted enemy spawns; object type 27 uses the same value as its one-shot trigger turn."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7451"
name = "stage_object_reinforcement_spawn_limit"
category = "data-table"
type = "int[50]"
value_domain = "positive spawn limit, 1..20 in the shipped stages; zero disables scheduled spawning"
usage = "Maximum number of scheduled units materialized through a stage object. FIELD stops the object's reinforcement path once its runtime spawn counter reaches this value; object type 27 stores one for its one-shot special spawn."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe7483"
name = "stage_object_difficulty_mask"
category = "data-table"
type = "int[50]"
value_domain = "{3,4,7}; bit 0/1/2 enables the object on the corresponding difficulty"
usage = "Per-object difficulty inclusion mask. SETOBJ uses check-bit with difficulty_index and rejects the object slot when the selected difficulty bit is absent."
source = "investigation"
confidence = "high"
depends_on = ["0x32f1"]
[[global]]
address = "0xe74b5"
name = "stage_object_required_story_flags"
category = "data-table"
type = "int[50][7]"
columns = { "0" = "required_flag_1", "1" = "required_flag_2", "2" = "required_flag_3", "3" = "required_flag_4", "4" = "required_flag_5", "5" = "required_flag_6", "6" = "required_flag_7" }
value_domain = "one-based story_event_flags ids; zero means no requirement"
usage = "Seven positive prerequisites per stage object. SETOBJ subtracts one from every populated id and suppresses the object unless the corresponding story_event_flags cell equals 1."
source = "investigation"
confidence = "high"
depends_on = ["0x6d3"]
[[global]]
address = "0xe7613"
name = "stage_object_forbidden_story_flags"
category = "data-table"
type = "int[50][5]"
columns = { "0" = "forbidden_flag_1", "1" = "forbidden_flag_2", "2" = "forbidden_flag_3", "3" = "forbidden_flag_4", "4" = "forbidden_flag_5" }
value_domain = "one-based story_event_flags ids; zero means no exclusion"
usage = "Five negative prerequisites per stage object. SETOBJ subtracts one from every populated id and suppresses the object when the corresponding story_event_flags cell equals 1."
source = "investigation"
confidence = "high"
depends_on = ["0x6d3"]
[[global]]
address = "0xe773f"
name = "stage_enemy_spawn_tile_x"
category = "data-table"
type = "int[30]"
value_domain = "map tile X coordinate, 1..25 when populated"
usage = "Direct X coordinate for a current-stage enemy slot. FIELD copies it into the runtime unit position when stage_enemy_spawn_object_slot is zero; object-linked alternatives instead inherit the referenced object's coordinates."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe775d"
name = "stage_enemy_spawn_tile_y"
category = "data-table"
type = "int[30]"
value_domain = "map tile Y coordinate, 3..799 when populated"
usage = "Direct Y coordinate paired with stage_enemy_spawn_tile_x. FIELD and ADDEN copy the pair into the runtime unit position; object-linked alternatives instead inherit the referenced object's coordinates."
source = "investigation"
confidence = "high"
depends_on = ["0xe773f"]
[[global]]
address = "0xe777b"
name = "stage_enemy_spawn_object_slot"
category = "data-table"
type = "int[30]"
value_domain = "stage object slot 2..46; zero means use the direct tile coordinates"
usage = "Optional object-placement anchor for an enemy spawn. FIELD resolves nonzero entries through stage_object_type_id and uses the matching stage_object_tile_x/Y location; zero selects stage_enemy_spawn_tile_x/Y directly."
source = "investigation"
confidence = "high"
depends_on = ["0xe7325", "0xe7357", "0xe7389"]
[[global]]
address = "0xe7799"
name = "stage_enemy_faction_id"
category = "data-table"
type = "int[30]"
value_domain = "{0,2,3}"
usage = "Per-spawn faction/team selector. FIELD and ADDEN copy it into the runtime unit's faction field, use it to choose the entity-index band, and test the same value against map occupancy masks."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe77b7"
name = "stage_enemy_difficulty_mask"
category = "data-table"
type = "int[30]"
value_domain = "7 in the shipped table; bit 0/1/2 enables the spawn on the corresponding difficulty"
usage = "Per-spawn difficulty inclusion mask. FIELD uses check-bit with difficulty_index and rejects a slot when the selected difficulty bit is absent."
source = "investigation"
confidence = "high"
depends_on = ["0x32f1"]
[[global]]
address = "0xe77d5"
name = "stage_enemy_first_clear_only"
category = "data-table"
type = "int[30]"
value_domain = "{0,2}; 2 suppresses the spawn after the stage has been cleared"
usage = "Per-spawn replay gate. FIELD rejects a populated enemy slot when this value is 2 and stage_clear_state for the current stage is 1; zero/default slots remain eligible on cleared-stage replays."
source = "investigation"
confidence = "high"
depends_on = ["0x7684"]
[[global]]
address = "0xe77f3"
name = "stage_enemy_random_selection_weight"
category = "data-table"
type = "int[30]"
value_domain = "{0,1,2,3,10,20,30}; zero means spawn directly"
usage = "Weight for stage-enemy alternatives. FIELD groups eligible nonzero-weight slots by their stage_enemy_spawn_object_slot, sums the weights, makes a weighted random choice within each eligible group, and directly materializes zero-weight slots."
source = "investigation"
confidence = "high"
depends_on = ["0xe777b"]
[[global]]
address = "0xe7811"
name = "stage_enemy_unit_id"
category = "data-table"
type = "int[30]"
value_domain = "EBINIT unit ids 1..869; zero means unused slot"
usage = "Unit-definition id for each current-stage enemy slot. FIELD rejects zero slots, while FIELD and ADDEN pass populated ids to SETEN to copy the corresponding EBINIT definition into a runtime entity."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe782f"
name = "stage_enemy_min_level"
category = "data-table"
type = "int[30]"
value_domain = "1..99"
usage = "Scenario-specific minimum level for each stage enemy. After applying party-level auto-scaling, SETEN raises the runtime level to this floor before applying the maximum-level clamp."
source = "investigation"
confidence = "high"
[[global]]
address = "0xe784d"
name = "stage_enemy_max_level"
category = "data-table"
type = "int[30]"
value_domain = "1..99"
usage = "Scenario-specific maximum level for each stage enemy. SETEN uses a positive value as the upper clamp unless the debug/config override is active; otherwise it falls back to the unit definition's unit_level_cap."
source = "investigation"
confidence = "high"
depends_on = ["0x7a766"]
[[global]]
address = "0xe786b"
name = "stage_enemy_auto_level_scale_divisor"
category = "data-table"
type = "int[30]"
value_domain = "{1,2}"
usage = "Scenario override for enemy auto-level scaling. SETEN divides the positive gap between the scenario base level and unit_starting_level by this value before adding it to the runtime level; zero would fall back to unit_auto_level_scale_divisor."
source = "investigation"
confidence = "high"
depends_on = ["0x7a37e", "0x7ab4e"]
[[global]]
address = "0xe7889"
name = "stage_enemy_movement_routine_set_ids"
category = "data-table"
type = "int[30][3]"
columns = { "0" = "difficulty_0", "1" = "difficulty_1", "2" = "difficulty_2" }
value_domain = "movement-routine set ids 1..176"
usage = "Three difficulty-specific movement-AI routine-set ids per stage enemy. SETEN copies the row into the runtime unit, and MVRTN selects the difficulty_index column as its movement routine table row."
source = "investigation"
confidence = "high"
depends_on = ["0x32f1", "0x152617"]
[[global]]
address = "0xe78e3"
name = "stage_enemy_battle_routine_set_ids"
category = "data-table"
type = "int[30][3]"
columns = { "0" = "difficulty_0", "1" = "difficulty_1", "2" = "difficulty_2" }
value_domain = "battle-routine set ids 2..7; zero row falls back to the unit definition"
usage = "Optional three-column battle-AI routine override per stage enemy. SETEN copies a populated row into the runtime unit or falls back to the unit definition, and BTRTN selects the difficulty_index column as its battle routine table row."
source = "investigation"
confidence = "high"
depends_on = ["0x32f1", "0x152617"]
[[global]]
address = "0xe793d"
name = "stage_enemy_required_story_flags"
category = "data-table"
type = "int[30][7]"
columns = { "0" = "required_flag_1", "1" = "required_flag_2", "2" = "required_flag_3", "3" = "required_flag_4", "4" = "required_flag_5", "5" = "required_flag_6", "6" = "required_flag_7" }
value_domain = "one-based story_event_flags ids; zero means no requirement"
usage = "Seven positive prerequisites per stage enemy. FIELD subtracts one from every populated id and suppresses the spawn unless the corresponding story_event_flags cell equals 1."
source = "investigation"
confidence = "high"
depends_on = ["0x6d3"]
[[global]]
address = "0xe7a0f"
name = "stage_enemy_forbidden_story_flags"
category = "data-table"
type = "int[30][5]"
columns = { "0" = "forbidden_flag_1", "1" = "forbidden_flag_2", "2" = "forbidden_flag_3", "3" = "forbidden_flag_4", "4" = "forbidden_flag_5" }
value_domain = "one-based story_event_flags ids; zero means no exclusion"
usage = "Five negative prerequisites per stage enemy. FIELD subtracts one from every populated id and suppresses the spawn when the corresponding story_event_flags cell equals 1."
source = "investigation"
confidence = "high"
depends_on = ["0x6d3"]