Skip to content

5. Header tags

rafa97sam edited this page Sep 27, 2023 · 30 revisions

Header tags can change the behavior of a header

Value expression

Set the expression that is used to calculate the value of the column.

header My Level
expr Level + 5

Alias expression

Set the expression that is used to determine the title of the category/header. Overrides alias tag

category 
expa  rgb(255, 255, 255)
header Fortress
expr a

Color expression

Set the expression that is used to calculate the background color of the column.

header Level
expc Level > 5 ? @green : @red
# You can also use a value calculated in expr
header EE
width 200
expr rgba(209, 20, 172,0.07)
expc this
format `{0}{1} nº1 <img src="https://cdn.discordapp.com/emojis/814927467776442369.png?v=1">`(this,5)

Format expression

Set the expression that is used to calculate the display value of the column.

header Level
format this + 5
# expf has the same effect (just different spelling)
header Level
expf this + 5
# format() function is especially useful
header Level
format format('Lvl {0} {1}', this, Classes[Class])
# Alternate syntax
header Level
format `Lvl {0} {1}`(this, Classes[Class])

Value conditions

Identical to value expression but simplified. Order matters ➜ first matching condition is applied

header Level
value above or equal 5 Big Level
value above 0 OK Level
value default Bad Level
not defined value Really Bad Level

Color conditions

Identical to color expression but simplified. Order matters ➜ first matching condition is applied

header Level
color above or equal 500 green
color above 400 @orange
color default red
not defined color darkred

Background

Sets the background color for the scope.

header Level
background red

Text

Sets the text color for the header via expression.

header Level
text Level > 500 ? @green : @red

Text Auto

Sets the text color automatically white/black for the header depending on the background color.

header Level
text auto

Order by

Sets the sorting expression for a given column.

# Order by custom expression
header Level
order by this * 55 - 5

# Order by difference
header Level
order by difference

Default Sorting

Specify the columns by which the table will sort itself when it loads up with glob order <asc|des> <[priority]>

#Sort the table by highest level and on tie sort by lowest HOF rank
header Level
glob order des 0
header Rank
glob order asc 1

Difference

Shows a difference in value if a compare file is set.

header Level
difference on

Hydra (Only for Awards header)

Shows whether player obtained the Dehydration achievement.

header Awards
hydra on

Flip

Flips the default sorting order and switches the sign of the difference if displayed.

header Level
difference on
flip on

Brackets

Shows difference within brackets.

header Level
difference on
brackets on

Statistics

Enables statistics to be displayed for this header.

header Level
statistics on

Statistics color

Disabling this will not apply any color to statistics

header Level
statistics color off

Maximum (Only for Knights header)

Shows a fortress level together with the amount of knights.

header Knights
maximum on

Grail (Only for Album)

Shows whether player has found the Holy Grail.

header Album
grail on

Decimal

Disables rounding for statistics for the header.

header Level
statistics on
decimal on

Clean

Ignores tags inherited globally or from a category

header Level
clean

Adding hard further ignores predefined tags applied on the header itself

header Level
clean hard

Width

Sets the width of the header.

header Level
width 150

Extra

Adds a custom text to the end of the value.

header Level
extra L

Visible

If disabled, it will set the font color to the background color.

header Level
visible off

Border

Creates a border around the header.

# Left border
header Level
border left

# Right border
header Level
border right

# Both borders
header Level
border both

Align

Aligns the content of the header

# Left
header Level
align left

# Right
header Level
align right

# Center
header Level
align center

You can also align the title of the header independently by doing: align <content alignment> <title alignment>

# Content on the left and title on the right
header Level
align left right

Format difference

Enables or sets special formatting for a difference

# Uses the format tag to format the difference
header Level
format this + 5
format difference on

# Uses custom format
header Level
format difference this + 5

Format statistics

Enables or sets special formatting for a statistics

# Uses the format tag to format the statistics
header Level
format this + 5
format statistics on

# Uses custom format
header Level
format statistics this + 5

Action show

Enables the info popup for the cells in the header's column

header Name
action show

Breakline

Disables the default behavior of breaking lines when there are spaces and the width is insufficient.

header Name
breakline off
width 10

Difference Below

Forces the difference to be displayed on a new line always.

header Name
difference on
difference position below

Padding

Shorthand for style padding-left. Adds blank space before the text in the element. Accepts lengths.

header Name
padding 13px

Style

Styling tag that brings the power and liberty of CSS to your element. It's too wide to give in depth guidance but go ham at it with this references basic and all. Expect some properties to not work or not work as intended.

Syntax goes as follows style <property-name> <property-string> where property string is any valid CSS string for that property.

# red thick border as in https://www.w3schools.com/csS/css_border_shorthand.asp
header Name
style border solid red 5px

Push

If you want to strip some tags on the fly, you can force push the current header / row / statistic as is.

header Level
difference on
push
background red

# The column will display the difference but won't be colored red