DisplayMessage

From Final Fantasy Hacktics Wiki
Revision as of 05:02, 26 June 2023 by Nyzer (talk | contribs) (→‎Dialog Box Opening Type : Byte (hex): Added a note about a discovery I made where using x04 causes the whole box to darken.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{10} DisplayMessage

DisplayMessage(x10,xDT,xMSG#,xID,x00,xPR,+XXXXX,+YYYYY,+ARPOS,xOT)

This instruction is used to display any text stored after the event's instruction in various ways like a character thinking, speaking, or simply printing text on the screen.


See Also: {50} PortraitCol{51} ChangeDialog{E5} WaitForInstruction(x01,x00)


Unknown : Byte (hex)

This always seems to be x10. Probably just a programming error. Any value should be fine.


Dialog Type : Byte (hex)

  • x00: -Do not use-
  • Box Type:
    • x0X: Appears Centered on screen
    • x1X: 3 line Dialog Box (includes portrait)
    • x2X: 1-4 line box named "Check"
    • x3X: 1-4 line box named "Help"
    • x4X: 2 line box
    • x5X: 8 line box
    • x6X: 1-14 line unnamed box (does not support pages)
    • x7X: 3 line Dialog Box (includes portrait)
    • x8X: 1-6 lines. Close later with instruction {51} ChangeDialog. A very different dialog type. See below for details.
    • x9X: 3 line Dialog Box (includes portrait). Close later with instruction {51} ChangeDialog*.
    • xAx: 1-4 line box named "Check". Supports Pages. Close later with Instruction {51} ChangeDialog*.
    • xBx: 1-4 line box named "Help". Supports Pages. Close later with Instruction {51} ChangeDialog*.
    • xCx: 1-2 line box. No portrait. Supports Pages. Close later with Instruction {51} ChangeDialog*.
    • xDx: 8 line box. No portrait. Supports Pages. Close later with Instruction {51} ChangeDialog*.
    • xEx: 1-8 line box. No portrait. Does not support pages. 9 or more lines and it will not appear (WaitForInstructionx01 with 9+ lines hangs game). Close later with Instruction {51} ChangeDialog*.
    • xFx: Same behaviour as x1X it seems
  • Vertical Alignment:
    • xX1: Top
    • xX2: Bottom
    • xX3: Center**
  • Arrow Type:
    • xX4: Convert Arrow to Thinking Bubbles (Dialog Box)
    • xX8: Remove Arrow (Dialog Box). Does not seem to work with x9X.


*If the game doesn't detect a (sufficiently close?) ChangeDialog (to close the box?) afterwards, it may not display the message at all in the first place.

**xX3 displays the message at the center of the screen, except for Dialog Box (the box is over the unit's head and the arrow is flipped horizontally).

Dialog Type x8X does a lot of things differently.

  • No dialog box, just text over the screen.
  • The lines have central, rather than left, alignment.
  • Text is drawn more slowly. {delay:00} can fix this, but without at least one character at {delay:02}, the sixth line (if used) will cause a brief, minor graphical glitch.
  • Unlike regular dialog boxes, you can't have multiple of these going at the same time. WaitForInstruction(x01,x00) must be used in between.
  • Sometimes when loading words through {EB}, the ends of certain letters might be clipped off. Certain characters in the line fix (or cause) this somehow...? You can try fixing this by putting {DA73} at the start & end of the line, which adds an invisible space to each side. Unfortunately, different words called by {EB} can cause it inconsistently on the same line - it just isn't recommended to use it for such.

Message ID : Half-Word (hex)

ID of the Message that will be displayed. Message x0001 starts at the text offset of the event. Therefore there is no Message x0000. This parameter being a Half-Word, you could even go take lines that are stored in the RAM, which is pretty pointless IMHO.


Unit ID : Byte (hex)

ID of the unit specified in the ENTD. This is only required for Dialog Box.

If a unit with the same Unit ID is found, the dialog box will be centered over or under it and the unit's portrait will be displayed.

Else, it will display a blank portrait (which still takes up the place of a normal portrait) and display on the left side of the screen.


x00 : Byte (hex)

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


Portrait Row : Byte (hex)

For the list and more explanation read {50} PortraitCol.

  • x09: Removes the portrait from the Dialog Box (and the space it occupied)


X Coordinate : Half-Word (signed)

Move the Displayed Message on the screen's X axis based on default location.

Determines the portrait's facing. Any negative value will flip the portrait to the other side of the dialog box, so if you don't want to move it and still flip the portrait, use -00001.

Odd values MAY cause the message box to rattle slightly?


Y Coordinate : Half-Word (signed)

Move the Displayed Message on the screen's Y axis based on default location.

Odd values MAY cause the message box to rattle slightly?


Arrow Position : Half-Word (signed)

Move the Arrow on the Dialog Box's X axis based on its default location.

Determines the portrait's facing.

If you don't move the Dialog Box in X, you can simply set this byte to -1 and the portrait will switch side.


Dialog Box Opening Type : Byte (hex)

  • x01: +50% speed
  • x02: -50% speed, remove bouncing*
  • x04: Darkens the Dialog Box
  • x10: Toggle Arrow (points left if FALSE; point right if TRUE)

*bounce: the message box grows in size gradually and goes a bit over it's real size (about 110%) in the process then shrinks back to 100%.