Skip to content
Twine Cookbook
2.5.1
Initializing search
Twine Cookbook
Home
Cookbook Introduction
Cookbook Introduction
Using the Cookbook
Example Formatting
Style Guide
Common Questions
Common Questions
What can I make with Twine?
How do I get started?
How do I make links?
How do I style text?
Where are my stories saved?
What do I need to know?
Common Terms
Common Terms
Twine
Cookbook
Stories
Passages
Variables
Markdown / Markup
Macros
Story Formats
CSS
JavaScript
Twee
HTML
Twine 2 Editor
Twine 2 Editor
Story Listing
Passages View
Passages
Story Formats
Getting Started
Getting Started
First Story
Choosing Story Formats
Creating Links
Reviewing Stories
Publishing on Borogove.io
Publishing on Itch.io
Adding to IFDB
Working with HTML
Working with HTML
Reviewing HTML
Story Formats
Story Formats
Chapbook
Harlowe
SugarCube
Snowman
Working with CSS
Working with CSS
Reviewing CSS Selectors
Story Formats
Story Formats
Chapbook
Harlowe
SugarCube
Snowman
Working with JavaScript
Working with JavaScript
Reviewing JavaScript
Story Formats
Story Formats
Chapbook
Harlowe
SugarCube
Snowman
Twine 2 Examples
Twine 2 Examples
Adding Functionality
Adding Functionality
Chapbook
SugarCube
Snowman
Arrays
Arrays
Chapbook
Harlowe
SugarCube
Snowman
Audio
Audio
Chapbook
Harlowe
SugarCube
Snowman
Conditional Statements
Conditional Statements
Chapbook
Harlowe
SugarCube
Snowman
CSS Selectors
CSS Selectors
Chapbook
Harlowe
SugarCube
Snowman
Snowman (v2.0 and later)
CSS and Passage Tags
CSS and Passage Tags
Chapbook
Harlowe
SugarCube
Snowman
Sugarcane (1.4.2)
Cycling Choices
Cycling Choices
Chapbook
Harlowe
Harlowe (v3.0.1 or later)
SugarCube
Snowman
Date and Time
Date and Time
Chapbook
Harlowe
SugarCube
Snowman
Delayed Text
Delayed Text
Chapbook
Harlowe
SugarCube
Snowman
Deleting Variables
Deleting Variables
Chapbook
SugarCube
Snowman
Dice Rolling
Dice Rolling
Chapbook
Harlowe
SugarCube
Snowman
Dropdown
Dropdown
Chapbook
Harlowe (v3.0.1 or later)
Fairmath System
Fairmath System
Chapbook
Harlowe
SugarCube
Snowman
Geolocation
Geolocation
Chapbook
Harlowe
SugarCube
Snowman
Google Fonts
Google Fonts
Chapbook
Harlowe
SugarCube
Snowman
Sugarcane (1.4.2)
Headers and Footers
Headers and Footers
Chapbook
Harlowe
SugarCube
Snowman
Hidden Link
Hidden Link
Harlowe
SugarCube
Snowman
Images
Images
Chapbook
Harlowe
SugarCube
Snowman
External JavaScript
External JavaScript
Chapbook
Harlowe
SugarCube
Snowman
Keyboard Events
Keyboard Events
Chapbook
Harlowe
SugarCube
Snowman
Left Sidebar
Left Sidebar
Harlowe (both v1.x and v2.x series)
Harlowe (v2.1.0 or later)
SugarCube
Snowman
Limiting Number Range
Limiting Number Range
Chapbook
Harlowe
SugarCube
Snowman
Loading Screen
Loading Screen
SugarCube
Lock and Key (Variable)
Lock and Key (Variable)
Chapbook
Harlowe
SugarCube
Snowman
Looping
Looping
Chapbook
Harlowe
SugarCube
Snowman
Modal (Pop-up Window)
Modal (Pop-up Window)
Harlowe
SugarCube
Snowman
Modularity
Modularity
Harlowe
SugarCube
Snowman
Moving through a 'dungeon'
Moving through a 'dungeon'
Harlowe
SugarCube
Snowman
Sugarcane (1.4.2)
Passage Events
Passage Events
SugarCube
Snowman
Snowman (v2.0.2 or later)
Passages in Passages
Passages in Passages
Chapbook
Harlowe
SugarCube
Snowman
Passage Transitions
Passage Transitions
Harlowe (v3.0.1 or later)
SugarCube
Snowman
Snowman (v2.0 and later)
Passage Visits
Passage Visits
Chapbook
Harlowe
Harlowe (3.1 or later)
SugarCube
Snowman (v2.0.2 and later)
Player Statistics
Player Statistics
Chapbook
Harlowe
SugarCube
Snowman
Programmatic Undo
Programmatic Undo
Harlowe
SugarCube
Snowman
Render Passage to Element
Render Passage to Element
SugarCube
Snowman (2.0 or later)
Saving Games
Saving Games
Harlowe
SugarCube
Snowman
Setting and Showing Variables
Setting and Showing Variables
Chapbook
Harlowe
SugarCube
Snowman
Space Exploration
Space Exploration
Chapbook
Harlowe
SugarCube
Snowman
Static Healthbars
Static Healthbars
Chapbook
Harlowe
SugarCube
Snowman
Story and Passage API
Story and Passage API
Chapbook
SugarCube
Snowman
Storylets
Storylets
Harlowe (3.2 or later)
Style Markup
Style Markup
Chapbook
Harlowe
SugarCube
Snowman
Sugarcane (1.4.2)
Templates
Templates
SugarCube
Timed Passages
Timed Passages
Chapbook
Harlowe
SugarCube
Snowman
Timed Progress Bars
Timed Progress Bars
SugarCube
Snowman
Turn Counter
Turn Counter
Chapbook
Harlowe
SugarCube
Snowman
Typewriter Effect
Typewriter Effect
Chapbook
Harlowe
SugarCube
Snowman
Variable Style Styling
Variable Style Styling
Chapbook
Harlowe
SugarCube
Snowman
Using Add-ons
Using Add-ons
SugarCube
Twine 1
Twine 1
Common Terms
Common Terms
Passages
Links
Formatting
Tags
Story Formats
Special Passages
Scripts
Getting Started
Getting Started
Installing
Story Files
Story Map
Editing Passages
Working with Images
Proofing Work
Finding and Replacing Text
Why use code?
Expressions
Functions
Writing Macros
CSS
Twine and Twee
Browser Support
General Questions
Twine 1 Macros
Twine 1 Macros
back
button
checkbox
choice
display
else
endif
endsilently
forget
if
nobr
print
radio
remember
return
set
silently
textinput
Twine 1 Functions
Twine 1 Functions
alert
confirm
either
open
parameter
passage
previous
prompt
random
rot13
tags
turns
visited
visitedtag
Twine 1 Story Formats
Twine 1 Story Formats
Jonah
Jonah
Jonah
Common Questions
Sugarcane
Sugarcane
Sugarcane
Common Questions
Release Notes Archive
Release Notes Archive
Twine 2
Twine 2
2.6.2
2.6.1
2.6.0
2.5.1
2.5.1
Table of contents
Story Format Updates
2.5.0
2.4.1
2.4.0
2.3.16
2.3.15
2.3.14
2.3.13
2.3.12
2.3.11
2.3.10
2.3.9
2.3.8
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3.0
2.2.1
2.2.0
2.1.3
2.1.2
2.1.1
2.1.0
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
Twine 1
Twine 1
1.4.3
1.4.2
1.4.1
1.4
Table of contents
Story Format Updates
Twine 2.5.1
#
Release Date: Aug 28, 2022
Story Format Updates
#
Harlowe has been updated to 3.3.3.