Modding Wiki

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:

KeyDescription
<center>Aligns text to the center.
\n<name>Create a message box titled name.
\c[n]Sets text color to nth color.
\frResets all font changes.
\fbToggles font boldness.
\fiToggles 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.

A screenshot of the dialog.loc file, showing a JSON structure where a section called "labelLUT" has a highlighted key "BvGWbZMb" with the value "Tomato Can"

Text Formatting

See the above table for the codes and examples for examples.

These are the color codes, corresponding to the Window.png file:

0
1
2
3
4
5
6
7

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.

A screenshot of the "Show Text" dialog, and the "Select an Image" dialog that opens from it.

Examples

<center>
This is the first line!
And this is a second, optional line!

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

Jon Arbuckle

”Why do they call 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]

This is the first line!

And this is a second, optional line!


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]

Jon Arbuckle

”Why do they call it oven when you

of in the cold food of out hot eat the food?”

(also displays whichever bust was specified on the right side of the screen)