
Ink – inkle's narrative scripting language - Tomte
https://www.inklestudios.com/ink/
======
Rabidgremlin
Also great for scripting chat bots! Used to as part of Air New Zealand's
chatbot Oscar. 390 topics, multiple regions, 60K words of content so it helps
keep us sane :)

~~~
cetra3
I'd be interested to hear more about this. Is there a writeup somewhere?

~~~
Rabidgremlin
No technical write up but you can see how it all hangs together because we
have open-sourced the core of what makes Oscar tick:
[https://github.com/rabidgremlin/Mutters](https://github.com/rabidgremlin/Mutters)

------
segphault
Also worth checking out Kni, an authoring language inspired by Ink but written
in JavaScript, ideal for bringing this kind of content to the web:
[https://github.com/kriskowal/kni](https://github.com/kriskowal/kni)

------
crooked-v
Now I have this weird urge to build a JS DSL with equivalent functionality
using objects, lambdas, and template strings.

~~~
nielsbot
You should check out OMetaJS
[http://www.tinlizzie.org/ometa/](http://www.tinlizzie.org/ometa/) It's an
object oriented parser-compiler for building languages (DSLs?) inside a host
language. JS is a supported host language.

~~~
crooked-v
Ah, but I'm thinking real Javascript, J-expression[1] style. Something like
this:

    
    
        [
          `I stared at Monsieur Fogg.`,
          {
            if: `know_about_wager`,
            then: [`<> "But surely you are not serious?" I demanded.`],
            else: [`<> "But there must be a reason for this trip," I observed.`]
          },
          `He said nothing in reply, merely considering his newspaper with as much
          thoroughness as entomologist considering his latest pinned addition.`
        ]
    

Or, more complicated:

    
    
        [
          `I looked at Monsieur Fogg `,
          {choose: [
            `... and I could contain myself no longer.`,
            `What is the purpose of our journey, Monsieur?`,
            `'A wager,' he replied.`,
            {choose: [
              `'A wager!'[] I returned.`,
              `He nodded.`,
              {choose: `'But surely that is foolishness!'`},
              {choose: [`'A most serious matter then!'`, `He nodded again.`]},
              {choose: [
                `'But can we win?'`,
                `'That is what we will endeavour to find out,' he answered.`
              ]},
              {choose: [
                `'A modest wager, I trust?'`,
                `'Twenty thousand pounds,' he replied, quite flatly.`
              ]},
              {choose: `I asked nothing further of him then[.], and after a final, polite cough, he offered nothing more to me. <>`}
            ]},
            {choose: `'Ah[.'],' I replied, uncertain what I thought.`},
            `After that, <>`
          ]},
          {choose: `... but I said nothing[] and <>`},
          `we passed the day in silence.`,
          {goto: 'END'}
        ]
    

[1]:
[http://sriku.org/blog/2012/04/15/j-expressions/](http://sriku.org/blog/2012/04/15/j-expressions/)

~~~
nielsbot
Maybe as a first step... but seems like a "real" DSL would have a lot of
benefits... maybe it even compiles to something like your example? Anyway,
just thinking out loud... not a critique.

------
Promarged
I wish they published Ink scripts for their games (especially Sorcery series),
I've beaten them numerous times but the games are so complex that it's
basically impossible to go through all branches. Even if I tried I couldn't
replicate some of dialogue and that's in a game that always allows you to undo
everything!

~~~
jessaustin
This is fascinating. If you had such a script, would you simply read it, or
would you use it as a guide to play the game so as to produce results you
previously hadn't seen?

------
wohlergehen
It looks really cool, much more usable (IMO) than Inform7, which probably is
the grandfather of all CYOA languages.

------
arjan_sch
Botsquad's Bubblescript language does something similar, although more
imperative: [http://www.botsquad.com/2018/04/14/beyond-the-
dsl/](http://www.botsquad.com/2018/04/14/beyond-the-dsl/)

------
ktpsns
tl,dr; A domain specific language for a Dungeon text-like game, see an
overview of the language at
[https://github.com/inkle/ink/blob/master/Documentation/Writi...](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md)

~~~
empath75
If you’ve played any inkle games they’re very far from dungeon.

~~~
dkersten
I’m trying to understand exactly what this is. Is it like Twine?

~~~
straybasilisk
It's like Twine. AFAIK Twine is mostly for publishing directly to the web.

Ink is more suited for embedding in a game which adds additional presentation
or gameplay stuff on top of the text, using some other language/engine (like
Unity). It will handle the text stuff, and provide hooks/bindings for the rest
of the game to use.

------
ai_ia
How does this compare to Superscriptjs?
[https://github.com/superscriptjs/superscript](https://github.com/superscriptjs/superscript)

