Casper Gaming Developer Corner
Casper Gaming Developer Corner

Documentation

Back to Plugin


Quick InfoVersion: Alpha R8
Made for RPG Maker MZ 1.9.0

New Text CodesThe following text codes allow you to display an item name with its icon
\ii[x] - Draw item x icon then name
\wi[x] - Draw weapon x icon then name
\ai[x] - Draw armor x icon then name
\ski[x] - Draw skill x icon then name
\sti[x] - Draw state x icon then name
\acti[x] - Draw actor x icon then name (requires [CGMZ] Actor Upgrade)
\eni[x] - Draw enemy x icon then name (requires [CGMZ] Enemy Upgrade)

\iib[x] - Draw item x name then icon
\wib[x] - Draw weapon x name then icon
\aib[x] - Draw armor x name then icon
\skib[x] - Draw skill x name then icon
\stib[x] - Draw state x name then icon

The following text codes allow you to display database object names:
\in[x] - Draw item x name
\an[x] - Draw armor x name
\wn[x] - Draw weapon x name
\skn[x] - Draw skill x name
\stn[x] - Draw state x name
\en[x] - Draw enemy x name
\tn[x] - Draw troop x name
\cn[x] - Draw class x name
\cen[x] - Draw common event x name
\mn[x] - Draw map x name

The following text codes allow you to get random text:
\rand[x|y|z] - Will randomly choose to display either x, y, or z
\randl[id] - Will randomly choose to display a random string from a predefined list
\rands[list|data] - Will randomly choose a random string from a predefined list (the saved lists). This random value will then be saved, and using the same text code will always return the same string. Can be used to randomly generate NPC names which are random per playthrough, but once generated will always stay the same.

The following text codes allow you to make text bold or italics:
\_ - Toggles bold on/off. Ex: \_this is bold\_ this is not
\- - Toggles italics on/off. Ex: \-this is italics\- this is not

The following text codes allow you to change text properties
\oc[x] - Changes the text outline color to color x. Same as built in \c[x] for the color number. Ex: \oc[1]. Use \oc[-1] for default.

\ow[x] - Changes the text outline width to x. Ex \ow[1]. Use \ow[3] for default.

\po[x] - Changes the text paint opacity to x. Ex \po[125]. Use \po[255] for default.

\ff[x] - Changes the font face used to x (should be font family, not font filename). Default RMMZ fonts are rmmz-mainfont and rmmz-numberfont. When using other fonts, it is recommended to preload them first. You can preload them through any plugin that offers the ability to preload fonts, if you would like to stick with [CGMZ] the plugin that handles that is [CGMZ] Preloader.

The following text codes have misc effects:
\date[x] - Prints the current date in x format (see date format section).

\input[keyboard|gamepad] - If the user last used the keyboard, it will show the keyboard text. Otherwise, it will show the gamepad text.

\evalb[x] - Will run whatever is between the brackets as JavaScript code. Note that you should return a string here. It is only meant for very basic JS applications. For complex code, see below eval code.

\eval[x] - Will run the associated custom JS code set up via plugin params. Note that you should return a string here. This can handle complex code, and should also work with text codes whereas the basic eval text code will not.

To draw the name of the currently selected difficulty (requires CGMZ Difficulty):
\difficulty

To draw the icon and name of a profession (requires CGMZ Professions):
\prof[x]
substitute x for the profession name. If it is an actor profession, add a - and the actor id after the profession name. Example: Cooking-2

To draw the icon and name of a crafting recipe (requires CGMZ Crafting):
\craft[x]
substitute x for the recipe name.

To draw the icon and name of a reputation (requires CGMZ Reputations):
\rep[x-y]
substitute x for the reputation name, and y for the reputation category.

To draw the icon and name of a reputation rank (requires CGMZ Reputations):
\repRank[x]
substitute x for the reputation rank id.

To draw the icon and name of a dungeon tool (requires CGMZ Dungeon Tools):
\dt[x]
substitute x for the dungeon tool's symbol

To draw the icon and name of a currency (requires CGMZ Currency System):
\cur[x]
substitute x for the currency id. Use "default" for default currency. Ex: \cur[default]

Window Text CodesThere are also some new text codes that affect the entire window, such as the windowskin or window tone. They are as follows:

\wpad[x] - Will change the window padding to whatever x is (number). You can also do \wpad[default] to restore the padding to the default.

\wbo[x] - Will change the window back opacity to whatever x is (number). You can also do \wbo[default] to restore the back opacity to the default.

\wskin[x] - Will change the windowskin to whatever x is (filename). Please make sure your windowskin is in the System folder of images. You can also do \wskin[default] to restore the windowskin to the default.

\wtone[x,x,x] - Will change the window's tint (tone) to the RGB value of each x value. Examples:
\wtone[-68,-68,-68] - A darker windowskin
\wtone[68,68,68] - A lighter windowskin
You can also do \wtone[default] to restore the tone to the default.

Message Window OnlySome text codes only work in the Message Window (Show Text command). These are:

\rum[x] - Will rumble connected game pads based on rumble preset set up in plugin parameters. Requires [CGMZ] Rumble.

\spd[x] - Will change the message speed by adding waits between each character equal to x. Use \spd[0] to reset to normal.

Date FormatsThe following numbers correspond to the following date formats:
0-2: Day / Month / Year are numeric
3-4: Day and Year numeric, Month long string
5-6: Day and Year numeric, Month short string
7-8: Day and Month numeric, no Year

These will be according to the user's locale (or the forced locale as set in CGMZ Core). For example, USA may see March 22, 2024 while Mexico may see 22 de marzo de 2024. This helps your users see dates that make sense to them.

Integrations[CGMZ] Difficulty
When using [CGMZ] Difficulty, the \difficulty text code becomes available which can display the current difficulty.

[CGMZ] Professions
When using [CGMZ] Professions, the \prof[x] text code becomes available which can display the profession name with icon

[CGMZ] Crafting
When using [CGMZ] Crafting, the \craft[x] text code becomes available which can display a recipe name with icon

[CGMZ] Reputations
When using [CGMZ] Reputations, the \rep[x] and \repRank[x] text codes become available which can display a reputation name + icon or a reputation rank name + icon.

[CGMZ] Dungeon Tools
When using [CGMZ] Dungeon Tools, the \dt[x] text code becomes available which can display a dungeon tool's icon and name.

[CGMZ] Currency System
When using [CGMZ] Currency System, the \cur[x] text code becomes available which can display a currency icon and name.

[CGMZ] Rumble
When using [CGMZ] Rumble, the \rum[x] text code becomes available which can rumble any connected gamepads the player has.

[CGMZ] Actor Upgrade
When using [CGMZ] Actor Upgrade, the \acti[x] text code becomes available which can display the actor's name with their icon

[CGMZ] Enemy Upgrade
When using [CGMZ] Enemy Upgrade, the \eni[x] text code becomes available which can display the enemy's name with their icon

Plugin CommandsThis plugin does not have any plugin commands.

Saved GamesThis plugin is fully compatible with saved games. This means you can:

✓ Add this plugin to a saved game and it will work as expected.
✓ Change any plugin params and changes will be reflected in saved games.
✓ Remove the plugin with no issue to save data.

Filename

The filename for this plugin MUST remain CGMZ_MessageSystem.js. This is what it comes as when downloaded. The filename is used to load parameters and execute plugin commands. If you change it, things will begin behaving incorrectly and your game will probably crash. Please do not rename the js file.


Known Issues

This plugin currently has no known issues that need to be fixed. If you believe you have encountered a bug, please report it to Casper Gaming.


Compatibility

This plugin currently has no known compatibility issues with other RMMZ plugins. If you believe you have encountered a conflict, please report it to Casper Gaming.


Version HistoryVersion AlphaR2
  • Added text code to display random text
  • Added plugin command to change message window tone
  • Added plugin command to change message windowskin
Version AlphaR3
  • Added text code to display random text from predefined list, which can be saved and remembered later
  • Added text code to display random text from predefined list
  • Fixed bug with random text code being too greedy
Version AlphaR4
  • Added text code to rumble connected gamepads
  • Added text code to display actor name with icon
  • Added text code to display enemy name with icon
Version AlphaR5
  • Added text code that can change font face
  • Added text code that changes text based on last input type
  • Added text code that can show the current date (formatted)
  • Added message window text code to change message speed
Version AlphaR6
  • Added eval text code
  • Added eval id text code
Version AlphaR7
  • Added auto coloring for words
Version AlphaR8
  • Fix bug with undefined in text when not using auto colors
  • Removed font preloading parameter

Back to Plugin