Difference between revisions of "InflictStatus"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (→‎Unknown : Byte (hex): to Wait Time)
 
(9 intermediate revisions by 2 users not shown)
Line 2: Line 2:
 
{{IE_92_ex}}
 
{{IE_92_ex}}
  
{{IE_92_desc}}
+
Inflict a status on a given unit. The changes are visible even outside of battle.
  
 +
Statuses can be stacked, but sometimes need to be applied in the correct order; for example, Chicken needs to be applied before Float.
  
 
See Also: [[Event_Instruction_83|{83} {{IE_83}}]] ― [[Event_Instruction_E5|{E5} {{IE_E5}}]](x43,x00)
 
See Also: [[Event_Instruction_83|{83} {{IE_83}}]] ― [[Event_Instruction_E5|{E5} {{IE_E5}}]](x43,x00)
 +
 +
Warning: Any event with an InflictStatus command will instantly apply it at the start of the event to any Floating or Jumping unit with a matching Unit ID, even if the event wasn't actually going to run the command. A fix is available here (thanks Glain and Talcall):
 +
 +
<code><?xml version="1.0" encoding="UTF-8"?><br>
 +
<Patches><br>
 +
<Patch name="Nyzer Event Hack Thing"><br>
 +
<Description> Kills the routine that causes Jumping or Floating units to auto-apply every InflictStatus command with a matching Unit ID in an event file the moment the file is loaded, even if the event wasn't actually going to run the command. </Description><br>
 +
<Location file="BATTLE_BIN" offset="143CB0" offsetMode="RAM" mode="ASM"><br>
 +
nop<br>
 +
</Location><br>
 +
</Patch><br>
 +
</Patches></code>
  
  
Line 15: Line 28:
  
 
== Status : Byte (hex) ==
 
== Status : Byte (hex) ==
*x00: Revive with 1 HP if necessary. Note that the use of this command will block any attempts at event-based HP restoration within the same event. See below for an alternative.  
+
*x00: Revive with 1 HP if necessary. Note that the use of this command will block any attempts at event-based HP restoration on this unit within the same event. See below for an alternative.  
**(It will also play a sound effect.)
+
** If the unit is dead, this will also play a sound effect.
 +
** This will also set the unit to a Critical animation if their HP is low, or a Standing animation if it is not.
 
*x01: Crystal
 
*x01: Crystal
 
*x02: Poison + Critical
 
*x02: Poison + Critical
*x04: Apply any status currently set on the unit (see [[Battle Stats]] 0x01A7 to 0x01AB). Requires the [[Event Instruction Upgrade]] hack. Warning: Many statuses at once might not apply properly / This instruction erases the currently written statuses! You'll have to rewrite them if you want them activated for battle.
+
*x80-xFF: Applies any singular status. Requires [[Event Instruction Upgrade]] hack v1.35+.
 +
**x80: Performing
 +
**x81: Defending
 +
**x82: Jump
 +
**x83: Charging
 +
**x84: Undead
 +
**x85: Dead
 +
**x86: Crystal
 +
**x87:
 +
**x88: Treasure
 +
**x89: Cursed
 +
**x8A: Blood Suck
 +
**x8B: Silence
 +
**x8C: Confusion
 +
**x8D: Darkness
 +
**x8E: Invite
 +
**x8F: Petrify
 +
**x90: Critical
 +
**x91: Frog
 +
**x92: Chicken
 +
**x93: Berserk
 +
**x94: Transparent
 +
**x95: Reraise
 +
**x96: Float
 +
**x97: Oil
 +
**x98: Wall
 +
**x99: Stop
 +
**x9A: Slow
 +
**x9B: Haste
 +
**x9C: Shell
 +
**x9D: Protect
 +
**x9E: Regen
 +
**x9F: Poison
 +
**xA0: Death Sentence
 +
**xA1: Reflect
 +
**xA2: Don't Act
 +
**xA3: Don't Move
 +
**xA4: Sleep
 +
**xA5: Charm
 +
**xA6: Innocent
 +
**xA7: Faith
  
 +
=== Reviving a dead unit with full HP: [[Battle_Stats|Battle Stats]], [[Event_Instruction_3D|Remove]], [[Event_Instruction_45|Add]] ===
  
 
In order to revive a dead unit with full HP, use the following commands. (Requires the [[Event Instruction Upgrade]] hack.)
 
In order to revive a dead unit with full HP, use the following commands. (Requires the [[Event Instruction Upgrade]] hack.)
  
UnitAddress(x??,x70)
+
Note: this will cause the unit to revert to their upright Marching animation right after they're Added.
 
 
LoadAddress(x71,x0058,x70,001)
 
 
 
SUB(x0071,x0020)
 
 
 
SaveAddress(x71,x0058,x70,001)
 
 
 
LoadAddress(x71,x01BB,x70,001)
 
 
 
SUB(x0071,x0020)
 
 
 
SaveAddress(x71,x01BB,x70,001)
 
 
 
ChangeStats(x??,x00,x00,+00999)
 
  
RemoveUnit(x??,x00)
 
  
AddUnit(x??,x00,x00)
+
<code>UnitAddress(x??,x70)<br>
 +
LoadAddress(x71,x0058,x70,001)<br>
 +
AND(x0071,x00DF)<br>
 +
SaveAddress(x71,x0058,x70,001)<br>
 +
LoadAddress(x71,x01BB,x70,001)<br>
 +
AND(x0071,x00DF)<br>
 +
SaveAddress(x71,x01BB,x70,001)<br>
 +
ChangeStats(x??,x00,x00,+00999)<br>
 +
RemoveUnit(x??,x00)<br>
 +
AddUnit(x??,x00,x00)<br>
 +
WaitAddUnit()</code>
  
WaitAddUnit()
+
== Wait Time : Byte (hex) ==
 +
Often 0x0C, else 0x01.
  
== Unknown : Byte (hex) ==
+
This may be a parameter for how long to wait after inflicting the status. However, InflictStatus runs on its own thread, so this may not do anything without the appropriate WaitForInstruction.
Often 0x0C, else 0x01.
 
  
  
 
{{x00}}
 
{{x00}}

Latest revision as of 04:22, 2 October 2022

{92} InflictStatus

InflictStatus(xID,x00,xSS,x0C,x00)

Inflict a status on a given unit. The changes are visible even outside of battle.

Statuses can be stacked, but sometimes need to be applied in the correct order; for example, Chicken needs to be applied before Float.

See Also: {83} ChangeStats{E5} WaitForInstruction(x43,x00)

Warning: Any event with an InflictStatus command will instantly apply it at the start of the event to any Floating or Jumping unit with a matching Unit ID, even if the event wasn't actually going to run the command. A fix is available here (thanks Glain and Talcall):

<?xml version="1.0" encoding="UTF-8"?>
<Patches>
<Patch name="Nyzer Event Hack Thing">
<Description> Kills the routine that causes Jumping or Floating units to auto-apply every InflictStatus command with a matching Unit ID in an event file the moment the file is loaded, even if the event wasn't actually going to run the command. </Description>
<Location file="BATTLE_BIN" offset="143CB0" offsetMode="RAM" mode="ASM">
nop
</Location>
</Patch>
</Patches>


Unit ID : Byte (hex)

ID of the unit specified in the ENTD.


x00 : Byte (hex)

This value is always set to x00 in the original game; it probably doesn't have a function.


Status : Byte (hex)

  • x00: Revive with 1 HP if necessary. Note that the use of this command will block any attempts at event-based HP restoration on this unit within the same event. See below for an alternative.
    • If the unit is dead, this will also play a sound effect.
    • This will also set the unit to a Critical animation if their HP is low, or a Standing animation if it is not.
  • x01: Crystal
  • x02: Poison + Critical
  • x80-xFF: Applies any singular status. Requires Event Instruction Upgrade hack v1.35+.
    • x80: Performing
    • x81: Defending
    • x82: Jump
    • x83: Charging
    • x84: Undead
    • x85: Dead
    • x86: Crystal
    • x87:
    • x88: Treasure
    • x89: Cursed
    • x8A: Blood Suck
    • x8B: Silence
    • x8C: Confusion
    • x8D: Darkness
    • x8E: Invite
    • x8F: Petrify
    • x90: Critical
    • x91: Frog
    • x92: Chicken
    • x93: Berserk
    • x94: Transparent
    • x95: Reraise
    • x96: Float
    • x97: Oil
    • x98: Wall
    • x99: Stop
    • x9A: Slow
    • x9B: Haste
    • x9C: Shell
    • x9D: Protect
    • x9E: Regen
    • x9F: Poison
    • xA0: Death Sentence
    • xA1: Reflect
    • xA2: Don't Act
    • xA3: Don't Move
    • xA4: Sleep
    • xA5: Charm
    • xA6: Innocent
    • xA7: Faith

Reviving a dead unit with full HP: Battle Stats, Remove, Add

In order to revive a dead unit with full HP, use the following commands. (Requires the Event Instruction Upgrade hack.)

Note: this will cause the unit to revert to their upright Marching animation right after they're Added.


UnitAddress(x??,x70)
LoadAddress(x71,x0058,x70,001)
AND(x0071,x00DF)
SaveAddress(x71,x0058,x70,001)
LoadAddress(x71,x01BB,x70,001)
AND(x0071,x00DF)
SaveAddress(x71,x01BB,x70,001)
ChangeStats(x??,x00,x00,+00999)
RemoveUnit(x??,x00)
AddUnit(x??,x00,x00)
WaitAddUnit()

Wait Time : Byte (hex)

Often 0x0C, else 0x01.

This may be a parameter for how long to wait after inflicting the status. However, InflictStatus runs on its own thread, so this may not do anything without the appropriate WaitForInstruction.


x00 : Byte (hex)

This value is always set to x00 in the original game; it probably doesn't have a function.