If, like me, you’ve been impressed with the works of Autumn Chen (Archivist and the Revolution, New Years Eve 2019) and want to try your hand at using Dendry, I’ve written a tutorial to get you started with it.
I’ve tried to make it as accessible as possible to people with no programming background and created a “Dendry Starter Pack” project on GitHub to remove the hassle of setuping a Node/JavaScript environment on your local computer.
The real plus side of Dendry is its ability to create a storylet based interactive fiction with no boiler plate code or external plugins (in contrast to previous experiments with twine or ink)
It’s been successfully tested by a handful of people, but I will welcome all feedback to improve it further. It would also be interesting to know what you’d want further documented (I know Autumn is also working on improving the documentation)
There’s still a bug which causes the title and author of the game not to be printed, so until this bug is fixed, I’d suggest those using Windows to install Dendry in WSL.
One of the reason I created the starter pack and described a way to use Dendry without installing it locally was that I had two tutorial testers who :
were Windows users
had no idea what WSL was
had no idea what Node was and how to use it
That said, I think you refer to an issue where handlebars is not behaving correctly when using a node version directly running in the windows shell (I’ve seen that before elsewhere), but I don’t have access personally to a Windows machine so it’ll difficult to fix. However, if you want to submit a Pull Request to fix the problem, you’d be very welcome !
Oh yeah, those names are fairly descriptive but they have some odd corner cases. If you haven’t found that/figured it out yet, it’s mostly in lib/engine.js lines 930-990 or so? I think the general idea is:
Priority starts at 1 and goes up; higher priority options will push out lower-priority ones (to be specific, if you have found more than min-choices options at a higher priority level, then it will stop there and won’t process lower-priority choices).
Frequency is supposed to look like a percentage: the default is 100 and you can go up or down from there (higher frequencies are more likely, lower frequencies less likely). If you have too many options (more than max-choices), then it’ll sort them randomly weighted by their frequency (random()/frequency ascending) and take the first however many to show to the user.
To include images in the text, you can use {! <img src="path/to/image.jpg"> !} in the text. In general, anything included in {! ... !} will be treated as arbitrary HTML and will be passed through to the output.
In addition, {! ... !} is also used for including arbitrary javascript snippets in on-arrival: or view-if:, but that works slightly differently. In on-arrival (or on-departure or on-display), you can modify qualities using something like Q.quality1 = 10;. Q is an object containing all qualities. In view-if (or choose-if), you have to end the snippet with return [a boolean variable]; .