Twinery.org

No I’m not a developer for Twinery, just someone who thought it might be useful for others.

So you want to build your own text-adventuring system from the ground up? Well, I don’t know if I’ll be able give you everything to make it the most interactive experience possible, but I did play around with Twinery enough to get a few features down that are necessary for making such a game.

Why Twinery? Twinery can be used for text-adventuring, pick your own stories, or even just to visualize non-linear story telling in a better way so you have a digital cork board to place all of the information and keep track of it in a more manageable way.

I’ll be using the syntax found in the wiki for Harlowe Twinery 2.0 found here (http://twine2.neocities.org/), incase you find this dull.

01_HomeScreen

The Passage

02-Empty Passage

The Passage is your sticky note, place where you keep some sort of information. It can reference which sticky note to go to next (goto note 10) or it can reference other notes to paste information on top of the current sticky note.

So get some information down on it.

:: My First Page

This is some non-interactable text

[[This clickable link goes to a different page]]

[[Another Clickable Link|Page3]]

03-My First Passage

04-Effects of my passage

Set the passage as your “Starting Point”

05-Set Start Point

And see what you’ve created by hitting the “Test” button.

06-My First Story Visualized

Now to annotate what’s going on in this blob of text

03-My First Passage _ small

 

This is some non-interactable text

This is literally text that is just printed to the screen, nothing special.

[[This clickable link goes to a different page]]

This is called a link. It will display “This clickable link goes to a different page” and make the text clickable, going to a passage named “This clickable link goes to a different page”

[[Another Clickable Link|Page3]]

This is also a link; however, the displayed name and the page that it goes to will be different.

The text display with be “Another Clickable Link”, while the passage it goes to will be named “Page 3”

06-My First Story Visualized

You now have the basic for a pick your own adventure-style text story. Gratz. For a text-adventure GAME, though, you’re going to have to keep on reading.

More than a single passage

So Passages are more than just moving from one sticky note to another; they can be something more, a composition of other passages. This way you can reuse passages from other sections depending on the circumstances that lead you to the current passage, or have other passages meant to keep track of things like where you are, what you have in your inventory, stats for the other characters and such. Essentially, you can delegate certain passages to a task and just call to use this passage every so often so you don’t have to copy and paste every time you want to use such a passage.

::My Character

My name is Joe

07-My Character

Make a new “Passage”

08-Making the next one

::The Scene (Set to Start Point)

(display: “My Character”)

*Looks like someone has entered the Scene*

09-The Scene 1

To test your scene:

 

10 - Test from here

This is what it looks like.

11-The Scene Visualized 1

What’s going on is that when “The Scene” run’s

(display: “MyCharacter)

it looks up the Passage “My Character’ and overlays it on top of “The Scene” and then continues on to print the rest of “The Scene”‘s text.

This is a bit closer to what you’re aiming for, having passages delegated for certain roles, either for a scene or a person or a place.

Now we can actually have “My Character” store some information about himself. Important information like a name, some health points, maybe even a weapon

::My Character

(set: $sword to (datamap: “name”, “sword”, “atk”, 1))

(set: $myCharacter to (datamap: “name”, “Joe”, “hp”, 10, “weapon”, $sword))

12-My Character complicated

So, introduced a few things to this. Variables and Datamaps

(set: $myName to “Joe”)

is the simplest version of a storing to variable. Now when you use $myName within a passage, it will be replace with the word Joe. This isn’t too exciting, except now you can add things like “Pick your name” beginnings or random name generation and you won’t have to keep track of who is who, because the name is tracked in $myName.

(set: $myCharacter to (datamap: “name”, “Joe”))

builds upon this as now $myCharacter can have various properties about itself. When you add more properties into the datamap, they become attributes to $myCharacter which can be called with the following syntax:

$myCharacter’s name

Which will be replaced with:

Joe

This looks into the datamap for a (“name”) and finds the associated with it (“Joe”)

The s can be strings of characters like (“this”), numbers (102.1), or even other variables ($sword)

So let’s change The Scene a bit to make use of our character Joe:

::The Scene

(display: “My Character”)

*Looks like someone has entered the Scene*

(print: $myCharacter’s name) has joined taken to the stage with his (print: $myCharacter’s weapon’s name)

It won’t do him much good with a measily (print: $myCharacter’s hp) health, though.

[[To Battle!]]

13 - The Scene 2

 

Now you can actually get something started, right? Maybe? …Guys?15-The Scene 2 visualized

 

Save it out so you can playtest and post it someplace else.

16 - Export1

 

I’ll talk about handling combat with more complicated mechanics in another post.

@GIntrospection 

Advertisement