Placeholders & Live Text
What resolves, where
| Placeholder | Meaning |
|---|---|
%player% | The viewing player's name — works even without PlaceholderAPI |
%any_papi_placeholder% | Everything from PlaceholderAPI + its expansions (if installed) |
%nxgui_<key>% | The live value of a named element — an input box's typed text, a slider/toggle state |
%state% / %value% / %valueRaw% | Inside element commands only: toggle/checkbox state · slider 0–100 · slider exact 0–1 |
Placeholders work in text elements, element commands, logic text inputs, head/model sources, and open requirements.
Refresh cadence
Open screens re-resolve placeholders every placeholders.refresh-seconds (default 20). Override per screen in its settings — 0 = only on open. For a single fast-updating label, prefer an Every X Seconds → Set Element Text loop over cranking the whole screen's rate.
The anchor problem (and fix)
In-game text is centered on its position, so when %balance% changes from 100 to 1,000,000 the text grows in both directions and the left edge drifts. Set the text's Placeholder anchor to Left (or Right for right-aligned columns) and NxGui pins that edge on every refresh — stat rows stay perfectly aligned. Design canvas always shows the literal design text; anchoring is runtime behavior.
Design for variable width
- Placeholders are measured at their literal design length — leave room for the longest realistic value.
- Two-column stat grids beat three-column when values can be long.