Off the Path: HERO Power Construction

A brief diversion on the Words of Power exploration, I thought it worth providing a bit of an overview of how powers are constructed in HERO System. This looks like it will become important soon.


Powers in HERO are based on effect, with descriptors added to give flavor and something to hook abilities on. At its root, a fireball and a lightning bolt are very similar: they do damage at range. In HERO 6e terms, and for the sake of argument, they both use the Blast power (previous editions it was ‘Energy Blast’, but the same power was used for energy and physical blasts. Blast costs 5 points per 1d6 damage, and has a range directly proportional to points. The descriptors provide narrative and descriptive elements that can be applied, and can influence how these interact with other powers. For instance, a staff that augments fire powers can make the fireball more powerful, but do nothing for the lightning bolt. For this example, we’ll work with an 8d6 blast in both cases (worth 40 points, the Base Cost).

That is at the base… but powers are not just the base effect. In this case ‘fireball’ implies that it fills a circular area, while a lightning bolt probably zaps anything between where the bolt started and where it ends. The fireball might be best defined as having a ‘radius area of effect’ that determines how much gets charred, and the lightning bolt could be defined as having a ‘line area of effect’. This sounds like it should make the spells better than without, providing an advantage. It would be reasonable to expect this to be more expensive… and it is.


The 40 point base cost is just where we start. Advantages are measured in units of “+¼” (and presented in simple form: the next step up from a +¼ advantage is a +½ advantage, not a +2/4 advantage). You  multiply the base cost by (1+sum of advantages) to get the Active Cost, the measure of how powerful the power is. A 4d6 Blast (20 Base Cost) with +1 of advantages would have an Active Cost of 40, same as the 8d6 Blast (and in principle is as powerful — it might do less base damage, but the advantages might make it better than the 8d6 Blast, such as if it were armor piercing and able to ignore some armor, or indirect and not needing line of effect to the target).

In the Pathfinder Roleplaying Game, fireball has a 20-foot radius. This doesn’t align exactly with HERO System (which uses metric on a hex grid, each hex being 2 metres across), but 20 feet is four squares, and if I equate that to four hexes that would be 8 metres. In reality this is a little more than 25 feet, but in game terms I’ll consider this a rounding error. A power in HERO with an 8-metre radius would have a “+¾” advantage. The fireball has an Active Cost of 40*(1+¾)= 70 points.

With the lightning bolt I’m going to do something different. In the Pathfinder Roleplaying Game this is a 120-foot line, but instead I’m going to make it indirect, a +½ advantage that means I don’t need line of effect to my target. Unlike the fireball I affect only a single target, but I all lightning from the sky to strike my enemies, and don’t need to be able to reach them directly. The indirect advantages increases my Active Cost to (40*(1+½)=) 60 points, but ‘calling lightning from the sky’ sounds like I need to be able to see the sky. That limits how I can use the spell, it’s not going to be much use underground.


Limitations serve two purposes in power construction. They lower the Real Cost of a power to make it affordable (in a Heroic-grade game a 60- or 70-point power would consume a very large fraction of a character’s build resources), they provide restrictions on the use of a power to make the powers more interesting to play, and they help make the powers more distinct.

As advantages, limitations are measured in units of ¼, but are marked as negative values as a reminder. Where the Base Cost is multiplied by (1+advantages) to get the Active Cost, the Active Cost is divided by (1+absolute value of limitations). That is, a 60 Active Cost power with -½ limitation would be worth 60/(1+½)= 40 character points.

In the Pathfinder Roleplaying Game, casting fireball has verbal, somatic, and material components. In HERO terms these would be Incantations (verbal utterance for the purpose of activating power and no other purpose, recognizable as unusual; preventing speech prevents the power from being used: -¼), Gestures (free and visible movement for the purpose of activating power and no other purpose, recognizable as unusual; preventing free movement prevents the power from being used, -¼), and a Focus (“Obvious Accessible Focus”: it’s clear that the bat guano and sulphur are used for unusual purpose, and thus ‘obvious’, they can be knocked out of hand (spoiling the spell) with a single action, and thus ‘accessible’, -1… foci are worth a lot in HERO). This is a total of -1½ limitation. This reduces the Real Cost to (70/(1+1½)=) 28 character points. Still awfully big for a heroic-grade HERO campaign, but you wouldn’t often see a starting PC with a 70 Active Point spell.

The lightning bolt, on the other hand, requires some more adjudication. There actually isn’t an inherent “must be able to see the sky” limitation, so the GM will need to determine a limitation value based on campaign expectation. If the campaign is largely set outdoors, this might be only a -¼ limitation: the sky is almost always available. If the campaign is in the Underdark and the sky is only rarely visible it might be -1½ (or even more! and this is probably a silly spell to pick). I’m going to guess here and say that the spell is usable roughly half the time, which is a -1 limitation (and I’ll be strict — if I made it a -½ limitation I’d likely still let it work in caves and rooms with windows, as long as the sky was reachable). I’m going to say that this spell has verbal and somatic components (-½ together), but that each casting consumes a wand made from the branch of a lightning-struck oak (OAF expendable, hard to get: -1¼). This gives a Real Cost of (60/(1+1.75)=) 21.8181… points — which in HERO rounds down to 21 points to 22 points.

Thanks to Chakat for the correction, I was misremembering a different example. Rounding in HERO is to the nearest integer, with half-points being rounded in the character’s favor. The only exception I can find is that the figured SPEED attribute always truncates — a character with Dex 18 would make DEX checks at 13- (i.e. 9+18/5 = 12.6, rounds up to 13) and have a base SPD of 2.8 (1 + DEX/10), which gets treated as SPD 2 for determining actions.

Closing Comments

This has been a brief explanation of power construction in HERO System. Even just as far as I’ve gone here, the flexibility inherent in the system should be evident… and I left out some of the funkier options, such as:

  • Naked advantages, advantages bought ‘as powers’ that can be applied to other powers. Buy an advantage as its own power, such as being able to Autofire ‘any weapon’ up to a certain Active Cost: take the Active cost of the biggest effect the Autofire can be used with, multiply by the Autofire advantage cost, and treat the result as the base cost of the ‘Autofire power’.
  • Partially-limited powers, where you can apply limitations to some but not all of a power. For instance, the 8d6 ‘fireball’ above has Gestures, Incantations, and OAF limitations. The spell could be written as being 6d6 with those limitations but having 4d6 more power available if other limitations (such as Extra Endurance, Extra Time and Concentration, say) are applied. You can cast a 6d6 fireball ‘normally’, or exert yourself (Extra Endurance, Extra Time, and Concentration) to cast a 10d6 fireball. The Active and Real costs of the two pieces would be calculated and added together to find the final values for the spell.
  • Power frameworks, where thematically related powers are grouped together to reduce their Real cost. This gives you more powers available at once, but there are restrictions on how you can use them. For instance, a ‘multipower laser rifle’ might have several ‘configurations’ that allow you to use Blast, Killing Attack, each with Autofire or Armor Piercing or Area of Effect… but only one configuration at a time. Lots of options, cheaper than getting six different items, but only one is usable at a time.

Hopefully this will help make my next Words of Power articles easier to understand. I’m pretty sure I can lean on this power construction mechanism to build and apply the Words of Power framework I’m devising.

Letters from the Flaming Crab Kickstarter

Alex Abel — the Flaming Crab himself — is Kickstarting the 2017 Letters from the Flaming Crab series.

These are small (15-20 page), flavorful supplements that explore topics often overlooked in many roleplaying games, topics that help round out a setting and make it more than a murderhobo arena.

Topics from 2016 include:

  • Winged Cavalry Welcome to our first issue: Winged Cavalry! Our team of writers brings you the master of aerial combat: the wind warden, an alternate class for the cavalier. And 4 orders for the wind warden: the order of the feather (pegasus), order of the hunt (pteranodon), order of the spire (magic carpet), and the order of talon and mane (griffon). In addition, we have a few advanced flying maneuvers in the book. “Do a barrel roll!”
  • Culinary Magic Within Culinary Magic you’ll find rules for culinary magic, a variety of recipes, new items, feats, and traits for magical bakers and chefs, and two new archetypes: the kitchen witch and the performing chef.
  • Haunted Places Within Haunted Places, you’ll find four haunts (one is sometimes also a loci), one new medium spirit, and three new archetypes inspired by those haunts just in time for the spookiest day of the year.
  • Wheel of the Year Wheel of the Year features 9 pagan holidays, from Yule to Samhain!For each holiday we have a brief description, the types of deities that are revered, mystic resonances (each holiday has a school of magic that’s enhanced and one that’s weakened), and a specific ritual/spell that may be cast during these events. Without celebrations, a campaign world is a sterile place. Breathe some life into your game with holidays!
  • Iconic Princesses Iconic Princesses features 4 women from classic fairy tales ready to be introduced into your campaign as NPCs or even as PCs.Each “princess” is detailed in the established iconic format (1st, 7th, and 12th level) along with a unique magic item, feat, or spell. Inside you’ll find:
    • Beauty. A vengeful witch that protects the powerless and curses their oppressors.
    • Mulan. A resourceful brawler that defends her homeland in her father’s stead.
    • Rapunzel. A disciplined monk with a hardened mind and barbed hair.
    • Snow White. A wandering occultist with a zest for battle.
  • Here There Be (tiny) Dragons Here There Be (tiny) Dragons presents six new Tiny sized dragons to be used as friend, foe, or improved familiar! It also features new archetypes and a new class of scaling wondrous item, dragonstones, that can only be used by a dragon and non-dragon in cooperation!
  • Her Story In honor of Women’s History Month, Her Story tells the tales of 8 incredible women (from Earth). It also features “crunch” inspired by each woman. (For example, Saint Clare Assisi inspired a pious Inquisitor archetype and 5 new virtues.) Inside you’ll find:
    • Countess Elizabeth Báthory de Ecsed
    • Queen Boudicca
    • Saint Clare of Assisi
    • Doctor Marie Curie
    • Hatshepsut
    • Joan of Arc
    • Osh-Tisch
    • Mary Shelley
  • Coins & Credit Within Coins and Credit (our biggest Letter, yet!), we cover the topic of money and how to make it fit in your campaign (and your bag of holding).
    The first part of our 8th Letter is all about coins. We cover mundane and magical currency crafting, counterfeiting, coin size, exchange rates, and transportation of coins. Slaying the dragon is great and all, but how many coins can you fit in a leather bag? And is the party barbarian strong enough to carry the whole hoard? Part two is on banks. Surely you don’t want to lug around all that gold? Even if you got it converted to mithral pieces, tens of thousands of metal coins is a lot for our heroes! We cover the different types of banks, account types, loans, account tiers, the likelihood of finding banks in different settlements, and example banks!Finally, part three covers credit. Don’t worry if your head is still spinning from tax season. We make things simple for you and your adventuring party! We cover tabs, letters of credit, promissory notes, banknotes, and magic items to assist in the transfer of wealth!
  • Hygiene In the days of old, the public bathhouse was as much of a social center as any tavern. So why not mix things up and start your adventure somewhere a little more clean? Sure, the half-orc may object to soapy water (after all, he’d get a -2 penalty on Diplomacy checks against his own people for being dishonorably cleansed of his enemy’s blood), but I’m sure the elf noble wouldn’t object to spending time in a more refined and relaxing establishment.Within Hygiene, we cover both the effects of neglecting cleanliness and places where you can scrub after delving in a mucky dungeon! Included are maps for each of the 6 locations inside, including 3 bathhouses (Japanese, Roman, meditative), a barber shop, laundry pools, and a salon.
  • County Faire Within County Faire, we take a trip to the fantastic Fantasia County Faire! It’s the perfect location to take a break from dragon slaying and dungeon delving! There is plenty to do!Play a variety of games of skill and chance! Can you hold your alcohol like a dwarf during the chug run? How many hot peppers can you handle in the flame mouth competition?See one of a kind spectacles and events! The finest cows, goats, sheep, and pigs are on display at the livestock contest! Watch a variety of animal races, everything from horses to humans to rats!Between events, be sure to pick up delectable treats. The faire has anything and everything you crave (most of it is fried, of course)! Children and adults with a sweet tooth will especially love dropping by Sugar’s Sweets!We’ve also included a mini adventure for 1st or 2nd level characters! The PCs are employed by the fireworks specialist– the Splendiferous Spranza– to guard her tent from nosy locals and mischievous children. While the default setting is the Fantasia County Faire, it can be used at any faire, festival, or celebration.
  • Inspired by Heraldry Within Inspired by Heraldry…We bring you 5 new unusual creatures for Pathfinder that are often featured as decorations upon a shield of arms: biscoine, enfield, lepus hositili (murder bunny), talbot hound, and yale.We also introduce heraldic feats that allow characters to draw power from their noble bloodline, familial history, and the spiritual patron of their clan. We feature the following patrons: allocamelus, basilisk, bear, biscoine, boar, bull, dragon, enfield, griffin, lepus hostili, manticore, phoenix, serpent, talbot hound, toad, unicorn, and yale.And we finish Inspired by Heraldry with the heraldic knight, an alternate class for the cavalier that invokes the power of their family’s crest.
  • Strange Weather Within Strange Weather…We bring you a dozen new Conditions and Hazards more magical and exciting than a mere thunderstorm! Acid rain, aurora hypnosis, ball lightning, blood storm, ectoplasmic storm, fire whirl, hailstorm, pollen storm, skyquake, blood moon, dread moon, radiant moon, and the solar eclipse!We also introduce the Storm Elemental with four variants: the blizzard storm elemental, dust storm elemental, hurricane elemental, and lightning storm elemental!And we finish Strange Weather with two weather related archetypes: the Stormcaller (Shaman) and the Child of the Sky (Barbarian)!
  • Dinosaur Companions We introduce 25 new dinosaurs (and pterosaurs and a crocodilian) to choose from to be your new best friend! Every dinosaur can be an animal companion/mount or familiar!15 of these prehistoric pals are animal companions/mounts: Argentinosaurus, Baryonyx, Concavenator, Corythosaurus, Deinocherius, Dilophosaurus, Dracorex, Excaliborsaurus, Maiasaura, Neptunidraco, Scipionyx, Stygimoloch, Tethyshadros, Tupandactylus, and Utahraptor!10 of them are familiars: Coelophysis, Jinfengopteryx, Leaellynasaura, Mei, Micropachycephalosaurus, Microraptor, Nyctosaurus, Parvicursor, Scansoriopteryx, and Sordes!
  • Household Magic

In 2017 they plan to drop to bimonthly (i.e. every two months, not the misbegotten twice per month) in order to accommodate the request that they make each issue longer. Topics planned include:

  • The Puppet Show
  • Gremlins
  • Libraries and Research
  • Imaginary Friends
  • Religious Communities
  • Dangerous Spores
  • 3 personal letters (topics chosen by high-rolling backers)

If you’re interested in an eclectic mix of topics that can help you flesh out your world, I recommend you check this Kickstarter out and consider backing.

Tenkar’s Disclosure: Alex is a friend of mine online, I backed his Archetype Compendium, Echelon Explorations: Polyhedral Pantheons was an add-on for $30+ pledges for the Letters from the Flaming Crab (2016) Kickstarter last year, and we’ve been talking about my writing about Small Gods for one of the Letters.

Letters from the Flaming Crab (2017)

Letters from the Flaming Crab (2017)


Off the Path: Words of Power, Part 2

In my last post I outlined some things I’d like to see in the Words of Power system.

  1. Cost based on caster level;
  2. Reorganizing the effects;
  3. Unified power framework.

The unified power framework might seem to be the most ambitious… but I noticed something that might make it a lot less work than I expected. I’ll come back to that a little further below.

Examining Words of Power

Runecaster by Gary Dupuis

Runecaster by Gary Dupuis

Let’s start looking at aspects of the words of power and see where it takes us.


I’m going to use Healing Words as my starting point. In Words of Power there are five healing words that map more or less directly to the stabilize spell and the four cure wounds spells (soothing touch stabilizes a dying creature, then each level of Word after that heals 1d6+level (max 5*word level) points of damage — 1d8+1/level if the spell is boosted).

This is an okay starting point, but I want characters with greater word mastery to be able to get greater effect for cost. It doesn’t matter if you have elder cure (4d6+1/level, 4d8+1/level boosted) if you only use a second-level slot. Also, I really don’t like “per level” calculations in effects. I considered having the same degree of healing for a single point (so having Healing Word IV lets you do 4d6 points of healing for one magic point) but that’s way too rich if I’m going to allow using more than one point.

I’ll back it off. Healing Word I heals 1d6 points per magic point, Healing Word II heals 1d8 points per magic point (just 1 more on average), Healing Word III heals 1d10 points per magic point… and following my smoother damage progression, Healing Word IV and Healing Word V heal 2d6 and 2d8 points per magic point respectively. With the understanding that cantrips are often considered “half” a first-level spell, I’ll include a Healing Word 0 (cantrip-grade) for 1d3 points of healing per magic point.

But wait! 1d3… that’s… half a d6. And d6, then d8 has a mean of 4.5, which is d6+1, and d10 has a mean of 5.5 (or d6+2, or the same as d6+d3… one and a half d6s).

HERO System damage classes (DC) are five points each, and go 1, ½d6, 1d6, 1d6+1, 1½d6, 2d6, 2d6+1, 2½d6, 3d6… the Healing Word I spell does 1d6, Healing Word II does 1d8 and averages the same as 1d6+1, Healing Word III does 1d10 averages the same as 1½d6, Healing Word IV does 2d6, Healing Word V does 2d8 and averages… 9 points, one point higher than 2d6+1. Close enough. Even Healing Word 0 aligns, at 1d3 (½d6), and the (as-yet unmentioned) “Healing Word -1” (because Echelon has a Pre-Basic tier even below Basic tier, for things like rats) doing a single point of healing would align.

So… power words being worth 15 Active cost (in HERO terms) at tier 1, then plus or minus 5 Active cost per tier above or below, there must be something I can do with this. Let’s look at limitations, see how they line up.

Limitations on Words of Power

The Words of Power system expects that all spells have Verbal, Somatic, and Material components, unless otherwise indicated, and take a standard action to cast. The Verbal and Somatic components apply only when casting, and map directly to the Incantations and Gestures limitations, each at the -¼ level. Material components have no special cost, but are easily identifiable at casting time and taking them away is a relatively simple action. Together I’m going to call them an “Obvious Accessible Focus” (OAF), which is a -1 limitation. This gives a total limitation of -1½ on spells by default.

This works well for me. If power words have an Active Cost of 5 points per tier, and expected limitations of -1½, that means the power words have a Real Cost of 2 points (5/(1+1½) = 5/2½ = 2) per tier.

What if I ignore Active Cost here and look primarily at Real Cost? If I require that a power word is worth “2 Real” per tier and allow the Active Cost to swing, I find I could have more variety in the power of the words, with varying degrees of limitation. A ‘simple spell’ (low limitation, such as ‘just Verbal and Somatic components’, a total of -½) would limit the power word to 3 Active Cost per tier. Simple to cast, doesn’t do much. Or I could go the other way and increase the limitations (let’s say requiring more time to cast and spending more magic points — Extra Time and Extra Endurance in HERO terms) but get an effect with more Active Points — harder to cast, but more powerful. The -1½ already present on the spell means I’m not going to get a lot of mileage out of adding more limitations, though. To double the Active Points available (from 5 points per tier to 10 points per tier) I’m going to need to take the divisor from 2½ to 5 — which means increasing the limitations from -1½ to -4! That’s a huge jump, so this is not an easy path to incredible cosmic power.

It does, however, gain me something nifty.

Variations and Unified Casting


I don’t have to stick with Verbal, Somatic, and Material components (Incantations, Gestures, Focus). HERO provides me with all sorts of options for limitations that could be applied.

Concentration: made for a psychic/psionic system.

Requires Skill Check: want a skill-based magic system? Or just the ability to do crazy fantastic things with skill checks? Or…

… or even martial. ‘Sword Magic’ can be a thing! It might use attack rolls instead of skill checks, or not, but this could be a thing.

Aaand I need to get back to work, lunch break is over. I’ll have to continue this more later.

Off the Path: Words of Power, Part 1

The first Off the Path series will take the Words of Power system from Pathfinder Roleplaying Game: Ultimate Magic and make it more to my taste. The general approach is good, and I see room to add a lot more to it.

Words of Power Overview

Runecaster by Gary Dupuis

Runecaster by Gary Dupuis

Words of Power in the Pathfinder Roleplaying Game are pretty straightforward. There are many ‘effect words’, and a smaller number of ‘target words’ and ‘meta words’. Effect words ‘do something’ (burn targets, heal subjects, teleport the caster), target words determine what is affected by the effect words, and meta words change what or how this happens.

A wordspell consists of one target word, one to three effect words, and any number of meta words, within the limits of the caster’s ability. A fireball analogue wordspell might be ‘burst fire blast distant’

  • burst: 10-foot radius within close range, or boosted to 20-foot radius within medium range (level 1, or 3 if boosted);
  • fire blast: 1d6 points of fire damage per caster level (level 3, max 10d6);
  • distant: range extended from medium to long (level 0).

This wordspell has a single effect word with a minimum level of 3, the burst target word has a minimum level of 1 (or 3 if boosted, and why not do that?), and the distant meta word does not modify the level. This is a third-level spell doing 1d6/level damage (max 10d6) in a 20-foot radius at long range.

There are more targets, more meta words, and many more effects described in Pathfinder Roleplaying Game: Ultimate Magic… and yet I see some things that could be added, and while it’s pretty close to what I want, I see a few things I’d like to do differently.

Changes Under Consideration

There are several things I’d like to try to incorporate.

Casting Cost Based on Caster Level

The psionics rules in D&D 3.x (and later in Dreamscarred Press’ Ultimate Psionics) base casting cost not on ‘spell level’, but on the ‘caster level’ of the effect. I find I very much like that, and want to incorporate it here. Higher-level abilities might be more efficient (more benefit for cost — cure light wounds doing 1d8+1/level, and cure serious wounds doing 3d8+1/level, both could be cast at a cost of 5 points, but one would do 1d8+5 points of healing and the other 3d8+5). I like the idea of unskilled but powerful casters throwing heaps of power at a spell in order to achieve what a more skilled caster could do more easily.

Reorganize Effects

There are many (137 effect words across 35 effect types, 10 meta words, and 6 target words)… but I they can be better organized and expanded. In fact…

Unified Power Framework

think I see the outline of a unified power framework that can be used to develop a variety of different power types. Spells, psionics, and martial disciplines (as from Dreamscarred Press’ Path of War) might all be possible here.

Closing Comments

This is a pretty ambitious change, to be sure… but it relates to several things I’ve considered over the years, and I think it can be done.

Off the Path: Exploring Different Ground

Blank Arrow Sign -- William McAusland

Blank Arrow Sign — William McAusland

I’m starting a new series, “Off the Path”.

Off the Path takes an idea currently implemented in the Pathfinder Roleplaying Game and changes it — much like the old ‘KJD-ALT‘ posts I used to make to

Much of my design is influenced by my work on Echelon. I mostly talk about Echelon at my other site, but since this series is actually about Pathfinder I’m keeping it here.

Echelon Influence

The mechanics of Echelon are in flux, I’ve identified several ways they can be implemented. The only important bits about Echelon to remember in this series are:

  • Many Games In One: D&D 3.x, and by extension the Pathfinder Roleplaying Game, has several modes of play hidden within it. At low levels it’s relatively gritty and realistic, in the middle levels the PCs are superhuman, and at the upper levels they are functionally superheroes and demigods (even if they don’t have divine traits — look at human mythology, and what the PCs can do).
  • Power Curve Is In Spells: The true power curve in D&D 3.x is not at all based on fighters and the like, but on dedicated spell casters. The most powerful classes are cleric, druid, and wizard. Tiers in Echelon are mapped to iconic spell levels (the iconic spells are usually at levels 1, 3, 5, 7, and 9, and are gained at caster level 1, 5, 9, 13, and 17 respectively). I’ll be remapping back to D&D-esque levels (i.e. PCs start at first level, not ninth), but I’ll still keep “levels 1-4, 5-8, 9-12, 13-16, 17-20” in mind.
  • Awesome Comes From Level, Not Class: Everybody should become increasingly more awesome as they reach higher levels. Spells are fantastic, but fantastic doesn’t need to mean spells. Even the non-casters should not be limited to strictly mundane, can-happen-in-reality options.

These will often have application in the Off the Path series.

I Blame GreyKnight

Today GreyKnight tagged me in a G+ post regarding some machine-assisted mapping software by Martin O’Leary (Uncharted Atlas on Twitter).

Well, I say ‘machine-assisted’, but it looks like the software does most of the work.

It’s also frighteningly close to some ideas I explored about fifteen years ago, but Martin made it work much better than I did… and this gives me ideas for how to improve what I’d done, and make it a little more interactive.

Fantasy Map Generator (Terrain 2.0)

Some notes off the top of my head, so I don’t forget.

Original Version

My original attempt was a command line program. Given an an arbitrary height map (TIFF file with elevation ranging from black to white — which mapped to values ranging from 0..1) it would apply many iterations of ‘precipitation’ to discover rivers (and thus watersheds) and lakes/oceans (depressions that filled with water). I was good at finding waterways, I never did find a satisfactory method of finding bodies of water.

There was also an erosion element, where moving water would reduce the elevation along its path. This included a ‘sediment’ component where the eroded material could be dropped if the speed of the water became too low. This would happen mostly when the slope became to shallow or when the ‘water unit’ hit standing water. It didn’t work as well as I’d hoped but I think this was mostly because of my problem finding bodies of water.

The program would periodically render the image in several modes, so I could see what was going on.

  • Bump mapped height map, just the terrain itself. Over time I could see the effects of erosion.
  • Bump mapped colored height map, the terrain with pseudocolored elevation so I could more readily make out the differences in elevation.
  • ‘Water map’ showing the aggregated water flows, optionally with the ‘ocean’ (everything with an elevation under a specified value) filled in blue. This gave me a very good idea of how the water flows were working out. It was very satisfying seeing how, over time, I could pick out where the mountains were by the water flowing away from them.
  • Combined, the colored height map with the waterflows and ocean shown. Because I like the pretty pictures.

New Version

First thoughts on what will be in the new version.

  • GUI (C#/WPF, because that’s what I work with in my day job) allowing adjustments as it goes.
  • Multiple phases in map development:
    • Initial height map. The first iteration will load a greyscale raster image (black = low, white = high) to use as its height map. I might later add a height map generation tool, but that’s lower priority for me.
    • Adjustment layer, so the user can adjust the heights of the original height map nondestructively. I will probably add this after height map generation, since loading the height map from a raster image means the height map can be modified outside this program if needed.
    • Set sea level (which might be below the lowest elevation, if the entire map is above sea level). This should be readily adjustable, but will affect later steps.
    • Find lakes (apply the Planchon-Darboux algorithm), so I know where all the standing water is.
    • Erosion, per my original algorithm. Drop units of water on the terrain, see where it goes. If it hits a lake, go to the exit point of the lake and carry on until it hits the ocean (or the edge of the map). This will find my rivers and watersheds, and will affect the final height map.
      • I might need to find lakes a few times, depending how much effect erosion has. The water leaving the lake should probably erode the terrain as well, and would thus reduce the maximum elevation of the surface of the water. Ultimately it might even wash the lake out!
      • I might go with with a more approximate, but much faster, erosion mechanism. I might even make it configurable which gets used… but I will still need to do the water flow analysis.

That gets me more or less as far as I’d gotten before. Get height map, pour water on it. Now for the next steps.

  • New phases in map development:
    • Settlement. User identifies how many cities (major settlements) and towns (minor settlements) to add. There might be the option of manual insertion (put them exactly where the user says), but for the first pass I’m going to apply them based on rules — mostly around where the water is. Each city or town added will grab the most attractive location available.
      • Initial version will follow Martin’s algorithm, taking into account how attractive the location is (how much water) and how unattractive (how close to another city or town).
      • Later versions might allow weighting these. Perhaps cities want to be far from each other, but towns like to be close to cities.
    • Nations. Assign control (or at least influence) over the territory based on proximity to settlements.
      • It appears Martin assigns control of the territories based on relative proximity to the cities, splitting things as evenly as possible between them. This seems to take the terrain into account, with mountains, and rivers and other waterways, penalizing distance.
      • Martin’s process appears to assign all territory on the map. I am greatly tempted to restrict the reach of each settlement.
      • I might instead give each settlement a certain amount of ‘regional reach’ (first pass, each city is worth this much, each town is worth less) that governs how far their influence can reach. (City, city) regions overlapping are probably either contended or split based on proximity (each point goes to the closer city), (city, town) regions overlapping probably see the town allying with the closest overlapping city, (town, town) probably either stand alone or ally. Allied town regions are counted as part of their ally’s region, extending the reach of a city (or set of towns).
    • National option: iterative assignment.
      • Rather than working on ‘distance to settlement’, each settlement might have a certain amount or number of points of influence. Assign each in turn (proportional to number available, I suspect — if a city has twice as much influence as a town, the city should assign/grab two units of territory for each the town grabs… of course, there are more towns than cities).
      • Each time a settlement grabs territory, it looks for the most attractive location to grab. This is probably a function of:
        • Distance from settlement;
        • Ease of travel (proximity to water is probably a good measure here, easier to follow a river up-valley or follow a shoreline than to cross the mountains);
        • Distance to or amount of neighboring territory of the same settlement (while it is easier to go up-river for a while, eventually the proximity to other controlled terrain makes it cheaper to climb the hill than to follow the river).

I don’t anticipate worrying about names.

Further Adjustments

I expected to have more places for the user to intervene in the map development. Adjusting the height map is the biggest one, but by dropping the need (and ability) to do that there isn’t much left to change. There are some controls involved (how much erosion, etc.) but most of the work after that is done by the computer.

… I started to list other things that could be added, but I think I’ve got enough to start. It would be very easy to get bogged down in additional detail, and I don’t want that to happen. At least, not until I’ve got this part working.

Taxonomy and the Echelon Reference Series

In the last couple of posts it’s pretty clear I was wearing my geek hat. Time to lower the flaps and tie the strings under my chin, because this is going to get busy.


Echelon Game Design Logo

Echelon Game Design Logo

Straight from

taxonomy [tak-sonuh-mee]

noun, plural taxonomies

  1. the science or technique of classification
  2. a classification into ordered categories:
    a proposed taxonomy of educational objectives
  3. Biology. the science dealing with the description, identification, naming, and classification of organisms.

Moving to a more abstract representation of the game data means I need some way of identifying what a particular object is. At one point this was done using styles, but now ‘object’ is the only style left related to game objects. I have others for document structure and for certain types of information belonging to objects (the ‘abstract’ styles described in my last post, ‘attribute’ style from the last post, a ‘brief’ style for things like one-line spell descriptions), but these are not game objects.

I have styles in place for type declaration (d20-1-Decl, d20-2-Decl, d20-3-Decl), but what do I put in them? Well, I’m working a hierarchical taxonomy.

Hierarchical Taxonomy

Almost all taxonomies are hierarchical. Biological taxonomy has seven levels (kingdom, phylum, class, order, family, genus, and species), with each becoming more specialized and specific. At any given level, a member of a group is a member of that group’s parent group. For instance, a dog is canis lupus (or canis lupus familiaris, for domesticated dogs)… which means that it is of the canidae family, carnivora order, mammalia class, chordata phylum, and animalia kingdom. It shares characteristics with all canidae, all carnivora, all mammalia, all chordata, and all animalia. These characteristics become a smaller and smaller set the higher you get the taxonomy, but ultimately there are identifiable characteristics shared between dogs and cats (same order, carnivora), and dogs and humans (same class, mammalia), and dogs and sea slugs (same kingdom, animalia).

Game object taxonomy can be similar. I don’t plan to be nearly so rigorous or have so many levels, but having a hierarchy makes many things easier for me down the road.

Hierarchical Parsing

I can take advantage of this when parsing content. Because an object has all types at its level and above in the hierarchy, I can resolve many references I can’t now. Consider the partial hierarchy below:

  • Ability Something a creature can do
    • Feat Learned ability gained using a feat slot
    • Class Feature Ability granted by a class or archetype
      • Class Subfeature An element of a class feature, often chooseable (rage powers) but sometimes not (bardic performance)
        • Class Subsubfeature An element of a class subfeature, sometimes choosable (revelation) but often not (bloodline power, granted power)
          • Bloodline Power Ability granted by a bloodline
          • Granted Power Ability granted by a domain
          • Revelation Ability granted by a mystery
        • Bardic Performance Ability granted by the bardic performance class feature, not choosable but determined by class or archetype
        • Domain Ability granted by the domains class feature (or domain class feature for classes and archetypes that just get one), usually choosable
        • Mystery Ability granted by the mystery class feature, choosable
        • Oracle’s Curse Ability granted by the curse class feature, choosable
        • Rage Power Ability granted by the rage powers class feature, choosable
        • Rogue Talent Ability granted by the rogue talents class feature, choosable
    • Sense Sensory ability; included here as a universal monster rule but I’m not sure that’s appropriate for the taxonomy.
    • Skill Learned ability with variable degrees of expertise (skill ranks)
    • Trait Ability inherent to a creature
      • Character Trait Trait of characters, choosable
        • Class Trait Trait available to characters of a specific class
        • Race Trait Trait available to characters of a specific race [note collision with ‘racial trait’, below; personal peeve]
        • Regional Trait Trait available to characters from a particular region
      • Racial Trait Trait inherent to a race, common to all members of that race
      • Monster Trait Trait inherent to a species of monster, common to all members of that species
  • Magic Non-abilities that do fantastic things
    • Spell Castable magic
    • Magic Item Magic in physical form
      • Magic Armor Physical protection, magically enhanced
      • Magic Quality Magic that can be added to an item
        • Armor Quality Magic that can be added to magic armor
        • Weapon Quality Magic that can be added to a magic weapon
      • Wondrous Item Miscellaneous magic item
  • Affliction Persistent (usually bad) thing that happens to a creature or object
    • Curse Supernatural stuff that happens to a creature or object
    • Disease Illness that happens to a creature or object [O.o for consitent definition… –kjd]
    • Poison Venom or toxin that happens to a creature or object [well, applied to an object, so it affects a creature –kjd]

“Darkvision” is both a racial trait (dwarves have it) and a monster trait (dragons have it). There is also a sense (universal rules) called ‘darkvision’.

In the second and third versions of the Echelon Reference Series, ‘darkvision trait’ could not be readily resolved. I could find ‘darkvision racial trait’ or ‘darkvision monster trait’, but ‘darkvision trait’ did not exist. I also couldn’t find ‘darkvision’ because there were multiple objects with that name.

Under this taxonomy, I am in a much better position.

  • I can now resolve ‘darkvision trait’ because racial traits and monster traits also are traits (specializations of ‘trait’). If I search for ‘darkvision trait’ I find an implied ‘darkvision trait’. That there are two variations (racial and monster) doesn’t matter to me because I specified the ‘trait’ level. If I wanted the racial trait specifically, I would have said.
  • Similarly, ‘darkvision ability’ will resolve at the ‘ability’ level: I just care that you have the darkvision ability, and not whether it is a sense or a trait.
  • ‘Darkvision’ alone won’t resolve. There are traits (abilities) and a darkvision spell (magic). Without something to further identify the target, I can’t tell which is the correct link. ‘Heal’ is another challenging one (skill and spell).
    • I do get some benefit out of implied rules. If I see heal (that is, ‘heal’ in italics), by convention that is the magic heal, the spell, rather than the skill.

This can still lead to ambiguity, and I need to decide what to do. The ghost touch quality resolves to two different concrete items (armor quality and weapon quality) with different characteristics, and I do care about the distinction. Similarly, bane (weapon quality and spell) and spell resistance (armor quality and spell) conflict. I suspect marking certain elements of the hierarchy ‘abstract’ or ‘not implied’ could handle it. That is, while both are under ‘Magic’ for classification reasons, spells and magic items are to be considered sufficiently separate from each other and cannot be equated. For ‘bane‘ to resolve, it must be specifically the spell or the weapon quality (or technically it could be the quality, or the magic item).

Obviously the exact hierarchy will be in flux for a while. I’m still not satisfied with the class feature/subfeature bit.

On further consideration, I think I like the “blocker” possibility. While in many ways the taxonomy holds for many purposes, for some there might be a restriction on climbing the hierarchy for reference purposes. That there is both a “bane spell” and a “bane weapon quality” doesn’t mean there is a meaningful “bane magic”… but they are both still magic for other purposes. Must consider further, this seems very strange in a hierarchy, like it can be a thing without being a thing.

Hierarchical Rendering Rules

The Echelon Reference Series is quite consistent in how it renders game objects. Most often, each game object has a heading (rounded rectangle containing the name) that may have additional elements.

  • A stat block (spells, feats with prerequisites, archetype class features that replace or alter features of the associated class);
    • Because the stat blocks are so long, monsters and characters have a ‘relaxed stat block’: the stat lines are still grouped together, but are not contained inside the heading because it looks really, really bad when it doesn’t fit in the column. Though I think I haven’t had any single stat block fail to fit on a page; I could go full page width and two column within that. Hmm…)
  • a level marker (feats and other character options that have a minimum level derived from level, skill rank, or base attack bonus prerequisites);
  • a type marker (abilities can be (Ex), (Sp), or (Su); abilities might have other types such as (Combat) or (Item Creation) feats; some abilities have special rules, such as rogue talents that modify the sneak attack ability and only one can be applied at once).

Often the only visible difference between objects is color (class features are dark brown, class subfeatures are a medium brown, feats are pale brown). The rendering in documents is otherwise identical. When rendering an object I can take the type and work up the taxonomy hierarchy until I find rules for how to render the object: ‘rogue talent’ and ‘rage power’ are both ‘class subfeatures’ and have no special formatting, so I can fall back on the inherited rendering rules for ‘class subfeature’ when I want to render one of these objects. I might want to render bloodlines differently, so I override the rendering rules for bloodlines and they will look different… and when I add ‘draconic bloodline’ to the taxonomy, it gets rendered the same was as normal bloodlines.

The head of this taxonomy, ‘ability’ (which is ‘something a creature can inherently do’ — includes skills and feats, does not include spells) would thus provide a default rendering mechanism that will let me see the content. It might be very generic, it might be very ugly (I like to make undefined things red so they jump out when I’m reviewing documents — which is why some ‘links’ are red in my PDFs, it means I had identified some text as a link but no target was found, while green means a target was found but is not in this document), but it is presented in the document.

Closing Comments

Building a hierarchy gives me a lot of functionality by letting me ‘inherit’ parsing and rendering behavior, without really adding or changing code. For instance, I can add ‘draconic bloodline’ (child of ‘bloodline’ class subfeature, in the taxonomy) and objects marked as draconic bloodlines will be correctly identified as this kind of bloodline, but still parse and render as normal bloodlines.

I can also use the more more specific taxonomy to change behavior correctly. When I added ‘bloodline’ to the taxonomy it was rendered the same as any other class subfeature, and while that works, I’d like to do something a bit different. I can add code to change how bloodlines are rendered, without affecting other types… except draconic bloodlines, because they inherit this code.

Between the increased abstraction and the use of hierarchical taxonomy, I can get rid of a great deal of complex and redundant code, while making the processing more powerful and specific.

Next Generation of the Echelon Reference Series

Echelon Game Design Logo

Echelon Game Design Logo

In my previous post I wrote about the evolution of the Echelon Reference Series. So far there have been four stages:

  1. Raw copy and paste aggregation. Ultimately not useful to me because it threw away so much information without gaining me much.
  2. Aggregating by source document, marking up in Word using styles specific to the problem domain. Ultimately too specific, not abstract enough, and my workflow was prone to error… as illustrated very clearly when a moment’s inattention blew away almost everything. Oops… but it cleared the deck for the next version.
  3. As second iteration, but slightly more abstract, making it easier to handle in code. More importantly, started using source control (as I should have been from the start). Also started to parse and gain information from the text itself, allowing automating linking and cross-referencing of content. Ultimately insufficient because it lacked fine control over layout, and the automated data extraction similarly lacked fine control. Released: ERS: Barbarians, ERS: Clerics, and ERS: Sorcerers.
  4. Revised document construction mechanisms. Made workflow more efficient by building a common index file, then linking and cross-referencing information as new content was added. While it is getting closer, I realized there is opportunity for another level of abstraction in content (which I’ll talk about below) and combining the document files (as opposed to data files) so I need only maintain one set for all six versions (see below) of each. Released: ERS: Rogues, ERS: Fighters, ERS: Monks, and ERS: Rangers in RAF (except Monks, which is WIP — Work In Progress, the next stage), and will release the other ERS class books and the ERS spell books (sample ERS: Elemental Wizard Spells, PWYW).

Now to describe the next generation of the Echelon Reference Series.

Next Generation Data Geekery

Grab your pocket protectors, this is going to be a ride.

The biggest limitation I’ve had with the Echelon Reference Series lately is around data selection, and redundancy in document scaffolding. What does that mean? Well…

  • Almost release of the Echelon Reference Series has two main flavors: PRD-Only, and 3pp+PRD. The first has material only from the PRD (well, mostly… I don’t count my augmentations), the second includes select third-party material.
  • Each book in the Echelon Reference Series has three versions, at different stages of development. I started releasing the early-stage versions (at a discount, see below) so they at least exist, and I can then improve on them.
    • The RAF (‘Rough And Fast’, politely) version has the basic text content, but not much more. No diagrams, no additional useful redundancy (such as applying the archetypes to the associated class to build a ‘new class’ and see what it looks like when the archetype is used. While I do look for places where items are referenced (such as feats and skills) I might not have yet done it exhaustively. This version of the product sells at 50% off (75% off in bundles) because they’re not complete, and buyers will also get the WIP and Final versions at no extra charge when they come available.
    • The WIP (‘Work in Progress’) is more developed. The text has been gone over more thoroughly, and I’ve added many diagrams (but possibly not all). I probably don’t have the archetype classes in place, but I might have started organizing things better. This version of the product sells at 25% off (50% in bundles) because while they’re getting closer, they’re not actually done yet. Again, buyers will also get the Final versions at no extra charge when they are available.
    • The Final version has the diagrams and the archetype classes, and so on. I’m done with this, until I add more content. This version no longer has a discount on its own, but does have a 25% discount in bundles.

The releases that don’t have both PRD-Only and 3pp+PRD versions, and don’t have RAF/WIP/Final versions, are typically sample documents (such as ERS: Elemental Wizard Spells and ERS: Teamwork Feats).

I have found while working on them, though, that even though the earlier versions aren’t as complete as I’m aiming for, they’re still pretty good. The RAF version is, after I finish cleaning the text up, a pretty close copy of the source material, but organized and consistently formatted. I can see many people preferring this version, in fact. Similarly, the WIP has that and the diagrams, without some of the redundant text that provides context: I can see people preferring this version because it doesn’t have excess material, but presents the rest of the content in a more approachable manner.

As a result I’ve pretty much decided to release each document with RAF, WIP, and Final included, when and as available, with discounts for ‘buying early’ (before Final version). This means I’ll be maintaining six versions of each title, and the current framework… does not do that well. What was more or less manageable with two versions (PRD-Only and 3pp+PRD) becomes difficult with six versions of each document.

Document Workflow

A couple years ago I described workflows for extracting data from Word files, so I won’t describe it here again… except as ‘painfully complicated and prone to error’. I’ve largely worked around the problems, but even now I run into problems when a line ends (or starts? I forget) on an HTML element, in which case the space that should follow it gets removed. This leads to cases where I get text like

Bloodline Spells magic missile(3rd)

If you look closely, there is no space character between ‘magic missile‘ and ‘(3rd)’. I have not found an acceptable workaround for this that is easy and consistently effective.

Moving ahead, I will instead convert the Word files to ‘WordprocessingML’, an XML representation of the Word internal structure of the file. This starts in a useful character encoding (UTF-8) rather than the less than useful windows-1232, and more importantly does not need HTML Tidy (which appears to have a lot of influence on the problem). This means that once the content leaves Word it will be in happy XML, where it is easy for me to get at.

Document Creation, Single Sourcing

I realized that with some changes to how I capture the information I can probably get each title down to a single source document (plus my data store, of course). Major sections simply copy content from my data store into the output document. For instance, a chapter containing all the rogue talents contains the chapter title and introductory text, then a long list of object IDs of content to copy from source into this document. Right now the PRD-Only and 3pp+PRD rogue talent chapters are different files, but I realized that if the IDs are properly unique I can get away with a single list and plug into different data stores depending on version. If I plug into the 3pp+PRD data file all the identified objects will be copied, if I plug into the PRD-Only data file then many of the identified objects (the 3pp ones) won’t be copied. I achieve my PRD-Only/3pp+PRD split with no further effort… at least as far as data objects are concerned.

Text selection and formatting is a little more effort:

  • All PRD content ends up in the 3pp+PRD version, but there are sometimes entire chapters that exist only for the 3pp+PRD version (exalted domains are in ERS: Clerics (3pp+PRD), but not in ERS: Clerics (PRD-Only), so an ‘Exalted Domains’ chapter in the PRD-Only version would be empty and out of place). There needs to be a way to turn off certain content based on PRD-Only/3pp+PRD distinctions.
  • Final includes content not present in WIP and RAF (archetype classes, for example) and WIP includes content not present in RAF (diagrams, some expanded text). It’s easy to exclude the diagrams in the RAF version by simply ignoring the diagram instructions, but there needs to be a way to exclude text.
  • Because the content differs from version to version (that is, I might need six different sets of tweaks), there needs to be a way to include or exclude tweaks based on (PRD-Only, 3pp+PRD) and (RAF, WIP, Final) distinctions.

This actually should be easier than it sounds.

Word is very flat (except for tables): a chapter heading, a section heading, and a list nested within two other lists are all at the same level according to Word. The first two steps when processing the XML files created from these Word files are:

  1. Remove stuff I don’t care about. Word has a lot of overhead in the file, defining styles and whatnot. I don’t care about it, I get rid of it. This step includes mapping the content elements to other elements with attributes to be used later. For instance, a paragraph with ‘doc 4 Chapter’ (document level 4, chapter — ‘doc 4 indicating depth and so they’re ordered properly in the style manager, ‘chapter’ to remind me of the semantic intent) gets turned into <section outline-level=”4″ />. This happens with many elements.
  2. Build the document hierarchy, so each outline-level=’1′ element contains all following objects of lower (or with no) outline level, repeating until there are no more outline-levels… then do the same for list-level. (Incidentally the game objects live somewhere around outline-level=10… and For Reasons, stat blocks are considered lists)
    • Instructions to import files or copy game objects are also given outline-levels, which 1. keeps them from being nested incorrectly in other content, and 2. allows me to append content to them after importing.

This gives me a very easy way to solve my problem. I can assign attributes (exact mechanism not yet determined, I have many options) to the various objects so they are relevant only for certain builds.

  • prd means ‘include only in a PRD-Only build’.
  • 3pp means ‘include only in a 3pp+PRD build’.
  • raf means ‘include only in an RAF build’
  • wip means ‘include only in a WIP build’
  • fin means ‘include only in a final build’
  • !prd means ‘do not include in a PRD-Only build’
  • !3pp means ‘do not include in a 3pp+PRD build’
  • !raf means ‘do not include in an RAF build’
  • !wip means ‘do not include in a WIP build’
  • !fin means ‘do not include in a final build’

When processing, it is very easy for me to know which version I’m working on. The “Exalted Domains” chapter I mentioned earlier would be marked (either on the chapter itself or in the include instruction) as “3pp”, meaning it is only to be included in the 3pp+PRD version, while the “Cleric Archetype Classes” would be marked “fin”. The layout tweaks can also be marked with these values, so “3pp wip” means “do this tweak only if it’s the 3pp+PRD WIP version” (because all the PRD-Only and the RAF and FIN versions don’t need this tweak).

This largely solves my ‘scaffolding’ problem. A single set of input documents should now be transformable into six output documents, depending on flags set. I’ll need to make some changes in the make-the-final-document scripts, but by and large this should greatly reduce the file handling I need to do.

Data Hierarchy

The earliest versions of the Echelon Reference Series data store, at least after I started parsing the data, had very specific styles, from ‘class’ down to individual class subfeature types such as rage powers and bardic performances. The middling versions used some better abstractions and let me get away from being quite so specific, but when rendering the documents I had to examine the context of the object to see what it was. For instance, I would deduce that a particular class-subfeature is a rage power because it’s parent was a class-feature called ‘rage power’. This worked, as far as it went, but led to my ‘inserting’ parent data objects so the abstractions would work.

This had two unfortunate side effects, one minor and one more significant. The minor was that if I were to render the source document in PDF (as I often do as a data check, to verify the structure is correct) I would have extraneous objects in the document. This is ultimately not a big deal, but I found it jarring. The more significant effect was that it caused me to have many objects in the system with exactly the same ID. This was more troublesome.

It looks like the easiest solution consists of embracing abstraction. Much of the time I need only know that I have an object and what type it is (i.e. a label). It is still necessary to be able to nest the items, but the following seems to work well:

  • Replace all data-specific stat-block styles (spells and monsters are the most-used, but there are others) with ‘d20 Abstract’, ‘d20 Abstract Group’, and ‘d20 Abstract Sub’. These can be applied to all object types. ‘d20 Abstract’ is the most commonly used, ‘d20 Abstract Group’ provides a heading in the stat block (often seen in monster stat blocks), and ‘d20 Abstract Sub’ is a child object of a ‘d20 Abstract’, most commonly used so there can be more than one paragraph in a stat block field (such as a monster special ability that needs more than one paragraph to describe). These are actually identified internally as list items so they can interact and include lists.
  • Replace all game object styles with a combination of nine styles (three sets of three):
    • d20-1-Decl, d20-1-Object, d20-1-Section (Heading levels 1-3)
    • d20-2-Decl, d20-2-Object, d20-2-Section (Heading levels 4-6)
    • d20-3-Decl, d20-3-Object, d20-3-Section (Heading levels 7-9)
  • Add ‘d20 Attribute’, which adds or overrides meta information about the object, that isn’t game information. This is used mostly to provide processing hints, and doesn’t get used much.

The naming scheme seems odd, but is set up that way so they appear in my style manager in a useful order.

Functionally there is no difference between a d20-2-Object and a d20-1-Object, except that the d20-2-Object can be nested within a d20-1-Object… and because I declare the types explicitly now, this mostly does not come up often.

When I encode a character class, I can do something like

[d20-1-Decl] Class

[d20-1-Object] Rogue

(description goes here)

[d20-1-Section] Class Features

Rogues have the following class features

[d20-2-Decl] Class Feature

[d20-2-Object] Weapon and Armor Proficiency


[d20-2-Object] Sneak Attack


[d20-2-Object] Trapfinding


[d20-2-Object] Evasion


[d20-2-Object] Rogue Talents

(description… not including actual rogue talents)

The headings — all the styled paragraphs in the block quote above — are actually increasingly indented in Word, to make the hierarchy easier to see. They also show up in the navigation pane in tree format, making it easy to navigate.

While processing, I end up with an object (of type ‘class’) called ‘rogue’, with the ID ‘class.rogue’. This has descriptive text and a section containing five objects (second-tier, but still ‘objects’) of type ‘class feature’. These objects each have a description and are called respectively ‘Weapon and Armor Proficiency’, ‘Sneak Attack’, ‘Trapfinding’, ‘Evasion’, and ‘Rogue Talents’. Because they are inside another object, though, their IDs are slightly different: class-feature.weapon-and-armor-proficiency.rogue, class-feature.sneak-attack.rogue, class-feature.trapfinding.rogue, class-feature.evasion.rogue, and class-feature.rogue-talents.rogue. Each also has a ‘group ID’ (gid) that has the ‘.rogue’ suffix removed.

That each instance of the object now has a unique ID is incredibly valuable. It lets me to identify and refer to (or copy) a specific data object. In many ways they are equivalent (they do the same thing, and satisfy the same prerequisites… usually), but in some ways they are different (class-feature.evasion.rogue is gained at rogue second level, but class-feature.evasion.ranger is gained at ninth level).

This also makes it feasible for me to define ‘universal class features’ (provide a single standard definition for a class feature such as evasion). I can then change the class-specific definitions to the class-specific application (‘Rogues gain evasion at 2nd level’, ‘Monks gain evasion at 2nd level’, ‘Rangers gain evasion at 9th level’). It will no longer be necessary to define the class feature each time a class gains it, and more importantly it becomes reasonable to get rid of ‘gains evasion, as a 2nd-level rogue’.

Regarding the rogue talents above, the class feature describes the rules for rogues taking rogue talents (gained at 2nd level and every even level after that). The actual rogue talent definitions happen outside the class, mostly because most rogue talents are not defined in the class (in other supplements). Also, rogues aren’t the only class to gain rogue talents, so defining them outside the class makes it easier to ‘share’ them. I might put the following in another chapter (using d20-2-Decl

[d20-2-Decl] Rogue Talent

[d20-2-Object] Bleeding Attack (Ex, Sneak Attack Exclusive)

(description goes here)

[d20-2-Object] Combat Trick

(description goes here)

[d20-2-Object] Fast Stealth (Ex)

(description goes here)

[d20-2-Object] Finess Rogue

(description goes here)

This gives me four new objects, named ‘Bleeding Attack’, ‘Combat Trick’, ‘Fast Stealth’, and ‘Finesse Rogue’ (with IDs rogue-talent.bleeding-attack, rogue-talent.combat-trick,, rogue-talent.finesse-rogue). I used d20-2 styles to show that it isn’t necessary to start at d20-1.

In case you’re curious, Bleeding Attack is given the ‘sneak attack exclusive’ type for clarity. “Talents marked with an asterisk add effects to a rogue’s sneak attack. Only one of these talents can be applied to an individual attack and the decision must be made before the attack roll is made.” is not terribly useful when asterisks are used in many places for different things, I prefer to be explicit.


I had originally planned to write about object type taxonomy, but this article is already almost 2,900 words long! Next post!

Evolution of the Echelon Reference Series

After I finish releasing the RAF versions of the Echelon Reference Series, I’ll be rebuilding my workflow for data capture. It will be simpler and more abstract, and more powerful. I thought it might be interesting to show how this has evolved.

Origin of the ERS

Echelon Game Design Logo

Echelon Game Design Logo

The ERS started as a set of research documents for Echelon. There have been several iterations.

First Cut

Originally I just created a file for each topic — feats, spells, rage powers, etc. — and dumped all the relevant bits into the file. This worked for a while, but I started running into places I wanted to split the data up or organize it in different ways. The feat document could be split into item creation feats, metamagic feats, combat feats, style feats, and… the last two could be applied to the same feat.

And the prerequisites. The complexity of the prerequisites started to overwhelm me, and there wasn’t a lot I could do about it. First design scrapped, thankfully before I invested too much in it.

Second Cut

I started to use styles to mark data types, with a style for each data type of interest. I didn’t limit it to ‘feats’ and ‘spells’, either: rogue talents, advanced rogue talents, domains, all had their own styles (that mostly looked like Heading 3… I didn’t start changing the style presentation until later). Using heading styles for game elements made it easy to navigate my Word file because they’d show up in the navigation pane, but making them look the same meant it was easy to assign the wrong one.

I was manually saving the files as Word and ‘filtered HTML’ formats so I could do a series of transformations to parse and extract information. Everything was done in a single directory… don’t do that. Hundreds of source files, each combined with about eight intermediate files before hitting the final form made for a huge directory full of stuff I don’t care about, with important stuff inside it.

More intermediate files than that, even. After parsing the information I would spray out the individual items into their own files — each feat, each spell, each rage power, etc. — that would be picked up by a script for inclusion in output. I started building PDFs via LaTeX, but it wasn’t very manageable. It was also very easy to accidentally delete something.

… as I actually did. Got a new computer, was working on it and decided to blow away the ‘copy I’d made’, forgetting I hadn’t actually copied the files but created a shortcut to the folder to ensure I kept both versions in step.

Much to my surprise, after a moment of shock I wasn’t even particularly upset. No swearing or tears involved, even, just a deep breath. I was running into severe limitations and was ready to move on already.

Third Cut

This version saw the release of ERS: Barbarians, ERS: Clerics, and ERS: Sorcerers. This is where I started to abstract the data types. ‘Class feature’ had been around for a while, but I replaced all the individual feature types (rogue talent, etc.) with a more abstract ‘class subfeature’ type. This reduced the mental space needed to keep track of things, and simplified parsing later quite a bit.

Rogue talents and rage powers really parse about the same way, so why differentiate in code? I know from the parent class-feature what this is (class-subfeature with class-feature of ‘Rage Power’ means I’m looking at a rage power, right?) so I could mark it and move on. Lots of heavy encoding in the object markers, mostly for automation reasons.

Runeforger (Su) [1 Forgemaster’s Blessing; 2; 4; 6; 8; 10; 12; 14; 16; 18; 20] <channel energy>

A forgemaster may inscribe mystical runes upon a suit of armor, shield, or weapon as full-round action, using this ability a number of times per day equal to 3 + her Intelligence modifier. These runes last 1 round per cleric level, but inscribing the same rune twice on an item increases this duration to 1 minute per level, three times to 10 minutes per level, and four times to 1 hour per level. Erase affects runes as magical writing. A forgemaster learns forgemaster’s blessing at 1st level and may learn one additional rune at 2nd level and every 2 levels thereafter. Only one type of rune marked with an asterisk (*) may be placed on an item at any given time.

Using the runeforger class feature of the forgemaster cleric archetype as an example, The heading line has:

  • class feature name,
  • class feature type (Su, supernatural ability),
  • [1…20] showing the levels it is applied (first level gives ‘Runeforger (Forgemaster’s Blessing)’, then every even level up to 20th you get another runeforger choice), included mostly so I could automatically create the level table correctly (or at least automatically),
  • <replaces class feature> indicating that runeforger gets this instead of the ability to channel energy. <<double angle brackets>> indicates that this new feature only modifies an existing feature.

This actually worked, more or less. I could parse and render the items, and even eventually combine them (applying archetype to base class) to get the archetype class, complete with level table. I had almost no control over it, though.

Parsing, Prerequisites, and Pictures

Animal Companion Diagram

Animal Companion Diagram

This was also the version where I finally had the ability to extract and automate prerequisite links. This gave me the ability to draw pictures showing me the prerequisite relationships between game elements. The first pass would be machine drawn using GraphViz (software that takes a list of nodes and edges and draws the diagram — linked page includes sample diagram for the Improved Sunder feat), which was helpful for understanding but not very pretty when I tried to include them in the PDF.

I would then redraw the diagrams using PGF/TikZ, a LaTeX package that, well, draws diagrams. I’d write down where to put each node and how to draw the edges, then the image would be rendered and added to the output PDF. This let me put diagrams with hyperlinks in the documents.

For example, the diagram to the right shows the relationship between Animal Companion (top, second column over) and a bunch of feats (pale brown). In many cases Animal Companion is not sufficient, and the feat has other prerequisites (class features or subfeatures, mostly), and in others Animal Companion is one of several options to meet a prerequisite (one of animal companion or familiar or mount or divine bond… or some subset of these).

The other thing the prerequisite parsing and linking allowed was the automated discovery of ‘class-relevant’ feats. I could take the list of class features for the base class and archetypes, and look for feats that had those class features (or subfeatures) as prerequisites. I could then pull a copy of those feats into the PDF. Some of the choices ended up looking nonsensical because they required features from other classes as well, but since the barbarian’s uncanny dodge did meet the prerequisite I kept it.

Subversion Repository

This also is where I started working with an offsite Subversion repository. I had my formatting software on a server offsite and SVN allowed me to send minimal file changes from my workstation to the server, while making it almost impossible for me to accidentally blow the whole thing away again. I’m now creeping up on revision 2000.

Automated Conversion

In Second Cut I was manually saving the files as DOCX and Filtered HTML as I went. This was troublesome and annoying, and made it frightfully easy to get out of step — a couple times I ended up making the same change more than once because I’d saved as Filtered HTML and forgot to save it again as DOCX.

I wrote a program that would go through the ‘docx directory’ and convert all the files to Filtered HTML. Every time it was run. Very time-consuming and wasteful, but after learning of the ‘%’ file designator I switched to making the program a filter (single-input, single-output) and adding a make rule so only the files that were out of date needed to be replaced.


The third cut did a lot, but it didn’t give very good control over the output. There was no facility for being selective: the druid got access to some cleric domains, so if I included domains in the druid book I had to include all the domains. I could add a note to the front of the chapter that said “druids get only these ones, ignore the rest”, but after including subdomains that amounted to about a hundred pages when I needed only a couple dozen (which is why I didn’t release the druids book under the ‘third cut’). It also gave very little control over spacing the like, the small tweaks that let me fix unfortunate object placement. That’s why this version sees some places where a feat name appears at the bottom of a page and the description on the next.

Fourth Cut

The lack of control over layout was getting to me, so I took steps to clean the data up some more and regain more control over the layout. This led to the release of the ‘RAF’ (‘Rough And Fast’) releases that grabbed all the information, but didn’t add the diagrams or useful redundancy (and have a ticket price of 50% less than the final version will). I no longer capture certain information (such as the detailed level progression of the class feature within the class) and reworked the entire linking process so it could work on individual files as it parsed them, and was more accurate.

This cost me some of my automated data discovery, though. I no longer have the tools in place (with the current data set) to generate the initial version of each of the books. It also does not handle duplicate items well, something that really showed up (to me) with Draconic Bloodlines, when it could not differentiate between the ‘Claws’ bloodline powers. It seems a minor thing, but it bothered me.

So, while I did release ERS: Rogues, ERS: Fighters, ERS: Monks, and ERS: Rangers in RAF (except Monks, which is WIP — Work In Progress, the next stage), and will release the other ERS class books and the ERS spell books (sample ERS: Elemental Wizard Spells, PWYW), I will be revising the entire workflow and data capture process to make it easier to move to the next step.

And I’ll describe that in my next post.

Ornamentation: Polishing Gems… and Cutting Them

Hope Diamond, By David Bjorgen

Hope Diamond, By David Bjorgen (Own work) [GFDL, CC-BY-SA-3.0 or CC BY-SA 2.5-2.0-1.0], via Wikimedia Commons

My last post refined the generation of random gems, introducing variance to the size and quality of the stones. One of the first comments I got regarding the post suggested ‘uncut’ as one of the low-quality entries. I hadn’t previously considered gem cutting because I was focusing on the end result, but I do have some ideas on it.

In the Pathfinder Roleplaying Game, when randomly generating gems they suggest having odd-numbered rolls indicate a raw or uncut stone that is half the value of the final cut version. With a successful Craft check, DC increasing with base stone value from 10 to 25, the stone takes on its full finished value. As shown in yesterday’s post, a -5 quality modifier to the base value halves the value of the stone (ignoring size considerations).

Here are some things I want to consider:

  • A rough, uncut stone has a quality modifier of -5. This halves the value of a medium stone.
  • Cutting something makes it smaller (or rather makes more pieces of it; I’m going to say the other bits are valueless for my purpose). Cutting a stone can make it smaller, but this makes it easier to improve the quality of what remains.
  • A rough stone will be easier to improve than a well-cut stone.

As a first pass, perhaps something like the following:

  • Craft DC to improve a stone is 10 + 2 per target grade up to average, +4 per grade above average. This means taking a normal uncut stone to average quality is a DC 20 check, but taking it to flawless (quality +4) is DC 36.
  • When cutting the stone, each step you reduce the size gives a +2 bonus to the check. Given the abstract nature of the system, I’m willing to say you don’t have to reduce the size.
  • Failure by 5 or more damages the stone, reducing its quality by 1d4. However, you normally can Take 10.
  • Probably needs to be done trained.

Taking a normal uncut medium opal (100 base value, -5 quality modifier = 50 gp current value) and cutting it (they’re usually polished, actually, but faceted opals do exist… don’t look as nice, IMO) to bring it to average quality has a DC of 20 (10 + 5 steps improvement). DC 20 checks can be made by first-level characters Taking 10 if they are focused on it (good ability score, Skill Focus, and masterwork tools — and a gemcutter should be able to afford masterwork tools). Someone a little bit better (+12 total modifier) and willing to reduce the stone’s size a bit (one step) could reliably take it to good (+1) quality but a small size (-1) — same net value, but a nicer gem. This person could try to do the same without reducing the size but would need to make a check (+12 modifier but DC 24; must roll in order to succeed) and can increase the value of the gem… but runs a chance of damaging it.

If the stone starts at average quality and the gemcutter aims to improve it, the DC… is the same, actually. A more skilled crafter might take a gem that has already been cut and improve it, but under normal circumstances a single gemcutter probably wants to take only a single run at it. I’m okay with that.

Improving a Gem

A trained gemcutter can improve a gem’s quality by making a success Craft check (DC = 10 + 2 per target grade up to average, +4 per grade above average). The gemcutter gets a +2 bonus to this roll for each step the gem’s size is reduced. A failure by 5 or more reduces the gem’s quality by 1d4 grades. The gemcutter can Take 10, but cannot Take 20 (unless there are many gems available to work with and the goal is to get one of the target quality).