Table des matières

Language / Langue : FR | EN

Sounds, Images and Videos (YAML)

Media can be used in narrative text, object descriptions and HUD panels.

Sounds

text: |
  The dragon roars! <<https://example.com/sounds/roar.mp3>>
  You take 10 damage.

Supported formats for linting and exports: .mp3, .ogg, .wav, .flac, .m4a.

<<3:https://example.com/sounds/alarm.mp3>>
<<0:https://example.com/sounds/music.mp3>>
<<stop>>

Images

text: |
  [[https://example.com/images/castle.png]]

Supported formats include .png, .jpg, .jpeg, .gif, .webp and .svg depending on the adapter/browser.

Videos (v4.10)

text: |
  ((https://example.com/videos/intro.mp4))

Recognized formats: .mp4, .webm, .mov, .ogv.

If the content does not look like a valid video, it remains normal text with its parentheses.

Video Options

Options go before the URL, separated with ; then :.

Option Effect
loop Loop playback.
autoplay Autoplay; the engine also forces muted.
muted Muted audio.
controls or controls=true Show controls. Default.
controls=false Hide controls. For a file, click play/pause still works on web and standalone. For a hosted video, playback starts on its own, muted: an iframe cannot be controlled by a click.
poster=url Poster image before playback. URL variables are accepted.
((loop:https://example.com/videos/ambience.mp4))
((autoplay;muted:https://example.com/videos/intro.mp4))
((poster=https://example.com/poster.jpg;loop:https://example.com/videos/scene.mp4))

Hosted videos

The same (( )) syntax also accepts a link to YouTube, Vimeo, Dailymotion or PeerTube. The service player replaces the built-in one, in the same place and with the same appearance as an ordinary video.

((https://www.youtube.com/watch?v=aqz-KE-bpKQ))
((https://vimeo.com/76979871))
((https://framatube.org/w/mnRs2Wm5cGqXcHbF))

Short and alternate forms are recognised: youtu.be, /shorts/, m.youtube.com, dai.ly, player.vimeo.com, and both PeerTube forms (/videos/watch/ and /w/) on any instance.

A link to a channel or a playlist is refused: the address must point to one precise video. The linter reports it.

Privacy. YouTube is called through its cookie-free domain and Vimeo receives dnt=1, with nothing to write on the author side.

Options. loop, autoplay, muted and controls=false are translated into the parameters of each service. Two exceptions:

Other platforms. Discord and the Terminal display the link, the Terminal also naming the platform. In an HTML5 export the video stays online: it is not embedded in the archive, and the report does not list it as missing. The export must therefore be served over HTTP or HTTPS, since hosted players do not work from a local file:// page.

Variables in URLs

Use {variable_name} inside sound, image and video URLs.

text: |
  [[https://site.test/images/{zone}.png]]
  <<https://site.test/sounds/{ambience}.mp3>>
  ((poster=https://site.test/posters/{clip}.jpg:https://site.test/videos/{clip}.mp4))

Media inside object descriptions

objects:
  - name: map
    location: table
    description: "A map of the kingdom.
[[https://example.com/images/map.png]]"
    pickup_text: "You take the map."

  - name: musical_key
    location: chest
    description: "A key that rings. <<https://example.com/sounds/key.mp3>>"
    pickup_text: "You take the key."

When the description is only an image URL [[url]], inspect <object> shows the picture directly.