FF7/Field/Script/Opcodes/41 MPARA

From Final Fantasy Inside
< FF7‎ | Field‎ | Script‎ | Opcodes
Revision as of 03:24, 8 September 2006 by my_wiki>Synergy Blades
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  • Opcode: 0x41
  • Short name: MPARA
  • Long name: Message Parameter

Memory layout

0x41 B W I V

Arguments

  • const UByte B: Bank to retrieve value from, or zero if using a literal value.
  • const UByte W: WINDOW ID for this parameter.
  • const UByte I: ID of the "Variable" dialog code that this value will replace.
  • const UByte V: Value to insert into dialog, or address of value, if B is non-zero.

Description

Replaces the Variable Control Code, found in lines of dialog, with a specific value. This allows either literal values or values retrieved from memory to be displayed in message boxes. Message parameters are set, and then the dialog with the Variable control codes is displayed using MESSAGE, as normal.

The ID of the Window must be provided, but this can be still be provided before the window has been created using WINDOW. For lines of dialog with multiple Variable codes, the I argument identifies which code this value should replace, starting from zero for the first Variable code found in the line of dialog about to be displayed.

If B is non-zero, then bank B and address V will be accessed to retrieve the value that will be used in inserting into the dialog. Otherwise, the value provided by V is inserted as-is into the control code.