Inky updated: images, CSS, and dark theme for web export

Inky the stand-alone editor for writing interactive Ink stories gets some polish that adds a few bells and whistles to the web exporter, including a tag for inserting images, clearing the screen, restarting the story, and a dark theme.
https://github.com/inkle/inky/releases

A shiny rewrite of the “Getting Started” tutorial shows off the new export-for-web features and aims to get budding interactive writers in shipshape for the upcoming Ink Jam 2018 on itch.io August 30th – September 3rd.
https://itch.io/jam/inkjam

The Ink Unity Integration plugin was updated on July 30th, bringing both up-to-date with Ink 0.8.2.

An unofficial port of the Ink Integration Plugin for Unreal is on Github. Further digging will find Python and a few other ports.

Writing with Ink – Lists with an Oxford Comma

The guys at Inkle Studios have shared their method for printing a list using a recursion function on their Patreon page, but I found an easier method to insert an Oxford Comma when printing a list.

{LIST_COUNT(IsPresent):
   - 0: No one is here. 
   - 1: Only {IsPresent} is here. 
   - 2: {LIST_MIN(IsPresent)} and {LIST_MAX(IsPresent)} are here. 
   - else: {IsPresent-LIST_MAX(IsPresent)}, and {LIST_MAX(IsPresent)} are here. 
}

In this example I’m grabbing the LIST_COUNT of IsPresent, and printing the contents  according to how many items there are.

With 3 or more in the list I subtract the LIST_MAX (the last item in the list) from the full list before printing, then insert a comma before printing the LIST_MAX.

Writing with Ink – Runtime Loop

I’ve written an old knock-knock joke into an Ink script to show a basic runtime loop. The logic here is simple: tell a joke three times, but the third time with a different ending.

I define the loop start with an index: joke.

The loop gate has two settings: closed diverts the runtime to the start of the loop, open (or unlocked) allows the runtime to proceed. My start state is closed. On the third try it will open.

CONST punchline = 3 

- (joke) Knock knock! 
+ Who is there? 
- {joke<punchline: 
   Banana. 
   + Banana Who? 
      -> joke 
   - else: 
   Orange. 
   * Orange Who? 
      Orange you glad I didn't say banana? 
}

My conditional test doesn’t use variables, although the loop gate looks as if joke and punchline are variables. Ink is counting how many times the index joke has been seen and comparing it against a constant value called punchline. When joke is less than punchline the loop is closed.

joke<punchline

Things to know:

  • A constant looks like a variable in Ink script, but it isn’t dynamic. At runtime it is replaced with the value it represents. Constants are for scripting convenience.
  • The index cannot be addressed from outside this knot, but leaving and coming back to the knot will preserve the seen count.