ActionHint
Client only. 'Press [key] to ...' hints drawn by the game's HUD. A hint sits on one of the game's controls, primary_action, attack_special, torch, companion_interaction, distract or jump, or on script_action (U), a free key KCDS keeps for scripts. With several on a control, the newest shows and takes input, and removing it reveals the previous one. Press and hold hints are kept separately, so a tap runs one and a hold the other. An enabled hint takes over its key, so the game's action does not run while it shows, and E puts nothing down and starts no talk. Hints show while the player controls their character.
actionHint.create()
ActionHint.create(options, handler)Shows a hint and returns its id. The handler runs with the id when the player presses or holds it. While enabled, the game's own prompts on that key, such as Talk, Loot and Pickpocket, are not drawn beside it.
actionHint.setText()
ActionHint.setText(id, text)Changes a hint's text.
actionHint.setEnabled()
ActionHint.setEnabled(id, enabled)Enables a hint, or greys it out so that it takes no press.
actionHint.remove()
ActionHint.remove(id)Removes a hint.
actionHint.keys()
ActionHint.keys()The controls a hint can sit on.
actionHint.shown()
ActionHint.shown()All hints the HUD is drawing, in its order, including the game's and interaction prompts such as cooking, opening a door and talking, from all resources. Each is { key, map, text, mode, enabled, progress, target }, as of the game's last hint change, at most a tenth of a second old. `key` is a resource hint's control or a game hint's action, such as 'trigger_use' or 'talk'. `map` is the action map, 'player' for prompts in the world. `text` is the label in the player's language. `mode` is 'press' or 'hold'. `enabled` is false when greyed out. `progress` shows how far a hold hint's ring has filled, 0 to 1. `target` is currently ''. actionHintsChanged fires when the set changes.
actionHint.shownKeys()
ActionHint.shownKeys()Each control or action with a drawn hint, once, including the game's prompts. Empty when none is drawn.
actionHint.isKeyInUse()
ActionHint.isKeyInUse(key)True while any hint shows on this control or action, whoever put it there. Use it to avoid a key that a game prompt needs.