HUD

Usage guide of the HUD kits: hud.action, hud.open_world, hud.moba, hud.nameplates, hud.minimap and hud.tactical: what each shows, settings and defaults, scenes, modding, engines.

Source: module-kits:kits/hud_action/usage/en.mdView Markdown source

Also read offline — CLI: grip-forge docs hudMCP tool: gripforge_docs { "topic": "hud" }

HUD kits (hud.*) #

The overlay drawn over a game: health, objectives, mini-map, hero bars. Readable offline: gripforge docs hud, or the MCP tool gripforge_docs (topic hud). Menus, theme, prompts and the end screen are in ui-screens; the HTML page layer is ui-webui.

What it is for #

A HUD kit is a view (role view): it decides nothing of the game. It publishes which elements to show (hud.show.<element>), keeps the small state of the overlay (a kill feed, a banner) and raises toasts (hud.notify); the host application draws it. Each kit reads the state and events of the kits it is made for and shows an element only when the variables it reads are defined.

KitForRequires
hud.actionan action roguelike: health, dash, special, boons, boss, room, wave, money, damage numbers, boon offercombat.health
hud.open_worldan open world: objective, wanted stars, speedometer, interaction prompt, moneymission.run
hud.mobaa lane game: score and clock, hero bar, abilities, items, shop, allied frames, kill feed, announcementsmoba.match
hud.nameplatesMOBA hero bars above the characters: name, level, segmented health, manamoba.match, moba.controls, combat.health
hud.minimapa world-space mini-map for any gamenothing besides game.engine
hud.tacticalthe editable layout of a team shooter HUD (roster, clock, health, equipment, objectives, results)nothing besides game.engine

hud.action, hud.open_world and hud.moba are mutually exclusive main HUDs (one per project). hud.minimap, hud.nameplates and hud.tactical sit beside them.

Turn it on #

gripforge_gamekit_install   { project_id: "gkp_…", id: "hud.action" }
gripforge_gamekit_configure { project_id: "gkp_…", id: "hud.action", config: { "healthStyle": "minimal", "lowHealth": 0.25 } }

Only the keys that differ from the defaults need to be written. A new game gets the HUD of its genre from the generator; the full reference of a kit is gripforge kit api <id>.

Settings and defaults #

hud.action #

KeyDefaultMeaning
showevery elementelements drawn: health, dash, special, boons, boss, room, encounter, money, damage_numbers, offer
lowHealth0.3health ratio under which hud.low_health is raised
healthStylebarbar (built-in plate), frame (an image frame), minimal (slim themed bars, no panels)
healthLabelemptythe line above the bar; {name} is the name of this machine's player (coop.session)
healthFillRange[0, 1]with frame: the part of the fill image's width the health covers
partynoneframe (with healthStyle: "frame") also draws the other players of a coop party
chapteremptytop-left panel { eyebrow, title, text }; with a title, the room line sits under it
actions[]buttons at the bottom centre, shown only, never clicked through to the game
hintemptyone discreet line of text; never keys or controls (an audit flags and a migration empties it)
moneyFormatemptyempty: the money plate at the top right; otherwise a discreet line from this text, {n} being the amount
loadingBarfalsea thin bar while asset.preload loads the rest of the game behind it

Elements read vars such as player.health, dash.charges, boons.owned, boss.*, room.*, encounter.*, run.money. Toasts come from boon.acquired, room.cleared, door.unlocked, encounter.wave, boss.phase and run.ended. The boon offer is answered by the actions hud.choice_1 to hud.choice_4 (keys 1 to 4 by default, rebindable) or a click. Service hud.action: notify(text, { seconds?, style? }), shown(element), setShown(element, visible), loading(lang), frame().

hud.open_world #

KeyDefaultMeaning
showobjective, wanted, speed, prompt, moneychannels drawn; one whose variable no kit defines stays hidden
layout.elements[]chrome elements { id, slotId?, label?, anchor, width, height?, inset? }

Channels are bound with state.bind, so nothing polls: mission.objective.label, wanted.level, vehicle.speed (only while driving), interaction.prompt, economy.money. The slot hud_skin takes panel chrome. Service hud.bind (exclusive): channels(), notify(text, seconds?, style?). Quest markers (instances whose state quest_available is true) are listed by hud.bind.markers() and counted in hud.markers.

hud.moba #

KeyDefaultMeaning
showall elementsscore, hero, abilities, items, stats, shop, team, feed, announcements, respawn, minimap
feedSize5lines kept in the kill feed
feedSeconds8seconds a feed line stays
announceSeconds3.5seconds a banner stays

Ability and item icons are slots moba_ability_icon:<ability id> and moba_item_icon:<item id>. The shop opens with the input action moba.shop, which the player rebinds. The feed (hud.moba.feed, a JSON array of { text, team, until }) and the banner (hud.moba.announce) are saved. Banners come from moba.wave, moba.structure.destroyed, moba.hero.killed, moba.victory.

hud.nameplates #

visible, showName, showMana, showLevel (all true), width (160 px, 100 to 240), healthTicks (8 segments, 0 for none), offsetY (0.45 m above the hero), avoidOverlap (true) with maxShift (150 px), playerName (the local handle, else the champion name) and the four colours allyColor, enemyColor, playerColor, manaColor. Service: snapshot() (rows with id, name, team, level, health and mana) and setName(entityId, handle) for a session name (not saved). Dead and stealthed enemies are omitted; allies in bushes stay visible. Minions and structures keep their simple bars.

hud.minimap #

KeyDefaultMeaning
visibletruedraw the map
modeoverviewoverview of the whole world or follow the player
orientationnorthnorth up or player heading up
shapecirclecircle or square
zoom, range1, 100zoom 0.5 to 4; metres across the view in follow mode at zoom 1
playerTagplayertag of the entity drawn as the player
markerTagsracer, objective, markertags of the entities drawn as markers
playerColor, markerColor#ff934b, #fff3d9colours
zonefalsedraw the zone of a zone kit (the storm edge now and where it goes)

Routes are documents of minimap_layers: { id, points: [{ x, z }…], closed?, color?, width? }. An entity becomes a marker with the component map_marker { kind: "actor" | "objective", color?, label? }. Service (exclusive): snapshot(), configure(options), setLayer / removeLayer, setMarker / removeMarker, follow(entity), click(x, z, button). A click is told to the game as minimap.clicked (camera jumps, orders).

hud.tactical #

themeId (harbor, gothic, neon, minimal; default minimal) and document (a HUD Studio v2 document; empty uses the tactical template). brief, conceptItem, conceptHash and studioHud hold the optional concept image and the Studio document it came from. Service: document() returns the layout, concept() the concept image id or null. It owns no rule: the page fills the document with the match snapshot, and widgets the game does not support stay hidden.

Scenes #

A scene whose ui.hud names another HUD kit turns this one off (hud.active false and every hud.show.* false). layers["hud.action"].show (or the same for hud.open_world, hud.moba) lists the elements of one scene over the config. hud.scene holds the scene title (through i18n.text when it is a key), else its id. Entering a scene clears the MOBA feed and banner.

Hooks and modding #

The HUD kits are views, so none declares a hook: the decisions behind what they show (damage, a tower falling, a purchase) have their own hooks in the kits that take them. Texts and toast durations are not config: the texts go through i18n.text (hud.action.<key>, hud.open_world.<key>), which a game translates or rewrites. A mod may override the config keys (all listed above, except hud.nameplates playerName) and add documents to minimap_layers.

{ "schema": "gripforge.mod/1", "id": "slim_hud", "name": "Slim HUD", "version": "1.0.0",
  "requires": { "hud.action": "^1" }, "config": { "hud.action": { "healthStyle": "minimal", "show": ["health", "boss", "money"] } } }

Engines #

KitWhere it is drawn
hud.action, hud.open_world, hud.minimapthe web player (React overlay), and the native player, Godot, Unity and Unreal deliveries
hud.moba, hud.nameplates, hud.tacticalweb and native player

When it does not do what you expect #

SymptomCause and fix
An element does not showthe vars it reads are not defined by any installed kit, or it is missing from show
Two HUDs fightthe main HUDs are exclusive: a scene ui.hud names the one that draws
Keys appear on screenthe HUD never shows keys; use ui.prompts in a tutorial and Options > Controls
Markers are missing on the mini-mapthe entity has no map_marker component and none of the markerTags
The loading bar never appearsloadingBar is false, or asset.preload is not installed