Text Escape Codes

Overview

Text escape codes are special codes that you can use in dialogue and message boxes to dynamically manipulate output during runtime. This gives you the capability to change text color, size, insert variable values, party members' names, change message speed, to name a few.

They are generally broken down into three categories: Formatters, Control Sequences, and Replacements.

Formatters format the text and change how it is presented, such as changing the text color, font, weight, and so forth.
Control Sequences change and control how text interaction occurs, such as causing a wait.
Replacements replace the text with values, such as a character name, party member, variable value, money, and so forth.

Formatters

Name Description Parameters Example
< Adds a <. None << only one less than sign will appear.
b Bolds a text sequence. None <b>This is bolded.</b>
i Italicizes a text sequence. None <i>This is italicized.</i>
s Strikethroughs a text sequence. None <s>This is struck-through.</s>
u Underlines a text sequence. None <u>This is underlined.</u>
left Horizontally aligns a text sequence to the left. None <left>This is aligned left.</left>
center Horizontally aligns a text sequence to the center. None <center>This is aligned in the middle.</center>
right Horizontally aligns a text sequence to the right. None <right>This is aligned left.</right>
fontsize Changes the font size of a text sequence away from the default. Font Size (Number) <fontsize[50]>This is a 50pt font.</fontsize>
fontcolor Changes the font color of a text sequence away from the default. Font Color (Hexidecimal Markup or Comma-Separated Decimal in RGB or ARGB Format) <fontcolor[128,255,0,0]>This is partially-transparent red text.</fontcolor>
fontfamily Changes the font family of a text sequence away from the default. Font Family (Number) <fontfamily[3]>This uses the fourth font family at '003' in the database.</fontfamily>
portraitexpression
pe
Changes the portrait expression of a portrait being displayed. Portrait Expression (Number) <pe[1]>This uses the second portrait expression at '001' in the database.</pe>
pitch Adjusts the pitch of the sound generated by the character. Value (Number)
Random Minimum (Number), Random Maximum (Number)
<pitch[-.4]>This text has pitch modulated down by .4.</pitch>
<pitch[-.1,.5]>This text has pitch modulated to a value between -.1 and .5.</pitch>
shake Shakes the text sequence in X and Y directions. Shake X (Number), Shake Y (Number)
Default: 2, 2
<shake[4,10]>This text is shaking horizontally by 4 pixels and vertically by 10 pixels.</shake>
sound Changes the character sound of the span. Name (String)
Name (String), Pan (Number), Pitch (Number), Volume (Number)
<sound[Sounds\Bit by Bit Sound\Chatter.ogg,1,0.4,1]>This text is shown on the screen with a sound effect from Chatter.ogg, with a pan of 1, a pitch of 0.4, and 100% volume.</sound>
wave Waves the text sequence along a sin wave. Wave Factor (Number), Wave Speed (Number)
Default: 1, 2
<wave[4, 2.5]>This text is oscillating along a wave, sped up by a factor of 2.5, with crests to +4 and -4.</wave>
characterdelay
cd
Changes the delay between each character displaying. Duration in Milliseconds (Number) <cd[20]>It takes 20 milliseconds to display each character</cd>
<cd[100]> and this is much slower, taking 100 milliseconds per character.</cd>

Control Sequences

Name Description Parameters Example
continue Emulates a Confirm press, causing the text to paginate, continue forward, or close. None This waits for 500ms and then closes itself.<wait[500]><continue>
displayall Ignores the character delay and displays all text immediately between it.
Note: This requires a closing tag.
None <displayall>This text is ignoring the standard character delay and displaying this text immediately.</displayall> This text is now displayed at the normal delay.
pause Requires a Confirm press. None Did <pause> you know <pause> you hit the confirm key twice?
wait Waits for a duration before display continues. Duration in Milliseconds (Number) This text will wait 1 second <wait[1000]> and now we're continuing!

Replacements

Name Description Parameters Example
globalvar
gv
Displays the value of a global variable. Index (Number) Global Variable #0 has the value: <globalvar[0]>.
globalswitch
gs
Displays the value of a global switch. Index (Number) Global Switch #4 has the value: <gs[4]>.
localvar
lv
Displays the value of a local variable.
Note: This will use the local context from where it was called or created.
Index (Number) Local Variable #0 has the value: <localvar[0]>.
localswitch
ls
Displays the value of a local switch.
Note: This will use the local context from where it was called or created.
Index (Number) Local Switch #4 has the value: <ls[4]>.
party Displays the name of an active party member. Index (Number) Did you know that the first party member's name is <party[0]>?
inactiveparty Displays the name of an inactive party member. Index (Number) Did you know that the first member of your backup party roster is named <inactiveparty[0]>?
partystat
partystatistic
Displays the statistic of an active party member, based on party position and formula name. Index (Number) and Formula Name (String) Did you know that the first party member's HP is <partystat[0,hp]>?
inactivepartystat
inactivepartystatistic
Displays the statistic of an inactive party member, based on inactive party position and formula name. Index (Number) and Formula Name (String) Did you know that the first inactive party member's Strength is <inactivepartystatistic[0,str]>?
character Displays the name of a character from the database. Index (Number) The second character in your database has the name of <character[1]>.
enemy Displays the name of an enemy from the database. Index (Number) The fourth enemy in your database has the name of <enemy[3]>.
fps Displays the current FPS that the engine is running at. None You are currently rendering at <fps> FPS!
icon Displays the visual of an icon from the database. Index (Number) and optionally Size in Pixels The fifth icon in your database looks like <icon[4]>. Alt <icon[4,32]>
item Displays the name of an item from the database. Index (Number) The third item in your database has the name of <item[2]>.
equipment Displays the name of an equipment from the database. Index (Number) The fifth equipment in your database has the name of <equipment[4]>.
mapname Displays the name of the current map. None You are currently at: <mapname>
newline Displays a new line. None This is on the first line.<newline>And this is on the second!
playtime Displays the current playtime. Format String
Default: hh:mm:ss
You've been playing for <playtime>.
machinename Displays the name of the computer, if valid. None Welcome 127.0.0.1, <machinename>, nice to have you!
systemdate Displays the current date from the device. Format String
Default: d
The current date is <systemdate>.
systemtime Displays the current time from the device. Format String
Default: t
The current date is <systemtime>.
steps Displays the number of steps the party has taken. None You have walked <steps> in your playthrough.
encountersteps Displays the number of steps the party has taken that count towards encounters. None <encountersteps> have been made towards the next random encounter.
money
$
Displays the money held by the party. None You have <$> gold!
mastermusicvolume Displays the current master music volume. Format String††
Default: P
The current master volume is <mastermusicvolume>.
mastersfxvolume Displays the current master sound effect volume. Format String††
Default: P
The current master volume is <mastersfxvolume>.
camerax Displays the X coordinate of the target of the camera. Format String††
Default: 0.000
The camera is targeting <camerax>, <cameray>, <cameraz>.
cameray Displays the Y coordinate of the target of the camera. Format String††
Default: 0.000
The camera is targeting <camerax>, <cameray>, <cameraz>.
cameraz Displays the Z coordinate of the target of the camera. Format String††
Default: 0.000
The camera is targeting <camerax>, <cameray>, <cameraz>.
camerarotx Displays the X rotation of the camera (in degrees). Format String††
Default: 0
The camera's rotation is <camerarotx>, <cameraroty>, <camerarotz>.
cameraroty Displays the Y rotation of the camera (in degrees). Format String††
Default: 0
The camera's rotation is <camerarotx>, <cameraroty>, <camerarotz>.
camerarotz Displays the Z rotation of the camera (in degrees). Format String††
Default: 0
The camera's rotation is <camerarotx>, <cameraroty>, <camerarotz>.
camerarotxrad Displays the X rotation of the camera (in radians). Format String††
Default: 0.000
The camera's rotation is <camerarotxrad>, <camerarotyrad>, <camerarotzrad>.
camerarotyrad Displays the Y rotation of the camera (in radians). Format String††
Default: 0.000
The camera's rotation is <camerarotxrad>, <camerarotyrad>, <camerarotzrad>.
camerarotzrad Displays the Z rotation of the camera (in radians). Format String††
Default: 0.000
The camera's rotation is <camerarotxrad>, <camerarotyrad>, <camerarotzrad>.
partyx Displays the X coordinate of the party. Format String††
Default: 0.000
The party is currently at <partyx>, <partyy>, <partyz>.
partyy Displays the Y coordinate of the party. Format String††
Default: 0.000
The party is currently at <partyx>, <partyy>, <partyz>.
partyz Displays the Z coordinate of the party. Format String††
Default: 0.000
The party is currently at <partyx>, <partyy>, <partyz>.

Format strings for date and time can be found at https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings.
†† Format strings for numbers can be found at https://learn.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings.