messagedata#

For accessing and editing message strings (Quests > Strings). Load with Game->LoadMessageData().

Tutorials#

Variables#

int

Next

int

Tile

int

CSet

int

Font

int

X

int

Y

int

Width

int

Height

int

Sound

int

ListPosition

int

VSpace

int

HSpace

bool[]

Flags

int[]

Margins

int

PortraitTile

int

PortraitCSet

int

PortraitX

int

PortraitY

int

PortraitTileWidth

int

PortraitTileHeight

const int

TextHeight

const int

TextWidth

const int

Length

bool

Transparent deprecated

int

Flag deprecated

const int[]

Segments

Functions#

void

Get(char32[] str)

void

Set(char32[] str)

Enumerations#

enum MessageFlag: πŸ”— Source

Used with messagedata::Flags[].

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


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


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 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

index MessageFlag (MSGFLAG_)


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

deprecated_getter TextHeight

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.


const int TextWidth πŸ”— Source

deprecated_getter TextWidth

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.


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")


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.