Editing Status Effects In Events

From Final Fantasy Hacktics Wiki
Revision as of 02:46, 5 April 2022 by Nyzer (talk | contribs) (Created page with "Adjusting units' status effects in events can be tricky. Typically, starting status effects aren't applied until the battle begins; however, the use of InflictStatus, or m...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Adjusting units' status effects in events can be tricky. Typically, starting status effects aren't applied until the battle begins; however, the use of InflictStatus, or manually setting a unit's Current Statuses in their Battle Stats and then Removing/Adding them, will cause the visual effects of the status effect(s) to appear instantly. Units will start Floating, or animate with Hasted speed, or change color to indicate that they're Poisoned, well before the battle may start. And if you try using UpdateUnit, the visual effects won't appear at all.

It also seems that innate/initial status effects function very oddly when it comes to non-party units that were Always Present, then Removed, but then later Added back in during a mid-battle event. The game seems to handle status initialization differently during mid-battle events - Adding a unit will cause most of their status-related Battle Stats to be wiped, as well as almost all of the Status Effect Data. The Current Statuses will not be wiped (but will instantly show up visually), nor will the Inflicted Statuses (whose values get saved to the off-unit status storage from 0x8019FA85-0x8019FAEE, but this doesn't seem to do anything in a mid-battle event).

So, in the interest of figuring out all the little intricacies here, this shall be a guide on every way we can find to edit status effects in events.

1) Using InflictStatus


The simplest method. With the Event Instruction Upgrade, we can inflict any single status upon a unit. However, this will cause the unit to instantly show the appropriate animation rather than waiting until battle starts/resumes, and it also cannot be used to remove statuses.

Simply use the event command for each individual status you wish to inflict. If you want multiple statuses, use it multiple times, in order.

2) Editing Current Statuses in Battle Stats.


This is the next simplest method. It takes more lines than a single InflictStatus, but can be used to add several statuses at once, or to remove them. However, it requires Removing/Adding a unit (resetting their field animation), and can also be subject to interference from the Status Effect Data, in ways that are not yet fully documented.

UnitAddress(x??,x70) - use the Unit ID of the desired unit SET(x0071,x????) - use the total value of the statuses you want to have set SaveAddress(x71,x????,x70,001) - choose x0058, x0059, x005A, x005B, or x005C, depending on the Current Statuses those bytes are responsible for. (Optionally, also x004E-x0052 for Innate Statuses.) RemoveUnit(x??,x00) AddUnit(x??,x00,x00) WaitAddUnit()

3) Using UpdateUnit


UpdateUnit is not the best choice, as it doesn't function quite as intended. However, one known function is that it will take the Status Infliction data and inflict those statuses, though without the animation that goes with the effect. That said, it will also seem to remove any status effects that weren't in those bytes.

UnitAddress(x??,x70) - use the Unit ID of the desired unit SET(x0071,x????) - use the total value of the statuses you want to have set SaveAddress(x71,x????,x70,001) - choose x01A7, x01A8, x01A9, x01AA, or x01AB, depending on the Status Inflictions those bytes are responsible for. UpdateUnit(x??,x02)

4) Editing the Status Effect Data


This data seems to be mostly undocumented so far. More information to come later.