Changes

Jump to navigation Jump to search

FF7/Field/Script/Opcodes/41 MPARA

1,746 bytes added, 03:24, 8 September 2006
no edit summary
* Opcode: '''0x41'''
* Short name: '''MPARA'''
* Long name: Message Parameter

==== Memory layout ====
{| border="1" cellspacing="1" cellpadding="3" style="border: 1px solid black; border-collapse: collapse;"
! width="40" | 0x41
! width="40" | ''B''
! width="40" | ''W''
! width="40" | ''I''
! width="40" | ''V''
|}

==== Arguments ====

* '''const UByte''' ''B'': Bank to retrieve value from, or zero if using a literal value.
* '''const UByte''' ''W'': [[FF7/Field/Script/Opcodes/50 WINDOW|WINDOW]] ID for this parameter.
* '''const UByte''' ''I'': ID of the "[[FF7/Field/Variable Dialog|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 [[FF7/Field/Variable Dialog|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 [[FF7/Field/Script/Opcodes/40 MESSAGE|MESSAGE]], as normal.

The ID of the ''W''indow must be provided, but this can be still be provided before the window has been created using [[FF7/Field/Script/Opcodes/50 WINDOW|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.

Navigation menu