Outils pour utilisateurs

Outils du site


en:yaml:tooltips

Ceci est une ancienne révision du document !


Language / Langue : FR | EN

Interactive Tooltips

Tooltips add a small help bubble directly inside a room text. On web and desktop interfaces, the player can hover or tap the word to reveal the content.

Syntax

text: "The {{door:?An old door covered in runes.}} blocks the way."

The text before ?: is the visible label. The content after ?: is shown inside the tooltip.

Tooltip content supports the usual text formatting: +n+, pictures ..., sounds «…», videos 1) and simple markdown depending on the interface.

Tooltip Bound To An Event

A tooltip can also reference a local event with !event_id.

text: "Inspect the {{statue:?It seems to watch you.:!statue_seen}}."

events:
  - id: statue_seen
    do: "statue_seen.=.1"
    text: "A mechanism clicks inside the wall."
    once: true

The event is triggered when the player interacts with the tooltip. The usual fields remain available: if:, visible-if:, disabled-if:, do:, to:, text: and once:.

Event Without A Bubble

If you only want to make a word interactive, without a tooltip bubble, use !event_id alone.

text: "Touch the {{gem:!gem_touched}}."

For explicit clickable elements, see also Clickable elements.

Conditions

  • visible-if: false: the word becomes normal text.
  • disabled-if: true: the word remains visible but inactive.
  • once: true: the event can only be triggered once.
  • once: room: the event can only be triggered once while the room is active.

On Discord and in the terminal, tooltips are not interactive like on the web: the text remains readable, but the visual interaction depends on the adapter.

Tooltips also work inside YAML frames/HUDs: they are rendered with current variables and refresh with the room.

Join us on discord Make&Play

1)
en/yaml/tooltips.1778116560.txt.gz · Dernière modification : de cyrilfiesta