Wikia

Pokémon Essentials Wiki

Messages

Talk10
189pages on
this wiki

This article describes various message options, including modifying the appearance of text and the message box, and displaying choices.

See also

Options screen

  • Several options alter the displaying of text, including the text display speed and the message box background picture.

Messages

A message is any text which appears in a box, either by an event's "Show Text" command or by the method Kernel.pbMessage or any of a number of similar methods.

There are two kinds of messages: speech and system. Speech is for any text that appears as dialogue, while system is typically for choice menus and informative text.

When typing a message into an event, you do not need to add in any line breaks or restrict how much text you enter. The message system will automatically wrap text as appropriate, and scroll the text if it won't all fit into a single text box.

Windowskins

WindowskinBreakdown
Diagram showing the pieces of different-sized windowskins.
MarunoAdded by Maruno

A windowskin is the background image of the message box. All windowskins are stored in the folder Graphics/Windowskins.

A windowskin is a single graphic. The dimensions of the graphic are important, as they determine how it is to be split up in order to display as a proper message box. The image on the right shows how windowskins of different sizes are divided up.

  • "Tiling" is how the picture is divided up and stuck together to form the box. The side and central segments are repeated as often as necessary.
  • "Text position" is where text will appear within the box. It appears in the central segment shown. This is the same as the tiling's central segment for all windowskin sizes, except for 80x80.

Pokémon Essentials also supports windowskins in the forms used by RPG Maker XP (192x128) and RPG Maker VX (128x128). Information about those formats can be found online.

The player is able to change the windowskins of the speech and system messages. For more information, see the article Options screen.

Special windowskins

There are a couple of notable windowskins. These are:

  • goldskin - Used for the boxes which show the player's money and Coins.
  • signskin - Typically used for signposts and "Trainer Tips" boards.

Modifying text

These are a number of ways to modify the text in Pokémon Essentials. You can do so by using the following commands:

Command type Command What it does Screenshot
Displays text \\ Becomes the backslash character "\".

You don't need to use this in text which appears in a "Show Text" event command, but you will need to use it in other places (such as in scripts where the text is of the form _I("blah")). It will be used to put the backslash in the below text commands (e.g. use \\PN rather than \PN).

-
' Becomes the apostrophe character '. You don't need to use this in text which appears in a "Show Text" event command, but you may need to use it in other places. -
&lt; Becomes the less than character "<". You don't need to use this in text which appears in a "Show Text" event command, but you may need to use it in other places. -
&gt; Becomes the greater than character ">". You don't need to use this in text which appears in a "Show Text" event command, but you may need to use it in other places. -
&amp; Becomes the ampersand character "&". You don't need to use this in text which appears in a "Show Text" event command, but you may need to use it in other places. -
&quot; Becomes the double quote mark character ". You don't need to use this in text which appears in a "Show Text" event command, but you may need to use it in other places. -
\PN Becomes the player's name.
MessageReplaceText
MarunoAdded by Maruno
\PM Becomes the player's current money within the message, with a dollar sign before it (e.g. $1000). If using one of the Pokémon fonts that comes with Essentials, the dollar sign will instead be the PokéDollar symbol.
\v[42] Becomes whatever is stored in Global Variable 42.
Changes displayed text <b>...</b> Makes the text between these commands bold.
MessageFormatting1
MarunoAdded by Maruno
<i>...</i> Makes the text between these commands italic.
<u>...</u> Makes the text between these commands underlined.
<s>...</s> Makes the text between these commands struck out (i.e. a line is drawn through it).
<outln>...</outln> Makes the text between these commands display with an outline rather than a shadow.
<outln2>...</outln> Makes the text between these commands display with a thicker outline rather than a shadow.
<fn=X>...</fn> Makes the text between these commands display is a specified font (or Arial if the font doesn't exist).
MessageFormatting2
MarunoAdded by Maruno
<fs=X>...</fs> Makes the text between these commands font size "X". Text will be squished if this is greater than 32.
<o=X>...</o> Changes the opacity of the text between these commands. "X" is a number between 0 (fully transparent) and 255 (fully opaque).
Colours text \b Makes the text after this command blue (male dialogue colour). The shadow colour is still grey.
MessageColour1
MarunoAdded by Maruno
\r Makes the text after this command red (female dialogue colour). The shadow colour is still grey.
\pg Is treated as \b if the player is male, or \r if the player is female. It colors the text according to the player's gender. -
\pog Is treated as \r if the player is male, or \b if the player is female. It colors the text according to the player's opposite gender. -
\c[n] Makes the text after this command one of the following colours depending on the value of "n":
  • 0 - Black (normal colour)
  • 1 - Blue
  • 2 - Red
  • 3 - Green
  • 4 - Cyan
  • 5 - Magenta
  • 6 - Yellow
  • 7 - Gray
  • 8 - White
MessageColourPreset
MarunoAdded by Maruno
\[XXXXyyyy] Makes the text after this command a given colour. "XXXX" is the base colour, and "yyyy" is the shadow colour. Each number is a 15-bit hexadecimal RGB colour. Is a shortened version of <c2>. Examples (matching the colours above):
  • \[043c3aff] - Red
  • \[06644bd2] - Green
  • \[65467b14] - Blue
  • \[318c675a] - Gray
-
<c2=XXXXyyyy>...</c2> Makes the text between these commands a given colour. "XXXX" is the base colour, and "yyyy" is the shadow colour. Each number is a 15-bit hexadecimal RGB colour. Examples:
  • <c2=043c3aff>...</c2> - Red
  • <c2=06644bd2>...</c2> - Green
  • <c2=65467b14>...</c2> - Blue
  • <c2=318c675a>...</c2> - Gray
-
<c=RRGGBBAA>...</c> Makes the text between these commands a given colour. This text will not have a shadow.
  • "RRGGBB" is the hexadecimal colour of the text.
  • "AA" is optional and sets the opacity of the text. Is a hexadecimal number between 00 (fully transparent) and FF (fully opaque).
-
<c3=RRGGBBAA,RRGGBBAA>...</c3> Makes the text between these commands a given colour.
  • "RRGGBB" is the hexadecimal colour of the text.
  • "AA" is optional and sets the opacity of the text. Is a hexadecimal number between 00 (fully transparent) and FF (fully opaque).

The first number is the base colour, and the second number is the shadow colour.

-
Moves text \n
<br />
Causes a line break. Note that this has to be used to start a new line, as pressing Enter in the message command window of an event will only adds a space.
MessageTextAlign
MarunoAdded by Maruno
<r> Right-aligns the text after this command until the next line break. The text after this command begins to be displayed on the same line as the text just before it, so there may be overlapping text if there is enough of it.
<ac>...</ac> Makes the text between these commands centre-aligned. Causes line breaks before and after this text.
<al>...</al> Makes the text between these commands left-aligned. Causes line breaks before and after this text.
<ar>...</ar> Makes the text between these commands right-aligned. Causes line breaks before and after this text.
Alters message box \w[X] Changes the message box's windowskin after this command for this message only. The windowskin used is named "X.png" (in the folder "Graphics/Windowskins"). If "X" is blank, there is no windowskin (i.e. just the text appears).
MessageWindowskin
MarunoAdded by Maruno
\sign[X] Displays the message in the form of a sign and in the windowskin "X". If this field is blank, the message system won't display a windowskin. This command is actually a combination of \op, \cl, \ts[] and \w[X]. -
\l[n] Changes the number of lines in the text box to "n" lines.
MessageLines
MarunoAdded by Maruno
\wu The textbox is displayed at the top of the screen. -
\wm The textbox is displayed at the middle of the screen. -
\wd The textbox is displayed at the bottom of the screen (default). -
\op Slides the window vertically from off-screen to its display position (either top or bottom; middle is treated as bottom) as it displays. -
\cl[X] After pressing a button to close the window, slides the window vertically off-screen from its display position (either top or bottom). The "[X]" is optional, where X is the sound file to play as the window closes.

Not suitable for use with \wm, as the window will jump to the bottom and then slide off the bottom.

-
Alters displaying of text \ts[X] Sets the display speed of the text to the value "X". If "X" is blank (i.e. \ts[]), the text displays instantly. -
\1
\!
Pauses the message. When a button is pressed, the message will carry on being shown. -
\. Pauses the message for 1/4 of a second, then automatically continues to show the rest of the text. -
\| Pauses the message for 1 second, then automatically continues to show the rest of the text. -
\wt[X] Pauses the message for X/20 of a second, then automatically continues to show the rest of the text. -
\wtnp[X] Pauses the message for X/20 of a second, then automatically continues to show the rest of the text. The message closes immediately when it is done. -
\^ The message closes immediately when it is done. -
Plays sound \se[X] Plays the sound effect (SE) named "X". -
\me[X] Plays the music effect (ME) named "X". -
Displays extra things \G Displays a separate window showing the player's current money. This window is displayed by the def pbDisplayGoldWindow in the script section PokemonMessages, and is displayed in the top left of the screen only while the current message is displayed.
MessageMoney
MarunoAdded by Maruno
\CN Displays a separate window showing the player's current Coins. This window is displayed by the def pbDisplayCoinsWindow in the script section PokemonMessages, and is displayed in the top left of the screen only while the current message is displayed.

It can be shown alongside the money window, but if so, this command must appear after the money window's command (e.g. \G\CN).

MessageCoins
MarunoAdded by Maruno
\f[X] Displays the picture called "X.png", located in the folder "Graphics/Pictures".
MessagePicture1
MarunoAdded by Maruno
\ff[X]
\ff[X,2]
Displays a 96x96 pixel square of the picture called "X.gif" or "X.png", located in the folder "Graphics/Faces" (or "Graphics/Pictures" if not found). The number is optional, is 0 by default, and indicates which part of the picture to show. The picture is considered to be a 4x4 grid of squares, with square 0 being the top left one and then counting across and then down (e.g. square 7 is the far right square of the second row). This command works with animated gifs.
MessagePicture2
MarunoAdded by Maruno
<icon=X> Displays the icon called "X.png" in the folder "Graphics/Icons".
MessageIcon
MarunoAdded by Maruno
\ch[a,b,choices] Displays a list of choices. See below for more information.
MessageChoices
MarunoAdded by Maruno

When using a message command, you should not put any spaces around it as you would a word. For example, you should use "\bText" rather than "\b Text".

Choices

RPG Maker XP has an event command called "Show Choices", which is useful so long as there are no more than 4 options to choose from. To show a choice of more than 4 options, you will need to use a message command instead.

You can display a list of choices by using the message command \ch[a,b,choices], where:

  • "a" is the number of a Global Variable in which to store the chosen choice (the first choice is 0, the second is 1, and so on).
  • "b" is the choice used when the player cancels (or 0 if the player can't cancel). Here, the first choice is 1, the second is 2, and so on.
  • "choices" is a comma-separated list of choices.

Examples

\ch[5,1,Choice 1,Choice 2,Choice 3,Choice 4]

This example displays four choices, stores the chosen choice in Global Variable 5, and specifies that Choice 1 will be chosen if the player cancels. Global Variable 5 will store the number 0 if Choice 1 is chosen, the number 1 if Choice 2 is chosen, and so on.

\ch[5,0,Choice 1,Choice 2,Choice 3,Choice 4,Choice 5]

This example displays five choices, stores the chosen choice in Global Variable 5, and specifies that the player must make a choice (i.e. they cannot cancel).

\ch[5,-1,Choice 1,Choice 2,Choice 3,Choice 4,Choice 5]

This example displays five choices, stores the chosen choice in Global Variable 5, and specifies that none of the given choices will be chosen if the player cancels.

Here is a complete example that shows how an event can do different things depending on the choice the player chose. Note the Conditional Branches that check the value of the stored result.

@>Comment: Store result in Variable 1.
         : Cancelling stores a result of -1.
@>Text: Please choose one.\ch[1,-1,Choice 1,Choice 2]
@>Conditional Branch: Variable [0001: Temp Pokemon Choice] == -1
  @>Text: The choice was cancelled.
  @>
 : Branch End
@>Conditional Branch: Variable [0001: Temp Pokemon Choice] == 0
  @>Text: Choice 1 was chosen.
  @>
 : Branch End
@>Conditional Branch: Variable [0001: Temp Pokemon Choice] == 1
  @>Text: Choice 2 was chosen.
  @>
 : Branch End
@>

In the following example, the player must make a choice:

@>Comment: Store result in Variable 1.
@>Text: Please choose one.\ch[1,0,Choice 1,Choice 2]
@>Conditional Branch: Variable [0001: Temp Pokemon Choice] == 0
  @>Text: Choice 1 was chosen.
  @>
 : Branch End
@>Conditional Branch: Variable [0001: Temp Pokemon Choice] == 1
  @>Text: Choice 2 was chosen.
  @>
 : Branch End

Entering text

The player can provide text for the game to use. There are two different kinds of text entry. This section only describes how to get text; it does not describe what you can do with it.

Naming something

This method lets the player enter a short name. It is used for naming the player character (and rivals), giving a Pokémon a nickname, and naming a Pokémon storage box. This is done via the naming screen.

There are two versions of the naming screen - cursor entry and keyboard entry. Which one is used by a game depends on what the value of USEKEYBOARDTEXTENTRY is set to in the script section Settings. The cursor entry version is identical to text entry in the official games, where you are provided with a grid of letters, numbers and symbols to select and insert into the name. The keyboard entry version takes advantage of Essentials games being PC games, and allows direct text entry by typing it in via the keyboard.

Naming is done by using the following code:

name=pbEnterText(_INTL("Your name?"),0,7,_INTL("Red"))

The first parameter is the "helper text", a phrase which appears in the naming screen and lets the player know what they're supposed to be entering a name for.

The second parameter is the minimum length that the name can be. If this is 0, the naming can be cancelled (and name will be set to ""). The third parameter is the maximum length that the name can be, and is traditionally 7 characters for player names and 10 characters for Pokémon nicknames.

The fourth parameter is optional, and is the default name which the player can edit/replace.

Entering a message

This method lets the player enter a longer message. It is used for writing a message in a mail item when giving it to a Pokémon.

Unlike naming something, entering a message does not involve a separate screen. Instead, a message box appears on-screen which the player can type into using the keyboard.

Message entry is done by using the following code:

message=Kernel.pbMessageFreeText(_INTL("Please enter a message."),
                                 _INTL("Default message."),
                                 false,256,Graphics.width)

The first parameter is the "helper text", a phrase which appears to let the player know what they're supposed to be doing.

The second parameter is the default message. If you don't want a default message, simply put "" here instead.

The third parameter is whether the message is a password. If this is true, then the message is shown as asterisks instead of actual letters. If this is false, then the message is shown as normal.

The fourth parameter is the maximum length that the message can be.

The fifth parameter is optional, and is the width of the message entry box. If this is blank, the width will be 240 pixels (just under half the width of the screen).

Note that message entry can be cancelled. In that case, message will be set to "".

Advertisement | Your ad here

Around Wikia's network

Random Wiki