tiny-qbn

This is my original reference. It has more description than the quick reference, but doesn’t cover all the new features: I’ve been putting that effort into the walkthroughs instead of adding to this.

Declaring Cards

To make passages visible to the QBN engine, tag single-use passages with card and reusable passages with sticky-card. You can add or remove cards at any time using <<addcard "title" sticky=false>> or <<removecard "title" always=true>> (pass false as the optional second argument to remove only single-use cards).

Selecting Available Cards


Displaying Selected Cards

Then there are a bunch of helper widgets for common use cases. The most useful of these are:

The widgets used to implement these are also available:

Managing a Persistent “Hand” of Cards

You can save a list of cards to a variable with:

<<set $hand to `QBN.passages(5)`>>

To remove a card, do:

<<run $hand.delete("card title")>>

Refill the hand with:

<<set $hand to $hand.concat(QBN.passages(5 - $hand.length))>>

But note that this may add duplicate cards (if it selects sticky cards which are still in your hand). If you don’t want duplicates, you can create the hand and refill it with:

<<fillhand $hand 5 `QBN.passages()`>>