A Ask 1FF
Signature
Description
Displays a window with a message that asks the player to make a choice. The execution of the following functions is stopped until a choice was made. Once it was, the chosen item number will be returned. If the chosen item was part of a Numbox text tag, its macro parameter set via the Set Mes Macro function will be returned instead.
If the window type is a System Window, the window will close itself after a choice was made.
If it's a Dialogue Window, the window must be manually closed by using either the Mes Sync or Mes Sync 2 function after this one. As an alternative, you can also use the Mes Close and Mes Close Sync functions one after another.
The author of the message is the current script and can be referenced in the dialogue via the {name}
text tag.
Arguments
Window Identifier
The window the dialogue will be displayed in.
There are a total of 8 windows (0 -> 7) that can be used to simultaneously display several dialogues, shapes (textures), etc. at the same time.
If a value of -1
is passed, it will be changed to 0
.
If the window is already used before calling this function, it will overwrite the properties of the current one, but only if it wasn't a message with a choice.
Dialog Identifier
The id of the dialogue that will be displayed.
Usually, it's OR'ed by 0x01000000
before passing it as an argument. However, this is not necessary and probably just a leftover from the dev tools used to automate the process of the dialogue selection.
If the dialogue is empty or does not ask the user to make a choice via the text tags {choice}
or {numbox}
, no window will be opened. In this case, the return value will be 0
.
Position X
The position of the dialogue window on the x-axis.
Position Y
The position of the dialogue window on the y-axis.
Alignment Type
Controls the window's alignment.
There are a total of 5 alignment types (0 -> 4) that can be used to align the window to a different position on the screen. The position differs based on the position x and y arguments.
Window Type
The type of window the dialogue will be displayed in.
There are a total of 21 window types (-5 -> 15) that can be used to display a message in a different style.
Here is a list of which window types are commonly used.
Type | Name | Description |
---|---|---|
-5 | Combat Log | A window that looks like a combat log. |
-4 | Tutorial Header | A window with a tutorial text and line in the header. |
-1 | Dialog Window | A window that is commonly used when talking to a character. |
0 | System Window (No Border) | A window with no border, commonly used for system messages. |
1 | System Window (Blue Border) | A window with a blue border. |
12 | System Window (Brown Border) | A window with a brown border. |
The following window types ignore the position arguments:
Combat Log
Tutorial Header
Dialog Window
Notes
The window types: Combat Log and Tutorial Header will always cause a crash.
The window type: System Window (Brown Border) is bugged as it doesn't allow interacting with the window at all.
Unlike the Mes function, there is no way to manually set the width and height of the dialog window.
There is also technically no need to disable the user control with the Mes Sync, Mes Sync 2 or Uc Off function as you can still interact with dialog window regardless. However, I would still recommend using it for consistency.
Entering a new location will close all open windows.
Last updated