Jump to content

Constants: Difference between revisions

From fCraft Wiki
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
The following string constants can be used in {{cmd|Rules}}, announcements.txt, greeting.txt, and [[/WSet#.2FWSet_.3CWorldName.3E_Greeting_.3CText.3E|world greetings]].
The following string constants can be used in {{cmd|Rules}}, announcements.txt, greeting.txt, and [[/WSet#.2FWSet_.3CWorldName.3E_Greeting_.3CText.3E|world greetings]]. They cannot be used in normal chat.
==Text==
 
==List of constants==
:*<code>{SERVER_NAME}</code>
:*<code>{SERVER_NAME}</code>
:*<code>{MOTD}</code>
:*<code>{MOTD}</code>
Line 12: Line 13:
:*<CODE>{VERSION}</CODE> - fCraft version in use, only prints the version string.
:*<CODE>{VERSION}</CODE> - fCraft version in use, only prints the version string.


==Colours==
==See Also==
:These colours can be used in code and mods as well, but as of yet not in-game.
{{ChatStuff}}
:The default values can be edited in the [[List_of_config_keys|configuration]].
{{LastUpdated|1800}}
 
[[Category:Chat Features]]
:{| 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.
|}

Latest revision as of 02:52, 8 October 2012

The following string constants can be used in /Rules, announcements.txt, greeting.txt, and world greetings. They cannot be used in normal chat.

List of constants

  • {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.

See Also

Chat Features
Command TipsConstantsColorsEmotesPrivate Messages