Twine

A great way to tell interactive
stories
Download
http://gimcrackd.com/etc/src/
Choose Your Own Adventure++

with macros!
Passages
● A section of writing
● A route
Twine passages are both
Ye Olde Passage
Your feet are swollen.
Continue walking (turn to page 20)
Pass out (turn to page 42)
Hyperlinks
Your feet are swollen.
● Continue walking
● Pass out
Pass Out
You pass out, animals come by and lick you.
Continue Walking
You keep walking, your feet begin to bleed.
In Twine, we link like this
Open [[door]]
^--- goes to passage “door”
Open [[The Door|door]]
^--- goes to passage “door” displays
The Door
Formatting
italics
bold
underline

//text//
‘‘text’’
__text__

bullets

*one
*two

numbered

#one
#two
Special Passages
StoryTitle
StorySubtitle
StoryAuthor
These don’t link to anything, they just float
there in space when you’re in Twine.
Story Formats
● Sugarcane - One passage at a time, hides
the rest
● Jonah - Timeline of passages
Forcing Choices
<<choice “Try to escape”>>
<<choice “Attack”>>
<<choice “Crap your pants”>>
When you do this, it will disable all the other
choices in that passage.
Reusing Text
<<display “Inn”>>
<<display “Drink”>>
Shows the passage Inn and Drink
Actions
You see 2 fair maidens
<<display “maidens actions”>>
In passage maidens actions…
<<actions “the blonde” “the brunette”>>
Variables
$nameOfVariable
<<set $myVariable = “yes”>>
<<set $ammunition = 100>>
<<set $ammunition = $ammunition + 1>>
Conditions
<<if $myVariable eq “yes”>>
You have my variable!
<<else>>
You don’t have my variable
<<endif>>
Conditions
<<if $ammunition lt 1>>
No more ammo!
<<else>>
You fire a shot
<<set $ammunition = $ammunition - 1>>
<<endif>>
Conditions
eq
neq
gt
gte
lt
lte

Equal
Not Equal
Greater Than
Greater Than or Equal To
Less Than
Less Than or Equal To
Multiple Conditions
and
or
not
<<if ($myVariable eq “Zanzibar”) and
($ammunition gt 1>>
<<if ($myVariable eq “Yellow”) or ($ammunition
lt 100>>
Silently
Every time a macro runs, it’ll use a line. You
can remove those lines by encapsulating
macros with
<<silently>>
<<endsilently>>
Images
[img[filename.png]]
[img[http://www.yahoo.com/image.png]]
Publishing
● Build your story, save it as index.html
● Upload index.html and any images into a
folder onto a web server
I Can Haz Custom Theme?
Sure, use CSS
http://gimcrackd.com/etc/doc/#customizing,
appearance

Twine Workshop