Print Page

Thursday, March 21, 2019

Warding Undead - adding partial effect to the Turn Undead roll

The cleric's Turn Undead effect in OD&D is an awfully binary affair. Even in the rolled range, the result is T or nothing.  Some drama could be added by having a close miss on the roll have partial effect. Here's a possible rule: A turn roll missed by one or two points give the effect W, Warded. The cleric's holy power is having some effect on the undead but it is still contested. While the Warded condition is in effect, undead attacks that just do conventional damage have it halved, round up and undead attacks that do drains have it downgraded to dice of damage. A shadow's strength drain or a wight's single level of life drain becomes a die of damage, a spectre's two level drain adds two dice of damage while warded. So there is still a fight on, but the party is protected temporarily from the scariest effect of powerful undead, their life drain. The warding effect emanates in a 30' radius around the cleric.

So, how long does warding last? That depends on how strong you want it to be and how much mechanics are worth keeping track of. The simplest answer is one combat round. Next might be 1D6 rounds, or a round plus at the cleric's next action, there is a new roll, that either resolves the condition or continues the ward. There could be rolls against WIS or CHA to maintain concentration each round, or when damaged by an undead, or other finer grained mechanics.

I think I would go with this: the cleric can maintain the ward until choosing to reroll for resolution or damaged by one of the warded undead. While maintaining the ward, the cleric can attack but not cast spells.


Wednesday, March 20, 2019

The Temple of Zozer

This is an example of starting from a run of DunGen, and digging in and editing the results until a usable scenario emerged. It was a basic run, so makes a midsize, unthemed dungeon for a low level party, approximately 1st-3rd in OD&D. I put in about an hour and a half making edits and figuring out what it is about. And another hour and a half making it into the blog post and revising some more. I relabeled edges, added more description & elements to rooms, moved some linking edges, customized the entrance rooms on the map to make them stand out, tweaked names, moved some items to rooms they fit better, renamed monsters, etc, to adjust it from being a hodgepodge to what it is now.

Most of the spiderkin started out as "spiders" but when I looked at it, they needed sentient agency, so the spiderkin were born. Zozer and his religion started out by rationalizing and expanding on some vague hooks. The hooks got religious themed because the preponderance of random rooms that weren't caverns happened to be religious theme rooms. 

On the tip of a peninsula stands the crumbling ruin of a lighthouse and in the caverns beneath, an ancient temple of the god Zozer who traveled the sky in his skyship. The temple is desecrated and overtaken by a Spiderkin cult (think lesser ettercaps, mostly level 1, led by a mad science inclined wizard). Some unlucky mushroom men got captured by the Spiderkin and a few who escaped and are trying to get out completely are on the wandering monster table. They might talk the PCs into rescuing their comrades from the wicked experiments of Vvixx. There are a couple of ways here to draw Zozer's attention and one way to make a distant magical travel to another place for a sequel scenario.


Location Descriptions 
1: Spiral staircase down Tp: Filled with magical darkness,
This trap can be disarmed by concealed lever in the shape of a ship's bow, 
projecting from the wall, just inside the darkness at the head of the stairs.

An incautious person might stumble and fall when stepping onto the first stair in the dark or fall if out into the open space in the middle. The drop is 30 feet.

2: Bridge in cavern A ten foot oar leaning in the corner
A ghostly scene of priests boarding a ship that flies into the sky plays out and repeats hourly.
Ts: 100 silver, Jewelled brooch worth 10 GP
Mg: Necklace of Accents

3: Fane There is a small, empty basin projecting from one wall, 
and an empty oil lamp on another. 
A healing aura will fill the room if holy water is poured 
in the basin and sacred oil lit in the lamp.

4: Cave crossed by stream
M: 3 sick zombies lurking in ambush beneath the water
Ts: Bracelet worth 480 GP

5: Fane
Empty, but for a broken basin and ugly marking scratched into the walls. 
There is are niches that used to hold oil lamps near head height on the walls.

Loose bones, about half a human skeleton, 
are around and some under, the fallen part of the stone basin.

6: Fortified cavern M: 7 spiderkin, 1 is Sivvik, a 3HD monstrous boss who wears a necklace roughly set with the four blue sacred gems (@1000GP as treasure) that fit and activate the altar in the Curtained Cavern (7)
Ts: Torc worth 20 GP, 10 silver, 4 electrum
7: Curtained cavern Hook: Stone altar shaped like a ship, 
stripped of 4 sacred gemstones.
If activated by their replacement, it will heal, cure of conditions, and emit a 30' radius Protection from Evil aura.
This will also draw the attention of the diminished god of the Sky Ark, Zozer.

8: Pentagonal room
Ts: Illuminated Hymnal of Zozer worth 550 GP
Mg: Potion of Levitation
Hook: Rare imported spices in small jars, 
would be very valuable sold to nobles or rich merchants. 
Enough to spice about 100 meals richly, 
200 GP is the maximum value they might sell for.

9: Chapel
Tp: leg breaker pit near entrance
M: 2 spiderkin hiding behind statues
Ts: 20 gold
Mg: Mace +1, +2 vs undead held by statue of Zozer
The mace, Zozer's Fury, will draw the attention of Zozer,
and give its wielder dreams of restoring his power

10: Chamber M: 4 spiderkin pacing, one is poisonous and 2HD

11: Laboratory M: Vvixx, spiderkin wizard 2 and 2 spiderkin assistants performing weird experiments on a mushroom man wired to a strange machine, 
with two more horrified mushroom men in a cage.
Vvixx wears the Ring of Protection +1, with a crown shaped like a winged golden ship.
Ts: 500 silver, Jewelled box worth 120 GP, 40 electrum
Mg: Strong healing potion that can cure spider poison

12: Stream Torchlit by ghostly torches
A skittering voice in the dark
Tp: spiked pit, triggered by opening door
M: 2 unquiet spirits, incorporeal, drain 1D4 constitution (recovered at 1 point per hour) on a hit, 1 HD, AC 0, vulnerable to holy water, turn as 1HD undead
M: 1 water spider
Ts: Ring worth 878 GP beneath the water
Mg: Healing potion lodged amongst some detritus along the bank

13: Stockroom Remains of food stored in amphorae, 
4 red jars of sacred oils (fire plus holy water effect if set alight), 
and moth eaten vestments.
Hook: inscribed pillar
The pillar remains from previous use as a temple. 
The inscription, if deciphered, is in the ancient tongue of the Primacy of the Sky Ark, 
effectively a scroll of a spell that when spoken will transport all in the room to the Sacred Sky Ark, 
a place of holy power, now desecrated and occupied by unholy enemies.

14: Cave with pool Tp: slippery oil trap on sloped floor, 
triggered by tiny earth elemental that looks like a rock, 
would make victims slide into pool and risk drowning
Ts: 5 x 10 GP gem

15: Lair A crumbled lighthouse tower. It shows signs of a sea bear having laired here. 
The sea bear is out on a hunt and won't be back for 4D12 hours. 
A corridor leads away into the remains of the curtain wall.

Links
blocked tunnel 7: Curtained cavern to 3: Fane
channel 1: Spiral staircase down to 3: Fane
rope climb 8: Pentagonal room to 3: Fane
crawlway 2: Bridge in cavern to 7: Curtained cavern
archway 13: Stockroom to 3: Fane
narrow hallway 6: Fortified cavern to 8: Pentagonal room
empty room 12: Stream to 2: Bridge in cavern
barrel vault 5: Fane to 2: Bridge in cavern
secret tunnel 4: Cave crossed by stream to 1: Spiral staircase down
subterranean river 11: Laboratory to 3: Fane
subterranean river 14: Cave with pool to 2: Bridge in cavern
long tunnel 10: Chamber to 6: Fortified cavern
corridor with collar of spikes trap to deter the seabear 15: Lair to 1: Spiral staircase down
passage blocked by huge corpse 9: Chapel to 4: Cave crossed by stream
door 6: Fortified cavern to 7: Curtained cavern
stream 14: Cave with pool to 4: Cave crossed by stream
winding subterranean river 2: Bridge in cavern to 3: Fane
spiked door 10: Chamber to 14: Cave with pool

Wandering Monsters
1: 2 least demonspawn, one is malicious, both have a spiderlike aspect
2: 1 Yellow Slave cultist waiting for orders:
Othoix Boneshaver: charismatic fighter 2, charmed by the Spiderkin wizard Vvixx
3: 5 mushroom men evading capture, one is ribald
4: 3 giant spiders guarding, one is infectious
5: 4 spiderkin


Notes
Possible hook: The wizard Whaltis hired the party to retrieve the Ring of Protection from Zozer Caverns. 

Basic spiderkin are 1HD, look like a cross between people and spiders, and have chitinous hide equivalent to leather armor.  The spiderkin have a poisonous bite they can employ in the round following a successful grapple. Each spiderkin can use this bite once per day.

Organizations involved:
The Sky Dancers - descendants of the cult of Zozer
The Yellow Slaves - Spiderkin cult

Settlements nearby:
Henoxcross, population: 41, middling, half a day's sail to the northwest. Dark Jarfer, population: 126, wealthy, four days walk to the southeast. Chael, population: 50, middling, two days sail to the southwest.

Wednesday, February 6, 2019

Tuesday, October 23, 2018

More Cohesive NPC Groups in DunGen and DunMap

One thing that bothered me a bit is how much of a grab bag each group of  NPCs was, with a completely random selection there was no implied story there. So now there is an experiment towards remedying that.

Here's what I put in this morning.

When generating a group of NPCs, build a virtual hand of cards.
Start with one Fighter card, since simple combatants are the baseline in old school D&D.
Roll a D8 and draw that number of virtual class cards to match rolls on the old random NPC class collection. This makes up the hand of class cards for this group, a subset of the whole class collection, biased towards fighter, and possibly biased towards another class or classes.

For each NPC, the class is a random draw from the hand of classes.  So now it is more likely to make groups that are a wizard and guards or some clerics, a bard, and guards, and similar groups with more than one of the same class, rather than all looking like balanced random PC parties.

Let me know what you think.


Sunday, October 21, 2018

DunGen & DunMap content update

With the new theme tag system in place for details, I spent a couple hours this morning adding to the details list, so there are more to choose from when a theme or two is selected. I'm also experimenting with doubling up on details. Currently one room in six has a detail, and now one in three with a detail gets a second one. I may have to do some sort of weighting system though, so when I add variations, like more kinds of books or corpses, they don't imbalance the table too much in favor of books or corpses.

Saturday, October 20, 2018

Updating my Dungeon Generation Tools

In the past month I have put in a lot of time on DunGen, DunMap, and Hiring Hall.

Hiring Hall got extended to have an option to do hirelings for Astonishing Swordsmen and Sorcerers of Hyperborea. Though it needs another pass to round out the occasional classed NPCs, particularly bringing up their abilities to the minima for their classes.

DunGen and DunMap got a major lift in the handling of notes, with separate editable fields for things that were all being lumped in the notes field. This is the first step in a UI rebuild that should make it a lot better for the case of saving, editing, and running dungeons.

DunMap got an important bug fix to allow it to load the map images of imported dungeons, so it can properly work like DunGen and allow at least some movement from one computer to another. This is also a first step towards allowing some sort of remote save, maybe by storing your dungeons in your Google Drive or Dropbox, so you can access them from other devices, without making them dependent on a server run by me.

Today I finally finished a long planned feature to extend the theme to the little descriptive details for things found in rooms. Now these are tagged like room types, so if you choose the fort and palace theme, you won't get the weird, horrible stuff tagged with the creepy theme. I'll start adding more again, now that I have them all tagged.

Then I did a few passes at squashing bugs that had snuck in while I was making the UI and content changes mentioned above. Maybe fixed half the outstanding bugs?

Thursday, September 20, 2018

Barbarians of Genebackis

This morning I woke early (been doing too much of that lately) and mulled over the idea of running a campaign using Barbarians of Lemuria set in the Erikson and Esslemont's Malazan world. It's a lighter set of mechanics than GURPS that they originally used, better suited to the amount of time and energy that I could invest in campaign creation. The magic system would have to be morphed to fit the world, or replaced. The boons, and flaws would have to be adapted, and a suitable set of regional backgrounds worked up, but the fit would be pretty good. The rate of character advancement would not care about the Conanesque treasure wastage at the end of a session, and be more about "How deep did the character have to dig to survive?". If I actually go with it, I'll post more here.

Saturday, December 2, 2017

Stressed Spell Casting

I am working on houserules for my Astonishing Swordsmen and Sorcerors of Hyperborea campaign this morning. The main topic of the moment is variation from straight old school Vancian magic. Back in my 80s OD&D campaign I addressed making magic less predictable and a bit more epic, by including a D20 roll at every spell cast to get a spell off, with fumble and crit effects, spell level, caster level, and casting attribute bonuses involved, and allowed overcasting beyond spell slots at a penalty to the roll and taking HP damage based on the level of the spell and how the roll went. So casting was pretty reliable until spell slots were used up, then less so, and costing damage to self to overstrain. It worked pretty well, but was not really high on story flavor.
The primary concept is that magic is chimerical and capricious. A sorceror can manage the inherent riskiness of magic by preparation and not overtaxing himself. Vancian "finals cramming, with memory wipeout" style has always seemed odd to me, especially with multiple copies of the same spell being memorized into slots. So I will use each spell slot two ways. It is a spell that the sorceror has prepared enough that day to be as safe as possible and a packet in a sorcerous energy buffer to allow spells to be cast without undue strain. So a caster has two first and one second level slots can have two first and one second level spells prepared, and could cast either first level spell with each first level slot and either one or the prepared second level spell with the second level slot. That's all pretty straightforward and pretty similar to a 3rd Ed or 5th Ed sorcerer.

Various circumstances will add STRESS to a spell casting, and with Stress things are more likely to go wrong and in unpredictable ways. Stress will be a sort of currency, casting a spell with more Stress will likely make it go more spectacularly wrong. Casting with even one level of Stress should be dangerous. More should be really scary. Casting a spell over your level is a deeply desperate measure. This mechanic might replace various printed mechanics relating to armor, scrolls, interruption by damage, etc.

Stress causes I am considering using:
Cause of StressAmount of Stress
Not having the spell prepared1 (2 if spell level > 3 )
Not having the spell slot for itspell level/2
Cast a spell from your list and level range that you have seen but do not have in your book/preparable repertoire2
Each armor step beyond sorcerer's Armor Allowed1
Being struck for damage during the cast and not aborting1
Casting anything besides touch attack/melee escape spells in melee contact1
Cast a spell over your highest spell slot level 2 + 2/level over
Ritual casting - extended time and materials-1
Using a scroll from outside of your school, for a spell shared by your school1
Using a scroll from outside of your school, for a spell not shared by your school2
Casting using a scroll beyond your level1+

Each point of Stress will cause one roll on the table below. For each result, I plan to offer the choice of the rolled result and the next one farther down in the list. Followup rolls will be AFTER the choice. Each point after the first will modify all rolls by +5. Dungeon Crawl Classics has some nice tables in the right direction, so some of these results refer to those tables, which might take some results reinterpretation to fit in.
RollEffect
01-20Escaped without harm
21-30Spell fizzles
31-35Add a level of Stress to all casting until well rested
36-40Wipe out preparation of one spell (the attempted one first, if prepared).
41-45Wipe out energy of one spell slot(the attempted one first, if slot was used, else highest available).
46-49Knocked down
46-49Destruction of minor or consumable magic item on caster (1st) or friend
52-55Attract the unwanted attention of a nearby magically sensitive creature
56-58knocked back 10 feet per level of spell
59-61Destruction of an item in hand
62-64Stunned for one round
65-67DCC Generic Spell Misfire (5-6, pg 120)
68-70Attract the unwanted attention of all nearby magically sensitive creatures
71-73Save vs or Stunned for one turn
74-76Experience point loss - 1D4 x 5% of highest level
77-79DCC Minor Corruption (5-3, pg 116)
80-82Take 1D6 psychic damage per level of spell
83-84Attract the unwanted attention of a powerful but potentially remote magically sensitive being
85-86Roll on the madness table, effect lasts 1D6 days
87-89Take 1D6 damage to a random attribute
91-94DCC Major Corruption (5-4, pg 118) if arcane or Deity Disapproval 5-7 if divine (chaotic or evil divine could be either)
95-97Destruction of a significant magic item on caster or friend
98-100The spell gains/replaces a Mercurial Magic effect (DCC 5-2, pg 111)
101-102Gate in an inimical demon of level equal or up to 2 higher than caster, within 30' of the caster
103-105Destruction of a most significant magic item on caster or friend within 30 feet
106-109DCC Greater Corruption (5-5, pg 119) arcane; deity disapproval, worse of two rolls, if L/G/N divine; C/E divine could be either
110+Attract the (potentially ongoing) attention of an inimical divine being. In this campaign that might mean Cthulhu awakens, and starts disturbing the caster's dreams, sending minions, and eventually showing up itself.

So, Bilzor the Magician, at first level, has cast his one prepared sleep spell for the day, and his party is being overrun by bandits. He tries to save the day by casting another sleep spell, but his only spell slot is drained. He rolls a 47 and has the choice of loss of a minor magic item or attracting the attention of a nearby magically sensitive creature. He picks the item, and since he has a Potion of healing and a level 1 spell scroll, the GM dices and the potion bottle shatters. Had he picked the attention, he gets a creepy being watched feeling, and the DM consults his notes and decides the Ixian witch a level deeper in the dungeon feels the emanations of the reckless spell, and gets a glimspe of Bilzor in her mind's eye, and a general sense of where he is, and might come hunting for him or is at least alerted, can make preparations, like dispatching a minion to spy, and is not surprised by the party for the next day.

Later in the fight, the party's fighter goes down, Bilzor is beset by a pair of bandits, casts a further sleep spell, and is struck by one of them before he gets it off. This time, he'll have 3 Stress, for overcasting beyond his slots, melee, and being injured while casting, and will be adding 10 to each of three rolls. With a 16 first roll that would have succeeded without backfire in the first instance, he now has a 26 result, and the sleep spell fizzles or he has additional Stress for any further casts until he can rest for the day. He chooses the Stress so his spell might go off. The second stress roll of 77 becomes 87 and he declines the permanence of DCC major corruption and takes a 3 point hit to his CHA after followup rolls, the DM decides these points will recover at one per week. The third roll of 52 becomes 62 and he is stunned for a round, declining the DCC misfire table. Bilzor might survive to recover that CHA if the spell puts all his enemies to sleep.

I'll probably tweak this some more, but it gets pretty close to what I want in letting low level casters not be one trick ponies, but with significant risks, and letting higher level casters get themselves into deep trouble when they attempt great feats of magic.

Sunday, November 26, 2017

Putting on my DM Hat Again with Astonishing Swordsmen and Sorcerers of Hyperborea

The Plan

I got the second edition book for Astonishing Swordsmen and Sorcerers of Hyperborea a couple weeks ago via the Kickstarter. I've had the first edition boxed set for a few years, but never got around to actually running it. This time I intend to give it a whirl.

So, after reading a lot of it, and putting together a few starting characters that'll probably see service as pregens or NPCs, I decided this morning that the way to actually make myself focus is to put out the call. Here's my initial post on G+ and Facebook:

"So I'm thinking about setting up to try running AS&SH on Roll20. Potential interest? No time picked yet, but I'd aim to have a starter scenario ready in about a week and do the schedule matching dance along the way. In person is also possible if SF Bay Area people are interested."

Given the positive initial response, I got started today on a scenario. There's now enough that I could run it in a pinch, and time to polish it a bit. Now I have to fit it onto the campaign map and flesh it out some.

Sound fun? Leave a comment. Maybe start rolling up a character. The Rules PDF is on still on Black Friday to Cyber Monday sale at http://www.drivethrurpg.com/product/221806/Astonishing-Swordsmen--Sorcerers-of-Hyperborea-Second-Edition?term=astonishing+sword&test_epoch=0

What is this Astonishing Swordsmen and Sorcerors of Hyberborea Game?

Imagine D&D was written without the influence of Tolkien, but heavily influenced by Weird Tales authors like Robert E. Howard and Howard Lovecraft. The setting is a pocket dimension overlaying the uttermost North, inhabited by groups descended from historical and not quite historical peoples of the Earth, Vikings who were swept off by a storm, Cthulhu cultists that crossed over in a ritual that went sideways, and the like. The rules have a lot of AD&D flavor, but PCs are assorted humans or nearly human, and not elves or dwarfs or halflings and the monsters have a similar filtering.

Getting Started

We'll go with method II for PC attributes.
Roll 3D6 for each attribute in order: Strength, Dexterity, Constitution, Intelligence, Wisdom, Charisma

Then do it two more times and pick the set you like best out of the three sets.

Then you can trade points by paying down two in one attribute to bump another up one.  The range is bounded 3-18, no boosting to 19, and no percentiles on 18 for fighters.

The ranges on the attributes for bonuses and penalties is 3, 4-6, 7-8, 9-12, 13-14, 15-16, 17, 18. The bonuses are flatter than late editions of D&D, with an 18 giving +2 to melee attacks and +3 to damage, for instance.

Hit Dice for classes are pretty much what you would expect, D10s for Fighters, D4s for Magicians, D6s for Thieves, D8s for Clerics. Subclasses of each of the main four may redefine that up or down.

House Rule: Take the best of three rolls at first level, and best of two rolls at each level thereafter. 

There is a standard starting gear pack for each class and subclass. We'll go with those, or you can swap to similarly valued weapons and other gear that makes sense for your character.

This is a game with class and subclass specific EXPs for levelling, like older flavors of D&D. The level table goes up to level 12, it is unlikely the campaign will last to get close to that cap.

The classes very briefly summarized, with required stats, prime reqs, and notes,just enough to give flavor and see that you qualify (Prime requisites for EXP are in ALL CAPS):

Fighter, STR 9
Magician, INT 9
Cleric, WIS 9
Thief,  DEX 9, Rolls thief abilities on a D12, so abilities are expressed in chances in 12 of success

Subclasses have two Prime Requisites and both have to be 16+ for the bonus.

Subclasses of Fighter, all have more special rules, but base fighter gets the most weapon specialization bonuses, and extra attacks against weak mooks:
Barbarian STR 13, DEX 13, Con 13, D12 HD, a lot of wilderness and adventure related skills and abilities, No Rage. Great saves, Think Conan.
Berserker STR 15, CON 15, D12 Hd, Strong, multifaceted Rage 1/day/4 levels, dangerous to friends if still raging when enemies die, a few skills, Great saves
Cataphract STR 9, Dex 9, Wis 9, CHA 9, Mounted combat specialists, honorable heavy knights with high damage couched lance close order charge. Kinda meh dismounted for a dungeon crawl, or in the mountains, or in the swamps...
Huntsman STR 9, Dex 9, WIS 9, Cha 12, Wilderness and prey&pet animal related skills, max of Med armor
Paladin STR 9, Dex 9, Wis 9, CHA 15 Classic LG Paladin with spells at higher levels 7+
Ranger STR 9, Dex 9, Int 9, WIS 9 a lot of ranger type skills and has druid and mage type spells at upper levels 7+, sort of an X Files focus, with Lovecraftian special enemies instead of the usual ones
Warlock STR 12, INT 12 (some Wis 12), D8 HD fighter-mage hybrid, spells from 1st, any mage specialty, L or M armor

Subclasses of Magician
Cryomancer INT 9, WIS 9- cold focused, it is the demi-arctic
Pyromancer INT 9, WIS 9 - fire focus is popular when its cold 
Necromancer INT 9 WIS 9, has turn/command undead ability from 3rd level
Illusionist DEX 9, INT 9
Witch INT 9, Wis 9, CHA 12 - Spell list and witch trope skills, starting with potion brewing

Subclasses of Cleric
Druid WIS 9, CHA 12, shapechange starts at 5th
Monk Str 9, DEX 9, WIS 9, classic martial arts monk with some thief skills
Priest WIS 9, CHA 9, D4 HD more spells, less fight, no armor, few favored weapons, deity related bonuses, usually specific extra spells
Runegraver STR 9, WIS 12 Nordic flavor, Fighter-like combat ability, limited spell list, no turning, berserker minions at high level instead of the usual mix 
Shaman INT 9, WIS 12 D6 HD, shamanistic cleric/druid  plus mage/necro hybrid

Subclasses of Thief
Assassin Str 9, DEX 9, INT 9
Bard Str 9, DEX 9, Int 9, Wis 9, CHA 15 D8 HD  A few Thief skills, mez, Druid + Illusionist spells
Legerdemainist DEX 12, INT 12, Wis 12 if mage subclass requires it, Mage hybrid, pick specilization
Purloiner DEX 12, WIS 12 cleric hybrid
Scout DEX 9, INT 9, less theft, more woodsy or dungeon crawling skill focus

Races

Amazon Women warriors are legendary; their men, not so much.
Atlantis sank under the waves and Atlanteans are now amphibious and look it
Common (after a few generations of intermixing, unclear ancestry of multiple lineages)
Esquimaux
Hyperboreans are the tall, thin, pale, longlived indigenes, who consider all the Earth exile descendents beneath them, as snooty as other games' high elves without the pointy ears and infravision.
Ixians - Scythian, Egyptian, Persian heritage, Priests, Witches, Necromancers run society, the Stygians of this world
Kelts -still led by druids with Celtic-style society
Kimmerians, Caucusus Cimmerian derived, but with Conan Cimmerian flavor, hate Ixians, some steppe nomads, some are catacomb dwellers
Kimmeri-Kelts - barbaric hybrid race
Picts 
Halfblood Picts - Bloodthirsty savages, threatening civilization, orc-like niche
Vikings
Other Races - small numbers from nearly any earthly place and time, either recent arrivals or their ancestors stayed isolated

So roll up a character's attributes and choose a class it suits if you are interested in joining in.









Monday, May 15, 2017

Elm One Day In

I've been interested in the Elm programming language for several months, reading and poking around some at code examples but with too many hobbies competing, only finally started really writing some yesterday.

I usually do a gaming related project to learn a new programming language or framework on my own time, because that is where I have software itches to scratch. This time I started with the simple die roll example and my first step was learning how to take a program where the model is a single Integer that gets updated to a record with two attributes, one the value rolled on the die and the other the size of die to roll. Finding and wrapping my head around the pattern to write to an attribute of a model was my first hurdle.

That set me up for a first serious project. I have been playing a lot of D&D 5e lately and my character sheet has gotten pretty messy. I've been procrastinating on the rewrite, so making a character sheet application that avoids getting messy and can export nice copies is a natural fit.  Also at work, we are thinking about rewriting the proposal submission application, which is a form of similar complexity to a D&D character sheet, with a complex nested data structure and a lot of options. I'd like to be able to say with confidence that we can handle it in Elm and be better off for having used it.

So, I hid away the die roller part of the UI with a style of display:none, but kept it around as the core of an in situ dice rolling part,  and started into the character sheet.

Design spec: This will be a web based single page application, well loosely SPA since a full character sheet for a spellcaster can run to four or five paper pages, and I'll probably be hiding portions away with paging or tabs of some sort. It will be a full character sheet that can handle multiclassing at least up to three classes. It might not go beyond the Player's Handbook in terms of what it supports with known classes and such, but I might allow for typing in some other options. The displayed form on the web should be usable in game from tablet or laptop, maybe phone but its an awfully big form to navigate on a phone. It will have localstorage persistence for offline use and probably use Dropbox or Google Drive as the personal server storage for accessing the same sheet from multiple devices, but I'm not planning to provide a server that users would depend on with all the authentication, uptime, and cost/monetization issues that entails. In that regard, it will autosave the sheet to at least localstorage as changes are made, with syncing to update remote storage whenever access is good. There will be some sort of list selector to choose the character to to load into the sheet, and something to delete unwanted characters. After a CSS design pass, it should print out a pleasant sheet to use. There will be nested structured data for things like weapons blocks and spell lists, but a lot of things that are simple lists like mundane possessions and encounters to remember will just be free text in text areas. It might be worthwhile to support markdown in text areas.

I spent most of my Sunday coding on it, and by the end had about 500 lines of good code that displayed and recorded edits to the model for pretty much all the top level fields. I intentionally put off the nested structures, knowing they would be more complex, and did zero to minimal CSS styling, leaving that for after things basically work.

I downloaded Atom for the editor and a few Elm related packages for it. It mostly worked for me but I was seeing errors from the package that was trying to auto run elm-format for me and did not go down the rabbit hole of working that out. Instead I manually ran elm-format once at command line later in the day, and mostly just tried to code close to what it would output, which slowed me a little bit. Should probably have run it more often. I had the project sitting in my Dropbox for easy access from other machines, so I did not initialize it as a git repo, but will probably do that in my next big session on it.

 It was a very productive flow, using elm-reactor as the dev server and the Chrome browser to see the results. I already love the Elm compiler, which made it very easy to clean up simple mistakes. The debugger was fun to play with, but not too necessary for the simple, repetitive sort of coding I was doing. The workflow for adding a plain text field was very straightforward. Add a line for then new attribute to the model with name and type. Add the new attribute to the initialization record to match the model, with the default value. Add an update message for it to the messages list. Define the function that responds to the message according to one of two patterns, one where it is just text, another where the value needs to be an integer. Add the field and any framing HTML like a list item or label to the view, with the onInput attribute of the field calling the updater message function. Save and go look at the web page to see if it worked or there are compiler errors to fix.  Adding a batch of them at once was easy, the compiler is good at pointing out missing ones in some section, mismatch typos, and similar problems, so I could move along quickly.  Using an editor with syntax color and bracket/parentheses matching support has the usual benefits. Besides something like fifty basic input fields, I did the first dependent attribute calculations to show the die roll modifiers based on the primary attributes

At that point I had two possible places to go - work out the beginnings of persistence to localstorage or start to tackle the deeper data structures beyond placement of H2 headers in the character sheet to show where they would go.

I went with trying to tackle one of the simpler data structures, the saving throws section where it should have checkbox like controls to mark the two that get the proficiency bonus and fields to enter the value. I also started with intent to have a bonus section for special bonuses to saves like from magic items or feats, and to list the source of bonus, but did not expose that part of each saving throw model right away.

This is where I hit the wall. In Elm you can reach down multiple levels by dot notation in getters but not in setters.  So I couldn't say what I initially tried, { model | saves.strength.proficient = not model.saves.strength.proficient } as the update response to clicking the checkbox for the strength saving throw proficiency. Stared at that awhile and started googling for what to do about it.

From what I see, you end up writing a custom setter function that reaches down and updates the innermost record you are updating an attribute on, and the one that encloses that, etc, all the way out. These can be kind of long, so you probably want to tuck them in a module devoted to a related collection of them There is a Focus module from Evan that can simplify this process some, with caveats about performance. There is a blog post about it by Wouter In t Velt that explains how to make some helper functions to shorten it.

But all options are enough of a pain that I didn't move on from there last night, and am considering flattening out the saving throws data structure and possibly doing the calculable dependent values based on character class selection, character level (and thus proficency bonus), and primary attribute modifier, and only making editable fields for special bonuses. The downside is less flexibility for additional character classess. I'll also start looking deeper into the ToDoMVC example to see how to update nested elements that are members of variable length lists like spells and weapon stat blocks.

The take home as a beginner one day into programming in Elm is that Elm is very pleasant and productive to work in if you understand the basics, with a stumbling block once you have to work with nested data models. I expect that is just the first place where I'll be paying back for the benefits of immutability and functional programming. So far though, it feels like a good trade. I want to get back in there and work on the next part.