Showing posts with label tools. Show all posts
Showing posts with label tools. Show all posts

Monday, 6 January 2020

Randomly Eroded Messages

I was reading about WIPP and other long-term nuclear waste disposal sites, and it occurred to me that the proposed warning markers (for after the site is decommissioned in the next couple of decades) are an interesting thing for adventuring PCs to stumble across while hexcrawling. Both the physical shape of the markers -- an attempt to convey meaning through architectural form alone -- and the textual messages, which would rely on maintenance and future civilisations appending copies translated into their own language.

So to facilitate this -- and for any other case where you might want to generate multiple copies of the same text each damaged differently (e.g an abandoned library) -- I wrote a small script. You can change the font to wingdings or something if you want to give untranslated copies to players, or hand them out as-is if they have access to comprehend languages or proficiency in ancient languages. The Python script and a PDF of 20 pregenerated messages are on my google drive. The PDF is A4-sized -- just print out single-sided, cut each page in half, and you'll have 20 copies. Roll a d20 or just hand out a random one each time the party finds a new marker. Even with aggressive "erosion" the message is still quite readable, so if you want to obscure, say, the word "radioactive" some more, tear off the top of the message to simulate a broken marker.

An example message:

These structures mark an area used to bury radioactive wastes and hazardous materials. This place was chosen to put these dangerous materials far away from people and other living things. The rock and water in this area may not look, feel or smell unusual, but may be poisoned by radioactive wastes and hazardous materials. When radioactive matter decays, it gives off invisible energy that can destroy or damage people, animals, and plants.

Do not drill here. Do not dig here. Do not do anything with rocks or water in this area.

Do not destroy this marker. This marking system has been designed to last 10,000 years. If the marker is difficult to read, add new markers composed of longer-lasting materials and copy this message in your language onto them.

Monday, 30 December 2019

A small Python script for die-drop tables

Someone was asking about ways to do die-drop tables online (other than pointing a webcam at a physical sheet of paper and dice, I guess). At first I was thinking about some program that opens a png, picks a random pixel, and looks up the RGB value to determine what's encountered. Then I realised if I could make it work with Hex Kit, it'd be way prettier. And it turns out Hex Kit's .map files are really just renamed .json files, so it's super-easy to just pick a random tile in that json, get the filepath to the associated image for that tile, and look up the filename in some user-defined dictionary.

So here's a quick proof of concept. You'll have to download the script and run it in the command line, since I still have no idea how to make a proper webapp. It's pretty limited, but maybe it's of some use to people.

The example provided is a small random encounter table that's for use in a city, but based on the surrounding surrounding wilderness. Is it a good random table? No. Does it suffice as an example? Sure, I guess.

Human-Readable Version

Roll a d6 on the above hex map. Note which hex type the die lands upon, look it up in the following table. Some entries also use the face-up side of the die. Treat coastal hexes as their land terrain-type, not as ocean.

Hex Type Encounter
Jungle (dark green) Traders from the jungle clans. They have [1. brightly coloured snakes, 2. shavings of bark from various medicinal trees, 3. river-gold, painstakingly panned, 4. six glowing orbs of various sizes, looted from a sunken temple, 5. giant capybaras, excellent pack animals, 6. scavenged goods from the last, failed military expedition into the mountains] for sale.
Meadow (light green) [1. A few, 2-3. Several, 4-5. Dozens of, 6. Hundreds of] farmers angry at the viceroy's new taxes
Mountain (brown) The elephant-powered klaxon sounds. An air-raid from those goddamn mountain pterodactyls again. They carry incendiary bombs in their talons. Parents shoo their children into stone cellars.
Ocean (blue) A ship sails into port, bearing the flag of [1. Redbeard's pirates, 2-3. the Imperial Navy, 4. the Open-Handed Ones, 5. one of the petty river-kings, 6. a PLAGUE SHIP]
Swamp (purple) The swamp-sorcerer has sent envoys to purchase research materials. They are looking for [1. a live bear, 2. a chunk of floatstone from the Flying Fortress, 3. the bitter tears of a child who's just learned Santa isn't real, 4. silt from one of the jungle's more alkaline rivers, 5. tobacco, the good kind, 6. a human heart] and will pay well above market price for speedy delivery.
Volcano (orange) KRAKABOOOOOOOOOOOM! The volcano erupts, huge pyroclastic cloud sweeping over the farming hinterland. You see wealthy folk rushing to buy as many supplies as possible and hunker down, while the poor look on with dread at what is to come.

Thursday, 21 February 2019

BX Table Maker

EDIT: source now hosted on gitlab. Just download the html file and open it in your preferred browser. That repo is where I'll be putting adaptations for other old-school systems (and probably D&D 3.5/PF 1e too).

Have you come across a cool OSR class but it's only defined as "saves as Cleric, attacks as Fighter" and cross-referencing tables sounds like a chore?
Are you working on a class for your blog and HTML table tags getting you down?

Well I've been there, so I wrote this. It's all in javascript, the processing is all done in your browser. So you can save an offline copy of this page, or right-click & inspect the page source first if you have some noscript extension, and so you can hack it to your liking. Maybe you think clerics should get a spell at 1st level, you want to extend level caps, or you prefer different saving throw categories to the traditional ones.

Note that the raw html output doesn't include the table styling. You can find a copy of it here. I'll return to this and add further instructions for fellow CSS noobs when it's not 12:40am.

Yes, I do intend to adapt this for other versions of D&D and/or retroclones thereof, time permitting.

 Level Cap
 XP Progression
 Hit Dice As
 Attacks As
 Saves As
 Spell Progression

 Typeface
 Font Size
 Colour Palette
 Output Format

Thursday, 7 February 2019

Making tRPG class tables more friendly for screen readers

This is a test of some table-related HTML I've been learning. The goal is to be compatible with screen readers. If you use a screen reader, and the following is not intelligible or could be improved, please let me know.

The HTML for ll 7 core B/X D&D classes, CSS, and colour-toggling JS function can all be found on this gitlab file. Please feel free to adapt them for your own projects.

Elf Level Progression
Level XP Hit Dice AC0* Saving Throws Spells
Death Wands Paralysis Breath Spells 1st 2nd 3rd 4th 5th
1st 0 1d6 19 12 13 13 15 15 1
2nd 4,000 2d6 19 12 13 13 15 15 2
3rd 8,000 3d6 19 12 13 13 15 15 2 1
4th 16,000 4d6 17 10 11 11 13 12 2 2
5th 32,000 5d6 17 10 11 11 13 12 2 2 1
6th 64,000 6d6 17 10 11 11 13 12 2 2 2
7th 120,000 7d6 14 8 9 9 10 10 3 2 2 1
8th 250,000 8d6 14 8 9 9 10 10 3 3 2 2
9th 400,000 9d6 14 8 9 9 10 10 3 3 3 2 1
10th 600,000 9d6+2 12 6 7 8 8 8 3 3 3 3 2
*AC0: Modified attack roll needed to hit Armour Class 0.
Hit point modifiers from CON no longer apply.

Thursday, 31 January 2019

Noisy Map Maker

I made a spreadsheet (it's a Google Sheet) that takes a dungeon map like this one:

gridded dungeon map to be transformed by various rules
Raw map data

...and turns it into an imperfect, noisy dungeon map handout for your players. Naturally there's lots of ways to introduce noise/errors to an image, but I wanted one that was solveable by clever players. That is, it'd still have some use if they couldn't solve the puzzle, but if they could, they'd know the dungeon layout.

(in this case, not the presence of doors or walls dividing adjacent rooms, as the map scale is 10 ft per cell. But you could make a map to a different scale)

How it works is by assigning a random number from one of two lists to a cell, based on whether the corresponding cell for the true map is blank or not. The two lists follow / don't follow a simple mathematical rule. Then a simple conditional formatting rule fills the cell based on whether the number is above a certain threshold. The conditional formatting creates the "noise", while cracking the rule gets you back to the true underlying information.

The easiest version of this puzzle just uses two adjacent sets of integers. You can even let players have control over the conditional formatting if a laptop or tablet is available, letting them home in on the correct threshold:

gridded dungeon map with adjacent-intervals rule applied
Numbers in [0,255] / Numbers in [256,512]

A simple divisibility rule is of middling difficulty.

gridded dungeon map with divisible-by-3 rule applied
Divisible by 3 / Not divisible by 3

Probably the hardest of the three pre-populated options is prime numbers. Though if you used this one, you could be sneaky here and indicate secret doors or similar with a 1, as 1 is neither prime nor composite.

gridded dungeon map with prime-number rule applied
Composite numbers / Prime numbers

You can download and mess around with the sheet, defining your own number lists (and associated rule to crack) and tweaking the conditional formatting threshold to have the right amount of noise. If you use this in a game, let me know how it goes!

Just remember the two lists must have different averages, otherwise the conditional formatting applied to the cells won't tell players much. A list of the first 1,000 even numbers and the first 1,000 odd numbers will look completely random if the conditional formatting rule is "colour cells with value > 1000". The goal is to look sufficiently nonrandom so as to tip off the players there's actual meaning to decipher.

But diegetically, what is this handout anyway?
d6 Reason for the map
1. An ancient alien scannerbot, caked with dust, has done a geophysical survey of the dungeon. Its memory is corrupted, but its hologram display function still works. The map is unlikely to include recent dungeon extensions or geologic shifts.
2. A room has a huge crystal, glowing amber, set in the ceiling. Dust motes hover in the light, apparently trying to tell you something. They respond to your thoughts more than they do drafts of air, their motion growing less random the more you concentrate. In this case the numbers aren't literal, decoding them represents this concentration.
3. Extremely paranoid da Vinci-type gnome was the dungeon mapper for an adventuring party, disguising her findings as apparent gibberish numbers. Her skeleton lies in a trapped secret corridor, her cipher too devious for her party to decipher and come to her aid. Her worldly possessions, including the journal with this map, are for sale at an auction.
4. An imp bound in chains of rock-salt sits impudently in a glowing magic circle. Eager to tempt the party into a dark deal he quickly pens the map in immaculate calligraphy for them. He promises them the trick to reading it, if only they would release him.
5. Each number is actually meaningful. An ethereal telepath-spider unable to sense the physical world made the map to chart what it perceived as the dungeon layout. The map is a hovering blue tapestry, that can only be manipulated by ghosts and force effects. The dungeon is enchanted such that if two creature stand in spots with the same number, they can see through eah other's eyes and telepathically communicate. There is no saving throw to resist this effect, but moving to a different spot breaks the link.
6. A colossal brain-eating catfish lurks in a cavern behind a secret passage. They have seeded the dungeon with clues, in the hopes of luring only the most intelligent, piquant brains to their demesne.