LoadENTD

From Final Fantasy Hacktics Wiki
Revision as of 01:34, 1 June 2023 by Nyzer (talk | contribs) (Added a note about adjusting Party Level.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{EA} LoadENTD

LoadENTD(xENTD,xUNIT)

Temporarily loads the raw ENTD data of a specified ENTD slot into from 0x801DF000 to 0x801DFFFF. Because of the volatile nature of this RAM section, it will be overwritten by an {18} Effect instruction, or any in-battle Effect.

Optionally overwrites part of, or all units currently occupying the first 16 Battle Stats slots.

This instruction can be used to reroll units, or load completely new ones into the current event. If the unit is set to Party Level, you can even freely change what level they generate at mid-event by altering the Party Level byte saved at 0x80066308 before using this command.


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: {EB} LoadENTDUnit{45} AddUnit{49} AddUnitStart{4A} AddUnitEnd


ENTD ID : Half-Word (hex)

ID of the ENTD slot to load, as shown in FFTPatcher.


Units to Load : Half-Word (hex)

0x0000 to load no units.

Mimics a x00 Flags parameter of {EB} LoadENTDUnit.

  • 0x0001: Generates ENTD Unit #1 into Battle Stats slot #1
  • 0x0002: Generates ENTD Unit #2 into Battle Stats slot #2
  • 0x0004: Generates ENTD Unit #3 into Battle Stats slot #3
  • 0x0008: Generates ENTD Unit #4 into Battle Stats slot #4
  • 0x0010: Generates ENTD Unit #5 into Battle Stats slot #5
  • 0x0020: Generates ENTD Unit #6 into Battle Stats slot #6
  • 0x0040: Generates ENTD Unit #7 into Battle Stats slot #7
  • 0x0080: Generates ENTD Unit #8 into Battle Stats slot #8
  • 0x0100: Generates ENTD Unit #9 into Battle Stats slot #9
  • 0x0200: Generates ENTD Unit #10 into Battle Stats slot #10
  • 0x0400: Generates ENTD Unit #11 into Battle Stats slot #11
  • 0x0800: Generates ENTD Unit #12 into Battle Stats slot #12
  • 0x1000: Generates ENTD Unit #13 into Battle Stats slot #13
  • 0x2000: Generates ENTD Unit #14 into Battle Stats slot #14
  • 0x4000: Generates ENTD Unit #15 into Battle Stats slot #15
  • 0x8000: Generates ENTD Unit #16 into Battle Stats slot #16

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)