Hud

Client only. The game's HUD messages and elements, screen effects and tutorial hints on this player's screen. With no HUD, such as in the main menu or during a level load, message calls show nothing and return false.

hud.inConversation()

Hud.inConversation()

Whether the player is in one of the game's own conversations, not a server Dialogue.

hud.showNotification()

Hud.showNotification(message)

Shows a line in the game's notification log.

hud.showBanner()

Hud.showBanner(message, durationMs, priority)

Shows the game's info text mid-screen.

hud.hideBanner()

Hud.hideBanner()

Hides the info text.

hud.notifyPerkUse()

Hud.notifyPerkUse(iconName, name)

Shows the game's 'perk used' notice.

hud.notifyPerk()

Hud.notifyPerk(iconName, name)

Shows the game's 'perk gained' notice.

hud.notifyCombo()

Hud.notifyCombo(iconName, name)

Shows the game's 'combo learned' notice.

hud.notifyReputation()

Hud.notifyReputation(eventId, message)

Shows the game's reputation notice.

hud.notifyEventResult()

Hud.notifyEventResult(type, result, name)

Shows the game's random-event result.

hud.notifyXp()

Hud.notifyXp(stat, statName, type)

Shows the game's XP bar for a stat or skill.

hud.showTutorial()

Hud.showTutorial(name)

Shows one of the game's tutorials by name.

hud.hideTutorial()

Hud.hideTutorial(name)

Hides one of the game's tutorials.

hud.closeTutorial()

Hud.closeTutorial()

Hides whichever tutorial is showing.

hud.hideCodexHint()

Hud.hideCodexHint()

Hides the codex action hint.

hud.clearNotifications()

Hud.clearNotifications()

Clears the notification log.

hud.setHudPart()

Hud.setHudPart(name, visible)

Hides or shows a HUD element while your resource runs: Compass, Stats, QAMWeapon, QAMFood, Subtitles, InfoText, GameLog, Hints, DialogLeft, DialogRight, Cursor, Crime, Wanted, PopUpBackground, TutorialMessage, FancyEvent, SkillCheck, ItemTransfer, Buffs, CommonEvent, DiceCursor, Trespassing, RatioStrips, ShootingContest, Bubbles, TutorialInDialog, DiceContainer or Vignette. An element stays hidden while any resource hides it.

hud.hudPartShown()

Hud.hudPartShown(name)

Whether no resource is hiding an element.

hud.setInnerVoice()

Hud.setInnerVoice(enabled)

Lets the player's character speak the game's remarks, which are off by default on KCDS.

hud.innerVoiceOn()

Hud.innerVoiceOn()

Whether the character's remarks are on. False by default.

hud.setCutscenes()

Hud.setCutscenes(enabled)

Lets quests' story cutscenes play on this player's screen for the session. By default on KCDS, each is skipped, the quest continues as if it had played, and storyCutsceneSuppressed fires. Fast travel, sleeping and waiting always play. A skipped cutscene does not play later.

hud.cutscenesOn()

Hud.cutscenesOn()

Whether story cutscenes play. False by default.

hud.setHorseCompare()

Hud.setHorseCompare(enabled)

Sets whether the horse inspect screen shows the player's horse beside the one looked at.

hud.isHorseCompare()

Hud.isHorseCompare()

Whether the horse inspect screen shows the player's horse beside the one looked at. On by default, and again each session.

hud.effectList()

Hud.effectList()

The screen effects with their parameters, ranges and defaults: colorGrade (saturation, brightness, contrast, cyan, magenta, yellow, darkness, hue), and blur, ghosting and screenBlood (amount).

hud.startEffect()

Hud.startEffect(effect, params, options)

Adds a full-screen effect over this player's picture and returns its handle. Effects combine: brightness, contrast and saturation multiply, casts and hue add, and blur, ghosting and blood take the strongest. They end when your resource stops or the level changes.

hud.changeEffect()

Hud.changeEffect(handle, params, options)

Changes an effect's parameters.

hud.endEffect()

Hud.endEffect(handle, options)

Removes an effect.

hud.endAllEffects()

Hud.endAllEffects()

Removes all effects your resource added.

hud.effectRunning()

Hud.effectRunning(handle)

Whether an effect is still on.

hud.worldToScreen()

Hud.worldToScreen(point)

A world point's place on the screen in pixels, as { x, y, onScreen }. Null before the camera is known, which the first call starts, or for a point behind the camera.

hud.showTutorialHint()

Hud.showTutorialHint(options)

Shows the game's tutorial box at the top left with your content, and returns its id. $action; tokens in the text are drawn as the key bound to that action.

hud.hideTutorialHint()

Hud.hideTutorialHint(id)

Hides your tutorial hint.

hud.isTutorialHintShown()

Hud.isTutorialHintShown(id)

Whether a hint is showing, or any of yours if no id is given.