Mes

Signature

void mes(int windowId, int dialogId, int posX, int posY, int width, int height, int alignType, int windowType); //id:0x0461

Description

Displays a window with a message.

The Mes Sync or Mes Sync 2 function should always be followed after this one to stop the execution of the following functions until the window was closed by the player. This also automatically disables the user control and allows properly interacting with the window.

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.

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 asks the user to make a choice via the text tags {choice} or {numbox}, no window will be opened.

Position X

The position of the dialogue window on the x-axis.

Position Y

The position of the dialogue window on the y-axis.

Width

The width of the dialogue window. If it's too low, the dialogue will be cut off.

If a value of 0 is passed, it will be calculated automatically based on the dialogue length.

Height

The height of the dialogue window. If it's too low, the dialogue will be cut off.

If a value of 0 is passed, it will be calculated automatically based on the dialogue length.

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.

TypeNameDescription

-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, width and height arguments:

  • Combat Log

  • Tutorial Header

  • Dialog Window

Notes

The window types: Combat Log and Tutorial Header are only useable in the tutorial area of the game (Nalbina Fortress). Trying to use them in other locations will cause a crash.

If the user control isn't disabled with the Mes Sync, Mes Sync 2 or Uc Off function, the dialog window cannot be properly interacted with which can then cause a soft-lock.

The window type: System Window (Brown Border) is bugged as it doesn't allow interacting with the window at all.

The combat log window type requires proper setup via the Set Mes Win Line function. Otherwise the dialogue will be cut off, if it has more than 1 line.

Entering a new location will close all open windows.

Last updated