Keybind (Badge Type)
Badge — an icon whose hover text names the key the power is bound to.
An icon in the origin-selection screen whose hover text has the player’s actual bound key substituted into it, so an active power advertises the right key even after the player rebinds it.
Type ID: origins:keybind — a badge type, and the one an inline badge entry defaults to when it has no type.
Needs the Origins mod. Badges are an Origins concept; core Apoli has no equivalent.
Fields
| Field | Type | Default | Purpose |
|---|---|---|---|
sprite | Identifier | required | Full path to the texture to draw, e.g. origins:textures/gui/badge/active.png. |
text | String | required | A translation key, not a literal. Its first argument (%s) is filled with the bound key name. |
key | String | key.apoli.primary_active | Which key to report. Match it to the power’s own key. |
texthere is a plain translation key string — unlikeorigins:tooltip, it is not a text component. A literal sentence will render as the raw key.
The key name arrives already wrapped in square brackets, so write the translation as Press %s to leap. and the player sees Press [SPACE] to leap.. If the key is unbound, %s becomes the “unbound” placeholder instead.
Examples
The power and its badge, bound to the same key:
{
"type": "apoli:action_on_key_press",
"key": { "key": "key.apoli.primary_active" },
"entity_action": { "type": "apoli:add_velocity", "y": 1.0 },
"badges": [
{
"type": "origins:keybind",
"sprite": "origins:textures/gui/badge/active.png",
"text": "badge.my_pack.leap",
"key": "key.apoli.primary_active"
}
]
} With badge.my_pack.leap in your language file:
{
"badge.my_pack.leap": "Press %s to leap into the air."
} You often don’t need to write one
An apoli:toggle or apoli:action_on_key_press power with no badges array gets a keybind badge automatically, using its own key. Write one by hand only when you want your own sprite or wording.