Skip to content
◆ TTS-STUDIO docs Discord

Plugins / HudForge

Conditions, math and bars

Three ways to make a line follow the player's numbers.

A line that only shows when something holds

Write the line as a map with text and when. While the condition fails the line is left out and the ones below move up; a blank line would still take the space.

lines:
  - "<#C879FF>❙ <white>%hud_player%"
  - text: "<#5B3A6E>   faction <white>%df_faction_name%"
    when: "%df_faction_name%!=none"
  - text: "<#5B3A6E>   money <white>%hud_balance%"
    when: "%hud_economy%"

when is a comparison (>=, <=, !=, ==, >, <; numbers compare as numbers) or a bare value that reads as true (true, 1, yes). It works on sidebar lines, TAB header and footer lines, and boss bars:

bossbars:
  low-health:
    text: "<red><bold>Low health!</bold> <white>%hud_health%/20"
    color: RED
    progress: "%hud_health%/20"
    when: "%hud_health%<=6"

%hud_economy%, %hud_ranks% and %hud_papi% answer true or false, so a line that needs a plugin can hide when it is not there instead of printing the raw placeholder.

Math

<math:expr> computes with placeholder values: + - * / %, parentheses, and min max round floor ceil abs. The last number sets the decimals (two by default; whole numbers print whole).

- "<#5B3A6E>   level <white><math:floor(%player_total_experience%/100)>"
- "<#5B3A6E>   next <white><math:(660/100)*%player_level_percent%:1>%"

A formula that does not compute (a placeholder that answered with text) prints ?. Boss bar progress: accepts formulas too.

Bars

<bar:value:max:width> draws a row of characters whose filled part follows the value:

- "<bar:%hud_health%:20:10>"
- "<bar:%hud_health%:20:10:▰:▱:#6BFF9E:#5B3A6E> <white>%hud_health%<#5B3A6E>/20"
- "<bar:%player_level_percent%:100:20:|:|:green:dark_gray>"

After the width come the filled character, the empty character, the colour of the filled part and the colour of the rest (#hex or a MiniMessage colour name). The defaults are , and the studio purples.

Keep reading