Difference between revisions of "ResetUnitCalculations"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (→‎{15} {{IE_15}}: Added a simple way to do it for all units at once.)
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
Wipes the damage, status and other temporary calculations on all units on the field, allowing Effects to never display any damage/healing numbers when called with [[Event_Instruction_18|{18} {{IE_18}}]].
 
Wipes the damage, status and other temporary calculations on all units on the field, allowing Effects to never display any damage/healing numbers when called with [[Event_Instruction_18|{18} {{IE_18}}]].
  
Note: Currently bugged. Will cause all enemies to become allies if used.  
+
Note: Currently bugged. Resets a ton of other stats as well, including non-temporary ones. It's more reliable to zero out the Battle Stat that determines the Attack Type, though this has to be done to each individual unit.
  
This should be fixable by adding the following commands after {{IE_15}}:
+
=== Wiping the stat on one unit ===
  
*LUI(x0001,x8019)
+
<code>UnitAddress(x??,x70)<br>
*ADD(x0001,x08CC)
+
ZERO(x0071)<br>
*LUI(x0018,x8019)
+
SaveAddress(x71,x01B1,x70,001)</code>
*ADD(x0018,x2BCC)
 
  
*BackTarget(x01)
+
=== Wiping the stat on all units at once ===
  
*LoadAddress(x00,x0005,x01,001)
+
<code>SET(x0000,x0014)<br>
*SaveAddress(x00,x01BA,x01,001)
+
LUI(x0070,x8019)<br>
 
+
ADD(x0070,x08CC)<br>
*SETVar(x0000,x0018)
+
ZERO(x0071)<br>
*NEQ()
+
BackTarget(x01)<br>
*If()
+
SaveAddress(x71,x01B1,x70,001)<br>
ADD(x0001,x01C0)
+
If()<br>
JumpBack(x01)
+
SUB(x0000,x0001)<br>
*EndIf()
+
ADD(x0070,x01C0)<br>
 
+
JumpBack(x01)<br>
This will also cause a unit charging an ability to have the ability wiped clean - leaving the unit Charging but with no result, no way to finish the Charge. I honestly have no idea at this time which temporary stat causes that issue.
+
EndIf()</code>
  
 
See also: [[Event_Instruction_18|{18} {{IE_18}}]]
 
See also: [[Event_Instruction_18|{18} {{IE_18}}]]

Latest revision as of 22:08, 24 April 2022

{15} ResetUnitCalculations

ResetUnitCalculations()

Wipes the damage, status and other temporary calculations on all units on the field, allowing Effects to never display any damage/healing numbers when called with {18} Effect.

Note: Currently bugged. Resets a ton of other stats as well, including non-temporary ones. It's more reliable to zero out the Battle Stat that determines the Attack Type, though this has to be done to each individual unit.

Wiping the stat on one unit

UnitAddress(x??,x70)
ZERO(x0071)
SaveAddress(x71,x01B1,x70,001)

Wiping the stat on all units at once

SET(x0000,x0014)
LUI(x0070,x8019)
ADD(x0070,x08CC)
ZERO(x0071)
BackTarget(x01)
SaveAddress(x71,x01B1,x70,001)
If()
SUB(x0000,x0001)
ADD(x0070,x01C0)
JumpBack(x01)
EndIf()

See also: {18} Effect