SCORINFO: Difference between revisions

3,962 bytes added ,  12 June 2022
Updated the draft.
(Added some example images of the scoreboard.)
(Updated the draft.)
Line 1: Line 1:
__NOTOC__
{{MessageBox
{{MessageBox
|bgcolor=#F88
|bgcolor=#F88
Line 9: Line 7:
=Scoreboard commands=
=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!'''
* '''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 = <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.


<pre>
<pre>
HeaderFont = <font>
Scoreboard <"title name">
RowFont = <font>
{
HeaderColor = <text color>
    TitleFont = <font>
RowColor = <text color>
    SubtitleFont = <font>
LocalRowColor = <text color>
    HeaderFont = <font>
LocalRowDemoColor = <text color>
    RowFont = <font>
LightRowBackgroundColor = <color>
    TitleColor = <text color>
DarkRowBackgroundColor = <color>
    SubtitleColor = <text color>
RowBackgroundAmount = <value>
    HeaderColor = <text color>
BorderSpacing = <value>
    RowColor = <text color>
HeaderGap = <value>
    LocalRowColor = <text color>
ColumnGap = <value>
    LocalRowDemoColor = <text color>
RowGap = <value>
    BackgroundColor = <color>
HeaderHeight = <value>
    LightRowBackgroundColor = <color>
RowHeight = <value>
    DarkRowBackgroundColor = <color>
    BackgroundAmount = <value>
    RowBackgroundAmount = <value>
    BackgroundBorderSize = <value>
    GapBetweenTitleAndSubtitles = <value>
    GapBetweenHeaderAndRows = <value>
    GapBetweenSubtitles = <value>
    GapBetweenColumns = <value>
    GapBetweenRows = <value>
    HeaderHeight = <value>
    RowHeight = <value>
    Flags = <flag1> [, flag2 [, ...]]
    ColumnOrder = <column1> [, column2 [, ...]]
    RankOrder = <column1> [, column2 [, ...]]
    AddToRankOrder = <column>
}
</pre>
</pre>


* The scoreboard's '''title''' is what gets printed at the top of the scoreboard (e.g. "RANKINGS").
* '''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>.
* '''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>.
* '''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>.
* '''HeaderColor''' - The text colour used for the column's header. By default, this is <i>Red</i>.
* '''HeaderColor''' - The text colour used for the column's header. By default, this is <i>Red</i>.
* '''RowColor''' - The text colour used for the rows of all players. By default, this is <i>Grey</i>.
* '''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>.
* '''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>.
* '''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".
* '''LightRowBackgroundColor''' - 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".
* '''DarkRowBackgroundColor''' - The "dark" background colour of the row. By default, this is "20 20 20".
* '''RowBackgroundAmount''' - The opacity of the row's background. A value of 1.0 represents fully opaque, while 0.0 represents fully transparent.
* '''BackgroundAmount''' - The opacity of the scoreboard's background. A value of 1.0 represents fully opaque, while 0.0 represents fully transparent.
* '''BorderSpacing''' - The spacing between the edges of the scoreboard's background and the text, in pixels.
* '''RowBackgroundAmount''' - The opacity of the row's background. This works similarly to '''BackgroundAmount'''.
* '''HeaderGap''' - The spacing between the column's header and the player rows, in pixels.
* '''BackgroundBorderSize''' - The spacing between the edges of the scoreboard's background and the text, in pixels.
* '''ColumnGap''' - The spacing between the columns, in pixels.
* '''GapBetweenTitleAndSubtitles''' - The spacing between the title and subtitles in the scoreboard's header, in pixels.
* '''RowGap''' - The spacing between the player rows, 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.
* '''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.
* '''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>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.
* '''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 = <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.


'''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.
'''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.
Line 62: Line 88:
     Alignment = <value>
     Alignment = <value>
     Width = <value>
     Width = <value>
    OverrideColumnGap = <value [, <left | right>]
     Flags = <flag1> [, flag2 [, ...]]
     Flags = <flag1> [, flag2 [, ...]]
     GameMode = <gamemode1> [, gamemode2 [, ...]]
     GameMode = <gamemode1> [, gamemode2 [, ...]]
Line 80: Line 107:
** <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.
** <code>Lives</code> - How many lives this player still has. This column doesn't appear if players are supposed to have only one life.


* '''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 86: Line 113:
* '''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.
* '''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 95: Line 123:
** <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.
* '''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 any 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 any game modes where players earn any of the following: '''kills''', '''frags''', '''points''', or '''wins'''.
* '''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.
* '''RequiresLives''' - This column is only active in game modes where players have lives (e.g. Survival, LMS, TLMS).
* '''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).
* '''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.


==Custom columns==
==Custom columns==
Line 113: Line 145:
     FalseText = <string>
     FalseText = <string>


     // Color column commands
     // Int, bool, float, and string column commands
     RectWidth = <value>
     Length = <value>
     RectHeight = <value>
 
     Alpha = <value>
    // Color and texture column commands
     ClipRectWidth = <value>
     ClipRectHeight = <value>
}
}
</pre>
</pre>
Line 128: Line 162:
** <code>String</code> - Draws the column's contents as text.
** <code>String</code> - Draws the column's contents as text.
** <code>Color</code> - Draws the column with a single hexadecimal colour. A rectangular box is filled inside the column:
** <code>Color</code> - Draws the column with a single hexadecimal colour. A rectangular box is filled inside the column:
*** '''RectWidth''' - The width of the box. If zero or unspecified, this will be the same as the column's width.
*** '''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.
*** '''RectHeight''' - The height of the box. If zero or unspecified, this will be the same as the row height.
*** '''ClipRectHeight''' - The height of the box where the colour is drawn. If zero or unspecified, then it's the same as the row height.
*** '''Alpha''' - The opacity of the coloured box. By default, this is 1.0 (fully opaque).
** <code>Texture</code>: Draws the column with a graphic or texture. The name of the graphic must be entered as a string.
** <code>Texture</code>: 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.
* 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.
* '''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>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.


=Example Images=
=Example Images=