Skip to main content

Keybind (Badge Type)

An icon in the origin selection screen whose hover text includes the key the player has actually bound, so an active power shows the right key even after the player rebinds it.

Type ID: origins:keybind

An inline badge entry with no type gets this type.

note

Badges come from the Origins mod, and core Apoli has nothing like them.

Fields

FieldTypeDefaultDescription
spriteIdentifierrequiredThe full path of the texture to draw, such as origins:textures/gui/badge/isaacfanta/active.png.
fallbackIdentifier or Array of identifiersoptionalTextures to draw when sprite isn't in any loaded resource pack. The first one that exists is used.
textStringrequiredA translation key, not literal text. Its first argument (%s) is filled with the bound key's name.
keyStringkey.apoli.primary_activeThe key to report. Match it to the power's own key.
warning

text here is a plain translation key string, unlike origins:tooltip, where it is a text component. A literal sentence renders 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

{
  "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/isaacfanta/active.png",
      "text": "badge.my_pack.leap",
      "key": "key.apoli.primary_active"
    }
  ]
}

The power and its badge use the same key. 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 power, or any other power with a key field such as apoli:action_on_key_press, gets a keybind badge automatically when it has no badges array, using its own key (see automatic badges). Write one by hand only when you want your own sprite or wording.