How to write a passage
Write the text
Section titled “Write the text”-
Double-click a Narration node to open its editor.
-
Write the passage. To make a sentence vary instead of forking into two passages, put Python in an inline
{{ … }}span or a fenced```rippleblock. See How to run Python in a story.
Add a picture
Section titled “Add a picture”- Drop a file on the editor. The link writes itself.
- Click Image, beside Link. Type a few letters to pick a project file by name, or give a URL or a path for anything outside the folder.
A picture picked from outside the project is copied into .ripple/external/ first. If Import outside assets is switched off in the File menu, it is linked instead and Messages says so. The alt text and prompt behaviour are in Passages, choices, languages and reading time.
Write a link by hand
Section titled “Write a link by hand”Start the path with a slash to measure it from the project root, as in . Without a slash it is read from the bundle’s parent folder. The rules and an example are under Link spellings.
Hand a passage values to read
Section titled “Hand a passage values to read”-
Click the Reads row at the bottom of the card, beside the soundscape the node brings. It reads “Reads nothing — click to declare” until a name is declared, then “Reads — N”.
-
In the dialog, declare each name with a type, written the way every other card’s ports are. A slot may carry a default; the types and defaults are in Node families, slots and state.
-
Wire a value into the port the card now has for each name.
-
Use the name in the passage:
You owe {{ gold }} crowns.with a number on thegoldport. A slot with a default and nothing wired uses the default.
Declare the names on each card that shows the passage: they belong to the card, not to the passage file (see Passages and translations).
If a name is not wired, a small warning shows where it stood and the rest of the passage renders as usual. Names are offered as you type only when the passage is opened from a board.
Name a slot
Section titled “Name a slot”Use letters, digits and underscores, and do not start with a digit. If the dialog refuses a name, the reason is shown under the field. The full rule is under Name rule. If Messages reports W.GE.15, rename the slot.
Related
Section titled “Related”- Passages and translations: why a passage is a folder of Markdown files, one per language.
- Passages, choices, languages and reading time: link and name rules, the reading-time figures.