Difference between revisions of "LoadENTDUnit"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
m (Xifanie moved page Event Instruction EB to LoadENTDUnit)
(Added a note about the Unit Nickname bug and included a workaround.)
Line 69: Line 69:
 
* 0x10: Keep previous current HP/MP (Do not Heal)
 
* 0x10: Keep previous current HP/MP (Do not Heal)
 
* 0x08: Keep previous CT
 
* 0x08: Keep previous CT
 +
 +
== Known Bugs ==
 +
 +
Unit nicknames can't be properly generated, though the unit will still have the correct name ID, and Benching then Unbenching them will restore their base name. You can get around this by manually assigning them a nickname using the [[Battle_Stats|Battle Stats]] at offset 0x012C. The name ends once it hits the character FE. So giving a character the nickname Sam would require this value: 1C 24 30 FE, and would be done with the following commands:
 +
*UnitAddress(x??,x70)
 +
*LUI(x0071,xFE30)
 +
*ADD(x0071,x241C)
 +
*SaveAddress(x71,x012C,x70,004)

Revision as of 04:16, 11 May 2023

{EB} LoadENTDUnit

LoadENTDUnit(xID,xES,xBS,xFL)

Loads an ENTD into into the current Event. Requires {EA} LoadENTD to be called beforehand in order to use.

This instruction can be used to reroll units, or load completely new ones into the current event.


Note: For new units, you must use {3D} RemoveUnit on the unit previously occupying the slot you will overwrite to deallocate the spritesheet if necessary, as well as use {49} AddUnitStart {45} AddUnit {4A} AddUnitEnd to load the unit and allocate+load the correct spritesheet.


See also: {EA} LoadENTD{45} AddUnit{49} AddUnitStart{4A} AddUnitEnd


Unit ID : Byte (hex)

If this parameter if set to anything but x00, it will override the "Battle Stats Unit Slot" parameter and will instead fetch the Battle Stats Unit Slot of the unit corresponding to the specified unit ID.


ENTD Unit Slot : Byte (hex)

  • 0x00: Generates ENTD Unit #1
  • 0x01: Generates ENTD Unit #2
  • 0x02: Generates ENTD Unit #3
  • 0x03: Generates ENTD Unit #4
  • 0x04: Generates ENTD Unit #5
  • 0x05: Generates ENTD Unit #6
  • 0x06: Generates ENTD Unit #7
  • 0x07: Generates ENTD Unit #8
  • 0x08: Generates ENTD Unit #9
  • 0x09: Generates ENTD Unit #10
  • 0x0A: Generates ENTD Unit #11
  • 0x0B: Generates ENTD Unit #12
  • 0x0C: Generates ENTD Unit #13
  • 0x0D: Generates ENTD Unit #14
  • 0x0E: Generates ENTD Unit #15
  • 0x0F: Generates ENTD Unit #16


Battle Stats Unit Slot : Byte (hex)

  • 0x00: Replaces Battle Stats Unit #1
  • 0x01: Replaces Battle Stats Unit #2
  • 0x02: Replaces Battle Stats Unit #3
  • 0x03: Replaces Battle Stats Unit #4
  • 0x04: Replaces Battle Stats Unit #5
  • 0x05: Replaces Battle Stats Unit #6
  • 0x06: Replaces Battle Stats Unit #7
  • 0x07: Replaces Battle Stats Unit #8
  • 0x08: Replaces Battle Stats Unit #9
  • 0x09: Replaces Battle Stats Unit #10
  • 0x0A: Replaces Battle Stats Unit #11
  • 0x0B: Replaces Battle Stats Unit #12
  • 0x0C: Replaces Battle Stats Unit #13
  • 0x0D: Replaces Battle Stats Unit #14
  • 0x0E: Replaces Battle Stats Unit #15
  • 0x0F: Replaces Battle Stats Unit #16
  • 0x10: Replaces Battle Stats Unit #17 (Player Roster Unit)
  • 0x11: Replaces Battle Stats Unit #18 (Player Roster Unit)
  • 0x12: Replaces Battle Stats Unit #19 (Player Roster Unit)
  • 0x13: Replaces Battle Stats Unit #20 (Player Roster Unit)
  • 0x14: Replaces Battle Stats Unit #21 (Player Roster Unit)


Flags : Byte (hex)

  • 0x80: Keep previous X, Y Coordinates
  • 0x40: Keep previous spritesheet
  • 0x20: Keep previous Unit ID
  • 0x10: Keep previous current HP/MP (Do not Heal)
  • 0x08: Keep previous CT

Known Bugs

Unit nicknames can't be properly generated, though the unit will still have the correct name ID, and Benching then Unbenching them will restore their base name. You can get around this by manually assigning them a nickname using the Battle Stats at offset 0x012C. The name ends once it hits the character FE. So giving a character the nickname Sam would require this value: 1C 24 30 FE, and would be done with the following commands:

  • UnitAddress(x??,x70)
  • LUI(x0071,xFE30)
  • ADD(x0071,x241C)
  • SaveAddress(x71,x012C,x70,004)