Messages
Messages are simply lines in your script that will be sent to the user. Each line in your script will be displayed as a separate message unless it is a command or a comment.
Writing Messagesβ
Messages are regular lines of text that are sent to the game one at a time and displayed to the user.
For example, a simple message might look like this:
This is a message in t-Plot.
Messages can contain any text, but some special characters must be escaped.
Text Formattingβ
Since t-Plot uses the Yarn Spinner parser and strives to maintain full compatibility with it, there are some specific formatting rules for messages:
-
Line breaks: Each line is a separate message. To create a line break within a message, use the
[br/]tag.in the script:
This is the first line.[br/]This is the second line.in the game:
This is the first line.
This is the second line. -
Speaker: You can specify the name of the character speaking a line by using a colon
:after the character's name.in the script:
Anna: Hello!in the game:
Anna:
Hello! -
Escaping characters: Some characters must be escaped to prevent them from being interpreted as commands or special symbols. These include:
\[,\],\<,\>,\/,\{,\}, and\#. To use these characters in text, add a backslash\before them.in the script:
This message contains the following characters: $begin:math:display$ $end:math:display$ \< \> \{ \} \# \/in the game:
This message contains the following characters: [ ] < > { } # /
Colon :β
In Yarn Spinner, a colon is used to specify the name of the character speaking the line. If you need to use a colon in the text, use [cl/].
in the script:
This is a message[cl/] this is an example of using a colon.
in the game:
This is a message: this is an example of using a colon.
Dollar Sign $β
To include a dollar sign in your message, use [usd/].
in the script:
[usd/]100
in the game:
$100
Supported Formatting Tagsβ
You can format your messages using the following tags:
[i]Italic[/i][b]Bold[/b][u]Underlined[/u][s]Strikethrough[/s][link https://docs.tplot.com]Link text[/link][spoiler]Spoiler[/spoiler][ms]Code[/ms]
The url characters in the link tag do not need to be escaped or replaced by : with [cl/], just paste the link into the tag as it is.
Message Typesβ
You can use different types of media messages by starting the line with the appropriate tag:
Photoβ
// Photo with a caption
[photo test.jpeg /]Caption
// Photo with a caption and a speaker
player: [photo test.jpeg /]Caption
// Photo without a caption
[photo test.jpeg /]
Where test.jpeg is the name of the file in the media folder. Only jpg and jpeg formats are supported. The caption can be formatted just like a regular message or omitted.
Voice Messageβ
// Voice with a caption
[voice test.mp3 /]Caption
// Voice without a caption
[voice test.mp3 /]
Where test.mp3 is the name of the file in the media folder. Only mp3 format is supported. The caption can be formatted like a regular message or omitted.
Video Notesβ
[video_note test.mp4 /]
Where test.mp4 is the name of the file in the media folder. Only mp4 format is supported. This format does not support a caption.
For video notes, it's recommended to use videos with a resolution of 640x640 pixels and a length of no more than 59 seconds.
Videoβ
// Video with a caption
[video test.mp4 /]Caption
// Video without a caption
[video test.mp4 /]
Where test.mp4 is the name of the file in the media folder. Only mp4 format is supported. The caption can be formatted like a regular message or omitted.