diff --git a/docs/global-reference.md b/docs/global-reference.md index 7ad7f13..5a78961 100644 --- a/docs/global-reference.md +++ b/docs/global-reference.md @@ -1,7 +1,7 @@ # Global Variable Reference (generated) -5033 globals (196 curated, 4837 auto shape-inferred). Source of truth: `vm-map/globals.toml`. +5033 globals (197 curated, 4836 auto shape-inferred). Source of truth: `vm-map/globals.toml`. ## choice-output @@ -60,6 +60,7 @@ | `0x77886` | unit_summon_point_cost | high | investigation | 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. | | `0x77c6e` | unit_defense_element | high | investigation | 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. | | `0x78056` | unit_default_attack_item_id | high | investigation | 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. | +| `0x7843e` | unit_power_tier | med | inference | Authoring-only EBINIT power/progression tier populated for 243 units. It is independent of species, sex, defense element, and boss class, but rises strongly with deployment cost, essence yield, level cap, and base stats. Lily's child/girl/adult forms are tiers 2/4/6, and recurring heroine boss definitions generally rise as their story appearances become stronger. No shipped script reads the array, and the /v2 native image contains no literal reference to its global index, so the descriptive name is correlation-based rather than a runtime behavior claim. | | `0x78826` | unit_weapon_item_category | high | investigation | 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. | | `0x78c0e` | unit_starting_equipment_item_id | high | investigation | 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. | | `0x78ff6` | unit_starting_skill_ids | high | investigation | 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. Columns: 0=skill_slot_1, 1=skill_slot_2, 2=skill_slot_3, 3=skill_slot_4. | @@ -5003,7 +5004,6 @@ | `0x6638b` | — | med | auto-shape | record-table[stride 15] | | `0x66713` | — | low | auto-shape | index/counter? | | `0x66715` | — | med | auto-shape | current-entity-index? | -| `0x7843e` | — | med | auto-shape | unit-field | | `0x81c96` | — | med | auto-shape | record-table[stride 3] | | `0x8284e` | — | med | auto-shape | record-table[stride 3] | | `0xaac76` | — | low | auto-shape | index/counter? | diff --git a/docs/name-resolution.md b/docs/name-resolution.md index 054fee2..e6749fa 100644 --- a/docs/name-resolution.md +++ b/docs/name-resolution.md @@ -246,9 +246,16 @@ capture, and objective-interaction call sites. CALCDMG establishes BTL's miss/hi actor/target ownership, allowing BTL's selectors to separate ordinary attack, critical, skill-use, damage-reaction, defeated, and finishing-blow voices. The five populated slots that no shipped selector can reach remain explicit `unused_slot_*` authoring fields rather than generic address fallbacks; the two battle- -adjacent unused slots duplicate the final normal/critical skill pair in all 116 populated rows. Only three -EBINIT profile fields remain wholly anonymous: `0x7843e` and two suspicious sparse writes into runtime table -`0x4e693/300`. +adjacent unused slots duplicate the final normal/critical skill pair in all 116 populated rows. + +The last broad EBINIT field, `0x7843e`, is an authoring-only seven-value power tier. Its 243 rows do not +partition by species, sex, defense element, or boss class, but values rise strongly with deployment cost, +essence yield, level cap, and base statistics. Lily's three forms are exactly tiers 2/4/6, and recurring +heroine boss definitions generally rise with their later, stronger appearances. The static corpus contains +no read of this array, and the `/v2` native image contains neither its global index as an instruction operand +nor as a little-endian constant. `unit_power_tier` is therefore curated at medium confidence as descriptive +authoring metadata, not a runtime behavior claim. EBINIT now has specific names for 108 of 110 populated +profile fields; only two suspicious one-record writes into runtime table `0x4e693/300` remain anonymous. ### STINIT mixed stage records (2026-07-23) diff --git a/docs/phase-b-framework.md b/docs/phase-b-framework.md index ad79a6f..929bfc5 100644 --- a/docs/phase-b-framework.md +++ b/docs/phase-b-framework.md @@ -745,12 +745,14 @@ SKINIT parallel field as the skill-change catalog inclusion flag and separates a skill-information visibility. The remaining item/skill work is refinement rather than an unnamed populated schema. -The remaining EBINIT unknowns are now the unread `0x7843e` enum, two isolated sparse writes into a runtime -table, and the signed refinement within boss classes; enemy AI appears to live outside the static EBINIT -schema. SALLY's four unlock requirements and eight event ids are fully joined to their contract, brainwash, -reserved, form-dependent sex-magic, sacrifice, and release columns. FIELD/BTL/SHOWGROW also resolve all 23 -formerly generic populated voice columns, including five authoring slots unreachable in the shipped -selectors. STINIT's separate mixed parser is now complete: +The remaining EBINIT unknowns are two isolated sparse writes into a runtime table and the signed refinement +within boss classes; enemy AI appears to live outside the static EBINIT schema. The former seven-value +`0x7843e` unknown is now a medium-confidence authoring-only `unit_power_tier`: it tracks unit cost, yield, +caps, stats, and form/story strength but has no shipped script or native-index consumer. SALLY's four unlock +requirements and eight event ids are fully joined to their contract, brainwash, reserved, form-dependent +sex-magic, sacrifice, and release columns. FIELD/BTL/SHOWGROW also resolve all 23 formerly generic populated +voice columns, including five authoring slots unreachable in the shipped selectors. STINIT's separate mixed +parser is now complete: all 74 sparse stage ids retain their victory/defeat strings, six scalars, fixed-buffer cells, and 1,396 footer-array copies. AIM/FIELD/DRAWCHP consumers establish the four condition slots, stage BGM, turn limit, and turn-limit outcome. Further passes establish target clear turns, performance reward, replay behavior, diff --git a/tools/test_extract_init.py b/tools/test_extract_init.py index 3b44d3a..6f9d039 100644 --- a/tools/test_extract_init.py +++ b/tools/test_extract_init.py @@ -342,6 +342,10 @@ def test_field_semantics() -> None: unit_semantics["0x66716/30/17"] == "unit_voice_asset_ids.unused_slot_17", "populated but unreachable voice slots remain explicit", ) + check( + unit_semantics["0x7843e"] == "unit_power_tier", + "EBINIT's authoring-only power tier joins by semantic name", + ) extract_init.attach_semantic_fields(units, unit_semantics) unit_by_id = {record["id"]: record for record in units} check( @@ -352,6 +356,13 @@ def test_field_semantics() -> None: unit_by_id[5]["semantic_fields"]["unit_voice_asset_ids.defeated"] == 11523, "EBINIT records join voice assets by semantic field name", ) + check( + [ + unit_by_id[unit_id]["semantic_fields"]["unit_power_tier"] + for unit_id in (2, 3, 4) + ] == [2, 4, 6], + "Lily's three forms preserve the correlated 2/4/6 power tiers", + ) stages, meta = extract_init.extract_mixed( sys4load.load(extract_init.resolve("STINIT")) diff --git a/vm-map/globals.toml b/vm-map/globals.toml index 9e721c0..e45f79e 100644 --- a/vm-map/globals.toml +++ b/vm-map/globals.toml @@ -695,6 +695,16 @@ usage = "EBINIT default attack for 250 units. Every populated value cross-resolv source = "investigation" confidence = "high" +[[global]] +address = "0x7843e" +name = "unit_power_tier" +category = "data-table" +type = "int[1000]" +value_domain = "authoring tier 0..6" +usage = "Authoring-only EBINIT power/progression tier populated for 243 units. It is independent of species, sex, defense element, and boss class, but rises strongly with deployment cost, essence yield, level cap, and base stats. Lily's child/girl/adult forms are tiers 2/4/6, and recurring heroine boss definitions generally rise as their story appearances become stronger. No shipped script reads the array, and the /v2 native image contains no literal reference to its global index, so the descriptive name is correlation-based rather than a runtime behavior claim." +source = "inference" +confidence = "med" + [[global]] address = "0x78826" name = "unit_weapon_item_category"