It’s late. I ate too much. I need to drink more water.
I was working on a little random generator, once again. Instead of going down the route of writing half a megabyte of random tables like I did for Hex Describe, which also needs the ability to run Perl programs or access to my website, I’d like to teach people how to write their own random generator “app”.
The “app” is a HTML file that you can save on your computer and open in your browser. It contains some CSS to make it look good (well… taste differs, of course), some HTML for the buttons and the title, all the tables you need, and some JavaScript to generate the actual output.
I’ve been working on a generator for Knives, a 2d6 based Fantasy Traveller game. You can look at it, download it, use it offline, and replace the tables with your own tables. The table format is similar to the tables Hex Describe uses. – 2023-01-13 A stand-alone web page as a Generator
2023-01-13 A stand-alone web page as a Generator
When I wrote it, I focused on character generator for Knives in order to test all the functionality I needed. Now that I know it works, I’d like to show you how to use to make a random dungeon generator.
Here’s how to do it. First, download the generator from https://campaignwiki.org/generator and save it as “dungeon.html” or something like that. Next, open the file in your favourite editor: Notepad, Notepad++, Vim, Emacs, whatever you usually use. Find the tables around line 300 up to the nearly the end of the file and delete all of it.
https://campaignwiki.org/generator
Here are some new tables!
# Data # As this data needs to be valid HTML, you need to replace < & > in the tables with < & > (less than, ampersand, greater than). # '#' begins a comment # ';' begins a table, followed by a name, no space # A number and a comma begin a weighted entry for the current table # '[2d6]' or '[1d6+3]' are replaced by dice rolls # '[a]' gets replaced with a lookup of table 'a' # '[a|b]' gets replaced with 'a' or 'b' # This is the starting table. All we do is generate 3 room dungeons, for now. ;start 1,[3 room dungeon] # This loads a 3 room dungeon image from Campaign Wiki. ;3 room dungeon 1,<img style="background:white; width:40%; float:right" src="https://campaignwiki.org/text-mapper/gridmapper/random?rooms=3">[3 room key] # These are the three rooms. All we know is that the first room is always the entry. ;3 room key 1,<p>1. [entry]<p>2. [guarded room]<p>3. [treasure room] # More entries required in this table! ;entry 1,A stair leads down into the darkness. [floor description] ;floor description 1,The floor is strewn with dead leaves and twigs. 1,Branches have been shoved into a corner to build a nest. There are giant feathers all over the place. 1,Skulls and bones, broken and cut up with sharp blades and hacked to pieces by machetes lie all around you. ;guarded room 1,[monster] [floor description] # Using **bold** to highlight monsters ;monster 1,The putrid smell of dead things warns you of the **[predator name]** ([predator stats]). 1,You hear [2d6] **[nightling name]s** [nightling activity] ([nightling stats]). # I like compound names because that produces a lot more names ;predator name 1,[predator qualifier][predator relative] ;predator qualifier 1,Feather 1,Winter 1,Ice 1,Claw 1,Knife # Note the second word is lower case because there is no space between the qualifier and this entry ;predator relative 1,bear 1,lion 1,hunter 1,wolf # Random stats for the win! Each adventure is different. ;predator stats 1,Damage-[2d6] Endurance-[3d6] Life-[2d6] Attack-[1d6+5] Hit-[1d6+6] Escape-[1d6+2] ;nightling name 1,[nightling qualifier][nightling relative] ;nightling qualifier 1,Bone 1,Moon 1,Child 1,Blade ;nightling relative 1,taker 1,burglar 1,-eater 1,ling ;nightling activity 1,talking 1,fighting 1,singing 1,whimpering 1,bullying one of their own 1,whispering 1,rolling dice and snickering ;nightling stats 1,Damage-[2d6] Endurance-[1d6] Life-[1d6] Attack-[1d6+4] Hit-[1d6+5] Escape-[1d6+3] ;treasure room 1,There's a carpet on the floor, and on the carpet stands a *chest*. Beneath the chest ist a **pit trap** (2 in 6 chance: 1d6 falling damage). 1,There's a small altar here. On it, you see [silver treasure]. 1,[floor description] The floor also has a *concealed trap door* (2 in 6 chance of discovery) containing [silver treasure]. ;silver treasure 3,[three|four|five] silver cups worth [1d6]0 gold pieces 2,a silver plate worth 50 gold pieces 1,a silver chalice worth 100 gold pieces 1,a small figurine of [Pazuzu|Marduk|Ishtar|Nergal] worth 200 gold pieces
This is what it says:
1. A stair leads down into the darkness. Branches have been shoved into a corner to build a nest. There are giant feathers all over the place.
2. The putrid smell of dead things warns you of the Featherlion (Damage-4 Endurance-7 Life-4 Attack-7 Hit-7 Escape-3). The floor is strewn with dead leaves and twigs.
3. There’s a small altar here. On it, you see a small figurine of Marduk worth 200 gold pieces.
Nice!
You can download this experiment using the following link. Please note that the website configuration doesn’t allow pages on “alexschroeder.ch” to download images from “campaignwiki.org” which is why the dungeon map doesn’t show. You can either open the image in another tab, or download the file and run it from your computer. That should work.
Let me know if you write your own generators. I’d love to see some.
#RPG #Knives #2d6
(Please contact me if you want to remove your comment.)
⁂
Thanks!
– bluetyson 2023-01-13 23:41 UTC
---
My Generator now generates a mini-setting with many different characters and some monsters. Still some stuff on the to do list:
– Alex 2023-01-15 14:08 UTC