Continuing the discussion from Iron ChIF: Season One Episode 2 (Audience Commentary):
Hybrid Choices and Dialog’s choice mode work just fine from the player’s perspective. They’re no less expressive than Ink, and can do everything Ink or ChoiceScript can do.
The problem is the boilerplate you need for every. single. choice. Compare this bit of Ink code:
- I looked at Monsieur Fogg
* ... and I could contain myself no longer.
'What is the purpose of our journey, Monsieur?'
'A wager,' he replied.
* * 'A wager!'[] I returned.
He nodded.
* * * 'But surely that is foolishness!'
* * * 'A most serious matter then!'
- - - He nodded again.
* * * 'But can we win?'
'That is what we will endeavour to find out,' he answered.
* * * 'A modest wager, I trust?'
'Twenty thousand pounds,' he replied, quite flatly.
* * * I asked nothing further of him then[.], and after a final, polite cough, he offered nothing more to me. <>
* * 'Ah[.'],' I replied, uncertain what I thought.
- - After that, <>
* ... but I said nothing[] and <>
- we passed the day in silence.
- -> END
This is what Ink calls a “weave”. A line starting with one or more *s is a choice, and a line starting with one or more -s is a “gather point”. Ink takes all the choices at the same level (same number of symbols), up until the next gather point at the same level, and presents them as a menu.
When the player picks a choice, all the code inside that choice is run…which can include more choices and gather points, one level deeper. So if you play this example, you get two choices, because there are two one-star lines before the one-dash gather:
I looked at Monsieur Fogg
1: ... and I could contain myself no longer.
2: ... but I said nothing
And if you pick the first one, you get two options, because there are two two-star lines before the two-dash gather:
> 1
... and I could contain myself no longer.
'What is the purpose of our journey, Monsieur?'
'A wager,' he replied.
1: 'A wager!'
2: 'Ah.'
And the first one leads to two more options, because there are two three-star lines before the three-dash gather:
> 1
'A wager!' I returned.
He nodded.
1: 'But surely that is foolishness!'
2: 'A most serious matter then!'
No matter which you pick, flow resumes at that three-dash gather, and presents three more options (the next three three-star lines):
> 2
'A most serious matter then!'
He nodded again.
1: 'But can we win?'
2: 'A modest wager, I trust?'
3: I asked nothing further of him then.
And finally it flows back to the two-dash gather, then the one-dash gather, and the example is over.
> 2
'A modest wager, I trust?'
'Twenty thousand pounds,' he replied, quite flatly.
After that, we passed the day in silence.
This example doesn’t do anything except printing text. But these choices could also set variables, or do math, or redirect to another passage entirely (the syntax is -> somewhere_else), and so on.
I absolutely love this syntax. It’s fantastic for writing a conversation. (ChoiceScript has something similar, though I find Ink’s more readable.) But now imagine the several lines of boilerplate needed for each and every one of these choices in Inform or Dialog!
That’s why I’m considering a transpiler that turns an Ink weave into a chunk of Dialog code, so you can write your conversation in the simple, fluid syntax, then embed it in a Dialog game. But right now, including a short choice-based segment in a parser game tends to require a lot of very clunky boilerplate code, because the syntax of parser languages isn’t designed to make it easy to write choices.
