Learning Ink Script - Tutorial Five

  • Edwin McRae

I’m Edwin McRae, Narrative Designer and Interactive Fiction Writer, and this is Tutorial Five in my…

Ink Script Tutorial Series

Last time we learned how to wrangle Stitches, Gathers and Glues. In this tutorial, we’re going to start down the track of making your interactive fiction more responsive to your reader. And how are we going to do that? By giving you the power of Delayed Consequence through the application of Conditional Text.

In your classic pick-a-path story, the consequences are immediate.

To open the chest, turn to 13.

To leave the chest alone, turn to 29.

13 - The chest turns out to be a Mimic, a monster pretending to be a chest. As you kneel before it, ready to pick the lock, it opens its slavering jaws and bites your head off. Sorry, but you are dead!

29 - Having waited so patiently, pretending to be a chest, the Mimic is rather annoyed that you’ve chosen to ignore you. It sprouts four legs, opens its slavering jaws, and gallops towards you. Drawing your sword, you spin about to face this monstrous mockery of mahogany.

Immediate Consequences have long been the standard practice of gamebooks, pick-a-path books and visual novels, while Delayed Consequences have usually been limited to picking up an item earlier in the game, or a piece of information, and using the item or info to destroy a monster or pass a test later on. With Ink Script, you can do something a little more sophisticated than that. You can build delayed consequences into choices that will affect later events and options in a way that’s far more subtle than the whole all-or-nothing approach.

Conditional Text

Ink Script is able to remember where your reader has been in the story already. To demonstrate we’ll borrow the scenario from Tutorial Four...did the reader choose to help Jesse Winter or Ginger Burns?

 

-> Hoedown_Horror

=== Hoedown_Horror ===

You’re centre-stage of a true horror show, yet through the chaos of squid-faced monstrosities and fear-stricken people, your keen eyes spy two fellow song-slingers in dire need.

* On your left[...]

- <>, several squid-faces are laying siege to Ginger Burn’s house bus, attempting to wrench the doors open or climb in through the shattered windows.

* Inside[...]

- <>, Ginger is putting up a valiant defence, blasting them with an antique sawn-off shotgun and horse-kicking them back with her silver-spurred cowgirl boots. But she’s horribly outnumbered and it’s clear that she won’t be able to hold them off much longer.

* On your right[...]

- <>, Jesse Winton, the incumbent Queen of Country, has been cornered by three tentacled terrors. Nearby, another trio of squid-faces are feasting on the blood-spattered remains of Jesse’s sound crew. It looks like Jesse is about to suffer the same fate.

 

* [Help Jesse.]

    -> Jesse_Winton

* [Help Ginger.]

    -> Ginger_Burns

 

= Jesse_Winton

-> DONE

= Ginger_Burns

-> DONE

 

Ink Script will remember whether the reader clicked through to the Jesse_Winton stitch or the Ginger_Burns stitch.

Let’s assume that the character you didn’t help got eaten by the squid-faces. Very sad but that’s what happens in a Cthulian apocalypse. We can show this consequence with some fairly simple conditional statements.

{Jesse_Winton > 0: Jesse rounds the corner. Thinking fast, you toss her your megaphone. Having played many years of high school netball, she catches it with ease, raises the megaphone to her lips, pulls the trigger, and then hits the highest note she can muster. And being a soprano by nature, that’s a pretty high and piercing note. So piercing that, when amplified by the megaphone, it punches through your monstrous captors’ skulls and liquefies what little human grey matter they have remaining.}

See how I’ve used braces {} on either side of the text? Those braces contain the text, letting Inky know this piece of text should only be shown if the condition is met. And what’s the condition?

Jesse_Winton > 0: = IF the reader has visited the Jesse_Winton stitch more than zero times THEN show the text that follows the colon.

Alternatively, rather than recognising Jesse’s presence, we could recognise her dearly departed absence.

{Jesse_Winton < 1: As the first squid-face locks its tentacles into your flesh, the megaphone drops from your nerveless fingers and clunks on the concrete. Jesse Winton’s piercing soprano voice would’ve come in handy right now. A pity you had to leave her to be eaten earlier in this terrible day.}

Jesse_Winton < 1: = IF the reader has visited the Jesse_Winton stitch less than one time THEN show the text that follows the colon.

Let’s test this all out in Inky now. But first, let’s streamline our scenario by changing this…

 

= Jesse_Winton

-> DONE

 

= Ginger_Burns

-> DONE

 

...into this.

 

= Jesse_Winton

Jesse lives! :-) Ginger dies. :-(

-> Time_Passes

 

= Ginger_Burns

Ginger lives! :-) Jesse dies. :-(

-> Time_Passes

 

= Time_Passes

More stuff happens in this chapter and then we move on to the next chapter.

-> Nowhere_To_Run

 

=== Nowhere_To_Run ===

+ You should’ve peeked around the corner first[...]

- <> rather than blithely strolling into unknown territory. The pack of lurking squid-faces quickly surround you, cutting off any chance of escape. Armed only with a megaphone, there’s no way you’re going to fight your way out of this one either.

-> DONE

 

Do you see what I’m doing there? I’m shifting the story from one knot === Hoedown_Horror === to another knot === Nowhere_To_Run === because I also want you to learn how to deal with checking conditions across different knots. You see, if the reader is in the Nowhere_To_Run knot and we need to check if they’ve visiting a stitch in another knot, like Hoedown_Horror, we need to first tell Inky to go to Hoedown_Horror and then check the stitch that’s tucked inside Hoedown_Horror. We can do that by writing the knot name, a full stop, and then the stitch name.

{Hoedown_Horror.Jesse_Winton < 1: As the first squid-face locks its tentacles into your flesh, the megaphone drops from your nerveless fingers and clunks on the concrete. Jesse Winton’s piercing soprano voice would’ve come in handy right now. A pity you had to leave her to be eaten earlier in this terrible day.}

One last tricky thing...

Conditional Diverts

Once our conditional text has been displayed, we might then want to continue our story or offer some sort of conclusion to the story. We can do this by throwing in diverts that will lead the reader to different stitches depending on the condition that’s been met, in this case, whether Jesse is still alive or not.

{Hoedown_Horror.Jesse_Winton > 0: Jesse rounds the corner. Thinking fast, you toss her your megaphone. Having played many years of high school netball, she catches it with ease, raises the megaphone to her lips, pulls the trigger, and then hits the highest note she can muster. And being a soprano by nature, that’s a pretty high and piercing note. So piercing that, when amplified by the megaphone, it punches through your monstrous captors’ skulls and liquefies what little human grey matter they have remaining. ->Thank_Jesse}

{Hoedown_Horror.Jesse_Winton < 1: As the first squid-face locks its tentacles into your flesh, the megaphone drops from your nerveless fingers and clunks on the concrete. Jesse Winton’s piercing soprano voice would’ve come in handy right now. A pity you had to leave her to be eaten earlier in this terrible day. ->You_Die}

Putting it all together

Ok, so here’s how all of the pieces fall into place. You’ll notice that I put our two braced conditional texts into one big block of text without any spaces between them. This is because only one will appear, depending on the condition that’s been met, so we don’t want any rogue spaces messing up our nice, neat story.

Copy the following Script into your Inky:

 

-> Hoedown_Horror

=== Hoedown_Horror ===

You’re centre-stage of a true horror show, yet through the chaos of squid-faced monstrosities and fear-stricken people, your keen eyes spy two fellow song-slingers in dire need.

* On your left[...]

- <>, several squid-faces are laying siege to Ginger Burn’s house bus, attempting to wrench the doors open or climb in through the shattered windows.

* Inside[...]

- <>, Ginger is putting up a valiant defence, blasting them with an antique sawn-off shotgun and horse-kicking them back with her silver-spurred cowgirl boots. But she’s horribly outnumbered and it’s clear that she won’t be able to hold them off much longer.

* On your right[...]

- <>, Jesse Winton, the incumbent Queen of Country, has been cornered by three tentacled terrors. Nearby, another trio of squid-faces are feasting on the blood-spattered remains of Jesse’s sound crew. It looks like Jesse is about to suffer the same fate.

 

* [Help Jesse.]

    -> Jesse_Winton

* [Help Ginger.]

    -> Ginger_Burns

 

= Jesse_Winton

Jesse lives! :-) Ginger dies. :-(

-> Time_Passes

 

= Ginger_Burns

Ginger lives! :-) Jesse dies. :-(

-> Time_Passes

 

= Time_Passes

More stuff happens in this chapter and then we move on to the next chapter.

-> Nowhere_To_Run

 

=== Nowhere_To_Run ===

+ You should’ve peeked around the corner first[...]

- <> rather than blithely strolling into unknown territory. The pack of lurking squid-faces quickly surround you, cutting off any chance of escape. Armed only with a megaphone, there’s no way you’re going to fight your way out of this one either.

 

{Hoedown_Horror.Jesse_Winton > 0: Jesse rounds the corner. Thinking fast, you toss her your megaphone. Having played many years of high school netball, she catches it with ease, raises the megaphone to her lips, pulls the trigger, and then hits the highest note she can muster. And being a soprano by nature, that’s a pretty high and piercing note. So piercing that, when amplified by the megaphone, it punches through your monstrous captors’ skulls and liquefies what little human grey matter they have remaining. ->Thank_Jesse}{Hoedown_Horror.Jesse_Winton < 1: As the first squid-face locks its tentacles into your flesh, the megaphone drops from your nerveless fingers and clunks on the concrete. Jesse Winton’s piercing soprano voice would’ve come in handy right now. A pity you had to leave her to be eaten earlier in this terrible day. ->You_Die}

= Thank_Jesse

+ You step over the still-twitching corpses[...]

<> of the squid-faces and give Jesse a big, love-rustling thank you hug.

-> END

 

= You_Die

+ You are dead[...]

<> and Gore is doomed. Better luck next time, eh?

-> END

 

Test your Ink Script story

Now make sure you reset your story to the beginning before playing it through. The first time through, click on “Help Jesse” and see how the story plays out. The second time, click on “Help Ginger” and see how that turns out for our protagonist.

All going well, Inky should recognise the choice you made and the stitch you visited, and show the text appropriate to that condition. If not, try copying and pasting the script across again and make sure you completely reset your story before each playthrough.

 

Wrapping it up

That’s it for Conditional Text for the moment. In Tutorial Six we’ll take Delayed Consequence one step further by introducing you to Conditional Options!

 

 

For an example of my Ink Script work in full swing, you can download Guardian Maia Ep1 for free from Google Play and the Apple Appstore

You will guide a Māori warrior woman, Māia, on an interactive science-fiction adventure where your decisions mean life or death for your courageous heroine!

About Edwin McRae

Edwin is a narrative consultant and mentor for the games industry.

Share this post