Hud
constHud:object
Defined in: client/api.d.ts:3300
The mod’s own world-anchored interaction prompt, plus visibility control over the game’s HUD groups. Group visibility is the tool for hiding UI for a moment; Settings.setHud writes the player’s own HUD preferences and is only for a settings panel.
Type Declaration
Section titled “Type Declaration”groups()
Section titled “groups()”groups():
string[]
Every HUD group name the game knows, read straight off its own UIHUDGroups table rather than a baked copy, so it stays correct across game patches. Available from startup — it does not wait for the HUD.
Returns
Section titled “Returns”string[]
hideGroup()
Section titled “hideGroup()”hideGroup(
group):boolean
Hides one HUD group for as long as the mod holds it. This is the right tool for a cutscene or a duel: it stacks per owner alongside the game’s own hides and leaves the player’s Settings.getHud() choices untouched, so nothing has to be restored. Every group hidden this way is shown again on disconnect.
Parameters
Section titled “Parameters”string
A name from groups().
Returns
Section titled “Returns”boolean
hidePrompt()
Section titled “hidePrompt()”hidePrompt():
void
Hides the interaction prompt.
Returns
Section titled “Returns”void
setVisible()
Section titled “setVisible()”setVisible(
visible,allowSelectiveTicking?):boolean
Toggles the entire HUD through UIManager. Unlike hideGroup this is NOT provider-scoped — it is one global flag, so two callers fighting over it will clobber each other, and it is not restored on disconnect.
Parameters
Section titled “Parameters”visible
Section titled “visible”boolean
false hides the whole HUD.
allowSelectiveTicking?
Section titled “allowSelectiveTicking?”boolean
Lets the game keep ticking parts of the hidden HUD (default true).
Returns
Section titled “Returns”boolean
showGroup()
Section titled “showGroup()”showGroup(
group):boolean
Releases the mod’s hold on a group. The group stays hidden if the game itself is also hiding it.
Parameters
Section titled “Parameters”string
A name from groups().
Returns
Section titled “Returns”boolean
showPrompt()
Section titled “showPrompt()”showPrompt(
key,label,x,y?,z?):void
Shows a floating “[key] label” prompt anchored at a world position, re-projected each frame. Only one prompt at a time; hides itself when off-screen.
Parameters
Section titled “Parameters”string
The key glyph shown (e.g. “F”).
string
The prompt label text.
number | Vector3Like
World-space X anchor.
number
World-space Y anchor.
number
World-space Z anchor.
Returns
Section titled “Returns”void
showPromptOn()
Section titled “showPromptOn()”showPromptOn(
entityKind,networkId,key,label,heightCm?):boolean
Shows the interaction prompt over an entity’s body and follows it every frame, replacing any prompt shown. It hides itself once the entity has no body here (streamed out or destroyed). False when it has none of that kind now.
Parameters
Section titled “Parameters”entityKind
Section titled “entityKind”"beast" | "player" | "npc" | "worldObject" | "character"
networkId
Section titled “networkId”number
The entity’s id.
string
The key glyph shown (e.g. “F”).
string
The prompt label text.
heightCm?
Section titled “heightCm?”number
Above the body’s origin; 110 by default.
Returns
Section titled “Returns”boolean