Recover signed INIT data semantics

This commit is contained in:
gamer147
2026-07-22 21:05:48 -04:00
parent 24fac92676
commit b828c07ff7
8 changed files with 371 additions and 66 deletions

View File

@@ -138,11 +138,11 @@ confidence = "med"
[[global]]
address = "0x906f9"
name = "item_attack_status_levels"
name = "item_status_delta_levels"
category = "data-table"
type = "int[1000][30]"
value_domain = "condition strength 1..5; zero means absent"
usage = "Sparse ITINIT row-major table consumed by USEITEM and CALCILL when applying an item's attack effects. Confirmed condition columns from item descriptions are 2 HP drain, 3 SP drain, 4 FS drain, 6 charm, 7 confusion, 8 paralysis, 9 poison, 10 water-flow, and 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"
@@ -152,7 +152,7 @@ name = "item_equipped_status_levels"
category = "data-table"
type = "int[1000][30]"
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_attack_status_levels."
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"
@@ -161,7 +161,7 @@ address = "0x9f541"
name = "item_stat_modifiers"
category = "data-table"
type = "int[1000][14]"
value_domain = "signed additive stat values; shipped populated values are positive"
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, 9 capture power, 10 movement, 11 max HP, 12 max SP, and 13 max FS; column 8 remains unnamed."
source = "investigation"
confidence = "high"
@@ -196,6 +196,256 @@ usage = "Sparse ITINIT consumable field. Item 106, Blood Price Healing Hand, des
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 = "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]"
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]"
value_domain = "signed combat parameter deltas; observed -99..999"
usage = "Sparse SKINIT row-major table applied by CALCBTPARAM for the selected action. Descriptions directly establish columns 0 accuracy, 2 physical attack, 3 physical defense, 4 magic attack, and 9 capture power; columns 1, 5, 6, and 8 share the unit combat-stat layout but need final display-name confirmation."
source = "investigation"
confidence = "high"
[[global]]
address = "0xaa56e"
name = "skill_resource_deltas"
category = "data-table"
type = "int[300][3]"
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 = "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]"
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]"
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]"
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"