Constants: Difference between revisions
Appearance
Information about the special colour codes used in the code. |
→Text: Addded {VERSION} constant and restructured list |
||
| Line 5: | Line 5: | ||
:*<code>{RANK}</code> - Player's rank; may include formatting (prefix and color) | :*<code>{RANK}</code> - Player's rank; may include formatting (prefix and color) | ||
:*<code>{PLAYER_NAME}</code> - player's own name; may include formatting (prefix and color), or may be replaced with DisplayedName | :*<code>{PLAYER_NAME}</code> - player's own name; may include formatting (prefix and color), or may be replaced with DisplayedName | ||
:*<code>{ | :*<code>{PLAYER_LIST}</code> - List of names of all online players that this player can see, including prefixes and colors (if applicable). | ||
:*<code>{PLAYERS}</code> - Number of players online (excludes hidden ones) | :*<code>{PLAYERS}</code> - Number of players online (excludes hidden ones) | ||
:*<code>{WORLD}</code> - Name of the player's current world; may include formatting (prefix and color) | |||
:*<code>{WORLDS}</code> - Total number of worlds (includes hidden/inaccessible ones) | :*<code>{WORLDS}</code> - Total number of worlds (includes hidden/inaccessible ones) | ||
:*<code>{ | :*<code>{TIME}</code> - Server's local time (depends on the server's timezone) | ||
:*<CODE>{VERSION}</CODE> - fCraft version in use, only prints the version string. | |||
==Colours== | ==Colours== | ||
Revision as of 22:54, 28 August 2012
The following string constants can be used in /Rules, announcements, and greeting files.
Text
{SERVER_NAME}{MOTD}{RANK}- Player's rank; may include formatting (prefix and color){PLAYER_NAME}- player's own name; may include formatting (prefix and color), or may be replaced with DisplayedName{PLAYER_LIST}- List of names of all online players that this player can see, including prefixes and colors (if applicable).{PLAYERS}- Number of players online (excludes hidden ones){WORLD}- Name of the player's current world; may include formatting (prefix and color){WORLDS}- Total number of worlds (includes hidden/inaccessible ones){TIME}- Server's local time (depends on the server's timezone){VERSION}- fCraft version in use, only prints the version string.
Colours
- These colours can be used in code and mods as well, but as of yet not in-game.
- The default values can be edited in the configuration.
Code Default Description &SYellow (E) Color of normal system messages (e.g. command feedback). &HLime (A) Color of command usage examples in help. &YGreen (2) Color of messages produced by /Say command. &RGreen (2) Color of announcements and rules. Default is dark-green. Note that this default color can be overridden by colorcodes in announcement and rule files. &PAqua (B) Color of private and rank-wide messages. &MPurple (5) Color of /Me command messages. &WRed (C) Color of error and warning messages. &IPurple (5) Color of IRC messages and event announcements, as seen on the server/in-game.