SCORINFO: Difference between revisions

From Zandronum Wiki
m (Very minor edit.)
(Added some more relevant information.)
Tag: Source edit
 
(17 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{MessageBox
{{SpecialLumpWarning}}
|bgcolor=#F88
{{DevfeatureWarning|version=3.2|type=a [[:Category:Special lumps|special lump]]}}
|icon=[[File:MedalYouFailIt.png]]
{{Devfeature|3.2|alpha}} '''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. Modders aren't the only people who can benefit from this lump. Regular players can also write their own SCORINFO lump and save into their skins folder, if they wish to design their own personal scoreboard.
|text='''NOTE:''' This article is a draft for a future lump that lets users design their own scoreboard. '''This is not supported in any current Zandronum version!'''
}}
 
[[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!'''


= Scoreboard block =
The scoreboard block is used to change things that affect the entire scoreboard including its properties, what columns should appear and/or used to rank players, and starting margin sub-blocks. The block is set up like this:
<pre>
<pre>
Scoreboard <"title name">
Scoreboard
{
{
     // BORDER PROPERTIES
     MarginBlock
     Border = <"left">, <"middle">, <"right">
     {
     TeamBorder = <"left>, <"middle">, <"right">
        ...
     }


     // FONT PROPERTIES
     Property = <value>
    TitleFont = <font>
     AddFlag FLAGNAME1
    SubtitleFont = <font>
     RemoveFlag FLAGNAME2
    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 [, ...]]
}
}
</pre>
</pre>


The scoreboard's '''title''' is what gets printed at the top of the scoreboard (e.g. "RANKINGS").
== Properties ==
{| class="wikitable" width="100%"
! style="width: 20%" | Property
! style="width: 80%" | Description
|-
! HeaderFont = "<nowiki><font>"</nowiki>
| The font used to draw the column's header.
|-
! RowFont = "<nowiki><font>"</nowiki>
| The font used to draw the rows for each player.
|-
! HeaderColor = "<text color>"
| The text colour used on the column headers.
|-
! RowColor = "<text color>"
| The text colour used on the rows of all players.
|-
! LocalRowColor = "<text color>"
| The text colour used on the row of the player being spied on.
|-
! LocalRowDemoColor = "<text color>"
| Similar to the '''LocalRowColor''', except only used while watching a demo.
|-
! DeadPlayerTextAlpha = <value>
| The opacity of the row's text for dead players.
|-
! BorderTexture = "<texture>"
| The texture to use to draw the borders, if the '''USETEXTUREFORBORDERS''' flag is enabled. The texture is tiled from left to right along the width of the scoreboard, so ideally, the texture should be seamless.
|-
! LightBorderColor = "<color>"
| The "light" border line colour, if the '''USEHEADERCOLORFORBORDERS''' flag is disabled.
|-
! DarkBorderColor = "<color>"
| The "dark" border line colour, if the '''USEHEADERCOLORFORBORDERS''' flag is disabled.
|-
! BackgroundColor = "<color>"
| The colour of the background drawn behind the entire scoreboard.
|-
! LightRowBackgroundColor = "<color>"
| The "light" colour of the row background.
|-
! DarkRowBackgroundColor = "<color>"
| The "dark" colour of the row background.
|-
! LocalRowBackgroundColor = "<color>"
| The colour of the background of the row corresponding to the player being spied on.
|-
! BackgroundAmount = <value>
| The opacity of the scoreboard's background.
|-
! RowBackgroundAmount = <value>
| The opacity of the row's background.
|-
! DeadPlayerRowBackgroundAmount = <value>
| The opacity of the row's background for dead players.
|-
! BackgroundBorderSize = <value>
| The extra background space surrounding the contents of the scoreboard, in pixels.
|-
! GapBetweenHeaderAndRows = <value>
| The spacing between the column headers and the player rows, in pixels.
|-
! GapBetweenColumns = <value>
| The spacing between the columns, in pixels.
|-
! GapBetweenRows = <value>
| The spacing between each of the player rows, in pixels.
|-
! ColumnPadding = <value>
| How much extra padding to leave on both sides of a column, in pixels. This doesn't count as being part of the gap between two columns.
|-
! HeaderHeight = <value>
| The height of the header. If entered as a negative number, then this value is added onto the header font's height.
|-
! RowHeight = <value>
| The height of each rows. If entered as a negative number, then this value is added onto the row font's height.
|-
! ColumnOrder = "<column>" [, ...]
| Controls the order in which columns appear on the scoreboard, from left to right. Both data columns and composite columns may be included in this list. A few things to note:
# Any data columns nested inside composite columns cannot be included in this list. Instead, the composite column should be added to the column order.
# If the list is redefined and some columns are removed from the list, then they're also removed from the rank order.
|-
! AddToColumnOrder = "<column>" [, ...]
| Appends the column order list with the listed columns. The new columns will be added on the right side of the scoreboard.
|-
! RemoveFromColumnOrder = "<column>" [, ...]
| Removes the listed columns from the scoreboard. If any data columns are removed from the column order, then they're also removed from the rank order.
|-
! RankOrder = "<column>" [, ...]
| Controls the order in which players are ranked on the scoreboard, from top to bottom (e.g. frags, points, wins, kills, etc.). Columns at the beginning of the list have the highest priority, while columns at the end of the list have the least priority. Players with higher values (e.g. a higher frag count) will appear above those with lower values, unless the column enabled the '''REVERSEORDER''' flag, which inverts this behaviour.
'''Only data columns (i.e. no composite columns) can be added to the rank order, and they must already be included in the column order.'''
|-
! AddToRankOrder = "<column>" [, ...]
| Adds more columns to the rank order list. These columns will have less priority versus those that were already in the list.
|-
! RemoveFromRankOrder = "<column>" [, ...]
| Removes the listed columns from the rank order list.
|}
'''Note:''' The "light" and "dark" colours used on the borders and row backgrounds are just naming conventions and don't necessarily have to be "light" or "dark" in any sense. You're welcome to use any two colours, or make them both the same.


===Border Properties===
== Flags ==
* '''Border''' - Sets the graphics to be used for the main borders.
* <code>'''USETEAMTEXTCOLOR'''</code>
* '''TeamBorder''' - Sets the graphics to be used for the border that appears underneath the team headers.
:The row text will be printed in the same colour as the player's team in team-based game modes.
* <code>'''USEHEADERCOLORFORBORDERS'''</code>
:The text colour of the headers is automatically used to colour the border lines that surround the column headers.
* <code>'''USETEXTUREFORBORDERS'''</code>
:Instead of drawing the borders as a series of lines whose colours are controlled by '''LightBorderColor''' and '''DarkBorderColor''', the texture specified in '''BorderTexture''' is used to draw the borders instead.        
* <code>'''SHOWGAPSINROWBACKGROUND'''</code>
:Reveals the gaps between columns in the row's background.
* <code>'''DONTDRAWBORDERS'''</code>
:Prevents any borders from being drawn.
* <code>'''DONTSEPARATETEAMS'''</code>
:Players aren't separated into their respective teams and appear on a single list. This also implies that team headers aren't drawn, though the spectator header is still visible.
* <code>'''DONTUSELOCALROWBACKGROUNDCOLOR'''</code>
:Prevents '''LocalRowBackgroundColor''' from being used to draw the background of the row that corresponds to the player being spied on.
* <code>'''DONTSHOWTEAMHEADERS'''</code>
:Prevents the team headers and the spectator header from being shown.


===Font Properties===
== Margin blocks ==
* '''TitleFont''' - The font used to draw the title. By default, this is <i>BigFont</i>.
Margins are sub-blocks that go inside a scoreboard block and are used to modify special sections on the scoreboard. There are four types of margins:
* '''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>.
* '''MainHeader''': appears above the column headers and player rows.
* '''HeaderFont''' - The font used to draw the column's header. By default, this is <i>SmallFont</i>.
* '''TeamHeader''': appear above all players row of a single team.
* '''RowFont''' - The font used to draw the rows for each player. By default, this is <i>SmallFont</i>.
* '''SpectatorHeader''': appears above all true spectator player rows.
* '''Footer''': appears underneath all player rows.


===Text Properties===
=== Margin commands ===
* '''TitleColor''' - The text colour to draw the title. By default, this is <i>Red</i>.
{| class="wikitable" width="100%"
* '''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>.
! style="width: 20%" | Command
* '''HeaderColor''' - The text colour used for the column's header. By default, this is <i>Red</i>.
! style="width: 80%" | Description
* '''RowColor''' - The text colour used for the rows of all players. By default, this is <i>Grey</i>.
|-
* '''LocalRowColor''' - The text colour used for the row of the player you're spying. By default, this is <i>Green</i>.
! [[SCORINFO/MultiLineBlock|MultiLineBlock]]
* '''LocalRowDemoColor''' - Similar to the local row colour, but only when watching a demo. By default, this is <i>Gold</i>.
| Starts a block of lines that consist of strings, colors, or textures.
* '''DeadSpectatorTextOpacity''' - The opacity of the row's text for dead spectators. By default, this is 0.35.
|-
! [[SCORINFO/RowBlock|RowBlock]]
| Starts a row that consists of strings, colors, or textures.
|-
! [[SCORINFO/DrawString|DrawString]]
| Draws text somewhere in the margin.
|-
! [[SCORINFO/DrawColor|DrawColor]]
| Draws a color box somewhere in the margin.
|-
! [[SCORINFO/DrawTexture|DrawTexture]]
| Draws a graphic or image somewhere in the margin.
|-
! IfOnlineGame( <true/false> )
| Executes a block if the current game is (not) a network game.
|-
! IfIntermission( <true/false> )
| Executes a block if the intermission screen is (not) being shown.
|-
! IfPlayersOnTeams( <true/false> )
| Executes a block if players are (not) supposed to be on teams.
|-
! IfPlayersHaveLives( <true/false> )
| Executes a block if players are (not) supposed to have lives.
|-
! IfShouldShowRank( <true/false> )
| Executes a block if the current player's rank should (not) be shown.
|-
! IfGameMode( <gamemode> [, ...] )
| Executes a block when any of the given game modes are being played.
|-
! IfGameType( <gametype> [, ...] )
| Executes a block when any of the given game types are being played. Possible values are '''cooperative''', '''deathmatch''', and '''teamgame'''.
|-
! IfEarnType( <earntype> [, ...] )
| Executes a block when players can earn any of the given types. Possible values are '''frags''', '''points''', '''wins''', and '''kills'''.
|-
! [[SCORINFO/IfCVar|IfCVar]]
| Executes a block depending on a CVar's value.
|-
! Else
| Executes the following block if the condition of the previous "if" margin command (e.g. '''IfOnlineGame''') fails.
|}


===Background Properties===
= Column block =
* '''BackgroundColor''' - The colour of the background behind the entire scoreboard. By default, this is "00 00 00".
The columns are where all the information on the scoreboard get organized in. There are two types of columns: '''data''' and '''composite'''. Both column types require a ''columnname'' which is the internal name they will use.
* '''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===
== Data columns ==
* '''BackgroundBorderSize''' - The spacing between the edges of the scoreboard's background and the text, in pixels.
Data columns are what hold the actual data contents. There are six possible data types: <tt>int</tt>, <tt>bool</tt>, <tt>float</tt>, <tt>string</tt>, <tt>color</tt>, and <tt>texture</tt>. To define a data column, set up the block like this:
* '''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:
** <code>USETEAMTEXTCOLOR</code> - Row text will be printed in the same colour as a player's team in team-based game modes.
** <code>DONTSHOWHEADER</code> - Prevents the scoreboard's header 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>DONTSEPARATETEAMS</code> - 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''' - 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.
<pre>
<pre>
Column <type>
Column "<columnname>"
{
{
     DisplayName = <string>
     Property = <value>
    ShortName = <string>
     AddFlag FLAGNAME1
    Alignment = <value>
     RemoveFlag FLAGNAME2
     Width = <value>
    OverrideLeftColumnGap = <value [, <left | right>]
    Flags = <flag1> [, flag2 [, ...]]
    GameMode = <gamemode1> [, gamemode2 [, ...]]
    GameType = <gametype1> [, gametype2 [, ...]]
    EarnType = <earntype1> [, earntype2 [, ...]]
     [Other]
}
}
</pre>
</pre>
Zandronum supports many built-in native column types which already have their own data and are updated automatically. A list of all native column types can be found below.


* A column's '''type''' can be one of the following:
If the specified ''columnname'' doesn't match that of any native type, then the data column is a '''custom''' column.
** <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.
=== Native types ===
** <code>Ping</code> - The player's ping measured in milliseconds.
{| class="wikitable" width="100%"
** <code>Frags</code> - The player's frag count.
! style="width: 10%" | Type
** <code>Points</code> - The player's point count.
! style="width: 10%" | Data type
** <code>Wins</code> - The player's win count.
! style="width: 80%" | Description
** <code>Kills</code> - The player's monster kill count.
|-
** <code>Deaths</code> - The player's death count.
! Name
** <code>Assists</code> - How many times this player earned the "assist" medal.
| style="text-align:center;" | String
** <code>Secrets</code> - How many secrets this player discovered.
| The name this player is using.
** <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.'''
! Index
** <code>Country</code> - The country that a player is connecting from.
| style="text-align:center;" | Int
** <code>PlayerColor</code> - The current colour that this player is using.
| The player's index number.
** <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.'''
! Time
| style="text-align:center;" | Int
| How long this player has been playing in the current game.
|-
! Ping
| style="text-align:center;" | Int
| The player's ping measured in milliseconds.
|-
! Frags
| style="text-align:center;" | Int
| The player's current frag count.
|-
! Points
| style="text-align:center;" | Int
| The player's current point count.
|-
! Wins
| style="text-align:center;" | Int
| The player's current win count.
|-
! Kills
| style="text-align:center;" | Int
| The player's current kill count.
|-
! Deaths
| style="text-align:center;" | Int
| How many times this player has died.
|-
! Secrets
| style="text-align:center;" | Int
| The number of secrets this player has discovered.
|-
! Lives
| style="text-align:center;" | Int
| The number of lives this player still has.
|-
! Damage
| style="text-align:center;" | Int
| How much damage this player has dealt in a cooperative game, if [[DMFlags|sv_awarddamageinsteadkills]] is enabled.
|-
! Handicap
| style="text-align:center;" | Int
| The player's handicap value.
|-
! JoinQueue
| style="text-align:center;" | Int
| The player's position in the join queue.
|-
! Vote
| style="text-align:center;" | String
| What decision this player made for the current vote.
|-
! PlayerColor
| style="text-align:center;" | Color
| Shows what colour the player is currently using.
|-
! StatusIcon
| style="text-align:center;" | Texture
| Shows a mini icon that represents the player's current status (e.g. chatting, in the console or menu, or lagging).
|-
! ReadyToGoOn
| style="text-align:center;" | Texture
| Shows a mini icon to indicate whether or not the player is ready to go during the intermission.
|-
! PlayerIcon
| style="text-align:center;" | Texture
| The icon indicated by the '''ScoreIcon''' property of the player's current class.
|-
! ArtifactIcon
| style="text-align:center;" | Texture
| Shows an icon if this player is carrying a gamemode-specific item (e.g. terminator sphere, hellstone, the white flag, or another team's flag/skull).
|-
! BotSkillIcon
| style="text-align:center;" | Texture
| A mini icon that indicates the skill level of a bot.
|-
! CountryName
| style="text-align:center;" | String
| The full name of the country that the player is connecting from.
|-
! CountryCode
| style="text-align:center;" | String
| The country code that the player is connecting from.
|-
! CountryFlag
| style="text-align:center;" | Texture
| A mini icon of the flag of the country that the player is connecting from. The icons are organized in a 16x16 grid, inside a single texture called "CTRYFLAG".
|}


* '''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.
=== How to use custom columns ===
* '''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.
Unlike native columns which already have data, custom columns don't come with data out of the box. So to create a custom column, you must also define the custom data that it will use inside the <code>GameInfo</code> block of a [[MAPINFO]] lump, using the <code>AddCustomData</code> property. '''The name of the custom data must match the name of the custom column'''.
* '''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:
** <code>REVERSEORDER</code> - Sorts players in reverse (i.e. from least to greatest).
** <code>INTERMISSIONONLY</code> - This column only appears on the intermission screen.
** <code>NOINTERMISSION</code> - This column won't appear on the intermission screen.
** <code>NOSPECTATORS</code> - Don't draw the contents of this column for true spectators.
** <code>OFFLINEONLY</code> - This column only appears in offline games.
** <code>ONLINEONLY</code> - This column only appears in online games.
** <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>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.
* '''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===
Let's assume, for all intents and purposes, that we created a custom column named "MyCustomColumn" that uses integers with a default value of 0. The custom data would need to be defined like this:
* '''RequiresTeams''' - This column is only active in game modes that support teams (e.g. TDM, TLMS, CTF).
<syntaxhighlight lang="c" line="1">
* '''RequiresNoTeams''' - This column is disabled in game modes that support teams.
GameInfo
* '''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.
    AddCustomData = "MyCustomColumn", "int", 0
* '''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.
</syntaxhighlight>
Each player has their own value in a custom data set. The value(s) are automatically reset back to default for a single player when they disconnect from the server, or for all players at the start of a new game.


'''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.
The custom data can be manipulated using several built-in [[ACS Functions|ACS functions]]:  
* <code>[[GetCustomPlayerValue]]</code>
* <code>[[ResetCustomDataToDefault]]</code>
* <code>[[SetCustomPlayerValue]]</code>


==Custom Columns==
== Composite 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.
Composite columns consist of several or more data columns that are tucked underneath a single header - the composite column's. The values of the sub-columns are drawn from left to right. To define a composite column, set up the block like this:
<pre>
<pre>
CustomColumn <data type>, <name>
CompositeColumn "<columnname>"
{
{
     DefaultValue = <value>
     Columns = "<column>" [, ...]
    TeamValueMethod = <string>
     Property = <value>
 
     AddFlag FLAGNAME1
    // BOOL COLUMN PROPERTIES
     RemoveFlag FLAGNAME2
    TrueText = <string>
    FalseText = <string>
 
    // INT, BOOL, FLOAT, AND STRING COLUMN PROPERTIES
     Length = <value>
 
     // COLOR AND TEXTURE PROPERTIES
     ClipRectWidth = <value>
    ClipRectHeight = <value>
}
}
</pre>
</pre>
'''Note:''' The name of a composite column can't be the same as a native or custom data column. If this happens, Zandronum will throw a fatal error.


* A column's '''data type''' can be one of the following:
== Properties ==
** <code>Int</code> - Draws the column contents as an integer.
{| class="wikitable" width="100%"
** <code>Bool</code> - Treats the column as a boolean and draws two different strings depending on the value:
! style="width: 20%" | Property
*** '''TrueText''' - What's shown if the value is 1. By default, this is "true".
! style="width: 10%" | Used for
*** '''FalseText''' - What's shown if the value is 0. By default, this is "false".
! style="width: 70%" | Description
** <code>Float</code> - Draws the column's contents as a float or fixed-point number.
|-
** <code>String</code> - Draws the column's contents as text.
! DisplayName = "<name>"
** <code>Color</code> - Draws the column with a single hexadecimal colour. A rectangular box is filled inside the column:
| style="text-align:center;" | Any
*** '''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.
| The name that is used in the column's header.
*** '''ClipRectHeight''' - The height of the box where the colour is drawn. If zero or unspecified, then it's the same as the row height.
|-
** <code>Texture</code>: Draws the column with a graphic or texture. The name of the graphic must be entered as a string.
! ShortName = "<name>"
*** '''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.
| style="text-align:center;" | Any
*** '''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.
| A shorter or abbreviated version of the display name that's used when ''cl_useshortcolumnnames'' is enabled.
* 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.
! Alignment = <alignment>
* '''TeamValueMethod''' - Determines how the value of this column ('''only works for int and float types''') on a team's header is determined:
| style="text-align:center;" | Any
** <code>None</code> - The value will not be drawn on any team header. This is the default behaviour of all custom columns.
| How the contents inside the column are aligned. Possible values are '''left''', '''center''', or '''right'''.
** <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.
! Size = <value>
** <code>Median</code> - Uses the middle value of all players on the team, from least to greatest.
| style="text-align:center;" | Any
** <code>Mode</code> - Uses the most common value of all players on the team.
| The size of the column, in pixels. This is the column's whole width, or padding if the '''ALWAYSUSESHORTESTWIDTH''' flag is enabled.
** <code>Max</code> - Uses the player's value that is the highest on their team.
'''If the column's header or contents can't fit inside its ''size'', then the width will be increased to something large enough to fit everything.'''
** <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.
! GameMode = <gamemode> [, ...]
* '''Length''' - This has different implications depending on the data type:
| style="text-align:center;" | Any
** <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.
| A list of game modes where this column is only active in. If unspecified, then the column in active in all game modes.
** <code>Float</code> - 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.
|-
** <code>Bool</code> and <code>String</code> - Limits the number of characters. Longer messages are truncated with an ellipsis at the end.
! GameType = <gametype> [, ...]
 
| style="text-align:center;" | Any
=Console Variables=
|The game types which this column is only active in. Possible values are '''cooperative''', '''deathmatch''', and '''teamgame'''. In unspecified, then the column is active in all game types.
{| class="wikitable" border="2" width="100%"
|-
! EarnType = <earntype> [, ...]
| style="text-align:center;" | Any
| What kind of score the players must earn for this column to be active. Possible values are '''frags''', '''points''', '''wins''', and '''kills'''. By default, columns are active for all earn types.
|-
! CVar = "<cvarname>"
| style="text-align:center;" | Any
| If a CVar is specified, then its value will decide if this column is active (if non-zero) or disabled. Enabling the '''CVARMUSTBEZERO''' flag reverses this behaviour.
'''The CVar must be either an integer, boolean, or a flag.'''
|-
! MaxLength = <value>
| style="text-align:center;" | Bool, Float, String
| Limits how many decimals (for the float data type), or characters (for bool and string data types) are shown.
|-
! Prefix = "<text>"
| style="text-align:center;" | Int, Bool, Float, String
|The text that will be added to the beginning of a value.
|-
! Suffix = "<text>"
| style="text-align:center;" | Int, Bool, Float, String
| The text that will be added to the end of a value.
|-
|-
! Command <!-- Command name -->
! ClipRectWidth = <value>
! Data Type
| style="text-align:center;" | Color, Texture
! Default
| The width of the clipping rectangle. Any pixels outside of the clipping rectangle aren't drawn.
! Description <!-- What does the command do? -->
|-
|-
|'''cl_colorizepings'''
! ClipRectHeight = <value>
|style="text-align:center" | Bool
| style="text-align:center;" | Color, Texture
|style="text-align:center" | false
| The height of the clipping rectangle.
|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'''
! TrueText = "<text>"
|style="text-align:center" | Int
| style="text-align:center;" | Bool
|style="text-align:center" | 0
| The text that is drawn when a player's value is 1 (or true).
|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'''
! FalseText = "<text>"
|style="text-align:center" | Bool
| style="text-align:center;" | Bool
|style="text-align:center" | false
| The text that is drawn when a player's value is 0 (or 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'''
! GapBetweenColumns = <value>
|style="text-align:center" | Float
| style="text-align:center;" | Composite
|style="text-align:center" | 0.9
| The spacing between each of the data columns that are inside a composite column, in pixels.
|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'''
! Columns = <column> [, ...]
|style="text-align:center" | Float
| style="text-align:center;" | Composite
|style="text-align:center" | 0.9
| Specifies which data columns belong to the composite column, and their order from left to right. A few things to note:
|The maximum width of the scoreboard as a percentage of the screen's width.  
# The data columns cannot already be inside another composite column.
# The data columns cannot be included in the scoreboard's column order.
# The data columns must always have the '''DONTSHOWHEADER''' flag enabled, and be aligned to the left.
# If the list is redefined and some columns are removed from the list, then they're also removed from the scoreboard's rank order.
|-
|-
|'''cl_scoreboardalpha'''
! AddToColumns = <column> [, ...]
|style="text-align:center" | Float
| style="text-align:center;" | Composite
|style="text-align:center" | 1.0
| Appends the composite column's list with the listed columns. The new columns will be added on the right.
|The opacity of the scoreboard, from anywhere between 0.0 and 1.0.
|-
|-
|'''cl_showplayernumbers'''
! RemoveFromColumns = <column> [, ...]
|style="text-align:center" | Bool
| style="text-align:center;" | Composite
|style="text-align:center" | false
| Removes the listed columns from the composite column's list. If any data columns are removed from the list, then they're also removed from the scoreboard's rank order.
|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=
== Flags ==
* <code>[[CheckColumnStatus]]</code>
* <code>'''REVERSEORDER'''</code>
* <code>[[CheckScoreboardStatus]]</code>
:By default, players are sorted from highest to lowest value in a column. By enabling this flag, players will be sorted from lowest to highest value instead.
* <code>[[GetColumnType]]</code>
* <code>'''INTERMISSIONONLY'''</code>
* <code>[[GetColumnValue]]</code>
:The column is only active on the intermission screen.
* <code>[[SetColumnValue]]</code>
* <code>'''NOINTERMISSION'''</code>
* <code>[[SetColumnVisibility]]</code>
:The column is disabled on the intermission screen.
* <code>[[SetScoreboardVisibility]]</code>
* <code>'''NOSPECTATORS'''</code>
:The contents of this column are never drawn for true spectators.
* <code>'''OFFLINEONLY'''</code>
:The column is only active in offline (i.e. singleplayer or with bots) games, and never used in online games.
* <code>'''ONLINEONLY'''</code>
:The column is only active in online games, and never used in offline games.
* <code>'''REQUIRESTEAMS'''</code>
:This column is only active in game modes that support teams.
* <code>'''FORBIDTEAMS'''</code>
:Disables the column in game modes that support teams.
* <code>'''REQUIRESLIVES'''</code>
:This column is only active in game modes where players have lives.
* <code>'''FORBIDLIVES'''</code>
:Disables the column in game modes that use lives.
* <code>'''REQUIRESTEAMITEMS'''</code>
:This column is only active in game modes where a team's item is used.
* <code>'''FORBIDTEAMITEMS'''</code>
:Disables the column in game modes that use team items.
* <code>'''DONTSHOWHEADER'''</code>
:Prevents the column's header from being shown.
* <code>'''ALWAYSUSESHORTESTWIDTH'''</code>
:The width of the column is set to whatever's small enough to still fit everything (i.e. the header and contents) inside of it. The column's '''size''' will be treated as a padding and increase its width by the specified amount.
* <code>'''CVARMUSTBEZERO'''</code>
:The CVar used by this column uses must be equal to zero (or false) for it to still be active.
* <code>'''DISABLEIFEMPTY'''</code>
:Disables the column whenever it has no contents inside of it.
 
[[Category:Zandronum-specific lumps]]

Latest revision as of 18:02, 26 June 2023

This article documents a Zandronum-specific special lump which may not be supported by ZDoom and its other child ports.
This article documents a special lump which is only available in development builds of Zandronum 3.2 and newer.

(development version 3.2-alpha and above only) 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. Modders aren't the only people who can benefit from this lump. Regular players can also write their own SCORINFO lump and save into their skins folder, if they wish to design their own personal scoreboard.

Scoreboard block

The scoreboard block is used to change things that affect the entire scoreboard including its properties, what columns should appear and/or used to rank players, and starting margin sub-blocks. The block is set up like this:

Scoreboard
{
    MarginBlock
    {
        ...
    }

    Property = <value>
    AddFlag FLAGNAME1
    RemoveFlag FLAGNAME2
}

Properties

Property Description
HeaderFont = "<font>" The font used to draw the column's header.
RowFont = "<font>" The font used to draw the rows for each player.
HeaderColor = "<text color>" The text colour used on the column headers.
RowColor = "<text color>" The text colour used on the rows of all players.
LocalRowColor = "<text color>" The text colour used on the row of the player being spied on.
LocalRowDemoColor = "<text color>" Similar to the LocalRowColor, except only used while watching a demo.
DeadPlayerTextAlpha = <value> The opacity of the row's text for dead players.
BorderTexture = "<texture>" The texture to use to draw the borders, if the USETEXTUREFORBORDERS flag is enabled. The texture is tiled from left to right along the width of the scoreboard, so ideally, the texture should be seamless.
LightBorderColor = "<color>" The "light" border line colour, if the USEHEADERCOLORFORBORDERS flag is disabled.
DarkBorderColor = "<color>" The "dark" border line colour, if the USEHEADERCOLORFORBORDERS flag is disabled.
BackgroundColor = "<color>" The colour of the background drawn behind the entire scoreboard.
LightRowBackgroundColor = "<color>" The "light" colour of the row background.
DarkRowBackgroundColor = "<color>" The "dark" colour of the row background.
LocalRowBackgroundColor = "<color>" The colour of the background of the row corresponding to the player being spied on.
BackgroundAmount = <value> The opacity of the scoreboard's background.
RowBackgroundAmount = <value> The opacity of the row's background.
DeadPlayerRowBackgroundAmount = <value> The opacity of the row's background for dead players.
BackgroundBorderSize = <value> The extra background space surrounding the contents of the scoreboard, in pixels.
GapBetweenHeaderAndRows = <value> The spacing between the column headers and the player rows, in pixels.
GapBetweenColumns = <value> The spacing between the columns, in pixels.
GapBetweenRows = <value> The spacing between each of the player rows, in pixels.
ColumnPadding = <value> How much extra padding to leave on both sides of a column, in pixels. This doesn't count as being part of the gap between two columns.
HeaderHeight = <value> The height of the header. If entered as a negative number, then this value is added onto the header font's height.
RowHeight = <value> The height of each rows. If entered as a negative number, then this value is added onto the row font's height.
ColumnOrder = "<column>" [, ...] Controls the order in which columns appear on the scoreboard, from left to right. Both data columns and composite columns may be included in this list. A few things to note:
  1. Any data columns nested inside composite columns cannot be included in this list. Instead, the composite column should be added to the column order.
  2. If the list is redefined and some columns are removed from the list, then they're also removed from the rank order.
AddToColumnOrder = "<column>" [, ...] Appends the column order list with the listed columns. The new columns will be added on the right side of the scoreboard.
RemoveFromColumnOrder = "<column>" [, ...] Removes the listed columns from the scoreboard. If any data columns are removed from the column order, then they're also removed from the rank order.
RankOrder = "<column>" [, ...] Controls the order in which players are ranked on the scoreboard, from top to bottom (e.g. frags, points, wins, kills, etc.). Columns at the beginning of the list have the highest priority, while columns at the end of the list have the least priority. Players with higher values (e.g. a higher frag count) will appear above those with lower values, unless the column enabled the REVERSEORDER flag, which inverts this behaviour.

Only data columns (i.e. no composite columns) can be added to the rank order, and they must already be included in the column order.

AddToRankOrder = "<column>" [, ...] Adds more columns to the rank order list. These columns will have less priority versus those that were already in the list.
RemoveFromRankOrder = "<column>" [, ...] Removes the listed columns from the rank order list.

Note: The "light" and "dark" colours used on the borders and row backgrounds are just naming conventions and don't necessarily have to be "light" or "dark" in any sense. You're welcome to use any two colours, or make them both the same.

Flags

  • USETEAMTEXTCOLOR
The row text will be printed in the same colour as the player's team in team-based game modes.
  • USEHEADERCOLORFORBORDERS
The text colour of the headers is automatically used to colour the border lines that surround the column headers.
  • USETEXTUREFORBORDERS
Instead of drawing the borders as a series of lines whose colours are controlled by LightBorderColor and DarkBorderColor, the texture specified in BorderTexture is used to draw the borders instead.
  • SHOWGAPSINROWBACKGROUND
Reveals the gaps between columns in the row's background.
  • DONTDRAWBORDERS
Prevents any borders from being drawn.
  • DONTSEPARATETEAMS
Players aren't separated into their respective teams and appear on a single list. This also implies that team headers aren't drawn, though the spectator header is still visible.
  • DONTUSELOCALROWBACKGROUNDCOLOR
Prevents LocalRowBackgroundColor from being used to draw the background of the row that corresponds to the player being spied on.
  • DONTSHOWTEAMHEADERS
Prevents the team headers and the spectator header from being shown.

Margin blocks

Margins are sub-blocks that go inside a scoreboard block and are used to modify special sections on the scoreboard. There are four types of margins:

  • MainHeader: appears above the column headers and player rows.
  • TeamHeader: appear above all players row of a single team.
  • SpectatorHeader: appears above all true spectator player rows.
  • Footer: appears underneath all player rows.

Margin commands

Command Description
MultiLineBlock Starts a block of lines that consist of strings, colors, or textures.
RowBlock Starts a row that consists of strings, colors, or textures.
DrawString Draws text somewhere in the margin.
DrawColor Draws a color box somewhere in the margin.
DrawTexture Draws a graphic or image somewhere in the margin.
IfOnlineGame( <true/false> ) Executes a block if the current game is (not) a network game.
IfIntermission( <true/false> ) Executes a block if the intermission screen is (not) being shown.
IfPlayersOnTeams( <true/false> ) Executes a block if players are (not) supposed to be on teams.
IfPlayersHaveLives( <true/false> ) Executes a block if players are (not) supposed to have lives.
IfShouldShowRank( <true/false> ) Executes a block if the current player's rank should (not) be shown.
IfGameMode( <gamemode> [, ...] ) Executes a block when any of the given game modes are being played.
IfGameType( <gametype> [, ...] ) Executes a block when any of the given game types are being played. Possible values are cooperative, deathmatch, and teamgame.
IfEarnType( <earntype> [, ...] ) Executes a block when players can earn any of the given types. Possible values are frags, points, wins, and kills.
IfCVar Executes a block depending on a CVar's value.
Else Executes the following block if the condition of the previous "if" margin command (e.g. IfOnlineGame) fails.

Column block

The columns are where all the information on the scoreboard get organized in. There are two types of columns: data and composite. Both column types require a columnname which is the internal name they will use.

Data columns

Data columns are what hold the actual data contents. There are six possible data types: int, bool, float, string, color, and texture. To define a data column, set up the block like this:

Column "<columnname>"
{
    Property = <value>
    AddFlag FLAGNAME1
    RemoveFlag FLAGNAME2
}

Zandronum supports many built-in native column types which already have their own data and are updated automatically. A list of all native column types can be found below.

If the specified columnname doesn't match that of any native type, then the data column is a custom column.

Native types

Type Data type Description
Name String The name this player is using.
Index Int The player's index number.
Time Int How long this player has been playing in the current game.
Ping Int The player's ping measured in milliseconds.
Frags Int The player's current frag count.
Points Int The player's current point count.
Wins Int The player's current win count.
Kills Int The player's current kill count.
Deaths Int How many times this player has died.
Secrets Int The number of secrets this player has discovered.
Lives Int The number of lives this player still has.
Damage Int How much damage this player has dealt in a cooperative game, if sv_awarddamageinsteadkills is enabled.
Handicap Int The player's handicap value.
JoinQueue Int The player's position in the join queue.
Vote String What decision this player made for the current vote.
PlayerColor Color Shows what colour the player is currently using.
StatusIcon Texture Shows a mini icon that represents the player's current status (e.g. chatting, in the console or menu, or lagging).
ReadyToGoOn Texture Shows a mini icon to indicate whether or not the player is ready to go during the intermission.
PlayerIcon Texture The icon indicated by the ScoreIcon property of the player's current class.
ArtifactIcon Texture Shows an icon if this player is carrying a gamemode-specific item (e.g. terminator sphere, hellstone, the white flag, or another team's flag/skull).
BotSkillIcon Texture A mini icon that indicates the skill level of a bot.
CountryName String The full name of the country that the player is connecting from.
CountryCode String The country code that the player is connecting from.
CountryFlag Texture A mini icon of the flag of the country that the player is connecting from. The icons are organized in a 16x16 grid, inside a single texture called "CTRYFLAG".

How to use custom columns

Unlike native columns which already have data, custom columns don't come with data out of the box. So to create a custom column, you must also define the custom data that it will use inside the GameInfo block of a MAPINFO lump, using the AddCustomData property. The name of the custom data must match the name of the custom column.

Let's assume, for all intents and purposes, that we created a custom column named "MyCustomColumn" that uses integers with a default value of 0. The custom data would need to be defined like this:

GameInfo
{
    AddCustomData = "MyCustomColumn", "int", 0
}

Each player has their own value in a custom data set. The value(s) are automatically reset back to default for a single player when they disconnect from the server, or for all players at the start of a new game.

The custom data can be manipulated using several built-in ACS functions:

Composite columns

Composite columns consist of several or more data columns that are tucked underneath a single header - the composite column's. The values of the sub-columns are drawn from left to right. To define a composite column, set up the block like this:

CompositeColumn "<columnname>"
{
    Columns = "<column>" [, ...]
    Property = <value>
    AddFlag FLAGNAME1
    RemoveFlag FLAGNAME2
}

Note: The name of a composite column can't be the same as a native or custom data column. If this happens, Zandronum will throw a fatal error.

Properties

Property Used for Description
DisplayName = "<name>" Any The name that is used in the column's header.
ShortName = "<name>" Any A shorter or abbreviated version of the display name that's used when cl_useshortcolumnnames is enabled.
Alignment = <alignment> Any How the contents inside the column are aligned. Possible values are left, center, or right.
Size = <value> Any The size of the column, in pixels. This is the column's whole width, or padding if the ALWAYSUSESHORTESTWIDTH flag is enabled.

If the column's header or contents can't fit inside its size, then the width will be increased to something large enough to fit everything.

GameMode = <gamemode> [, ...] Any A list of game modes where this column is only active in. If unspecified, then the column in active in all game modes.
GameType = <gametype> [, ...] Any The game types which this column is only active in. Possible values are cooperative, deathmatch, and teamgame. In unspecified, then the column is active in all game types.
EarnType = <earntype> [, ...] Any What kind of score the players must earn for this column to be active. Possible values are frags, points, wins, and kills. By default, columns are active for all earn types.
CVar = "<cvarname>" Any If a CVar is specified, then its value will decide if this column is active (if non-zero) or disabled. Enabling the CVARMUSTBEZERO flag reverses this behaviour.

The CVar must be either an integer, boolean, or a flag.

MaxLength = <value> Bool, Float, String Limits how many decimals (for the float data type), or characters (for bool and string data types) are shown.
Prefix = "<text>" Int, Bool, Float, String The text that will be added to the beginning of a value.
Suffix = "<text>" Int, Bool, Float, String The text that will be added to the end of a value.
ClipRectWidth = <value> Color, Texture The width of the clipping rectangle. Any pixels outside of the clipping rectangle aren't drawn.
ClipRectHeight = <value> Color, Texture The height of the clipping rectangle.
TrueText = "<text>" Bool The text that is drawn when a player's value is 1 (or true).
FalseText = "<text>" Bool The text that is drawn when a player's value is 0 (or false).
GapBetweenColumns = <value> Composite The spacing between each of the data columns that are inside a composite column, in pixels.
Columns = <column> [, ...] Composite Specifies which data columns belong to the composite column, and their order from left to right. A few things to note:
  1. The data columns cannot already be inside another composite column.
  2. The data columns cannot be included in the scoreboard's column order.
  3. The data columns must always have the DONTSHOWHEADER flag enabled, and be aligned to the left.
  4. If the list is redefined and some columns are removed from the list, then they're also removed from the scoreboard's rank order.
AddToColumns = <column> [, ...] Composite Appends the composite column's list with the listed columns. The new columns will be added on the right.
RemoveFromColumns = <column> [, ...] Composite Removes the listed columns from the composite column's list. If any data columns are removed from the list, then they're also removed from the scoreboard's rank order.

Flags

  • REVERSEORDER
By default, players are sorted from highest to lowest value in a column. By enabling this flag, players will be sorted from lowest to highest value instead.
  • INTERMISSIONONLY
The column is only active on the intermission screen.
  • NOINTERMISSION
The column is disabled on the intermission screen.
  • NOSPECTATORS
The contents of this column are never drawn for true spectators.
  • OFFLINEONLY
The column is only active in offline (i.e. singleplayer or with bots) games, and never used in online games.
  • ONLINEONLY
The column is only active in online games, and never used in offline games.
  • REQUIRESTEAMS
This column is only active in game modes that support teams.
  • FORBIDTEAMS
Disables the column in game modes that support teams.
  • REQUIRESLIVES
This column is only active in game modes where players have lives.
  • FORBIDLIVES
Disables the column in game modes that use lives.
  • REQUIRESTEAMITEMS
This column is only active in game modes where a team's item is used.
  • FORBIDTEAMITEMS
Disables the column in game modes that use team items.
  • DONTSHOWHEADER
Prevents the column's header from being shown.
  • ALWAYSUSESHORTESTWIDTH
The width of the column is set to whatever's small enough to still fit everything (i.e. the header and contents) inside of it. The column's size will be treated as a padding and increase its width by the specified amount.
  • CVARMUSTBEZERO
The CVar used by this column uses must be equal to zero (or false) for it to still be active.
  • DISABLEIFEMPTY
Disables the column whenever it has no contents inside of it.