SCORINFO: Difference between revisions

From Zandronum Wiki
(Updated the draft.)
(Updated the draft again.)
Line 5: Line 5:
}}
}}


=Scoreboard commands=
[[Image:SCORINFO TLMS.png|frame|The scoreboard in a Team LMS game. Notice that dead spectators are drawn with less opacity and without the row's background colour to distinguish them from live players.]]
 
SCORINFO is a special lump that allows customization of the built-in scoreboard in Zandronum. This offers ways to change things like which fonts or colours are used, the sizing of elements (headers, columns, rows, gaps, etc.) on the scoreboard, what columns are to be displayed and how players are ordered by them, and more.
 
By default, this is an unprotected lump, meaning that modders aren't the only people who can benefit from this feature. Regular players are able to write their own SCORINFO lump and save into their skins folder, if they wish to design their own personal scoreboard.
 
=Scoreboard Commands=
* '''ClearColumns''' - Deletes any and all previously defined columns. '''At least one column must be defined afterwards or else Zandronum will throw a fatal error!'''
* '''ClearColumns''' - Deletes any and all previously defined columns. '''At least one column must be defined afterwards or else Zandronum will throw a fatal error!'''


Line 11: Line 17:
Scoreboard <"title name">
Scoreboard <"title name">
{
{
    // BORDER PROPERTIES
    Border = <"left">, <"middle">, <"right">
    TeamBorder = <"left>, <"middle">, <"right">
    // FONT PROPERTIES
     TitleFont = <font>
     TitleFont = <font>
     SubtitleFont = <font>
     SubtitleFont = <font>
     HeaderFont = <font>
     HeaderFont = <font>
     RowFont = <font>
     RowFont = <font>
    // TEXT PROPERTIES
     TitleColor = <text color>
     TitleColor = <text color>
     SubtitleColor = <text color>
     SubtitleColor = <text color>
Line 21: Line 34:
     LocalRowColor = <text color>
     LocalRowColor = <text color>
     LocalRowDemoColor = <text color>
     LocalRowDemoColor = <text color>
    DeadSpectatorTextOpacity = <value>
    // BACKGROUND PROPERTIES
     BackgroundColor = <color>
     BackgroundColor = <color>
     LightRowBackgroundColor = <color>
     LightRowColor = <color>
     DarkRowBackgroundColor = <color>
     DarkRowColor = <color>
     BackgroundAmount = <value>
     BackgroundOpacity = <value>
     RowBackgroundAmount = <value>
     RowOpacity = <value>
    DeadSpectatorRowOpacity = <value>
 
    // SIZE AND DIMENSION PROPERTIES
     BackgroundBorderSize = <value>
     BackgroundBorderSize = <value>
     GapBetweenTitleAndSubtitles = <value>
     GapBetweenTitleAndSubtitles = <value>
Line 34: Line 53:
     HeaderHeight = <value>
     HeaderHeight = <value>
     RowHeight = <value>
     RowHeight = <value>
    // MISCELLANEOUS
     Flags = <flag1> [, flag2 [, ...]]
     Flags = <flag1> [, flag2 [, ...]]
     ColumnOrder = <column1> [, column2 [, ...]]
     ColumnOrder = <column1> [, column2 [, ...]]
     RankOrder = <column1> [, column2 [, ...]]
     RankOrder = <column1> [, column2 [, ...]]
     AddToRankOrder = <column>
     AddToRankOrder = <column>
    DisableInGameMode = <gamemode1> [, gamemode2 [, ...]]
    DisableInGameType = <gametype1> [, gametype2 [, ...]]
    DisableInEarnType = <earntype1> [, earntype2 [, ...]]
}
}
</pre>
</pre>


* The scoreboard's '''title''' is what gets printed at the top of the scoreboard (e.g. "RANKINGS").
The scoreboard's '''title''' is what gets printed at the top of the scoreboard (e.g. "RANKINGS").
 
===Border Properties===
* '''Border''' - Sets the graphics to be used for the main borders.
* '''TeamBorder''' - Sets the graphics to be used for the border that appears underneath the team headers.
 
===Font Properties===
* '''TitleFont''' - The font used to draw the title. By default, this is <i>BigFont</i>.
* '''TitleFont''' - The font used to draw the title. By default, this is <i>BigFont</i>.
* '''SubtitleFont''' - The font used to draw all of the text that appears underneath the title, including the server hostname, current game mode, and game limits. By default, this is <i>SmallFont</i>.
* '''SubtitleFont''' - The font used to draw all of the text that appears underneath the title, including the server hostname, current game mode, and game limits. By default, this is <i>SmallFont</i>.
* '''HeaderFont''' - The font used to draw the column's header. By default, this is <i>SmallFont</i>.
* '''HeaderFont''' - The font used to draw the column's header. By default, this is <i>SmallFont</i>.
* '''RowFont''' - The font used to draw the rows for each player. By default, this is <i>SmallFont</i>.
* '''RowFont''' - The font used to draw the rows for each player. By default, this is <i>SmallFont</i>.
===Text Properties===
* '''TitleColor''' - The text colour to draw the title. By default, this is <i>Red</i>.
* '''TitleColor''' - The text colour to draw the title. By default, this is <i>Red</i>.
* '''SubtitleColor''' - The text colour to draw the header's subtitles (server hostname, current game mode, and game limits). By default, this is <i>Grey</i>.
* '''SubtitleColor''' - The text colour to draw the header's subtitles (server hostname, current game mode, and game limits). By default, this is <i>Grey</i>.
Line 52: Line 84:
* '''LocalRowColor''' - The text colour used for the row of the player you're spying. By default, this is <i>Green</i>.
* '''LocalRowColor''' - The text colour used for the row of the player you're spying. By default, this is <i>Green</i>.
* '''LocalRowDemoColor''' - Similar to the local row colour, but only when watching a demo. By default, this is <i>Gold</i>.
* '''LocalRowDemoColor''' - Similar to the local row colour, but only when watching a demo. By default, this is <i>Gold</i>.
* '''DeadSpectatorTextOpacity''' - The opacity of the row's text for dead spectators. By default, this is 0.35.
===Background Properties===
* '''BackgroundColor''' - The colour of the background behind the entire scoreboard. By default, this is "00 00 00".
* '''BackgroundColor''' - The colour of the background behind the entire scoreboard. By default, this is "00 00 00".
* '''LightRowBackgroundColor''' - The "light" background colour of the row. By default, this is "40 40 40".
* '''LightRowColor''' - The "light" background colour of the row. By default, this is "40 40 40".
* '''DarkRowBackgroundColor''' - The "dark" background colour of the row. By default, this is "20 20 20".
* '''DarkRowColor''' - The "dark" background colour of the row. By default, this is "20 20 20".
* '''BackgroundAmount''' - The opacity of the scoreboard's background. A value of 1.0 represents fully opaque, while 0.0 represents fully transparent.
* '''BackgroundOpacity''' - The opacity of the scoreboard's background. A value of 1.0 represents fully opaque, while 0.0 represents fully transparent.
* '''RowBackgroundAmount''' - The opacity of the row's background. This works similarly to '''BackgroundAmount'''.
* '''RowOpacity''' - The opacity of the row's background. This works similarly to '''BackgroundOpacity'''.
* '''DeadSpectatorRowOpacity''' - The opacity of the row's background for dead spectators. By default, this is 0.0.
'''Note:''' a row's light and dark background colour doesn't have to be exactly "light" or "dark" in any sense. You're welcome to use any two colours, or make them both the same.
 
===Size and Dimension Properties===
* '''BackgroundBorderSize''' - The spacing between the edges of the scoreboard's background and the text, in pixels.
* '''BackgroundBorderSize''' - The spacing between the edges of the scoreboard's background and the text, in pixels.
* '''GapBetweenTitleAndSubtitles''' - The spacing between the title and subtitles in the scoreboard's header, in pixels.
* '''GapBetweenTitleAndSubtitles''' - The spacing between the title and subtitles in the scoreboard's header, in pixels.
Line 65: Line 104:
* '''HeaderHeight''' - The height of the header. If entered as a negative number, then the height will be added onto the header font's height.
* '''HeaderHeight''' - The height of the header. If entered as a negative number, then the height will be added onto the header font's height.
* '''RowHeight''' - The height of each row. If entered as a negative number, then the height will be added onto the row font's height.
* '''RowHeight''' - The height of each row. If entered as a negative number, then the height will be added onto the row font's height.
===Miscellaneous Properties===
* '''Flags''' - Can be one of the following:
* '''Flags''' - Can be one of the following:
** <code>USETEAMTEXTCOLOR</code> - Row text will be printed in the same colour as a player's team in team-based game modes.
** <code>USETEAMTEXTCOLOR</code> - Row text will be printed in the same colour as a player's team in team-based game modes.
Line 70: Line 111:
** <code>DONTSHOWTEAMHEADERS</code> - Prevents any of the team headers from being shown.
** <code>DONTSHOWTEAMHEADERS</code> - Prevents any of the team headers from being shown.
** <code>DONTDRAWBORDERS</code> - Don't draw any borders on the scoreboard.
** <code>DONTDRAWBORDERS</code> - Don't draw any borders on the scoreboard.
** <code>DONTFADEOUTDEADPLAYERS</code> - Players that are dead don't appear faded out (i.e. less opacity, no row background).
** <code>DONTSEPARATETEAMS</code> - Players aren't divided into their respective teams and appear on a single list. '''This also disables team headers on the scoreboard.'''
** <code>DONTSEPARATETEAMS</code> - Players aren't divided into their respective teams and appear on a single list.
* '''ColumnOrder''' - By default, columns are ordered from left to right on the scoreboard in the same order that they're defined in. This means that columns defined first will be on the left, while columns defined last will be on the right. If this command is used, the user can decide how exactly they would like to order the columns. Any defined columns missing from this list will be put on the right. Columns should be entered in by '''type''' for standard columns, or '''name''' for custom columns.
* '''ColumnOrder = <column1> [, column2 [, ...]]''' - By default, columns are ordered from left to right on the scoreboard in the same order that they're defined in. This means that columns defined first will be on the left, while columns defined last will be on the right. If this command is used, the user can decide how exactly they would like to order the columns. Any defined columns missing from this list will be put on the right. Columns should be entered in by '''type''' for standard columns, or '''name''' for custom columns.
* '''RankOrder''' - This decides how players will be sorted. Columns entered first have the highest priority over those entered last. If no rank order is specified, players can only be sorted by their number. Columns should be entered in by '''type''' for standard columns, or '''name''' for custom columns.
* '''RankOrder = <column1> [, column2 [, ...]]''' - This decides how players will be sorted. Columns entered first have the highest priority over those entered last. If no rank order is specified, players can only be sorted by their number. Columns should be entered in by '''type''' for standard columns, or '''name''' for custom columns.
* '''AddToRankOrder = <column>''' - Adds one single column to the end of the rank order list. Columns should be entered in by '''type''' for standard columns, or '''name''' for custom columns.
* '''AddToRankOrder = <column>''' - Adds one single column to the end of the rank order list. Columns should be entered in by '''type''' for standard columns, or '''name''' for custom columns.
* '''DisableInGameMode''' - The scoreboard is disabled entirely in the listed game modes. This can be useful if modders prefer to design their own entire scoreboard via ACS. Refer to [[GAMEMODE]] for a list of all built-in game modes.
* '''DisableInGameType''' - If specified, the scoreboard is disabled in game modes that are of the following type: '''cooperative''', '''deathmatch''', or '''teamgame'''.
* '''DisableInEarnType''' - If specified, the scoreboard is disabled in game modes where players earn any of the following: '''kills''', '''frags''', '''points''', or '''wins'''.


'''Note:''' a row's light and dark background colour doesn't have to be exactly "light" or "dark" in any sense. You're welcome to use any two colours, or make them both the same.
=Column Commands=
 
==Standard Columns==
=Column commands=
==Standard columns==
Standard columns are built-in column types that Zandronum updates on its own. Users are allowed to customize the column to their own liking.
Standard columns are built-in column types that Zandronum updates on its own. Users are allowed to customize the column to their own liking.
<pre>
<pre>
Line 88: Line 129:
     Alignment = <value>
     Alignment = <value>
     Width = <value>
     Width = <value>
     OverrideColumnGap = <value [, <left | right>]
     OverrideLeftColumnGap = <value [, <left | right>]
     Flags = <flag1> [, flag2 [, ...]]
     Flags = <flag1> [, flag2 [, ...]]
     GameMode = <gamemode1> [, gamemode2 [, ...]]
     GameMode = <gamemode1> [, gamemode2 [, ...]]
     GameType = <gametype1> [, gametype2 [, ...]]
     GameType = <gametype1> [, gametype2 [, ...]]
     EarnType = <earntype1> [, earntype2 [, ...]]
     EarnType = <earntype1> [, earntype2 [, ...]]
     [Flags]
     [Other]
}
}
</pre>
</pre>


* A column's '''type''' can be one of the following:
* A column's '''type''' can be one of the following:
** <code>Name</code> - The player's current name. '''Every scoreboard must have this column or else Zandronum will throw a fatal error!'''
** <code>Name</code> - The player's current name. This may also include player numbers and join queue positions. '''Every scoreboard must have this column or else Zandronum will throw a fatal error!'''
** <code>Time</code> - How long the player has been in the current game, in minutes.
** <code>Time</code> - How long the player has been in the current game, in minutes.
** <code>Ping</code> - The player's ping measured in milliseconds.
** <code>Frags</code> - The player's frag count.
** <code>Frags</code> - The player's frag count.
** <code>Points</code> - The player's point count.
** <code>Points</code> - The player's point count.
Line 107: Line 149:
** <code>Assists</code> - How many times this player earned the "assist" medal.
** <code>Assists</code> - How many times this player earned the "assist" medal.
** <code>Secrets</code> - How many secrets this player discovered.
** <code>Secrets</code> - How many secrets this player discovered.
** <code>Lives</code> - How many lives this player still has. This column doesn't appear if players are supposed to have only one life.
** <code>Lives</code> - How many lives this player still has. '''This column is disabled if players are supposed to have only one life.'''
** <code>Vote</code> - What decision this player made for the current vote, either "Yes", "No", or blank if they haven't voted yet. '''This column is disabled if there's no active vote.'''
** <code>Country</code> - The country that a player is connecting from.
** <code>PlayerColor</code> - The current colour that this player is using.
** <code>PlayerStatus</code> - A mini icon to indicate the status of the player (i.e. chatting, in console/menu, lagging, ready to go).
** <code>BotSkill</code> - A mini icon to indicate the skill level of a bot. '''This column is disabled if there are no bots in the game.'''


* '''DisplayName''' - Determines what will be used in the column's header. If this property isn't specified, then the display name will use the same text as its type instead.
* '''DisplayName''' - Determines what will be used in the column's header. If this property isn't specified, then the display name will use the same text as its type instead.
Line 113: Line 160:
* '''Alignment''' - Determines how the contents of the column are aligned, and can be one of the following: '''left''', '''center''', or '''right'''. By default, the column is aligned to the left.
* '''Alignment''' - Determines how the contents of the column are aligned, and can be one of the following: '''left''', '''center''', or '''right'''. By default, the column is aligned to the left.
* '''Width''' - The maximum width of the column, in pixels. In case the scoreboard is too wide and needs to be shrunken down, this column could be narrower than what's specified.
* '''Width''' - The maximum width of the column, in pixels. In case the scoreboard is too wide and needs to be shrunken down, this column could be narrower than what's specified.
* '''OverrideColumnGap''' - This overrides the value of '''ColumnGap''' from the scoreboard block to control the amount of spacing from the column that comes from the ''left'' of this one.
* '''OverrideColumnGap''' - This overrides the value of '''ColumnGap''' from the scoreboard block to control the amount of spacing from the column that comes from the left or right of this one.
* '''Flags''' - Can be one of the following:
* '''Flags''' - Can be one of the following:
** <code>REVERSEORDER</code> - Sorts players in reverse (i.e. from least to greatest).
** <code>REVERSEORDER</code> - Sorts players in reverse (i.e. from least to greatest).
Line 123: Line 170:
** <code>HIDDENBYDEFAULT</code> - Don't show this column at the start of the game.
** <code>HIDDENBYDEFAULT</code> - Don't show this column at the start of the game.
** <code>DONTSHOWHEADER</code> - Prevents this column's header from being shown.
** <code>DONTSHOWHEADER</code> - Prevents this column's header from being shown.
** <code>DONTRESETONLEVELCHANGE</code> - This column's values won't be reset to their default when the level changes. This only works on custom columns.
** <code>DONTRESETONLEVELCHANGE</code> - This column's values won't be reset to their default when the level changes. '''This only works on custom columns.'''
* '''GameMode''' - A list of game modes where this column is active. By default, columns are active in all game modes. Refer to [[GAMEMODE]] for a list of all built-in game modes.
* '''GameMode''' - A list of game modes where this column is active. By default, columns are active in all game modes. Refer to [[GAMEMODE]] for a list of all built-in game modes.
* '''GameType''' - If specified, this column is active in any game modes that are of the following type: '''cooperative''', '''deathmatch''', or '''teamgame'''.
* '''GameType''' - If specified, this column is active in game modes that are of the following type: '''cooperative''', '''deathmatch''', or '''teamgame'''.
* '''EarnType''' - If specified, this column is active in any game modes where players earn any of the following: '''kills''', '''frags''', '''points''', or '''wins'''.
* '''EarnType''' - If specified, this column is active in game modes where players earn any of the following: '''kills''', '''frags''', '''points''', or '''wins'''.
 
===Other Properties===
* '''RequiresTeams''' - This column is only active in game modes that support teams (e.g. TDM, TLMS, CTF).
* '''RequiresTeams''' - This column is only active in game modes that support teams (e.g. TDM, TLMS, CTF).
* '''RequiresNoTeams''' - This column is disabled in game modes that support teams.
* '''RequiresNoTeams''' - This column is disabled in game modes that support teams.
Line 134: Line 183:
* '''RequiresNoTeamItem''' - This column is disabled in game modes that use team items.
* '''RequiresNoTeamItem''' - This column is disabled in game modes that use team items.


==Custom columns==
'''Note:''' If two or more columns with the same '''DisplayName''' and/or '''ShortName''' are placed next to each other, then a single header will be drawn for all of these columns. This can be useful if you want certain columns (e.g. name and player colours) to be drawn under a single header instead of them appearing separate.
 
==Custom Columns==
Modders can define custom columns for their own needs. They will be responsible for updating the values of these columns on their own via ACS. Custom columns support all the commands as standard columns, plus a few extra commands.
Modders can define custom columns for their own needs. They will be responsible for updating the values of these columns on their own via ACS. Custom columns support all the commands as standard columns, plus a few extra commands.
<pre>
<pre>
Line 140: Line 191:
{
{
     DefaultValue = <value>
     DefaultValue = <value>
    TeamValueMethod = <string>


     // Bool column commands
     // BOOL COLUMN PROPERTIES
     TrueText = <string>
     TrueText = <string>
     FalseText = <string>
     FalseText = <string>


     // Int, bool, float, and string column commands
     // INT, BOOL, FLOAT, AND STRING COLUMN PROPERTIES
     Length = <value>
     Length = <value>


     // Color and texture column commands
     // COLOR AND TEXTURE PROPERTIES
     ClipRectWidth = <value>
     ClipRectWidth = <value>
     ClipRectHeight = <value>
     ClipRectHeight = <value>
Line 169: Line 221:
* The column's '''name''' is what's used to reference the column. ACS functions use this name to find the column.
* The column's '''name''' is what's used to reference the column. ACS functions use this name to find the column.
* '''DefaultValue''' - The default value of this column at the start of a new game.
* '''DefaultValue''' - The default value of this column at the start of a new game.
* '''TeamValueMethod''' - Determines how the value of this column ('''only works for int and float types''') on a team's header is determined:
** <code>None</code> - The value will not be drawn on any team header. This is the default behaviour of all custom columns.
** <code>Sum</code> - Calculates the total value of all players on the team.
** <code>Average</code> - Calculates the average value of all players on the team.
** <code>Median</code> - Uses the middle value of all players on the team, from least to greatest.
** <code>Mode</code> - Uses the most common value of all players on the team.
** <code>Max</code> - Uses the player's value that is the highest on their team.
** <code>Min</code> - Uses the player's value that is the lowest on their team.
** <code>Custom</code> - The modder is responsible for updating the team's value on their own via [[SetColumnValue]] in ACS.
* '''Length''' - This has different implications depending on the data type:
* '''Length''' - This has different implications depending on the data type:
** <code>Int</code> - Limits the number of digits that are shown. This means that a number like 255 will appear as "99" if only two digits are allowed.
** <code>Int</code> - Limits the number of digits that are shown. This means that a number like 255 will appear as "99" if only two digits are allowed.
Line 174: Line 235:
** <code>Bool</code> and <code>String</code> - Limits the number of characters. Longer messages are truncated with an ellipsis at the end.
** <code>Bool</code> and <code>String</code> - Limits the number of characters. Longer messages are truncated with an ellipsis at the end.


=Example Images=
=Console Variables=
[[Image:SCORINFO Deathmatch.png]]
{| class="wikitable" border="2" width="100%"
 
|-
The scoreboard in a deathmatch game.
! Command <!-- Command name -->
 
! Data Type
[[Image:SCORINFO CTF.png]]
! Default
 
! Description <!-- What does the command do? -->
The scoreboard in a CTF game. This game mode uses the team's flag item, so it's good to also show how many "Assists" the players have.
|-
 
|'''cl_colorizepings'''
[[Image:SCORINFO TLMS.png]]
|style="text-align:center" | Bool
|style="text-align:center" | false
|If true, everyone's ping is printed in different colours that visually indicate how severe their connection is to the server:
*'''Green''' if between '''0-99 ms'''.
*'''Yellow''' if between '''100-149 ms'''.
*'''Orange''' if between '''150-199 ms'''.
*'''Red''' if '''200 ms or greater'''.
|-
|'''cl_countrycolumn'''
|style="text-align:center" | Int
|style="text-align:center" | 0
|Determines how a player's country is displayed on the scoreboard:
<ol start="0">
<li>Uses a mini icon of the country's flag.</li>
<li>Uses the country's [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements ISO 3166-1 alpha-2] country code, (e.g. "CA").</li>
<li>Uses the country's [https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Officially_assigned_code_elements ISO 3166-1 alpha-3] country code, (e.g. "CAN").</li>
<li>Uses the country's full name (e.g. "Canada"). '''Beware of incredibly long names!'''</li>
</ol>
|-
|'''cl_intermissiontimer'''
|style="text-align:center" | Bool
|style="text-align:center" | false
|If true, a message appears on the intermission screen to show how much time is left until the next level starts and the name of the level being entered into.
|-
|'''cl_maxscoreboardheight'''
|style="text-align:center" | Float
|style="text-align:center" | 0.9
|The maximum height of the scoreboard as a percentage of the screen's height (must be greater than 0.0 and no greater than 1.0).
|-
|'''cl_maxscoreboardwidth'''
|style="text-align:center" | Float
|style="text-align:center" | 0.9
|The maximum width of the scoreboard as a percentage of the screen's width.
|-
|'''cl_scoreboardalpha'''
|style="text-align:center" | Float
|style="text-align:center" | 1.0
|The opacity of the scoreboard, from anywhere between 0.0 and 1.0.
|-
|'''cl_showplayernumbers'''
|style="text-align:center" | Bool
|style="text-align:center" | false
|If true, a player's number appears next to their name. This is a quick way of identifying players based on their ID, instead of opening the console and using the playerinfo CCMD.
|}


The scoreboard in a Team LMS game. Notice that dead spectators are drawn with less opacity and without the row's background colour to distinguish them from live players.
=ACS Functions=
* <code>[[CheckColumnStatus]]</code>
* <code>[[CheckScoreboardStatus]]</code>
* <code>[[GetColumnType]]</code>
* <code>[[GetColumnValue]]</code>
* <code>[[SetColumnValue]]</code>
* <code>[[SetColumnVisibility]]</code>
* <code>[[SetScoreboardVisibility]]</code>

Revision as of 23:28, 18 June 2022

Template:MessageBox

The scoreboard in a Team LMS game. Notice that dead spectators are drawn with less opacity and without the row's background colour to distinguish them from live players.

SCORINFO is a special lump that allows customization of the built-in scoreboard in Zandronum. This offers ways to change things like which fonts or colours are used, the sizing of elements (headers, columns, rows, gaps, etc.) on the scoreboard, what columns are to be displayed and how players are ordered by them, and more.

By default, this is an unprotected lump, meaning that modders aren't the only people who can benefit from this feature. Regular players are able to write their own SCORINFO lump and save into their skins folder, if they wish to design their own personal scoreboard.

Scoreboard Commands

  • ClearColumns - Deletes any and all previously defined columns. At least one column must be defined afterwards or else Zandronum will throw a fatal error!
Scoreboard <"title name">
{
    // BORDER PROPERTIES
    Border = <"left">, <"middle">, <"right">
    TeamBorder = <"left>, <"middle">, <"right">

    // FONT PROPERTIES
    TitleFont = <font>
    SubtitleFont = <font>
    HeaderFont = <font>
    RowFont = <font>

    // TEXT PROPERTIES
    TitleColor = <text color>
    SubtitleColor = <text color>
    HeaderColor = <text color>
    RowColor = <text color>
    LocalRowColor = <text color>
    LocalRowDemoColor = <text color>
    DeadSpectatorTextOpacity = <value>

    // BACKGROUND PROPERTIES
    BackgroundColor = <color>
    LightRowColor = <color>
    DarkRowColor = <color>
    BackgroundOpacity = <value>
    RowOpacity = <value>
    DeadSpectatorRowOpacity = <value>

    // SIZE AND DIMENSION PROPERTIES
    BackgroundBorderSize = <value>
    GapBetweenTitleAndSubtitles = <value>
    GapBetweenHeaderAndRows = <value>
    GapBetweenSubtitles = <value>
    GapBetweenColumns = <value>
    GapBetweenRows = <value>
    HeaderHeight = <value>
    RowHeight = <value>

    // MISCELLANEOUS
    Flags = <flag1> [, flag2 [, ...]]
    ColumnOrder = <column1> [, column2 [, ...]]
    RankOrder = <column1> [, column2 [, ...]]
    AddToRankOrder = <column>
    DisableInGameMode = <gamemode1> [, gamemode2 [, ...]]
    DisableInGameType = <gametype1> [, gametype2 [, ...]]
    DisableInEarnType = <earntype1> [, earntype2 [, ...]]
}

The scoreboard's title is what gets printed at the top of the scoreboard (e.g. "RANKINGS").

Border Properties

  • Border - Sets the graphics to be used for the main borders.
  • TeamBorder - Sets the graphics to be used for the border that appears underneath the team headers.

Font Properties

  • TitleFont - The font used to draw the title. By default, this is BigFont.
  • SubtitleFont - The font used to draw all of the text that appears underneath the title, including the server hostname, current game mode, and game limits. By default, this is SmallFont.
  • HeaderFont - The font used to draw the column's header. By default, this is SmallFont.
  • RowFont - The font used to draw the rows for each player. By default, this is SmallFont.

Text Properties

  • TitleColor - The text colour to draw the title. By default, this is Red.
  • SubtitleColor - The text colour to draw the header's subtitles (server hostname, current game mode, and game limits). By default, this is Grey.
  • HeaderColor - The text colour used for the column's header. By default, this is Red.
  • RowColor - The text colour used for the rows of all players. By default, this is Grey.
  • LocalRowColor - The text colour used for the row of the player you're spying. By default, this is Green.
  • LocalRowDemoColor - Similar to the local row colour, but only when watching a demo. By default, this is Gold.
  • DeadSpectatorTextOpacity - The opacity of the row's text for dead spectators. By default, this is 0.35.

Background Properties

  • BackgroundColor - The colour of the background behind the entire scoreboard. By default, this is "00 00 00".
  • LightRowColor - The "light" background colour of the row. By default, this is "40 40 40".
  • DarkRowColor - The "dark" background colour of the row. By default, this is "20 20 20".
  • BackgroundOpacity - The opacity of the scoreboard's background. A value of 1.0 represents fully opaque, while 0.0 represents fully transparent.
  • RowOpacity - The opacity of the row's background. This works similarly to BackgroundOpacity.
  • DeadSpectatorRowOpacity - The opacity of the row's background for dead spectators. By default, this is 0.0.

Note: a row's light and dark background colour doesn't have to be exactly "light" or "dark" in any sense. You're welcome to use any two colours, or make them both the same.

Size and Dimension Properties

  • BackgroundBorderSize - The spacing between the edges of the scoreboard's background and the text, in pixels.
  • GapBetweenTitleAndSubtitles - The spacing between the title and subtitles in the scoreboard's header, in pixels.
  • GapBetweenHeaderAndRows - The spacing between the column's header and the player rows, in pixels.
  • GapBetweenSubtitles - The spacing between the different lines of subtitles in the scoreboard's header, in pixels.
  • GapBetweenColumns - The spacing between the columns, in pixels.
  • GapBetweenRows - The spacing between the player rows, in pixels.
  • HeaderHeight - The height of the header. If entered as a negative number, then the height will be added onto the header font's height.
  • RowHeight - The height of each row. If entered as a negative number, then the height will be added onto the row font's height.

Miscellaneous Properties

  • Flags - Can be one of the following:
    • USETEAMTEXTCOLOR - Row text will be printed in the same colour as a player's team in team-based game modes.
    • DONTSHOWHEADER - Prevents the scoreboard's header from being shown.
    • DONTSHOWTEAMHEADERS - Prevents any of the team headers from being shown.
    • DONTDRAWBORDERS - Don't draw any borders on the scoreboard.
    • DONTSEPARATETEAMS - Players aren't divided into their respective teams and appear on a single list. This also disables team headers on the scoreboard.
  • ColumnOrder - By default, columns are ordered from left to right on the scoreboard in the same order that they're defined in. This means that columns defined first will be on the left, while columns defined last will be on the right. If this command is used, the user can decide how exactly they would like to order the columns. Any defined columns missing from this list will be put on the right. Columns should be entered in by type for standard columns, or name for custom columns.
  • RankOrder - This decides how players will be sorted. Columns entered first have the highest priority over those entered last. If no rank order is specified, players can only be sorted by their number. Columns should be entered in by type for standard columns, or name for custom columns.
  • AddToRankOrder = <column> - Adds one single column to the end of the rank order list. Columns should be entered in by type for standard columns, or name for custom columns.
  • DisableInGameMode - The scoreboard is disabled entirely in the listed game modes. This can be useful if modders prefer to design their own entire scoreboard via ACS. Refer to GAMEMODE for a list of all built-in game modes.
  • DisableInGameType - If specified, the scoreboard is disabled in game modes that are of the following type: cooperative, deathmatch, or teamgame.
  • DisableInEarnType - If specified, the scoreboard is disabled in game modes where players earn any of the following: kills, frags, points, or wins.

Column Commands

Standard Columns

Standard columns are built-in column types that Zandronum updates on its own. Users are allowed to customize the column to their own liking.

Column <type>
{
    DisplayName = <string>
    ShortName = <string>
    Alignment = <value>
    Width = <value>
    OverrideLeftColumnGap = <value [, <left | right>]
    Flags = <flag1> [, flag2 [, ...]]
    GameMode = <gamemode1> [, gamemode2 [, ...]]
    GameType = <gametype1> [, gametype2 [, ...]]
    EarnType = <earntype1> [, earntype2 [, ...]]
    [Other]
}
  • A column's type can be one of the following:
    • Name - The player's current name. This may also include player numbers and join queue positions. Every scoreboard must have this column or else Zandronum will throw a fatal error!
    • Time - How long the player has been in the current game, in minutes.
    • Ping - The player's ping measured in milliseconds.
    • Frags - The player's frag count.
    • Points - The player's point count.
    • Wins - The player's win count.
    • Kills - The player's monster kill count.
    • Deaths - The player's death count.
    • Assists - How many times this player earned the "assist" medal.
    • Secrets - How many secrets this player discovered.
    • Lives - How many lives this player still has. This column is disabled if players are supposed to have only one life.
    • Vote - What decision this player made for the current vote, either "Yes", "No", or blank if they haven't voted yet. This column is disabled if there's no active vote.
    • Country - The country that a player is connecting from.
    • PlayerColor - The current colour that this player is using.
    • PlayerStatus - A mini icon to indicate the status of the player (i.e. chatting, in console/menu, lagging, ready to go).
    • BotSkill - A mini icon to indicate the skill level of a bot. This column is disabled if there are no bots in the game.
  • DisplayName - Determines what will be used in the column's header. If this property isn't specified, then the display name will use the same text as its type instead.
  • ShortName - A shorter or abbreviated version of the column's display name, used if the scoreboard is too wide to fit on the user's screen and needs to be shrunken down as much as possible. If unspecified, the display name will always be used.
  • Alignment - Determines how the contents of the column are aligned, and can be one of the following: left, center, or right. By default, the column is aligned to the left.
  • Width - The maximum width of the column, in pixels. In case the scoreboard is too wide and needs to be shrunken down, this column could be narrower than what's specified.
  • OverrideColumnGap - This overrides the value of ColumnGap from the scoreboard block to control the amount of spacing from the column that comes from the left or right of this one.
  • Flags - Can be one of the following:
    • REVERSEORDER - Sorts players in reverse (i.e. from least to greatest).
    • INTERMISSIONONLY - This column only appears on the intermission screen.
    • NOINTERMISSION - This column won't appear on the intermission screen.
    • NOSPECTATORS - Don't draw the contents of this column for true spectators.
    • OFFLINEONLY - This column only appears in offline games.
    • ONLINEONLY - This column only appears in online games.
    • HIDDENBYDEFAULT - Don't show this column at the start of the game.
    • DONTSHOWHEADER - Prevents this column's header from being shown.
    • DONTRESETONLEVELCHANGE - This column's values won't be reset to their default when the level changes. This only works on custom columns.
  • GameMode - A list of game modes where this column is active. By default, columns are active in all game modes. Refer to GAMEMODE for a list of all built-in game modes.
  • GameType - If specified, this column is active in game modes that are of the following type: cooperative, deathmatch, or teamgame.
  • EarnType - If specified, this column is active in game modes where players earn any of the following: kills, frags, points, or wins.

Other Properties

  • RequiresTeams - This column is only active in game modes that support teams (e.g. TDM, TLMS, CTF).
  • RequiresNoTeams - This column is disabled in game modes that support teams.
  • RequiresLives - This column is only active in game modes where players have lives (e.g. Survival, LMS, TLMS).
  • RequiresNoLives - This column is disabled in game modes that use lives.
  • RequiresTeamItem - This column is only active in game modes where a team's item is used (e.g. CTF or Skulltag).
  • RequiresNoTeamItem - This column is disabled in game modes that use team items.

Note: If two or more columns with the same DisplayName and/or ShortName are placed next to each other, then a single header will be drawn for all of these columns. This can be useful if you want certain columns (e.g. name and player colours) to be drawn under a single header instead of them appearing separate.

Custom Columns

Modders can define custom columns for their own needs. They will be responsible for updating the values of these columns on their own via ACS. Custom columns support all the commands as standard columns, plus a few extra commands.

CustomColumn <data type>, <name>
{
    DefaultValue = <value>
    TeamValueMethod = <string>

    // BOOL COLUMN PROPERTIES
    TrueText = <string>
    FalseText = <string>

    // INT, BOOL, FLOAT, AND STRING COLUMN PROPERTIES
    Length = <value>

    // COLOR AND TEXTURE PROPERTIES
    ClipRectWidth = <value>
    ClipRectHeight = <value>
}
  • A column's data type can be one of the following:
    • Int - Draws the column contents as an integer.
    • Bool - Treats the column as a boolean and draws two different strings depending on the value:
      • TrueText - What's shown if the value is 1. By default, this is "true".
      • FalseText - What's shown if the value is 0. By default, this is "false".
    • Float - Draws the column's contents as a float or fixed-point number.
    • String - Draws the column's contents as text.
    • Color - Draws the column with a single hexadecimal colour. A rectangular box is filled inside the column:
      • ClipRectWidth - The width of the box where the colour is drawn. If zero or unspecified, then it's the same as the column's width.
      • ClipRectHeight - The height of the box where the colour is drawn. If zero or unspecified, then it's the same as the row height.
    • Texture: Draws the column with a graphic or texture. The name of the graphic must be entered as a string.
      • ClipRectWidth - The maximum width of the image that will be drawn, from the left-side of the image. If zero or unspecified, then there's no cut-off width.
      • ClipRectHeight - The maximum height of the image that will be drawn, from the top-side of the image. If zero or unspecified, then it's the same as the row height.
  • The column's name is what's used to reference the column. ACS functions use this name to find the column.
  • DefaultValue - The default value of this column at the start of a new game.
  • TeamValueMethod - Determines how the value of this column (only works for int and float types) on a team's header is determined:
    • None - The value will not be drawn on any team header. This is the default behaviour of all custom columns.
    • Sum - Calculates the total value of all players on the team.
    • Average - Calculates the average value of all players on the team.
    • Median - Uses the middle value of all players on the team, from least to greatest.
    • Mode - Uses the most common value of all players on the team.
    • Max - Uses the player's value that is the highest on their team.
    • Min - Uses the player's value that is the lowest on their team.
    • Custom - The modder is responsible for updating the team's value on their own via SetColumnValue in ACS.
  • Length - This has different implications depending on the data type:
    • Int - Limits the number of digits that are shown. This means that a number like 255 will appear as "99" if only two digits are allowed.
    • Float - Limits the number of decimals that are shown. This means that a number like 3.14159 will appear as "3.14" if only two decimals are allowed.
    • Bool and String - Limits the number of characters. Longer messages are truncated with an ellipsis at the end.

Console Variables

Command Data Type Default Description
cl_colorizepings Bool false If true, everyone's ping is printed in different colours that visually indicate how severe their connection is to the server:
  • Green if between 0-99 ms.
  • Yellow if between 100-149 ms.
  • Orange if between 150-199 ms.
  • Red if 200 ms or greater.
cl_countrycolumn Int 0 Determines how a player's country is displayed on the scoreboard:
  1. Uses a mini icon of the country's flag.
  2. Uses the country's ISO 3166-1 alpha-2 country code, (e.g. "CA").
  3. Uses the country's ISO 3166-1 alpha-3 country code, (e.g. "CAN").
  4. Uses the country's full name (e.g. "Canada"). Beware of incredibly long names!
cl_intermissiontimer Bool false If true, a message appears on the intermission screen to show how much time is left until the next level starts and the name of the level being entered into.
cl_maxscoreboardheight Float 0.9 The maximum height of the scoreboard as a percentage of the screen's height (must be greater than 0.0 and no greater than 1.0).
cl_maxscoreboardwidth Float 0.9 The maximum width of the scoreboard as a percentage of the screen's width.
cl_scoreboardalpha Float 1.0 The opacity of the scoreboard, from anywhere between 0.0 and 1.0.
cl_showplayernumbers Bool false If true, a player's number appears next to their name. This is a quick way of identifying players based on their ID, instead of opening the console and using the playerinfo CCMD.

ACS Functions