Jump to content

Constants: Difference between revisions

From fCraft Wiki
No edit summary
Hellenion (talk | contribs)
Information about the special colour codes used in the code.
Line 1: Line 1:
The following string constants can be used in {{cmd|Rules}}, announcements, and greeting files.
The following string constants can be used in {{cmd|Rules}}, announcements, and greeting files.
*<code>{SERVER_NAME}</code>
==Text==
*<code>{MOTD}</code>
:*<code>{SERVER_NAME}</code>
*<code>{RANK}</code> - Player's rank; may include formatting (prefix and color)
:*<code>{MOTD}</code>
*<code>{PLAYER_NAME}</code> - player's own name; may include formatting (prefix and color), or may be replaced with DisplayedName
:*<code>{RANK}</code> - Player's rank; may include formatting (prefix and color)
*<code>{TIME}</code> - Server's local time (depends on the server's timezone)
:*<code>{PLAYER_NAME}</code> - player's own name; may include formatting (prefix and color), or may be replaced with DisplayedName
*<code>{WORLD}</code> - Name of the main/starting map; may include formatting (prefix and color)
:*<code>{TIME}</code> - Server's local time (depends on the server's timezone)
*<code>{PLAYERS}</code> - Number of players online (excludes hidden ones)
:*<code>{WORLD}</code> - Name of the main/starting map; may include formatting (prefix and color)
*<code>{WORLDS}</code> - Total number of worlds (includes hidden/inaccessible ones)
:*<code>{PLAYERS}</code> - Number of players online (excludes hidden ones)
*<code>{PLAYER_LIST}</code> - List of names of all online players that this player can see, including prefixes and colors (if applicable).
:*<code>{WORLDS}</code> - Total number of worlds (includes hidden/inaccessible ones)
:*<code>{PLAYER_LIST}</code> - List of names of all online players that this player can see, including prefixes and colors (if applicable).
 
==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 [[List_of_config_keys|configuration]].
 
:{| class="wikitable"
|-
!Code
!Default
!Description
|-
|<CODE>&S</CODE>
|{{ColorYellow}}
|Color of normal system messages (e.g. command feedback).
|-
|<CODE>&H</CODE>
|{{ColorLime}}
|Color of command usage examples in help.
|-
|<CODE>&Y</CODE>
|{{ColorGreen}}
|Color of messages produced by /Say command.
|-
|<CODE>&R</CODE>
|{{ColorGreen}}
|Color of announcements and rules. Default is dark-green. Note that this default color can be overridden by colorcodes in announcement and rule files.
|-
|<CODE>&P</CODE>
|{{ColorAqua}}
|Color of private and rank-wide messages.
|-
|<CODE>&M</CODE>
|{{ColorPurple}}
|Color of /Me command messages.
|-
|<CODE>&W</CODE>
|{{ColorRed}}
|Color of error and warning messages.
|-
|<CODE>&I</CODE>
|{{ColorPurple}}
|Color of IRC messages and event announcements, as seen on the server/in-game.
|}

Revision as of 22:36, 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
  • {TIME} - Server's local time (depends on the server's timezone)
  • {WORLD} - Name of the main/starting map; may include formatting (prefix and color)
  • {PLAYERS} - Number of players online (excludes hidden ones)
  • {WORLDS} - Total number of worlds (includes hidden/inaccessible ones)
  • {PLAYER_LIST} - List of names of all online players that this player can see, including prefixes and colors (if applicable).

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
&S Yellow (E) Color of normal system messages (e.g. command feedback).
&H Lime (A) Color of command usage examples in help.
&Y Green (2) Color of messages produced by /Say command.
&R Green (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.
&P Aqua (B) Color of private and rank-wide messages.
&M Purple (5) Color of /Me command messages.
&W Red (C) Color of error and warning messages.
&I Purple (5) Color of IRC messages and event announcements, as seen on the server/in-game.