Today, Sunday, was my Big Day. Not only did I have a Book Launch at 2pm…
…but I also ran a three-hour interactive fiction workshop in the morning.
Which was seriously awesome. (So was the Book Launch. If you haven’t seen the trailer, it’s here.)
The workshop was very biased, naturally, since it is all about my own notions regarding interactive fiction. This article, which I wrote last year, is an excellent summary of the IF scene (as I see it, having stumbled across it very recently).
This article focuses on the different elements of writing interactive novels as opposed to regular novels.
Today’s workshop was brimming with people who’d already written novels, which was quite different to last year. Last year we focused on Twine, the free tool that makes a useful map as you write and is the most user-friendly tool ever. This year we focused on ChoiceScript, which is a lovely elegant engine, also designed for non-programmers, made by Choice of Games. It’s easier to write longer works with ChoiceScript, because it’s set up for that (you can write longer pieces on Twine, but it’s trickier to do anything clever). More on that in a bit. FYI I’m not associated or affiliated with Choice of Games in any way.
I believe I promised a pic of yesterday’s outfit. Here it is (next to an ad for the excellent “Sentinels of Eden” series which I also mentioned yesterday).
I’ve spent the rest of the day in Conflux mode… that is, hanging around talking to interesting people. My love for the venue is only growing with greater familiarity. Apart from anything else, they DO have special free conference wifi. And SO many power points, just everywhere *swoon*. The staff continue to be absolutely excellent. The food is pretty good but expensive and the menu is fairly limited. Huge portions.
A lot of local people are unhappy Conflux is at the airport, which isn’t great for most Canberrans (especially those who rely on buses—the special shuttle to or from Civic has been helpful). Next year’s venue is TBA. Parking underneath the hotel costs $6 for up to two hours but over $20 for a full day. For people that validated their ticket at reception, a whole day costs $14. There was plenty of space.
People like me (ie with a disability card) can park in a funny little 2-hour carpark that’s on the right as you drive around the hotel on your way to the front door. There are no designated disabled spots but with a card you can use public 2-hour parking for a full day for free. So the key to Conflux parking is to have a disability card but still be able to drive. For me, it was a breeze, and much much nicer than anywhere in civic.
And it’s pretty.
There’s a moment at sunset when everyone in the foyer suddenly has a golden halo. When the moment passes, the brass lamps all come on (not these ones; other ones). It’s quite lovely.
The banquet was suitably glorious, and a very fine evening. Each item on the menu was linked to fairy tales. I ate a Goose’s Golden Egg for dessert (filled with panna cotta).
There’s a Trivia Night tonight, but I shall be going home to sleep.
Thus endeth today’s Conflux Report.
I promised to write out a few very useful bits of code for those who are learning ChoiceScript. This is reinventing the wheel to a large extent, since the official ChoiceScript guides, including a free link to download it, are excellent.
So is the wiki, which has had many years to be refined and expanded. The Twine documents are improving, but they’re newer and trickier, and there are significant changes from Twine1 to Twine2.
When you download ChoiceScript, it has some very basic intro scenes, choices, and statistics set up for you. When you want to start writing, you can just delete a bit and begin.
HOW TO WRITE A CHOICE:
To “play” the example game, follow this path (it works on PC or Mac):
It works best with Firefox, but most browsers are fine (other than, oddly, Google Chrome).
It’s fairly ordinary-looking visually, but it is immediately obvious how to progress the story (Click on a choice, then click on ‘Next’). Your text will be different to this image, because I’ve long since replaced the example with my own.
To see the code behind the story, follow this path (using a text editing program—I recommend Notepad++ for PC and Sublime for Macs):
The right-hand column above shows the startup file for the story I’m currently writing (so nobody look, okay?)
Don’t panic when you see a bunch of words and symbols. It will be okay.
NB: Each chapter of your book will be in a separate text file. You can name them whatever you like.
You can switch between the browser and the text file to see how the text file alters the story that you’re reading in the browser. The best thing to do is to just put your own words in, and you’ll be able to see them immediately fit the playable ChoiceScript format.
So if you write exactly this (at the END of the startup file, replacing the kingdom bit):
Then you go back to the index.html file, it will look like:
The * and # symbols are vital, and so is the spacing at the beginning of your lines. You can use either tab or spacebar to indent what needs indenting, but you have to pick one and stick to it or the game will break. Those three keys are the heart of your writing from now on.
If the reader picks “I choose option one” above, the line of text will appear, saying, “You chose option one.” Your story works—but so far you haven’t told the program what to do next (thus, the game will break immediately after that line).
Some structural info:
Many stories have a “branch and bottleneck” structure. Choices (often a whole series of nested choices) branch off in different directions, then different directions again… and then there’a a point at which they all come together, and then the choices branch out again from there. Here’s a diagram example using twine:
As a writer, the hard part isn’t branching your story; it’s bringing things back to bottlenecks (so you don’t end up with literally millions of utterly different stories). One handy way is with time, eg:
“The sun is setting. Enough mucking around. It’s time to…”
“Mucking around” is non-specific enough to cover all the possible adventures the character might just have experienced. Or you can leave out that sentence altogether.
Back to your basic ChoiceScript thing:
A lot of choices within a story bottleneck immediately, which is written as:
You can name your label whatever you like. Use lower case, avoid special characters, and remember each label must be different.
This is a simple choice structure that works. You don’t actually require the “goto” and “label” stuff unless you’re nesting choices, so a lot of the time it’s even simpler.
Whatever you write after “*label bottleneck” will be seen by all the readers, no matter what choice they made beforehand.
Anything that’s on a line marked with an * will not be seen by the reader.
If you want, you can write an entire story like this. The lines of unique text above (“You chose option one/two/three.”) are only seen by the readers that chose that option. Those lines can be expanded into literally any length, and can have other nested choices inside. ChoiceScript authors don’t have a wall diagram with string going everywhere; they have a ludicrous number of indentations as they write choices within choices within choices.
But you can also just bottleneck after each choice. That’s what smart authors do (for most of the choices, but not all of them—after all, you want your reader to have a unique experience). That’s how authors stay sane.
But how to make the choices matter in a deeper way?
[Tired? Breandead? Stop here and write some scenes. Come back later. This is where I stopped for a day when I was learning ChoiceScript.]
Choices have long-term consequences because of stats. Stats don’t create work; they are a brilliant and cumulative way of making hundreds of choices matter without writing a million-page book.
The two main types of statistics are personality based and skill based. So as your player makes their choices and has their adventures, you’re also noting what kind of character they are creating (think of them as a co-writer who’s in charge of the main character’s personality), as well as building their skill set (for later challenges that can be won or lost).
In ChoiceScript, you make your own unique statistics. The more unique the better!
One of the most distinctive & fun things about the ChoiceScript tool is that it often uses opposed statistics—so for example, you might have ‘Tactfulness’ versus ‘Straight Talker’. If a player chooses to be tactful, their tactfulness stat will go up and their ‘straight talker’ stat will go down.
HOW TO DO STATS:
First, go into the startup file. After the *scene_list but before the story begins, write this:
You can set any number of (single, lowercase) words as beginning stats.
Your Tactfulness versus Straight Talker opposed statistic will all be expressed (code-wise) as + or – tactfulness.
Your name stat will be a one-off choice (and the players can enter their own; instructions here).
Your strength starts at 0. It will grow with strength-based choices, and it will be tested at later choices.
The “show stats” button on the browser version of the story (that the players see) appears automatically.
To make the stats page look good, go into the choicescript_stats file (which you already have in the same “scenes” folder as the “startup” file), and write this:
It will look like this to the player:
The numerical values will change as the player makes choices.
The ! makes sure that a word is capitalised (it’s also useful for pronouns—which we’ll talk about next—when they’re at the beginning of a sentence).
Here’s your first-choice example, with stats added:
Now players who choose Option One have Tactfulness 60% (and Straight Talking 40%).
Players who choose Option Two have Straight Talking 60% (and Tactfulness 40%).
Behind the scenes, opposed stats are really just recording one stat going up or down, but they’re displayed with a red/blue bar for the player.
If the player chose Option Three, then “Bob” will appear after “Name:” in the player’s stat screen, AND their strength will be 5.
In the line “*set strength %+5” the % symbol is the key to avoiding maths. I have your attention now, don’t I? Long story short, if you use “%+” and “%-” for your stats, you will never get under 0% or over 100%. Is good.
Congratulations! You’ve written a functional choice that doesn’t break the game and that makes a difference to your statistics.
HOW TO DO GENDER:
In your startup file, write:
Then have a choice (early on) like this:
As you may have noticed above, you can put the stats and the text in any order. Since the player doesn’t see the stats (until they click on the button to see the stat page), it doesn’t make a difference. But consistency is a good idea.
Once you’ve done that, you can use pronouns, like so:
This text will appear normal to the player, but will have the right pronouns, eg:
You hear two people talking about you.
“What do you think of them, really?”
“They’s okay I suppose.”
“Really? I hate their dog.”
There are two important things to note here. (Okay, three.)
-You can write an entire novel without player-character (PC) pronouns if you’re determined (as I’ve done for “Choices That Matter” stories on iOS and Google Play via Tin Man Games).
-‘They’ is grammatically distinct. You probably noticed the painfully incorrect “They’s okay” above. If you include they/them pronouns, you will need to be very careful to avoid a similar grammar fail. But it’s worth it. The IF (Interactive Fiction) community works hard to be inclusive, especially with gender and sexuality.
-Using he/his/him as your “base stat” in the startup file works well because the three forms are distinct (unlike for she/her/her).
Erm, it’s just occurring to me that it might work better to use they/their/them as your base. I’m not smart enough to check the idea is sound without writing a novel to check, but I THINK it’ll help a bunch with both Point #3 and the Point #2.
WELL that was a long blog entry. Are you still here, dear reader? I’m off to eat dinner and have a lie down.
PS Guess what! It’s October! Who knew?
More Conflux tomorrow!
PS Two more super-useful sites for when you’ve finished that brilliant interactive fiction game.
Dashingdon hosts ChoiceScript games, and Philime.la hosts Twine games. Both are free, and both allow you to show your game to a select few (editors) before uploading/publishing a finished version.
3 thoughts on “Conflux 13: Day 3 (& ChoiceScript)”
Thanks for all this wonderful information Felicity! It was wonderful to meet you at Conflux and the interactive workshop you ran has really got my brain buzzing! Helen
It was an absolute pleasure for me from beginning to end. When I first got into ChoiceScript, I was as obsessed as if I’d just fallen in love.