Modifying Text
Text is handled by some plugins and RPG Maker itself. You may want to check out the page for Text Codes on the Yanfly.moe wiki.
Here’s a quick rundown of some common text codes used in the game:
Key | Description |
---|---|
<center> | Aligns text to the center. |
\n<name> | Create a message box titled name . |
\c[n] | Sets text color to n th color. |
\fr | Resets all font changes. |
\fb | Toggles font boldness. |
\fi | Toggles font italic. |
\bust[n] | Sets the bust location. 1 for left, 2 for right. |
Text Types
There are two different types of text:
- Character dialogues (when a character is speaking)
- Narration (text not spoken by a character)
Examples for how to structure each can be found in the examples.
Base-game Text
Looking through the project, you might notice text that looks like:
(lines)[XnbPs14z]
or
(label)[Qn6HyP9G]
These are replaced by the game with translated text. The lines
key (corresponding to linesLUT
in the translation file, with each string being a separate line) is used for dialogue, and the label
(corresponding to labelLUT
) key is used for item names, character names, multiple-choice options, and things of that nature.
Using these for your mod is also a wise idea, as it means others can translate your mod into other languages.
Text Formatting
See the above table for the codes and examples for examples.
These are the color codes, corresponding to the Window.png
file:
Busts
Busts refer to the character images that show up in dialogue. They can be shown on the left or on the right. To show a bust, add \bust[1]
to display it on the left or \bust[2]
to show it on the right. Then, double click the “Face” option and select any tile on whichever image you want shown image. You can add new images to the img/faces/
folder, but the must have [BUST]
in their name (i.e. b_grin[BUST].png
). To hide a bust, just set the image to the (none)
option at the top of the list.
Examples
<center>
This is the first line!
And this is a second, optional line!
\n<Jon Arbuckle>\c[3]
"Why do they \ficall\fr it oven when you
of in the cold food of out hot eat the food?"
With the following language patch:
{
"linesLUT": {
"example_narration": [
"This is the first line!",
"And this is a second, optional line!"
]
}
}
<center>(lines)[example_narration]
With the following language patch:
{
"labelLUT": {
"example_jon": "Jon Arbuckle"
},
"linesLUT": {
"example_jon1": [
"\"Why do they \\ficall\\fr it oven when you",
"of in the cold food of out hot eat the food?\""
]
}
}
\n(label)[example_jon]\c[3]\bust[2](lines)[example_jon1]
(also displays whichever bust was specified on the right side of the screen)