Difference between revisions of "Category:Text Codes (MZ)"

From Yanfly.moe Wiki
Jump to navigation Jump to search
(Message Core (VisuStella MZ))
Line 68: Line 68:
  
 
{{VisuMZ Message Core Text Codes}}
 
{{VisuMZ Message Core Text Codes}}
 +
 +
== [[Message Sounds VisuStella MZ]] ==
 +
 +
{{VisuMZ Message Sounds Text Codes}}
  
 
== End of List ==
 
== End of List ==
  
 
|}
 
|}

Revision as of 01:57, 13 December 2020

Welcome to the wiki! This is where you can find resources from Yanfly.moe, Ækashics.moe,
VisuStella, Caz Wolf, Fallen Angel Olivia, Atelier Irina, and other affiliated content creators.


ShowTextWindowMZ.png

Text Codes are used in the Show Text event command. They are used to display things that text normally can't produce on its own, such as colors, get the name of a specific actor, change icons, and more.

RPG Maker MZ already comes with text codes of its own:

\V[n] Will be replaced with the value of the nth variable.
\N[n] Will be replaced with the name of the nth actor.
\P[n] Will be replaced by the name of the nth (arranged order) party member.
\G Will be replaced by the currency unit.
\C[n] Draw the subsequent text in the nth color. Text color conforms to the contents of the [Window.png] system image.
\I[n] Draws the nth icon.
\FS[n] Changes the text font size to 'n'.
\{ Increases the text by 1 step.
\} Decreases the text by 1 step.
\\ Replaced with the backslash character.
\$ Open the gold window.
\. Wait for 1/4 second.
\| Wait for 1 second.
\! Wait for button input.
\> Display remaining text on same line all at once.
\< Cancel the effect that displays text all at once.
\^ Do not wait for input after displaying the next.

Here is a list of Text Codes that you may use.

Message Core VisuStella MZ

The following are text codes that you may use with this plugin. Some of these are original text codes provided by RPG Maker MZ, while others are new text codes added through this plugin. You may even add your own text codes through the plugin parameters.

RPG Maker MZ Text Codes

The following are text codes that come with RPG Maker MZ. These text codes cannot be edited through the Plugin Parameters.

---

Default MZ Text Codes

Text Code Effect (Global)
\V[x] Replaced by the value of variable 'x'.
\N[x] Replaced by the name of actor 'x'.
\P[x] Replaced by the name of party member 'x'.
\C[x] Draw the subsequent text with window skin color 'x'.
\I[x] Draw icon 'x'.
\PX[x] Moves text x position to 'x'.
\PY[x] Moves text y position to 'y'.
\G Replaced by the currency unit.
\{ Increase the text font size by one step.
\} Decrease the text font size by one step.
\FS[x] Changes the text font size to 'x'.
\\ Replaced by the backslash character.

---

Default MZ Message-Only Text Codes

Text Code Effect (Message Window Only)
\$ Opens the gold window.
\. Waits a 1/4 second.
\| Waits a full second.
\! Waits for button input.
\> Display remaining text on same line all at once.
\< Cancel the effect that displays text all at once.
\^ Do not wait for input after displaying text to move on.

---

Message Core Hard-Coded Text Codes

MessageCoreAlignment.png

The following text codes are hard-coded into VisuStella MZ Message Core's code. These text codes cannot be edited through the Plugin Parameters.

---

Global Hard-Coded Text Codes

Text Code Effect (Global)
<b> Makes subsequent text bold.
</b> Removes bold from subsequent text.
<i> Makes subsequent text italic.
</i> Removes italic from subsequent text.
<left> Makes subsequent text left-aligned. *Note1*
</left> Removes left-alignment for subsequent text.
<center> Makes subsequent text center-aligned. *Note1*
</center> Removes center-alignment for subsequent text.
<right> Makes subsequent text right-aligned. *Note1*
</right> Removes right-alignment for subsequent text.

Note1: Use at line-start. Does not work with Word Wrap.


Text Code Effect (Global)
<ColorLock> Text codes can't change text color for subsequent text.
</ColorLock> Removes Color Lock property.
<WordWrap> Enables Word Wrap for this window. *Note2*
</WordWrap> Disables Word Wrap for this window. *Note2*
<br> Adds a line break. Requires Word Wrap enabled.
<line break> Adds a line break. Requires Word Wrap enabled.

Note2: Some windows cannot use Word Wrap such as the Choice Window. Word Wrap also cannot be used together with <left>, <center>, or <right> and will disable itself if text alignment text codes are detected.


Text Code Effect (Global)
\picture<x> Draws picture x (filename) at current text position.
\CenterPicture<x> Draws picture x (filename) centered at the window.

---

Message Window Only Hard-Coded Text Codes

MessageCoreAutoSize.png

Text Code Effect (Message Window Only)
\CommonEvent[x] Runs common event x when text code is reached.
\Wait[x] Makes the message wait x frames before continuing.
<Next Page> Ends the current message page at this line. This is used for messages when rows are at 5 or above and the message lines don't match the amount. This is used to prevent grabbing message windows from following message events. Any lines following <Next Page> in the same message event will be ignored.
<Auto> Resizes message window dimensions to fit text. *Note3*
<Auto Width> Resizes message window width to fit text. *Note3*
<Auto Height> Resizes message window height to fit text. *Note3*
<Auto Actor: x> Resizes message window and positions it over actor x sprite's head. *Note3*
<Auto Party: x> Resizes message window and positions it over party member x sprite's head. *Note3*
<Auto Player> Map-Only. Resizes message window and positions it over the player sprite's head. *Note3*
<Auto Event: x> Map-Only. Resizes message window and positions it over event x sprite's head. *Note3*
<Auto Enemy: x> Battle-Only. Resizes message window and positions it over enemy x sprite's head. *Note3*

Note3: Upon using these text codes, the message window's settings will be reset for the upcoming message. These effects do not work with Word Wrap.

---

Battle-Only Hard-Coded Text Codes

Text Code Effect (Battle Only)
<Current Battle Target> Replaces text code with the current target of an action in battle.
<Current Battle User> Replaces text code with the currently active user in battle.
<Current Battle Action> Replaces text code with the current battle action's name with an icon in front.
<Current Battle Action Name> Replaces text code with the current battle action's name without an icon.

If there is no battle, no target, no user, or no action, then the text code will just be replaced with no text.

These text codes are NOT recommended to be used inside of Help Descriptions. They are best used with "Show Text" event commands.

---

Choice Window-Only Hard-Coded Text Codes

Text Code Effect (Choice Window Only)
<Show> Choice is always shown.
<Show Switch: x> Choice shown if switch x is ON.
<Show Switches: x,x,x> Choice shown if the x switches are all ON.
<Show All Switches: x,x,x> Choice shown if the x switches are all ON.
<Show Any Switches: x,x,x> Choice shown if any of x switches are ON.
<Hide> Choice is always hidden.
<Hide Switch: x> Choice hidden if switch x is ON.
<Hide Switches: x,x,x> Choice hidden if the x switches are all ON.
<Hide All Switches: x,x,x> Choice hidden if the x switches are all ON.
<Hide Any Switches: x,x,x> Choice hidden if any of x switches are ON.
<Enable> Choice is always enabled.
<Enable Switch: x> Choice enabled if switch x is ON.
<Enable Switches: x,x,x> Choice enabled if the x switches are all ON.
<Enable All Switches: x,x,x> Choice enabled if the x switches are all ON.
<Enable Any Switches: x,x,x> Choice enabled if any of x switches are ON.
<Disable> Choice is always disabled.
<Disable Switch: x> Choice disabled if switch x is ON.
<Disable Switches: x,x,x> Choice disabled if the x switches are all ON.
<Choice Width: x> Sets the minimum text area width to x. Applies to whole choice window.
<Choice Indent: x> Sets the indent to x value. Applies to current choice selection only.

MessageCore BgColor.png

Text Code Effect (Choice Window Only)
<BgColor: x> Requires VisuMZ_0_CoreEngine! Sets background color of this choice to 'x' text color. This will be combined with a fading
<BgColor: x,y> Requires VisuMZ_0_CoreEngine! Sets background color of this choice to 'x' to 'y' gradient text color.
<BgColor: #rrggbb> Requires VisuMZ_0_CoreEngine! Sets background color of this choice to '#rrggbb' color using hex color values.
<BgColor: #rrggbb, #rrggbb> Requires VisuMZ_0_CoreEngine! Sets background color of this choice to '#rrggbb' gradient using hex color values.

MessageCore Update123 Preview.png


Text Code Effect (Choice Window Only)
<Help> text </Help> Makes a help window appear and have it show 'text' in its contents. The help window will disappear if no text is displayed.


Text Code Effect (Choice Window Only)
<Shuffle> Shuffles the order of all choices. Any cancel shortcuts other than "Branch" will be undone.
<Shuffle: x> Shuffles the order of all choices and only x number of them will appear. Any cancel shortcuts other than "Branch" will be undone. Hidden choices do not count towards x number.


Text Code Background Effects (Choice Window Only)
<BgImg: filename> Creates a background image from img/pictures/ stretched across the choice rectangle.
<BgImg LowerLeft: filename> Creates a background image from img/pictures/ scaled to the lower left of choice rect. scaled to the lower center of choice rect.
<BgImg LowerRight: filename> Creates a background image from img/pictures/ scaled to the lower right of choice rect.
<BgImg MidLeft: filename> Creates a background image from img/pictures/ scaled to the middle left of choice rect.
<BgImg Center: filename> Creates a background image from img/pictures/ scaled to the center of choice rect.
<BgImg MidRight: filename> Creates a background image from img/pictures/ scaled to the middle right of choice rect.
<BgImg UpperLeft: filename> Creates a background image from img/pictures/ scaled to the upper left of choice rect. scaled to the upper center of choice rect.
<BgImg UpperRight: filename> Creates a background image from img/pictures/ scaled to the upper right of choice rect.

Note: For the <BgImg: filename> text code variants, even if the background image is smaller than the choice contents, it will overscale to match its choice rectangle dimensions.

Note: Using a background image will clear the dimmed background rectangle that is normally behind each selectable choice.

Note: Each choice can only have one background image but can use a combination of one background and one foreground image.

Note: Images in the background will appear behind the select cursor.


Text Code Foreground Effects (Choice Window Only)
<FgImg: filename> Creates a foreground image from img/pictures/ stretched across the choice rectangle.
<FgImg LowerLeft: filename> Creates a foreground image from img/pictures/ scaled to the lower left of choice rect. scaled to the lower center of choice rect.
<FgImg LowerRight: filename> Creates a foreground image from img/pictures/ scaled to the lower right of choice rect.
<FgImg MidLeft: filename> Creates a foreground image from img/pictures/ scaled to the middle left of choice rect.
<FgImg Center: filename> Creates a foreground image from img/pictures/ scaled to the center of choice rect.
<FgImg MidRight: filename> Creates a foreground image from img/pictures/ scaled to the middle right of choice rect.
<FgImg UpperLeft: filename> Creates a foreground image from img/pictures/ scaled to the upper left of choice rect. scaled to the upper center of choice rect.
<FgImg UpperRight: filename> Creates a foreground image from img/pictures/ scaled to the upper right of choice rect.

Note: For the <FgImg: filename> text code variants, unlike the background variant, the foreground image will not overscale past its original size. Instead, it will maintain its original size or be smaller, so long as it can be scaled to exist within the choice rectangle unless it is intended to be stretched by using the <FgImg: filename> variant.

Note: Text is then written on top of the foreground image.

Note: Each choice can only have one foreground image but can use a combination of one background and one foreground image.

Note: Images in the foreground will appear behind the select cursor.

---

Name Window-Only Hard-Coded Text Codes

Text Code Effect (Name Window Only)
<Left> Positions the name box window to the left.
<Center> Positions the name box window to the center.
<Right> Positions the name box window to the right.
<Position: x> Replace 'x' with a number from 0 to 10. This positions the name box window on the screen relative to the position of the value 'x' represents.
\NormalBG Changes background type of window to normal type.
\DimBG Changes background type of window to dim type.
\TransparentBG Changes background type of window to transparent type.

---

Message-Only Position Hard-Coded Text Codes

Text Code Effect (Message Window Only)
<Position: x, y, width, height> Forces the message window to exact listed coordinates and dimensions. Replace each of the arguments with numbers. *Note*
<Coordinates: x, y> Forces the message window to the exact listed coordinates. Replace each of the arguments with numbers. *Note*
<Dimensions: width, height> Forces the message window size to the exact listed dimensions. Replace each of the arguments with numbers. *Note*
<Offset: +x, +y> Quickly adjust the message window offset
<Offset: -x, -y> values to the x and y amounts. The values
<Offset: +x, -y> will replace the previous offset settings
<Offset: -x, +y> if there were any.

*NOTE:* These text codes do not work with Word Wrap.

---

Controls-Related Hard-Coded Text Codes

MessageCore ControllerButtons.png

Text Code Effect (Requires VisuMZ_0_CoreEngine)
<Up Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Left Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Right Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Down Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Ok Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Cancel Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Shift Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Menu Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Page Up Button> Display's VisuMZ_0_CoreEngine's button assist text.
<Page Down Button> Display's VisuMZ_0_CoreEngine's button assist text.

---

Random Text Pool

MessageCore RngTextCode.png

MessageCore RngTextExample.png

<RNG> text1 | text2 | text3 </RNG>

Using the above text code format in a Show Message entry, you can get a random result out of the various inserted texts. Use "|" (without quotes) as a separator between text entries. You can have unlimited entries. The result will have any excess white space trimmed.

This text code cannot be inserted into a macro and parsed properly.

---

Message Core Customizable Text Codes

MessageCoreLastGained.png

The following text codes can be altered through the Message Core's various Plugin Parameters to adjust replacements and actions.

---

Default Customizable Text Codes

Text Code Effect (Global)
\Class[x] Draws class x's icon (if have) and name.
\ClassName[x] Draws class x's name only.
\Skill[x] Draws skill x's icon (if have) and name.
\SkillName[x] Draws skill x's name only.
\Item[x] Draws item x's icon (if have) and name.
\ItemName[x] Draws item x's name only.
\ItemQuantity[x] Inserts the number of item x's owned by the party.
\Weapon[x] Draws weapon x's icon (if have) and name.
\WeaponName[x] Draws weapon x's name only.
\WeaponQuantity[x] Inserts the number of weapon x's owned by the party.
\Armor[x] Draws armor x's icon (if have) and name.
\ArmorName[x] Draws armor x's name only.
\ArmorQuantity[x] Inserts the number of armor x's owned by the party.
\LastGainObj Draws the icon + name of the last party-gained object.
\LastGainObjName Draws the name of the last party-gained object.
\State[x] Draws state x's icon (if have) and name.
\StateName[x] Draws state x's name only.
\Enemy[x] Draws enemy x's icon (if have) and name.
\EnemyName[x] Draws enemy x's name only.
\Troop[x] Draws troop x's icon (if have) and name.
\TroopName[x] Draws troop x's name only.
\TroopMember[x] Draws troop member x's icon (if have) and name. *Note1*

Note1: Only works in battle.


Text Code Effect (Global)
\NormalBG Changes background type of window to normal type.
\DimBG Changes background type of window to dim type.
\TransparentBG Changes background type of window to transparent type.
\FontChange<x> Changes font face to x font name.
\ResetFont Resets font settings.
\ResetColor Resets color settings.
\HexColor<x> Changes text color to x hex color (ie. #123abc).
\OutlineColor[x] Changes outline color to text color x.
\OutlineWidth[x] Changes outline width to x thickness.
\WindowMoveTo<?> Moves window to exact coordinates. *Note2*
\WindowMoveBy<?> Moves window by relative values. *Note2*
\WindowReset Resets window position to original position.

Note2: Replace '?' with the following format:

  targetX, targetY, targetWidth, targetHeight, duration, easingType

  Only targetX and targetY are required arguments. These will only alter the
  window dimensions when the text has arrived at that point. They will not
  alter the window preemptively. This is not used as a window positioner.
  Use the <Position: x, y, width, height> text code for that.

---

Default Message Effect Text Codes

Text Code Effect (Message Window Only)
\ActorFace[x] Inserts actor x's face into the Message Window.
\PartyFace[x] Inserts party member x's face into the Message Window.
\ChangeFace<x,y> Changes message face to x filename, y index.
\FaceIndex[x] Changes message face index to x.
\TextDelay[x] Sets delay in frames between characters to x frames.

---

As these text codes can be added, removed, and/or altered, their functions may or may not be the same depending on how you've altered them. VisuStella is not responsible for any errors caused by changes made to pre-made text codes nor any new text codes they did not make.

Message Sounds VisuStella MZ

MsgLetterSounds Preview1.png

Source

The following are text codes that have been added through this plugin. These text codes will not work with your game if the plugin is OFF or not present.

---

Full Length Text Codes

Text Code Effect (Message Window Only)
<Letter Sound On> Turns on the Message Letter Sounds.
<Letter Sound Off> Turns off the Message letter Sounds.
\LetterSoundName<filename> Changes SFX played to 'filename'. Do not use or insert the file extension. Case sensitive.
\LetterSoundVolume[x] Changes SFX volume to x value.
\LetterSoundPitch[x] Changes SFX pitch to x value.
\LetterSoundPan[x] Changes SFX pan to x value.
\LetterSoundVolumeVar[x] Changes SFX volume variance to x value.
\LetterSoundPitchVar[x] Changes SFX pitch variance to x value.
\LetterSoundPanVar[x] Changes SFX pan variance to x value.

---

For those who want to use shorter text codes:

---

Abbreviated Text Codes

Text Code Effect (Message Window Only)
\LSON Turns on the Message Letter Sounds.
\LSOFF Turns off the Message letter Sounds. file extension. Case sensitive.
\LSV[x] Changes SFX volume to x value.
\LSPI[x] Changes SFX pitch to x value.
\LSPA[x] Changes SFX pan to x value.
\LSVV[x] Changes SFX volume variance to x value.
\LSPIV[x] Changes SFX pitch variance to x value.
\LSPAV[x] Changes SFX pan variance to x value.

---

End of List