messagedata#

For accessing and editing message strings (Quests > Strings).

Load with Game->LoadMessageData().

Tutorials#

Variables#

Functions#

void

Get(char32[] str)

void

Set(char32[] str)

Enumerations#

enum MessageFlag: 🔗 Source

MessageFlag MSGFLAG_WRAP = 0

If the text wraps around the bounding box

MessageFlag MSGFLAG_CONT = 1

If the message is the continuation of a previous one

MessageFlag MSGFLAG_CENTER = 2

Deprecated: Not implemented.

MessageFlag MSGFLAG_RIGHT = 3

Deprecated: Not implemented.

MessageFlag MSGFLAG_FULLTILE = 4

If the background tile should be treated as the UL of a tile block,

MessageFlag MSGFLAG_TRANS_BG = 5

If the background should be translucent

MessageFlag MSGFLAG_TRANS_FG = 6

If the text should be translucent

MessageFlag MSGFLAG_NOFREEZE = 7

Added in version 3.0.

If the string should ignore ‘Messages Freeze All Action’.


enum MessageSegmentType: 🔗 Source

Added in version 3.0.

MessageSegmentType MSG_SEGMENT_TYPE_INVALID = 0

MessageSegmentType MSG_SEGMENT_TYPE_LITERAL = 1

MessageSegmentType MSG_SEGMENT_TYPE_COMMAND = 2


enum MessageAnchor: 🔗 Source

Added in version 3.0.

Anchor positions relative to message boxes, used for icons (messagedata::MoreIconAnchor, messagedata::ScrollUpIconAnchor, messagedata::ScrollDownIconAnchor)

MessageAnchor MSG_ANCH_TOP = 0

MessageAnchor MSG_ANCH_BOTTOM = 1

MessageAnchor MSG_ANCH_LEFT = 2

MessageAnchor MSG_ANCH_RIGHT = 3

MessageAnchor MSG_ANCH_TOPLEFT = 4

MessageAnchor MSG_ANCH_TOPRIGHT = 5

MessageAnchor MSG_ANCH_BOTTOMLEFT = 6

MessageAnchor MSG_ANCH_BOTTOMRIGHT = 7

MessageAnchor MSG_ANCH_CENTER = 8

MessageAnchor MSG_ANCH_SCREEN = 9

MessageAnchor MSG_ANCH_SCREEN_YOFFSET = 10


Variable descriptions#

int Next 🔗 Source

The ‘next’ message, which will be automatically displayed when this message finishes.


int Tile 🔗 Source

The tile used for the background.


int CSet 🔗 Source

The CSet to draw the background in.


int Font 🔗 Source

value Font

The font to display the message in.


int X 🔗 Source

The X position of the message box.


int Y 🔗 Source

The Y position of the message box.


int Width 🔗 Source

The width of the message box, in pixels.


int Height 🔗 Source

The height of the message box, in pixels.


int Sound 🔗 Source

The SFX to play when a new character is drawn (including spaces).


int SoundAdvance 🔗 Source

Added in version 3.0.

The SFX to play when player input advances the text.


int SoundMenuMove 🔗 Source

Added in version 3.0.

The SFX to play when player input changes the selected menu option.


int SoundMenuClose 🔗 Source

Added in version 3.0.

The SFX to play when player input closes a menu.


int ListPosition 🔗 Source

The list position of the messagedata as it is displayed in ZQ.


int VSpace 🔗 Source

The spacing between lines/characters, in pixels.


int HSpace 🔗 Source

The spacing between lines/characters, in pixels.


bool[] Flags 🔗 Source


int[] Margins 🔗 Source

The margins, in pixels, from each edge of the text box.

Valid indices: DIR_UP, DIR_DOWN, DIR_LEFT, DIR_RIGHT


int PortraitTile 🔗 Source

The upper-left corner tile of the portrait. If set to 0, no portrait will be displayed.


int PortraitCSet 🔗 Source

The CSet to draw the portrait in


int PortraitX 🔗 Source

The X/Y position of the portrait.


int PortraitY 🔗 Source

The X/Y position of the portrait.


int PortraitTileWidth 🔗 Source

The tile width/height of the portrait. Max 16 and 14 respectively. If either is 0, no portrait will be displayed.


int PortraitTileHeight 🔗 Source

The tile width/height of the portrait. Max 16 and 14 respectively. If either is 0, no portrait will be displayed.


const int TextHeight 🔗 Source

Returns the height, in pixels, of the message text - not including line wrap / breaks.

Note: this is busted in the presence of commands, escaped characters, or excessive whitespace.

Note: There is also a deprecated getter function ->TextHeight(), which returns the same value. Prefer this variable.


const int TextWidth 🔗 Source

Returns the width, in pixels, of the message text - not including line wrap / breaks.

Note: this is busted in the presence of commands, escaped characters, or excessive whitespace.

Note: There is also a deprecated getter function ->TextWidth(), which returns the same value. Prefer this variable.


const int Length 🔗 Source

The length, in bytes, of the underlying message data.

Note: in the presence of commands or escaped characters this is not the same as the displayed number of characters. To get the true character length, see Segments[].


bool Transparent 🔗 Source

Deprecated: Unused! Does nothing!


int Flag 🔗 Source

Deprecated: Use Flags[] instead!


const int[] Segments 🔗 Source

Added in version 3.0.

The result of parsing this string for SCCs and escaped characters.

The data returned in the array is formatted like this:

  1. segment type: MessageSegmentType (MSG_SEGMENT_TYPE_)

  2. For text literals, there are two more values: start position in raw string, length. For commands, there are a varying number of values: start position, length, command code, # of args, …args

For example, the string “Hello TextColor12World” returns 3 segments:

  1. 3 numbers: MSG_SEGMENT_TYPE_LITERAL 0 6 ("Hello ")

  2. 7 numbers: MSG_SEGMENT_TYPE_COMMAND 6 12 1 2 1 2 (\TextColor\1\2\<space>)

  3. 3 numbers: MSG_SEGMENT_TYPE_LITERAL 18 5 ("World")

Command args are returned at full precision: for the few commands that accept them, args may have decimal places (e.g. \SetCurrentScreenD\0\26.5\ returns an arg of 26.5).


ShadowType ShadowType 🔗 Source

Added in version 3.0.

The type of shadow to use on the text.


int ShadowColor 🔗 Source

Added in version 3.0.

The color of shadow to use on the text.


int MoreIconSprite 🔗 Source

Added in version 3.0.

The sprite to use for the ‘More Icon’. The ‘More Icon’ is displayed when the user needs to press A/B to see more.


MessageAnchor MoreIconAnchor 🔗 Source

Added in version 3.0.

The anchor to use for the ‘More Icon’. This determines what part of the message box the MoreIconX/MoreIconY are relative to. The ‘More Icon’ is displayed when the user needs to press A/B to see more.


int MoreIconX 🔗 Source

Added in version 3.0.

The X (relative to the MoreIconAnchor) to draw the ‘More Icon’ at. The ‘More Icon’ is displayed when the user needs to press A/B to see more.


int MoreIconY 🔗 Source

Added in version 3.0.

The Y (relative to the MoreIconAnchor) to draw the ‘More Icon’ at. The ‘More Icon’ is displayed when the user needs to press A/B to see more.


int ScrollUpIconSprite 🔗 Source

Added in version 3.0.

The sprite to use for the ‘Scroll Up Icon’. The ‘Scroll Up Icon’ is displayed when the user can press Up to scroll up.


MessageAnchor ScrollUpIconAnchor 🔗 Source

Added in version 3.0.

The anchor to use for the ‘Scroll Up Icon’. This determines what part of the message box the ScrollUpIconX/ScrollUpIconY are relative to. The ‘Scroll Up Icon’ is displayed when the user can press Up to scroll up.


int ScrollUpIconX 🔗 Source

Added in version 3.0.

The X (relative to the ScrollUpIconAnchor) to draw the ‘Scroll Up Icon’ at. The ‘Scroll Up Icon’ is displayed when the user can press Up to scroll up.


int ScrollUpIconY 🔗 Source

Added in version 3.0.

The Y (relative to the ScrollUpIconAnchor) to draw the ‘Scroll Up Icon’ at. The ‘Scroll Up Icon’ is displayed when the user can press Up to scroll up.


int ScrollDownIconSprite 🔗 Source

Added in version 3.0.

The sprite to use for the ‘Scroll Down Icon’. The ‘Scroll Down Icon’ is displayed when the user can press Down to scroll down.


MessageAnchor ScrollDownIconAnchor 🔗 Source

Added in version 3.0.

The anchor to use for the ‘Scroll Down Icon’. This determines what part of the message box the ScrollDownIconX/ScrollDownIconY are relative to. The ‘Scroll Down Icon’ is displayed when the user can press Down to scroll down.


int ScrollDownIconX 🔗 Source

Added in version 3.0.

The X (relative to the ScrollDownIconAnchor) to draw the ‘Scroll Down Icon’ at. The ‘Scroll Down Icon’ is displayed when the user can press Down to scroll down.


int ScrollDownIconY 🔗 Source

Added in version 3.0.

The Y (relative to the ScrollDownIconAnchor) to draw the ‘Scroll Down Icon’ at. The ‘Scroll Down Icon’ is displayed when the user can press Down to scroll down.


int ScrollSpeedActive 🔗 Source

Added in version 3.0.

The speed in pixels/frame that the string scrolls when the player is scrolling manually using the up/down buttons.


int ScrollSpeedPassive 🔗 Source

Added in version 3.0.

The speed in pixels/frame that the string scrolls when scrolling to fit new text on screen, or to scroll a selected menu choice into view.


Function descriptions#

void Get(char32[] str) 🔗 Source

Loads the raw message data into the provided string buffer.


void Set(char32[] str) 🔗 Source

Sets the raw message data to the provided string.