messagedata#
Tutorials#
Variables#
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
bool[] |
|
int[] |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
const int |
|
const int |
|
const int |
|
bool |
Transparent deprecated |
int |
Flag deprecated |
const int[] |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
|
int |
Functions#
Enumerations#
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
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
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#
The ‘next’ message, which will be automatically displayed when this message finishes.
The tile used for the background.
The CSet to draw the background in.
value Font
The font to display the message in.
The X position of the message box.
The Y position of the message box.
The width of the message box, in pixels.
The height of the message box, in pixels.
The SFX to play when a new character is drawn (including spaces).
Added in version 3.0.
The SFX to play when player input advances the text.
Added in version 3.0.
The SFX to play when player input changes the selected menu option.
Added in version 3.0.
The SFX to play when player input closes a menu.
The list position of the messagedata as it is displayed in ZQ.
The spacing between lines/characters, in pixels.
The spacing between lines/characters, in pixels.
index MessageFlag (MSGFLAG_)
The margins, in pixels, from each edge of the text box.
The upper-left corner tile of the portrait. If set to 0, no portrait will be displayed.
The CSet to draw the portrait in
The X/Y position of the portrait.
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.
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.
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.
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[].
Deprecated: Unused! Does nothing!
Deprecated: Use Flags[] instead!
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:
segment type: MessageSegmentType (MSG_SEGMENT_TYPE_)
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:
3 numbers: MSG_SEGMENT_TYPE_LITERAL 0 6 (
"Hello ")7 numbers: MSG_SEGMENT_TYPE_COMMAND 6 12 1 2 1 2 (
\TextColor\1\2\<space>)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.
Added in version 3.0.
The color of shadow to use on the text.
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.
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.
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.
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.
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.
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.
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.
For accessing and editing message strings (
Quests > Strings).Load with Game->LoadMessageData().