Programming tools for dungeoncrawls

I don’t like consulting tables during play. If possible I’ll always automate any table I expect to use more than once. Thus I have programmed a general-purpose random encounters table for dungeoncrawls that don’t use their own tables. (And if I expect to run a dungeon with its own table for more than a session or two, I’ll program its tables too.)

Here’s the program for dungeoncrawls. Currently it tracks time in the dungeon, light, the need to rest, encounter distance, reaction rolls, and surprise. I might add in treasure for those monsters who carry it individually.

And here’s one for wilderness travel. It generates encounters, lairs if necessary, and treasure.

Boring coding details

I’m here using javascript and the random table engine/website “perchance”. I’m still learning javascript; all my previous experience is in haskell. If I wanted to lose the perchance dependency, in haskell I’d make a new type, (Int, [(Int, String)]), for the table. If you’re not familiar with haskell, that’s a tuple with an integer (obviously) and a list. Every element in the list is a tuple with an integer and a string. The first Int would be the dX to roll on the table. Some “rollTable” function would print the string from the first 2-tuple whose Int was less than the random roll.

I guess if I translated it to JavaScript I’d do the same thing with arrays. Or maybe I could try typescript? Or maybe I just say fuck it and translate the whole thing back to Haskell.

8 Appreciations
Thumbnail

4 Appreciations

This is pure gold, thanks!

2 Appreciations

Since I programmed this in part as a learning opportunity (get better at programming) I’d be happy to take language suggestions for the 2.0 version! I like the user-side ease of javascript, but I dislike the weak type system. No strong opinions on imperative programming yet, I’m too new at it.

2 Appreciations

Don’t take the thumbnail too seriously, Canyon. It’s just a little programmer joke.

1 Appreciation

While it’s extremely useful for low-code generators, perchance is pretty limiting in its JS. If you want to try a full-JS generator, you can take a look at this one by me[1]. There was another one which was a full-fledged web app, but I can’t find its code anymore.


  1. the generator is in Italian, but I did my best to keep the function names in English. ↩︎

2 Appreciations

Canyon,

This is pretty phenomenal! I like it. This kind of thing can be a great aid in online play. I might try using this sometime.

I’m also a beginner programmer and tried writing my own code a while back - a character generator for my B/X-like homebrew D&D. A good challenge! I’ve gotten a lot of use out of it (but since then been too busy to do anything else), and people love the character/style/colour/process.

https://paultestingground.github.io/TaliesinGeneratorHome.html

I’m not sure I understand the difference between “reroll monsters” and “pass time” - both seem to reload/randomize all the content, don’t they?

(On an unrelated note, I’m struck by the really rather strange aspect of OD&D, where dungeons are dangerous, terrifying places… but wandering around outside is even more scary! Such a strange juxtaposition. Is all the content from the original rules?)

A friend of mine recently made a web-based tool for doing random encounters, “chaos events” (another randomized part of his homebrew), and tracking light sources. We’ve been using it to great effect in his Into the Odd game. It doesn’t have the monsters and such built into it, though!

Froggy,

I love the thumbnail! Haha! :stuck_out_tongue:

2 Appreciations

Your generator is great! I love how flavorful it is. And the Tufte css class is gorgeous. I would recommend his work to many RPG layout editors.

“Pass time” passes time, adding +10 minutes to the clock and rerolling all encounters. It gives messages like “Time to rest” and “Time to relight torches”. “Reroll monsters” simply rerolls encounters while leaving the time the same.

This is all from the OD&D rules, with some monsters added by later editions, and some tweaks to numbers as well. My understanding of the OD&D wilderness was given to me entirely by Dan “Delta” Collins, in his statistical analysis of wilderness play, and a post called The Original D&D Setting which discusses the extreme strangeness of the place.

1 Appreciation

Nice, Canyon!

I hadn’t noticed those messages on a quick click-through. Very cool!

And well spotted on the Tufte! Big fan, of course.

I should read those Delta posts. I have enjoyed many in the past!