Astral Realms Documentation Help

Placeholders

AstralHud registers three ComplexPlaceholder namespaces, all backed by the in-memory cache ImageManipulationService builds from image-manipulation.yml on load. For the placeholder syntax itself (%a_b_c%, %a_{b_c}%, $e(...)) see Placeholders.

Namespace

Backing class

Path tokens required

imgmanip

ImageManipulationPlaceholder

1 — the manipulation id

imgprovider

ImageProviderPlaceholder

3 — id, amount, upper bound

stringprovider

StringImageProviderPlaceholder

2 — id, lookup value

All three return null (rendering as nothing) on any lookup miss — unknown id, missing amount, or a value outside the cached range — rather than throwing.

%imgmanip_<id>_<amount>%

Renders one of a manipulations entry's pre-built, repeated-glyph images.

Path token

Description

<id>

The manipulation's id in image-manipulation.yml. No match → null.

(rest of the path)

Consumed as the amount placeholder wrapper and resolved against the current placeholder function — usually a nested placeholder like %imgmanip_hp-bar_player_health%, but a literal number also works.

Resolution: the resolved amount is rounded to the nearest int (Math.round). If it falls outside the entry's lower-bound/upper-bound (inclusive), the placeholder returns null. Otherwise it returns the pre-built Component for that exact amount from ImageManipulationService's cache — the element string repeated that many times.

# image-manipulation.yml manipulations: - id: "hp-bar" element: "<red>■" amount: "%player_health%" lower-bound: 0 upper-bound: 20
lore: - "%imgmanip_hp-bar_player_health%"

Note the amount field in image-manipulation.yml is not actually consulted for the manipulation's build-time behavior (the cache is built for every integer in the bound range regardless of what amount says) — it only matters at render time, and only as a default; a placeholder call can supply a different amount expression in its own path, as shown above.

%imgprovider_<id>_<amount>_<upperBound>%

Renders a value from an image-provider lookup table, rescaled from an arbitrary <amount>/<upperBound> pair onto the table's own index range. Requires at least 3 remaining path tokens; fewer returns null.

Path token

Description

<id>

The image-provider map key. No match → null.

<amount>

Resolved as an Integer placeholder wrapper.

<upperBound>

Resolved as an Integer placeholder wrapper — the caller's own max value for <amount> (e.g. a max-health stat), not necessarily related to the table's own key count.

Resolution: the table for <id> must already contain a literal entry keyed by <amount> — if it doesn't, the placeholder returns null regardless of <upperBound>. Otherwise, <amount> is rescaled onto the table's size (ceil(amount / upperBound * tableSize), clamped to [0, tableSize - 1]) and that rescaled index is what's actually returned. In effect, <amount> is checked directly against the table's own keys as a presence gate, but the value returned comes from the rescaled index — keep the two consistent (e.g. only call this with <amount> values that also exist as literal table keys) to get predictable output.

# image-manipulation.yml image-provider: compass: 0: "<gray>↑" 45: "<gray>↗" 90: "<gray>→"
actionbar: "%imgprovider_compass_player_direction_360%"

%stringprovider_<id>_<value>%

Renders a value from an image-provider-string lookup table by exact string key. Requires at least 2 remaining path tokens; fewer returns null.

Path token

Description

<id>

The image-provider-string map key. No match → null.

<value>

Resolved as a String placeholder wrapper and looked up verbatim (case-sensitive) in that table. No match → null.

# image-manipulation.yml image-provider-string: rank-icon: "vip": "<gold>★" "default": "<gray>☆"
lore: - "%stringprovider_rank-icon_parameters_rank%"

See also

Last modified: 25 July 2026