Decode EBINIT SALLY action semantics

This commit is contained in:
gamer147
2026-07-23 10:06:31 -04:00
parent 1b0c2a6a74
commit 53fc9f8131
5 changed files with 40 additions and 10 deletions

View File

@@ -49,8 +49,8 @@
| `0x7267e` | unit_canonical_id | high | investigation | 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. |
| `0x72a66` | unit_capturable | high | investigation | 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. |
| `0x72e4e` | unit_roster_state_flag_base_index | high | investigation | 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. |
| `0x73236` | unit_sally_action_unlock_requirements | high | investigation | 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. |
| `0x741d6` | unit_sally_event_ids | high | investigation | 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. |
| `0x73236` | unit_sally_action_unlock_requirements | high | investigation | Availability requirements for SALLY's contract, brainwash, reserved, and sex-magic action slots. The SO012 button atlas and selection dispatch prove that UI choices 1, 2, and 3 select columns 0, 1, and 3; column 2 has a switch case but is deliberately skipped by both drawing and input, so it is reserved/unreachable in the shipped UI. 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. Deploy, sacrifice, and release use separate eligibility logic. Columns: 0=contract, 1=brainwash, 2=reserved_action, 3=sex_magic. |
| `0x741d6` | unit_sally_event_ids | high | investigation | SALLY event ids for contract, brainwash, the unreachable reserved action, Lily's child/girl/adult sex-magic forms, sacrifice, and release. The action switch selects columns 0, 1, 6, and 7 directly; sex magic selects the current Lily unit id plus one, yielding columns 3..5 for Lily unit ids 2..4. A populated reachable slot is copied to scjump_decision_out and translated through the SCJUMP resource table at 0x87a57 into next_script_resource_id. Column 2 is paired with the UI-skipped reserved action and its shipped ids 1300..1306 have no SCJUMP resource mapping. EXILE also tests column 7 when deciding whether a unit can be released. Columns: 0=contract, 1=brainwash, 2=reserved_action, 3=sex_magic_lily_child, 4=sex_magic_lily_girl, 5=sex_magic_lily_adult, 6=sacrifice, 7=release. |
| `0x76116` | unit_roster_variant_ids | high | investigation | 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. Columns: 0=normal, 1=brainwashed. |
| `0x768e6` | unit_sex_magic_bonus_item_id | high | investigation | 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. |
| `0x76cce` | unit_essence_yield | high | investigation | 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. |