Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Text Formatting

Gijs edited this page Jul 13, 2024 · 5 revisions

Text Formatting

This article describes how formatting text with inline operators works for localisation files.

Background

OMORI uses text formatting facilities provided by the following software/plugins:

  • RPG Maker
  • Yanfly Engine's Message Core
  • Yanfly Engine's Message Core Extension - Extended Message Pack 1
  • Yanfly Engine's Message Core Extension - Extended Message Pack 2
  • Yanfly Engine's Message Macro Plugin
  • TDS Text Effects
  • Archeia - Message Codes
  • A custom plugin (in the files called Omori BASE)
  • Text Language Processor

Each of the elements on the list above follows the RPGMaker convention for text operators, mainly that each operator is prefixed with \ (backslash)

Operator parameters

  • Numeric, for example \c[13] where 13 is the parameter and c is the operator
  • Alphanumeric, for example \fn<OMORI_GAME> where OMORI_GAME is the parameter and fn is the operator. Additionally, these may take some text formatting as their parameters but it often can result in undefined behaviour, so it's advised to keep internal formatting to a minimum. A good use case for this feature might be, for example, printing the name of an actor.
  • Complex, for example \caseSwitch{5?on:off} where 5?on:off is the value of the complex operator and caseSwitch is the operator. Note that depending on the plugin, complex operators can have their arguments resolve to values, however that is not a given.
  • None, for example \{ where { is the operator and there is no parameter

Window types

Note that some escape characters may not be available in all contexts. In that case, they will be marked in this document with an additional, bold warning listing the contexts it's available in.

RpgMaker Built-in operators

\c[<number>] - Change text color. Available colors: (Empty spaces are either black or transparent) Color lookup table


\i[<number>] - Displays an icon in-line with the text. Available icons can be viewed from img/system/IconSet.png after decrypting the game files. Icons are indexed left to right, top to bottom.

Example usage of icons


\{ - Increases font size

Example usage of text sizing

String used in this example: Normal\{ bigger\{ even bigger


\} - Decreases font size

Example usage of text sizing

String used in this example: \{\{Big \}smaller \}normal \}a bit smaller than normal


\$ ONLY AVAILABLE IN MESSAGE WINDOWS - Show player's balance in the top right corner of the screen

Currency window


\. ONLY AVAILABLE IN MESSAGE WINDOWS - Wait 15 ticks before continuing


\| ONLY AVAILABLE IN MESSAGE WINDOWS - Wait 60 ticks before continuing


\! ONLY AVAILABLE IN MESSAGE WINDOWS - Wait until player input is made before continuing


\> ONLY AVAILABLE IN MESSAGE WINDOWS - Display characters immediately, without the text drawing animations


\< ONLY AVAILABLE IN MESSAGE WINDOWS - Negates the effect of \< past it's ocurence


\^ ONLY AVAILABLE IN MESSAGE WINDOWS - Immediately close window after text is done drawing

Yanfly Engine's Message Core

\v[number] - Gets replaced with the value of variable passed. For example, \v[143] would get replaced with the value of the current save's WTF variable


\n[number] - Gets replaced with the name of actor with ID of number. For example, \n[1] would get replaced with OMORI, as OMORI is actor number 1 in most contexts.


\p[number] - Gets replaced with the name party member with ID of number.


\g - Gets replaced by the currently used currency unit


\w[number] ONLY AVAILABLE IN MESSAGE WINDOWS - Wait the specified amount of frames.


\n<string> ONLY AVAILABLE IN MESSAGE WINDOWS - Creates a left-aligned name box with the specified string as the value. The value can contain other operators, a commonly used example being: \n<\n[x]> which would create a name box containing the name of the xth actor.

\nc<string> ONLY AVAILABLE IN MESSAGE WINDOWS - Creates a centered name box with the specified string as the value. The value can contain other operators, a commonly used example being: \nc<\n[x]> which would create a name box containing the name of the xth actor.

\nr<string> ONLY AVAILABLE IN MESSAGE WINDOWS - Creates a right-aligned name box with the specified string as the value. The value can contain other operators, a commonly used example being: \nr<\n[x]> which would create a name box containing the name of the xth actor.

NOTE: At least in OMORI, the alignment options seem to have no effect and the name window is always left-aligned.


<br> - Creates a line break. This is a special operator because it isn't prefixed with a backslash


\px[number] - Set x position of text to the value.

\py[number] - Set y position of text to the value

Text x and y value example

String used in this example: \px[50]\py[80]a\px[0]\py[10]b\px[70]\py[30]c


\oc[number] - Sets outline color (colors the same as in the earlier text color operator)

\ow[number] - Sets outline thickness (Needs outline color to be set beforehand)

Outline example

String used in this example: \oc[5]\ow[1]1\ow[2]2\ow[3]3\ow[4]4\ow[5]5\ow[6]6\ow[7]7\ow[10]10 \ow[30]30


\fr - Reset all font changes

\fs[number] - Change font size to the specified value

\fn<x> - Set font name to specified value (Default value is OMORI_GAME2)

\fb - Toggle if font is bold

\fi - Toggle if font is italic

Font sizing example

String used in this example: \fs[100]big\fs[15]tiny\frNormal

Font naming example

String used in this example: \fn<OMORI_GAME2>OMORI_GAME2 \fn<OMORI_GAME>OMORI_GAME \fn<Times new roman>Times new roman

Font boldness/italicness example

String used in this example: Normal \fbBold \fb\fiItalic


\af[number] ONLY AVAILABLE IN MESSAGE WINDOWS - Supposed to show face of actor with ID of number, seems to have no effect in OMORI.

\ac[number] - Prints class of actor with ID of number.

\an[number] - Supposed to print the nickname of an actor with ID of number, seems to produce empty strings in OMORI.


\pf[number] ONLY AVAILABLE IN MESSAGE WINDOWS - Supposed to show face of party member with ID of number, seems to have no effect in OMORI.

\pc[number] - Prints out class of party member with ID of number

\pn[number] - Supposed to print the party member with ID of number, seems to produce empty strings in OMORI.


\nc[number] - Replaced with name of class with the ID of number (TODO: Insert link to list of known classes here)

\ni[number] - Replaced with name of item with the ID of number (TODO: Insert link to list of known items here)

\nw[number] - Replaced with name of weapon with the ID of number (TODO: Insert link to list of known weapons here)

\na[number] - Replaced with name of charm (Armor in RPGMaker but OMORI seems to call them charms) with the ID of number (TODO: Insert link to list of known charms here)

\ns[number] - Replaced with name of skill with the ID of number (TODO: Insert link to list of known skills here)

\nt[number] - Replaced with name of state with the ID of number (Used with emotions, 5 becomes happy. TODO: Insert link to list of known states here)


\ii[number] - Replaced with name of item with the ID of number prefixed with an icon. Icon is just blank space as OMORI doesn't use RPGMaker's icon system.

\iw[number] - Replaced with name of weapon with the ID of number prefixed with an icon. Icon is just blank space as OMORI doesn't use RPGMaker's icon system.

\ia[number] - Replaced with name of charm (Armor in RPGMaker but OMORI seems to call them charms) with the ID of number prefixed with an icon. Icon is just blank space as OMORI doesn't use RPGMaker's icon system.

\is[number] - Replaced with name of skill with the ID of number prefixed with an icon. Icon is just blank space as OMORI doesn't use RPGMaker's icon system.

\it[number] - Replaced with name of state with the ID of number prefixed with an icon. Icon is just blank space as OMORI doesn't use RPGMaker's icon system.

Yanfly Engine's Message Core Extension - Extended Message Pack 1

\lson - Enable letter sounds

\lsoff - Disable letter sounds

\lsn<name> - Set the name of letter sounds to name. Name is the file name (without extension) from audio/se. For example, \lsn<SE_Meow> would set the text sound to meowing.

\lsv[number] - Set volume of letter sounds to number

\lspi[number] - Set pitch of letter sounds to number

\lspiv[number] - Set pitch variance of letter sounds to number

\lspa[number] - Set the pan of letter sounds to number

\lspav[number] - Set the pan variance of letter sounds to number

\lsi[number] - Set the interval of letter sounds to number


\en[number] - Prints the name of the enemy in Database position number

\et[number] - Prints the name of the enemy in Troop position number (Seems to have no effect in OMORI)


\nd<string> - Displays a "dimmed name box" with string as text that's left-aligned. Due to broken styling, doesn't work that well in OMORI.

\ndc<string> - Displays a "dimmed name box" with string as text that's center-aligned. Due to broken styling, doesn't work that well in OMORI.

\ndr<string> - Displays a "dimmed name box" with string as text that's right-aligned. Due to broken styling, doesn't work that well in OMORI.

\nt<string> - Displays a "transparent name box" with string as text that's left-aligned. Due to broken styling, doesn't work that well in OMORI.

\ntc<string> - Displays a "transparent name box" with string as text that's centered-aligned. Due to broken styling, doesn't work that well in OMORI.

\ntr<string> - Displays a "transparent name box" with string as text that's right-aligned. Due to broken styling, doesn't work that well in OMORI.


\msgposx[number] - Sets the X position of the message box to number. Valid values seem to be between 300 and 350 (For default width, at least)

\msgposx[auto] - (AUTO ISN'T A VALUE, IT'S SPELLED AS IS IN THE OPERATOR!). Sets the X position to the default one.

\msgposy[number] - Sets the Y position of the message box to number. Valid values seem to be between 110 and 480 (For default height, at least)

\msgposx[auto] - (AUTO ISN'T A VALUE, IT'S SPELLED AS IS IN THE OPERATOR!). Sets the Y position to the default one.

\msgevent[number] - Produces broken results in OMORI.

\msgactor[number] - Produces no effect in OMORI.

\msgparty[number] - Produces no effect in OMORI.

\msgenemy[number] - Produces no effect in OMORI.


\msgwidth[number] - Sets the width of the message box to number. Seems to have no effect in OMORI.

\msgwidth[auto] - (AUTO ISN'T A VALUE, IT'S SPELLED AS IS IN THE OPERATOR!). Sets the width of the message box to the default one.

\msgrows[number] - Sets the amount of rows of the message box to number. Seems to have no effect in OMORI.

\msgrows[auto] - (AUTO ISN'T A VALUE, IT'S SPELLED AS IS IN THE OPERATOR!). Sets the amount of rows of the message box to the default one.

\auto - Sets the width and rows of the message window to fit the current message window. Seems to have no effect in OMORI.


\autoevent[number] - Produces broken results in OMORI.

\autoactor[number] - Produces no effect in OMORI.

\autoparty[number] - Produces no effect in OMORI.

\autoenemy[number] - Produces no effect in OMORI.


\msgreset - Resets the positioning of message box to default

Yanfly Engine's Message Core Extension - Extended Message Pack 2

\qi[number] - Returns the quantity of item with ID of number that the party currently has.

\qw[number] - Returns the quantity of weapon with ID of number that the party currently has.

\qa[number] - Returns the quantity of charms with ID of number that the party currently has.


\compare<x:y> - Changes message color depending on if x is greater than or equal to y. x and y can be operators. ***Note: There are more compare operators (\compare1 to \compare9) but they only change the colors of the greater than or less than value.


\caseSwitch{s?x:y}- If switch s is on, shows value passed as x, otherwise shows value passed as y. x and y can be operators. The : and ? are mandatory separators.

\caseEval{e?x:y} - Executes javascript code passed as e and if the value is truthy, shows value passed as x, otherwise shows value passed as y. x and y can be operators. The : and ? are mandatory separators.


ToDo: Explain the below futher

\amhp[number] - Returns the Max HP of actor with ID number

\ahp[number] - Returns the current HP of actor with ID number

\ahp%[number] - Returns the HP% of actor with ID number

\ammp[number] - Returns the Max juice of actor with ID number

\amp[number] - Returns the Juice of actor with ID number

\amp%[number] - Returns the Juice% of actor with ID number

\amtp[number] - Returns the Max TP of actor with ID number

\atp[number] - Returns the TP of actor with ID number

\atp%[number] - Returns the TP% of actor with ID number

\aatk[number] - Returns the ATK of actor with ID number

\adef[number] - Returns the DEF of actor with ID number

\amat[number] - Returns the MAT of actor with ID number

\amdf[number] - Returns the MDF of actor with ID number

\aagi[number] - Returns the AGI of actor with ID number

\aluk[number] - Returns the LUK of actor with ID number

\ahit[number] - Returns the HIT of actor with ID number

\aeva[number] - Returns the EVA of actor with ID number

\acri[number] - Returns the CRI of actor with ID number

\acev[number] - Returns the CEV of actor with ID number

\amev[number] - Returns the MEV of actor with ID number

\amrf[number] - Returns the MRF of actor with ID number

\acnt[number] - Returns the CNT of actor with ID number

\ahrg[number] - Returns the HRG of actor with ID number

\amrg[number] - Returns the MRG of actor with ID number

\atrg[number] - Returns the TRG of actor with ID number

\atgr[number] - Returns the TGR of actor with ID number

\agrd[number] - Returns the GRD of actor with ID number

\arec[number] - Returns the REC of actor with ID number

\apha[number] - Returns the PHA of actor with ID number

\amcr[number] - Returns the MCR of actor with ID number

\atcr[number] - Returns the TCR of actor with ID number

\apdr[number] - Returns the PDR of actor with ID number

\amdr[number] - Returns the MDR of actor with ID number

\afdr[number] - Returns the FDR of actor with ID number

\aexr[number] - Returns the EXR of actor with ID number


\emhp[number] - Returns the Max HP of enemy with ID number

\ehp[number] - Returns the current HP of enemy with ID number

\ehp%[number] - Returns the HP% of enemy with ID number

\emmp[number] - Returns the Max juice of enemy with ID number

\emp[number] - Returns the Juice of enemy with ID number

\emp%[number] - Returns the Juice% of enemy with ID number

\emtp[number] - Returns the Max TP of enemy with ID number

\etp[number] - Returns the TP of enemy with ID number

\etp%[number] - Returns the TP% of enemy with ID number

\eatk[number] - Returns the ATK of enemy with ID number

\edef[number] - Returns the DEF of enemy with ID number

\emat[number] - Returns the MAT of enemy with ID number

\emdf[number] - Returns the MDF of enemy with ID number

\eagi[number] - Returns the AGI of enemy with ID number

\eluk[number] - Returns the LUK of enemy with ID number

\ehit[number] - Returns the HIT of enemy with ID number

\eeva[number] - Returns the EVA of enemy with ID number

\ecri[number] - Returns the CRI of enemy with ID number

\ecev[number] - Returns the CEV of enemy with ID number

\emev[number] - Returns the MEV of enemy with ID number

\emrf[number] - Returns the MRF of enemy with ID number

\ecnt[number] - Returns the CNT of enemy with ID number

\ehrg[number] - Returns the HRG of enemy with ID number

\emrg[number] - Returns the MRG of enemy with ID number

\etrg[number] - Returns the TRG of enemy with ID number

\etgr[number] - Returns the TGR of enemy with ID number

\egrd[number] - Returns the GRD of enemy with ID number

\erec[number] - Returns the REC of enemy with ID number

\epha[number] - Returns the PHA of enemy with ID number

\emcr[number] - Returns the MCR of enemy with ID number

\etcr[number] - Returns the TCR of enemy with ID number

\epdr[number] - Returns the PDR of enemy with ID number

\emdr[number] - Returns the MDR of enemy with ID number

\efdr[number] - Returns the FDR of enemy with ID number

\eexr[number] - Returns the EXR of enemy with ID number

Yanfly Engine's Message Macro Plugin

\m[number] - Evaluates to macro with ID number.

Macro lookup table

You can also use macro aliases as operators (\m[1] is the same as \omo for instance)

TDS Text Effects

\SINV[number] - Makes the text shake vertically (Accepted values are 1 and 2, 2 produces a more dense wave) Video demo

\SINH[number] - Makes the text shake horizontally (Accepted value is 1) Video demo

\QUAKE[number] - Makes the text wobble agressively (Accepted values are 1 and 2, 2 is less intense) Video demo

\RAINBOW[number] - Adds an animated rainbow effect to the text (Accepted value is 1) Video demo

Archeia - Message codes

\Com[number] - Invokes a common event (For example, in dream world making Mari say \Com[219] sends omori to black space)

\Var[var,value] - Sets variable with ID var to value

\VarA[var,value] - Adds value to variable with ID var

\VarS[var,value] - Subtracts value from variable with ID var

\VarX[var,value] - Multiplies variable with ID var by value

\VarD[var,value] - Divides variable with ID var by value

\VarM[var,value] - Sets variable with ID var to the module of variable with value

Omori Base

\DII[id] - Displays the input icon for the given input id. The input id can be a string. Example usage: \DII[down]

Down button

Text Language Processor

Adding a background tab to the message setup will allow you to change the text box display. The numbers range from 0-2, 0 being default, 1 being dim, and 2 being fully transparent. For example:

Adding a position tab will allow you to change the position of the text box. The numbers range from 0-2, 0 being the top of the screen, 1 being the middle, and 2 being the bottom, which is the default.