Tiny QBN for Twine/Sugarcube

And…the video of the NarraScope talk is up on YouTube, along with 40-some other awesome talks.

6 Likes

@videlais just published the first part of an apparently four-part series on TinyQBN: this one looks at a fair bit of history on storylets and quality-based narrative, covers terms and concepts, and how they map to TinyQBN.

5 Likes

This is kind of a big one: you can now put storylet metadata in the passage body instead of using tags. That lets you edit it more easily, copy/paste, etc., and lets you use TwineScript for your requirements.

So. TinyQBN recognizes comments of the form /*QBN ... */

Inside these comments you can write card, sticky-card, req-whatever just as you would in tags. Separate them by whitespace (spaces, tabs, line breaks).

If you use req: instead of req-, the remainder of the line is treated as a TwineScript expression. So in the first tutorial, Anderson Farm could have:

/*QBN
   sticky-card  req: _driving
   req: $location eq "Anderson"
 */

So now you can compare against strings with spaces, check object properties or array elements, use parentheses for more complex comparisons, etc.

Hat tip to @gilariel for the nudge that got me to finally do this…

2 Likes

So awesome Josh!

Really keen to start playing around with this. Thanks for all your work!

@videlais released the fourth and final part of his TinyQBN tutorial series. This one talks about dynamically generating cards, which I hadn’t realized was even possible.

Also, if you haven’t seen that Harlowe 3.2.0 is out, with storylet support and lots of other new features, check that out too.

2 Likes

Woah. Dynamically generating cards sounds awesome!!!

Unfortunately, I’m now thoroughly committed to Sugarcube hehe. In another life I’d be a master of Harlowe and all the other formats, but just remembering Sugarcube syntax is enough of a struggle for a noob like me haha.

Nah, SugarCube is fine. Harlowe does make it easier out-of-the-box to click text in one place and make something change somewhere else, and it has syntax highlighting to make it easier to see if you make certain kinds of mistakes, but other than that…

But Harlowe is the default story format so it’s the one that a lot of people start out with, and I do get questions about “are you going to port TinyQBN to Harlowe?” so I wanted to be sure and mention that Harlowe has its own storylets commands now.


Also, I posted about this in the announcements category, but I should put the links in this thread too: I wrote a short story (somewhere in the 2000-2500 word range; I didn’t try to separate the words from the code to count more accurately) using TinyQBN for the 8th Fortnightly Fiction Jam (theme: warm and cozy). I did some mucking around with using cycling links to let you enter “verb noun” commands so it feels slightly more like a parser model? And then storylets to respond to the commands, using some javascript to filter storylets by “who has the most conditions” (Huh. I should add this into the library, shouldn’t I?). You can play it on itch.io or check out the source code on GitHub (I gave it its own repository).

2 Likes

What a creative idea! Gonna check it out. That’s a really interesting idea mixing parser and hypertext like that (hopefully I’m using the correct terms).

And yea I think seeing a few examples in action is v. helpful in thinking through options etc.

1 Like

Re Harlowe, now that I’m using tweego I get highlighting for free yay!

1 Like

Not specifically Tiny QBN related, but this may be of interest to some: native SugarCube storylet API & macro discussion.

3 Likes