Friday, December 1, 2017

Rivers: Here Comes the Math

Early on in this River series, we found the total amount of water flowing through any given river hex.  We need to find the dimensions of the river and how fast it flows, to properly picture it within the game world.  The formula for this is deceptively simple:

total flow = cross-sectional area x flow velocity

Or, in the standard abbreviations used by people who know what they're doing:

Q = A x v

For simplicity's sake, I'm going to use a triangular cross-section for our rivers.  A trapezoid would be more accurate, but this is going to get hairy enough down the road without getting into the geometry of trapezoids.  So, a triangle's area is one half of the product of the base and the height, giving us:

Q = (b x h)/2 x v

Since we're talking about rivers, to be more clear, we'll substitute the term "base" with "width" and "height" with "depth".

Q = (w x d)/2 x v

Now we plug in Robert Manning's equation so we can figure out the velocity, with n being Manning's n, R being the hydraulic radius, and S being the slope of the riverbed:

Q = (w x d)/2 x (1.49/n) x R2/3 x S1/2

And just what is this hydraulic radius?  It's the cross-sectional area of the river divided by the "wetted perimeter", which is like a regular perimeter except we can ignore the river surface.  Only the parts touching the ground count for wetted perimeter.

R = cross-sectional area/wetted perimeter

Since we're using triangular cross sections, the numerator on this is the same as what we worked out above, one half width times depth.  If we take the Pythagorean theorem (a2 + b2 = c2, or c = (a2 + b2)1/2), we can find one side of the wetted perimeter, using half the width as "a" and the depth as "b".  Doubling that gives the full wetted perimeter.

R = ((w x d)/2)/2((1/2(w))2 + d2)1/2

Substituting this into our flow equation gives us:

Q =  (w x d)/2 x (1.49/n) x (((w x d)/2)/(2((1/2(w))2 + d2)1/2)2/3 x S1/2

Now we need to make this mess a little simpler.  We know the total flow, the Manning's n, and the slope for our river, so let's put all that on one side of the equation, with our unknown quantities on the other:

Qn/(1.49 x S1/2) =  (w x d)/2 x (((w x d)/2)/(2((1/2(w))2 + d2)1/2)2/3

We still have two unknowns, width and depth.  But, in the last post, we worked out a range of Width-to-Depth Ratios (WDR) for each river type, so we can reduce this to one unknown quantity and finally beat this monster into submission.  If the WDR is 1 (width equal to depth) we get:

Qn/(1.49 x S1/2) =  (d x d)/2 x (((d x d)/2)/(2(((1/2)d)2 + d2)1/2)2/3
Qn/(1.49 x S1/2) =  d2/2 x ((d2/2)/(2(((1/4)d2) + d2)1/2)2/3
Qn/(1.49 x S1/2) =  (d2)/2 x (((d2)/2)/(2((5/4)d2)1/2))2/3
 Qn/(1.49 x S1/2) =  (d2)/2 x (d2/(4((5/4)d2)1/2))2/3
 Qn/(1.49 x S1/2) =  (d2)/2 x (d2/(4(51/2/2)d))2/3
 Qn/(1.49 x S1/2) =  (d2)/2 x (d2/(2(51/2)d))2/3
 Qn/(1.49 x S1/2) =  (d2)/2 x (d/(2(51/2)))2/3
 Qn/(1.49 x S1/2) =  (d2)/2 x (d2/3/((4)1/3(51/3)))
Qn/(1.49 x S1/2) =  (d2)/2 x (d2/3/(201/3))
 Qn/(1.49 x S1/2) =  d8/3/(2(201/3))
(2Qn(201/3))/(1.49 x S1/2) =  d8/3
 ((2Qn(201/3))/(1.49 x S1/2))3/8 =  d

Pretty simple, right?  Plug in all our known values and we have the depth.  Now that we have the depth, we also have the width, since they're equal in this case.  And since we have that we can solve for the velocity, and our basic description of the river is complete.

Of course, this only works out if the WDR is 1.  If our WDR is 2 (width equal to twice depth) we get instead:

Qn/(1.49 x S1/2) =  (2d x d)/2 x (((2d x d)/2)/(2(((1/2)2d)2 + d2)1/2)2/3
Qn/(1.49 x S1/2) =  2d2/2 x ((2d2/2)/(2(d2 + d2)1/2)2/3
Qn/(1.49 x S1/2) =  d2 x (d2/(2(2d2)1/2)2/3
 Qn/(1.49 x S1/2) =  d2 x (d2/(2(21/2d))2/3
 Qn/(1.49 x S1/2) =  d2 x (d/(2(21/2))2/3
 Qn/(1.49 x S1/2) =  d2 x d2/3/(41/3(21/3))
 Qn/(1.49 x S1/2) =  d8/3/81/3
 Qn/(1.49 x S1/2) =  d8/3/2
 2Qn/(1.49 x S1/2) =  d8/3
 (2Qn/(1.49 x S1/2))3/8 =  d

We have to do this for every single possible WDR, and because it's really difficult to get all this math across in this format (even working it out so that square roots and division of complex chains of numbers show up in a less confusing manner), rather than post pages of confusing equations, I've already arbitrarily limited WDRs to whole number ratios (no 1.5, for's either 1 or 2), and I've also worked out a spreadsheet so all you have to do is input your total flow, Manning's n, and slope, and then find the proper WDR in the output fields, and it will spit out depth, width, cross-sectional area, and velocity.  I also added a second page on the spreadsheet that will work out speeds in meters per second, for sci-fi games or for those people who insist on using metric measures in a fantasy game.

Here's the link:

Thursday, November 23, 2017

The Rosgen Classification System

In 1986, TSR published the Dungeoneer's and Wilderness Survival Guides.  Both were treasure troves of information on their respective subjects, and even if they were too fiddly to use efficiently at the table, just systematizing the information gave Dungeon Masters something somewhat realistic to hang an improvisational decision on.  And while both touched on the subject of rivers and water flow, their guidelines weren't the most accurately realistic.  I don't blame Douglas Niles or Kim Mohan for their oversight here.  This was the pre-internet days after all, and to get more accurate info than what they provided would have required a fair amount of research at a university library.  Also, and more immediately to the point of this post, Dr. Dave Rosgen didn't publish his system of river classifications until 1994.

The Rosgen system breaks rivers down into one of nine types, based on a number of physical characteristics.  Importantly, for our purposes, one of those characteristics is slope.  Also importantly, for our ultimate purpose of working out the flow velocity of the river, one of the characteristics is width-to-depth ratio.  In this post, I'm going to show how to use the slope of the river to determine the Rosgen type, and then use that figure out a width-to-depth ratio (from here on out referred to as WDR) so we can plug it all into Manning's formula.  Also, since it has immediate bearing here, we'll look at another river characteristic, sinuosity, and how it affects slope.

Okay, a quick overview of the types of rivers...first up is type Aa+.  Any river with slope of more than 0.10 will be Aa+.  Note that you won't randomly determine any rivers this steep using the system I supplied earlier; they just don't run that steep for the distances most hex maps cover.  Rivers and streams this steep are going to be a lot smaller than a 20 mile hex, but almost any mountain or hill (of which there are usually quite a few in a 20 mile hex) will have one or more draining off of it, but the stream bed will flatten out as it reaches the bottom and become another stream type.  Aa+ rivers tend to erode their beds until solid rock is reached, carrying away the sediment to be deposited downstream.  They tend to include waterfalls or cascades along their length (the Dungeoneer's Survival Guide gives a guideline of 3d6 drops of d8 feet each per mile for streams this steep, but steeper drops can be placed as desired).

Any river with a slope of 0.04 to 0.099 is going to be type A. Type A is a lot like type Aa+, just not as steep.  There's probably a lot of technical details to separate the two, but for our purposes, I'm going to say they might as well be the same, but slightly more sinuous, and more likely to show up in lengths long enough to appear on a large area hex map.  If you look at the map of Mystara, the Streel River runs across most of the continent, and even at a gentle slope, the headwaters in the far west of Vestland end up at pretty high elevations, meaning the rivers draining eastwards through Vestland have a long way down in just a few hexes travel; they're almost all going to be type A rivers.

Type B rivers have slopes of 0.02 to 0.039.  They tend to have a lot of rapids, and as such, can use the Dungeoneer's Survival Guide guideline of 0-5 drops of d4 feet per mile, although at the higher end they can use the cascades guidelines above, and the lower end of the slope range would be closer to the medium grade guideline of a 1/3 chance for a drop of d3 feet per mile.

Type G rivers fall into the same slope range as type B, but they are more entrenched and narrower (lower WDR), taking on a "gully" form.  They typically arise in areas with unstable banks, or as a result of ill-advised modifications to other river types (straightening out meanders, dredging an otherwise stable bottom, etc).

Type D rivers can occur at any slope less than 0.04, typically arising when a fast flowing, sediment laden river suddenly slows down, usually because of a flattening in the slope.  The river drops most of the sediment it was carrying, resulting in a wide "river" made up of multiple smaller channels running through shifting bars of gravel or sand. The listed WDR for type D rivers is for the whole system.  Glaciers often form type D rivers where the sediments dredged up and trapped by the glacier are dropped by the melting ice. 

Type C rivers occur at gentler slopes (less than 0.02), and are meandering rivers with broad floodplains.  A defining factor in type C rivers is the existence of point bars, sandy shallows on the inside curve of each meander, with the deeper main channel pushed toward the outside of the curve.

Type E rivers are found at the same slopes as type Cs, but tend to be much deeper in relation to their width (lower WDR).  Type E rivers have very stable, vegetated banks.

Type F rivers are also found at slopes less than 0.02.  They tend to occur in easily erodible soils, and as such differ from type C and E in that they are more entrenched into the surface of the earth, and have unstable banks.

Lastly we have type DA rivers, found at slopes less than 0.005.  Like type D rivers, they are wide affairs made up of multiple smaller channels, however these channels don't shift like those of type D rivers, the banks and bars being anchored by heavy vegetation.  It's probably a safe bet that any swampy areas on the map are composed of type DA rivers, even if no river icon is noted on the map.  Any river running through a swampy area can be assumed to be type DA, and river deltas tend to be type DA as well.

So, from these descriptions, some river hexes on any map are already sorted into a particular type, either from the slope or from what we know about the surrounding terrain.  If two or more river types can conceivably work in a given hex, the DM can decide which one to use via random die roll.

One last thing before ending this post, because it affects the final effective slope of the riverbed: each river type has a range of sinuosity scores associated with it.  What this refers to is the amount of wiggle there is in the river.  If a hex is 20 miles across, but the river zigs and zags within that hex before flowing out, a boat traveling along it might cover 40 miles or more of distance in that space.  If that the river drops 500 feet moving along that hex, the slope of the river should be (500 ft/40 miles) = 0.002 rather than (500 ft/20 miles) = 0.004.  To represent this, divide the preliminary slope value found earlier by the sinuosity score to find the effective river slope.

Here is a handy chart (based on the earlier elevation chart, and which I will probably expand on in later posts as I go into more detail about river types) showing the river types grouped by slope values, and with width-to-depth ratios and sinuosity scores listed below.

Die Roll Slope DA C E F D B G A Aa+
1 0.0001 x x x x x

placed as needed
2 0.0003 x x x x x

3 0.0007 x x x x x

4 0.0015 x x x x x

5 0.002 x x x x x

6 0.004 x x x x x

7 0.006
x x x x

8 0.01
x x x x

9 0.02

x x x

10 0.03

x x x

11 0.04

12 0.05

13 0.08


Sinuosity 1 Min 1.4* Min 1.5* Min 1.4* 1 Min1.2* Min 1.2* 1.0 – 1.2 1.0 – 1.1

WDR 2d20 (d10x2)+12 d12 (d10x2)+12 (d10x4)+40 (d10x2)+12 d12 d12 d12

* For these river types, roll 1-6 d6, divide by 10, and add 1, for a total of 1.1 to 4.6.  If this result falls under the minimum listed, use the minimum instead.

Thursday, November 9, 2017

River Bottom Friction: Manning's n

This will be a fairly quick one.  The condition of the river bottom affects the speed of the river.  Surprised?

Smooth river beds make for smooth, faster flows; rugged or weedy bottoms create turbulence and slow things down.  Here's a fairly lengthy list of sample values (gleaned from, but to be honest, you could probably get away with just using 0.035 as a default for most rivers.  Follow that link if you want to work out flow rates for things like sewers...there's a good range of materials there.

Earth channel - clean 0.022
Earth channel - gravelly 0.025
Earth channel - weedy 0.03
Earth channel - stony, cobbles 0.035
Floodplains - pasture, farmland 0.035
Floodplains - light brush 0.05
Floodplains - heavy brush 0.075
Floodplains - trees 0.15
Natural streams - clean and straight 0.03
Natural streams - major rivers 0.035
Natural streams - sluggish with deep pools 0.04
Natural channels, very poor condition 0.06

The last two factors we need to figure out are width and depth, and that is going to be a fairly lengthy, math-heavy post.  But first, next time, I'll go over some different types of rivers and make at least a general link between width and depth, before taking that plunge (I couldn't resist).

Slope example

This slope system seems pretty straightforward to me, but since I've been doing this sample area, and will continue doing it as I get into the next major stage of this river-building project, I might as well work out the details on the slope.

For ease of reference, here is the map again:

Oh, look at me...I just now realized that when I started this river project, I set this map at 20 miles per hex, but when I worked out my rough slope system, I went with 24 mile hexes as standard.  Okay, no big deal.  I'll lop off about 20% of each increment.

I'll start from the lower end of the rivers and work my way up, going in the opposite order to how I worked out the total flow of water.  First, the small river to the west:

hex die roll type result elevation
0212 d4 1 0
0111 d4 4 160
0110 d4 3 240
0109 d4 2 240

I used hex 0212 as my baseline, even though it isn't really a coast.  Whenever I decide to extend this map to the coast, I'll work out the elevations to sea level and find 0212's true elevation, and then add that amount to the other hexes of the river.  The same goes for this other river, with 0912 as the baseline:

hex die roll type result elevation
0912 d4 4 160
0911 d4 3 240
0811 d4 1 240
0810 d4 4 400
0809 d4 3 480
0708 d4 2 480

That gets us up to the convergence point.  Now for the western branch:

hex die roll type result elevation
0608 d4 1 480
0607 d4 2 480
0507 d4 1 480
0407 d4 3 560
0306 d4 2 560
0206 d4 1 560
0105 d4 1 560
0104 d6 1 560
0103 d8 1 560

And the eastern branch:

hex die roll type result elevation
0707 d4 3 560
0706 d4 3 640
0705 d4 1 640
0704 d4 1 640
0604 d4 2 640
0603 d4 2 640
0602 d6 6 1040
0601 d8 4 1200

So now we just have to go back and work out the slope using the general formula (change in elevation)/(change in horizontal distance), keeping in mind that a 20 mile hex has (20*5280 = 105,600) horizontal feet.  For that matter, since we're using discrete increments, we don't even have to calculate the slope on each hex individually; every roll of 3 is an elevation increase of 100 feet, resulting in a slope of (80/105,600 = 0.0007).  We could just add this to the slope table I published last post.  Also, since we need a non-zero slope in order for the water to flow, I'm putting some fairly negligible numbers for the negligible elevation change results:

Die Roll Slope
1 0.0001
2 0.0003
3 0.0007
4 0.0015
5 0.002
6 0.004
7 0.006
8 0.01
9 0.02
10 0.03
11 0.04
12 0.05
13 0.08

Now, this results in our river sections looking like this:

hex die roll type result elevation slope
0212 d4 1 0 0.0001
0111 d4 4 160 0.0015
0110 d4 3 240 0.0007
0109 d4 2 240 0.0003

0912 d4 4 160 0.0015
0911 d4 3 240 0.0007
0811 d4 1 240 0.0001
0810 d4 4 400 0.0015
0809 d4 3 480 0.0007
0708 d4 2 480 0.0003

0608 d4 1 480 0.0001
0607 d4 2 480 0.0003
0507 d4 1 480 0.0001
0407 d4 3 560 0.0007
0306 d4 2 560 0.0003
0206 d4 1 560 0.0001
0105 d4 1 560 0.0001
0104 d6 1 560 0.0001
0103 d8 1 560 0.0001

0707 d4 3 560 0.0007
0706 d4 3 640 0.0007
0705 d4 1 640 0.0001
0704 d4 1 640 0.0001
0604 d4 2 640 0.0003
0603 d4 2 640 0.0003
0602 d6 6 1040 0.004
0601 d8 4 1200 0.0015

If you're using some other system for determining elevations of your hexes, you'll have to do the math to work out the slope values. Still, it's not that hard...change in elevation, divided by change in horizontal distance.  If you're getting numbers that don't look anything like what I have on this table, you might want to check your math, or else realize your world is craggy and rugged as all get out. 

Thursday, October 26, 2017

Slope: Adding Contour to the Map

Slope is a pretty easy concept to grasp.  It's just how fast the ground rises as you go uphill, or more directly related to rivers, how fast it falls off as you go downstream.  If you have elevations already marked out on your maps, it's trivially easy to find (divide the change in elevation by the change in horizontal distance, making sure to convert your hex size into the same unit as the elevation, since you're probably using miles for hexes and feet for height).  And so I spent most of the last month working on the math to figure out the dimensions of a riverbed, only going back to slope once I realized that almost 30 days had passed since my last post.  And then I realized that slope isn't trivially easy to work out if, as is the case with most game maps, you don't have the elevation of each hex laid out for you.

I looked through some of the likely game materials I have, and the Wilderness Survival Guide does list some "default" elevations for different terrain types for the purposes of weather generation, but this by itself is totally insufficient for working out riverbed slopes.  For one thing, this would leave a river barely flowing with essentially no slope at all while it flows between hexes of the same terrain type, and then have waterfalls falling hundreds or thousands of feet when the terrain changed, or perhaps even flowing uphill if the terrain suddenly got hilly.  Everything else I saw just had vague references to terrain type elevations, mostly centered on how tall mountains or hills of various types might be.

Next I tried looking at real world measurements, but aside from the official elevation of various cities and the elevation of high points like mountain peaks, these weren't easy to find.  No one (except me apparently) is interested in how high the base of a hill is, or how high a river is, with the sole exception of the Yarlung Zangbo River in Tibet.  It's the world's highest river, with 3/4 of its length at elevations above 3000 meters, and 1/3 over 4000.  But one river simply isn't enough to build any kind of coherent system on.

So what I've settled on here isn't based firmly in reality, and hasn't been extensively playtested in any way, but it seems to feel about right.  If anything, it generates terrain a little slopier than you might expect in real life; I think I'd prefer something a little closer to real life, but for now at least, I'll take rivers with more rapids and cascades as a high adventure feature rather than a bug.

All right, the method:  the ocean is at an elevation of 0'.  For every river hex, roll a die appropriate to the surrounding terrain, consult the table, and add the result to the previous river hex's elevation.  If you're not starting at the ocean, just use the hex that's furthest downstream as the baseline; all elevations above that are relative to the baseline, rather than being relative to sea level.

Terrain type Die type
Die Roll Elevation Add

24 mile hex 12 mile hex 6 mile hex 1 mile hex
Swamp d2
1 negligible negligible negligible negligible
Plains d4
2 negligible negligible negligible negligible
Low Hills d6
3 100' 50' 25' 4'
Foothills d8
4 200' 100' 50' 8'
Low Mountains d10
5 300' 150' 75' 12'
Mountains d12
6 500' 250' 125' 21'

7 800' 400' 200' 33'

8 1300' 650' 325' 55'

9 2100' 1050' 525' 85'

10 3400' 1700' 850' 140'

11 4500' 2250' 1125' 185'

12 6000' 3000' 1500' 250'

13 10000' 5000' 2500' 415'

Low Hills and Low Mountains are kind of transitionary types, to be used for the lowest hex of hills or mountains in a range, or not.  Do what you want with them. 

Why is there a 13 on a table where the highest die you'd roll is a d12?  Because this table is primarily for working out the elevation of the low points of the hex, but I thought it might be useful to have the ability to randomly roll up the high point too.  If you're looking for the high point, roll again and add 1; this gives the chance that a small hill will poke up out of a swamp.  Of course, there is a very small chance that a mountain hex will have a high point barely above the level of the riverbed.  Maybe use d10+3 or d6+7 or something.  Suggestions for improvements are welcome.

Also keep in mind that if you're going back and making a more detailed map, like a 6 mile per hex version of a map you originally did in 24 miles per hex, make sure your overall slope is the same.  There can be places in the detail map where the riverbed is more level or more sloped than you found in the 24 mile hex, but it has to even out by the time you get across the hex.  If you have an 800' drop in the 24 mile hex, and you roll three "negligibles" in a row, that last 6 mile hex will have to have an 800' drop to keep it even.

Tuesday, September 12, 2017

Rivers: Where the water goes and where it doesn't

Last time I had worked out that an inch of annual rainfall on a square mile translates into 1.5 cubic feet per minute of runoff all year on average.  So where does this runoff go?

Well, downhill obviously, and most wide-area maps show mountains and oceans, so obviously it ends up running into rivers and flowing to the ocean.  Wherever a river is shown on a map is by default the lowest spot in the immediate area, but even hexes without rivers marked will have creeks, streams, rivulets, and rills draining the excess rainfall out of the lowest point in the hex and toward the ocean.

If water flows toward the lowest point, then it follows that water flows away from the highest points.  The line connecting the highest points in an area (of whatever size, from a square foot to a continent) is the local divide.  The divide can run along a mountain ridge, a line of hills, or simply an area of slightly higher ground on otherwise flat terrain.  All rain falling in an area bounded by divides will flow eventually into the same body of water; this is the watershed.

Three watersheds, separated by divides running along mountains and hills

Using what we know about rainfall and the flow of water from higher to lower elevations, we can now work out the total flow of water in a river.  This will define the amount of water that flows past a given point in the river each minute, but doesn't show whether it is a wide, slow river or a narrow, cascading one.  We'll worry about that detail later...for now, we'll look at the total flow.

For simplicity's sake, I'm going to assume all the hexes on the following map receive the same amount of rainfall...let's say 50" per year.  Obviously when using an actual campaign map, forest gets more rain than grassland (although our 50" falls within both temperate forest and grassland), which gets more than desert.  For terrain types not specified in the last post, use an approximation based on the surrounding terrain; a bare, rocky mountain rising from the midst of a steaming jungle will probably get as much rain as the surrounding jungle.  An oasis in the desert probably gets no more rain than the desert itself (most are fed by groundwater).  A mountain hex serving as a divide might get more rain on one side than on the other, due to the rain shadow effect, and this will affect the water drainage on each side.

We know each square mile gets 50" of rain, and since each inch of annual rain translates to 1.5 cubic feet of flow per minute, we have a flow rate of 75 cubic feet per minute for each square mile on our map.  Let's say each hex is 20 miles across, but how many square miles are in a 20 mile hex? 

I've found a super easy link to help with that: Whatever hex size you choose (20 miles in this case), input that into the "short diagonal" or d2 window (notice d2 goes across the hex from one face to the opposite face...exactly the distance we use in RPG mapping).  For a 20 mile hex we get 346 square miles, and that means we get 26000 cubic feet per minute of water flow per hex, rounding off because we're not interested in making this math any crazier than we have to. 

Ok, this next part is a little tedious.  Now we add up the total flow for each river hex. So for the furthest north branch of this river (hex 0601), we'll have the hexes to the north (0500, 0600, 0700) flow into it.  0400 looks like it would flow into 0500, so we'll add that too; same goes for 0800 flowing into 0700.  Lastly, the rainfall running off of 0601 itself will end up in the river in 0601, so we have six hexes worth of flow.  Since we're using the same rainfall for all hexes, it's going to amount to 156,000 cubic feet of water per minute flowing out of 0601.

Similarly, 0602 will have 0200 flowing into 0300, which flows into 0401, which flows into 0501, which finally flows into 0602.  This is mirrored on the other side with 0701 through 1000.  The rain running off 0602 ends up in the river.  Lastly, all the water in the river at 0601 ends up here, for a total of 390,000 cubic feet per minute. 

For hex 0603, we do the same thing (I vastly oversimplified this water flow, just running in parallel lines of hexes like this...for greater realism and more satisfying detail, there should be low spots that local area hexes drain into, which then drains into the river).  In this case, since there is another branch of the river to the west, some of the hexes that would otherwise have ended up here instead drain towards the other branch.

Here is a table summing up the drainage area feeding each hex and the total water flow.  For each entry, if a river hex feeds into another river hex, I marked it in red, so I'd remember to add the river's total flow instead of counting it as another hex of rainfall runoff.  I ended this table before hex 0708, as that hex is fed by both branches of the river.

0400, 0500, 0600, 0601, 0700, 0800
0200, 0300, 0401, 0501, 0601, 0602, 0701, 0801, 0900, 1000
0301, 0402, 0502, 0602, 0603, 0702, 0802, 0901, 1001, 1100, 1200
0403, 0404, 0405, 0503, 0504, 0603, 0604, 0703, 0803, 0902, 1002, 1101, 1201
0505, 0604, 0605, 0704, 0804, 0903, 1003, 1102, 1202
0606, 0704, 0805, 0904, 1004, 1103, 1203
0705, 0806, 0905, 1005, 1104, 1204
0706, 0807, 0906, 1006, 1105, 1205

 And the same deal for that western branch.  You can see some of the drainage patterns get a little thrown off by the bends in the river:

0000, 0001, 0002, 0003, 0100, 0101, 0102, 0103, 0201, 0202, 0203, 0302
0004, 0103, 0104, 0204, 0303
0005, 0104, 0105, 0205, 0304
0006, 0105, 0106, 0206, 0305
0206, 0207, 0306
0007, 0107, 0208, 0306, 0307, 0406, 0407
0407, 0506, 0507
0507, 0607
0408, 0508, 0607, 0608

And now the lower reaches of this river, after the two branches meet up:

0608, 0707, 0708, 0808, 0907, 1007, 1106, 1206
0708, 0809, 0908, 1008, 1107, 1207
0609, 0709, 0809, 0810, 0909, 1009, 1108, 1208
0409, 0509, 0610, 0710, 0810, 0811, 0910, 1010, 1109, 1209
0811, 0911, 1011, 1110, 1210
0611, 0711, 0812, 0911, 0912, 1012, 1111, 1211

If you looked closely, you probably noticed that I didn't get all the hexes in there.  I decided it was all too regular and patterned (even though I was going for a simple illustration), and decided to add another small river in the west.  Here's the new map, and the chart for the new river:


0008, 0009, 0108, 0109, 0209, 0308
0010, 0109, 0110, 0210, 0309
0011, 0110, 0111, 0211, 0310, 0410
0111, 0311, 0411, 0510

All right...all done here.  Now we know the total flow in these rivers for each hex, but like I said earlier, that doesn't tell us whether the river is narrow, shallow, and fast or wide, deep, and slow, or somewhere in between.  This gives us a start, though, and once I tease apart the effects of the slope of the riverbed, we'll be well on our way to getting a clear picture of these rivers.

Tuesday, August 8, 2017

The Care and Feeding of Rivers

In 1804, noted Quest-Giver (and President of the United States) Thomas Jefferson sent Meriwether Lewis and William Clark on a hexcrawl to find a water route across North America to the Pacific Ocean.  Along the way, they had to portage their boats around rapids, and eventually cache them, moving forward in smaller canoes more suited to shallower water.  Eventually, they had to leave these as well, traveling overland across the continental divide until reaching a river on the other side deep enough to float a canoe in.

I have rarely (as in, "never that I can remember") seen a published adventure or RPG supplement which dealt with the changing nature of a river as you travel up or downstream, with varying currents, depth, and hazards.  For the most part, in an RPG, a river is a blue line on a map, and any interpretation of what that blue line means is left to a GM's personal experience.  For me as a teenager, that meant a blue line on a game map meant a body of water that was too deep and wide to cross without a bridge except by very strong and unencumbered swimmers, navigable by ocean-going ships, and potentially hiding giant water monsters of some sort.

A river
Of course, even then I knew there were other kinds of rivers, but I had no kind of feel for how a given river might vary from what I considered "the norm".  Heck, even now, I have a few generic fall-backs  that don't really cover the full range of possibilities for a river, and don't necessarily reflect reality all that well.  So I'm doing something about it.

A river
First, a river has to be fed by rainfall.  We can infer how much rain falls in a given area from the vegetation found there.  We're kind of reversing cause and effect here, but I've never seen an RPG map start with rainfall levels and just kind of imply that a forest exists in this area from there.  We work with the tools we have.

A river

Working off of this table (and converting units to imperial units, because metrics just doesn't say "fantasy", also rounding roughly for simplicity's sake):

We get the following for inches of rain per year:

Tundra 0-40
Cold Desert 0-10
Hot Desert 0-20
Grasslands 20-55
Shrublands 20-55
Savannah 20-55
Thorn Forest 20-55
Boreal Forest 15-50
Temperate Forest 25-95
Temperate Rainforest 75-100
Tropical Dry Forest 50-100
Tropical Montane Forest 100-140
Tropical Rainforest 100-180

Now, about 2/3 of this water will return to the atmosphere as vapor, from direct evaporation into the air or transpiration as a result of plant photosynthesis.  The rest of it is absorbed into the ground (where it slowly flows and returns to the surface as springs) or runs off into streams.  An inch of rain on one square mile of land produces 2,323,340 cubic feet of water, so each inch of annual rainfall translates into about 1.5 cubic feet of water per minute flowing off of each square mile of land year round (again, majorly simplifying).

And this is about as far as I've gotten.  The Dungeoneer's Survival Guide has some flow velocities based on the slope of the stream, and I originally considered this might be good enough to work with, since knowing total flow and flow velocity will give you the numbers you need to work out the size of the stream.  For example, if you know you have 1000 cubic feet of water flowing each minute, and you know it's flowing at 20 feet per minute, you can easily see that the stream will have a cross section of 50 square feet.  While I was trying to figure out how to structure that cross section (is it 5' deep and 10 across? 2 deep and 25 across?  deeper?  shallower?), I came across a discussion of water flow that showed that velocity is based on slope *and* cross section...a wide, shallow stream will move slower than a deeper one of the same cross-sectional area.  While I could ignore this, and it might not even matter for small rivers that only drain a couple dozen hexes, I'm afraid that really long rivers like the Streel River of the Known World/Mystara would end up ridiculously deep and wide as they flowed slowly through plains and marsh in the final few miles to the ocean.  Like miles wide.

So I'm looking into some numbers, trying to come up with a simpler solution for RPG rivers than applying Manning's equation with its fractional exponents to every hex.  I'll be back later.

Sunday, July 9, 2017

Parnax the Mighty

Inspired by Joseph Manola's hexcrawl In the Shadow of the Great Machine.

A crazed outcast, Parnax the Mighty has exposed himself to uncontrolled energies of the Great Machine in order to turn himself into a superman.  His results have been very mixed.

Parnax's plan was to give himself a powerful physique to match his unparalleled intellect and magical prowess.  He is now of prodigious size, but his musculature and skeletal structure have not quite kept up. His elephantine bulk requires him to move about on all fours, taking a full round to shift into a sitting position to cast spells.  Returning to all fours for movement takes no time.  If an arm or leg is injured, his movement rate is reduced by 1/2; if two limbs are injured, he is barely mobile, effectively immobile for tactical purposes.

Additionally, his tremendous bulk causes him to take double damage from falls, taking 1d6 damage even if he trips, although this might be hard to pull off given his four-limbed gait.

DCC Stats: Init -1; Atk fist +7 melee (1d8+8); AC 15; HD 10d8; hp 53; MV 30’; Act 1d20 or 2d20 (when spell casting); SP spell casting as level 7 Wizard, melee crits use Giant table; SV Fort +7, Ref +1, Will +4; AL C.

Thursday, June 29, 2017

Examples for NPC Corruption

I don't know if my original posts about how to do this are clear enough, so here's a few walk-throughs.

I'm making a level 8 wizard as the main villain for an adventure.  I have no strong theme for him that would suggest a series of linked mutations, so I'm going to corrupt him randomly.  His spell list is as follows: Runic Alphabet, Mortal; Sleep; Color Spray; Patron Bond (King of Elfland), and therefore Invoke Patron (King of Elfland); Choking Cloud; Nythuul's Porcupine Coat; ESP; Breathe Life; Dispel Magic; Lokerimon's Orderly Assistance; and Control Ice.  I roll an 86 on Table I, resulting in 22 failed rolls. 

The first failed casting I roll up is Control Ice.  At this point it's obvious that if you wanted more accurate detail you could develop the system so that the first few failures are 1st level spells, with the 4th level failures only coming in towards the end of the list, but this is good enough to suit me.  At any rate, rolling on the results for a spell check of 1 for Control Ice, I get a 4, which is a misfire.  Nothing of lasting interest.

Next, I roll up Sleep, and roll a 3 on Sleep's chart, resulting in another misfire.

Next is Patron Bond.  This results in automatic patron taint, so rolling on that table I get a 3.  This wizard becomes aloof and indifferent to mortal concerns.  This is no big deal, so I'll let it ride.  The wizard loses 1 Personality and I move on.

The next roll turns out to be a misfire, but after that a failed Color Spray leads to the caster having his skin changed to a rainbow pattern.  That attracts a little too much attention, so I use one of my (8/2) 4 bonus Luck points to ignore that.  The very next roll is a failed Lokerimon's Orderly Assistance, resulting in the caster becoming overly helpful to anyone who asks unless he passes a Will check.  That makes for a very poor villain, so I use another bonus Luck point to nix that.

Twenty two failures is a lot to detail, but I go on in this manner, throwing out a good many of the failures because they were simple misfires, spending bonus Luck to eliminate a few particularly bad corruptions/taints, and having to deal with the rest.  At the end of it all, this wizard has an aloof and indifferent manner (-1 Personality), horrid pustules on his face (-1 Personality), becomes withdrawn from mortal concerns (the same patron taint a second time, and another -1 Personality), shimmery sheen to his skin which has a green tone (two separate results), painful lesions and sores, flesh that flows and reforms on his legs, and a longing for Elfland.  Now he's nicely weird, as a level 8 wizard should be.

Later, the characters are looking for a wizard in town to sell some weird magic reagents to, and he seems like he'll be a recurring NPC, so I stat him up quickly.  Using the quicker method from part 2 of this series of posts, I roll a 78 for a level 5 wizard, giving this guy 5 failures.  Since I'm using Table II, these are all corruption or patron taint, and I don't have to deal with misfires. 

This guy's spell list is Charm Person, Magic Shield, Ekim's Mystical Mask, Flaming Hands, Ventriloquism, Shatter, Detect Invisible, and Write Magic.

The first failure is Ekim's Mystical Mask.  I roll a 3 on the corruption table (this guy has no patron, so no patron taint), and find that he's taken to wearing hoods or masks in order to not reveal his true face.

The second failure is the same.  No point worrying about it now...even if I had spent Luck on it before, he'd have to deal with it again.

Next is a failed Flaming Hands, resulting in a -2 on spell checks for any cold based magic.  Since he has no cold based magic, this is nothing to worry about.

I still have two more failures to roll, and two bonus Luck points to spend, so I'm done. 

Lastly, the PCs encounter a group of bandits with a wizard among the leadership.  This is another 5th level guy, and I don't want to spend a lot of time on detailing him, so using the quickest method, I roll a 95, or 7 failures.  I'm spending my two bonus Luck points to knock this right down to five failures.

First failure is 1 Minor, with a result of 7, chills.  Next is 6 Greater with a result of 3, bull head.  Next is Minor, painful lesions; Major, deep blue skin; and lastly Minor, hair falls out.  Quick and dirty, but done in about a minute. 

NPC Wizard Corruption, Part II

That last method of determining wizard corruption can take a while, especially as the wizard's level goes up.  That can take way too long to do at the table for those wizards who are rolled up as a random encounter.  Here is a couple of quicker methods.

Table II is used for these methods.  It is similar to Table I except that it excludes misfires from the results (I estimated that about half of failures result in a misfire...this may not be 100% accurate, but it's eyeball close.)

Table II
#failures Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 #failures Level 8 Level 9 Level 10
0 01-60 01-28 01-10 01-03 01 0

1 61-91 29-64 11-34 04-13 02-04 01 1

2 92-99 65-87 35-61 14-32 05-12 02-03 2 01

3 00 88-96 62-81 33-54 13-26 04-09 3 02
4 97-99 82-92 55-73 27-44 10-19 4 03-06 01
00 93-97 74-86 45-62 20-33 5 07-13 02-04 01
98-99 87-94 63-76 34-49 6 14-23 05-08 02
00 95-98 77-87 50-64 7 24-35 09-14 03-04
99 88-93 65-76 8 36-49 15-23 05-08

00 94-97 77-86 9 50-62 24-34 09-13

98-99 87-92 10 63-74 35-46 14-21

00 93-96 11 75-83 47-57 22-30

97-98 12 84-90 58-69 31-41

99 13 91-94 70-78 42-52

00 14 95-97 79-86 53-62

15 98 87-91 63-72

16 99 92-95 73-80

17 00 96-97 81-86

18 98 87-91

19 99 92-94

00 95-97

21 98

22 99

23 00

Quicker Method:
  • Roll on Table II for the number of spell failures that resulted in corruption or patron taint.
  • Subtract the wizard's Luck bonus from the number of spell failures (negative Luck bonus results in more corruptions).
  •  Approximately 1/3 of the remaining failures will be patron taint.  Randomly determine a spell from the wizard's spell list and roll on its corruption results table (or use the appropriate patron taint table).
  • Luck can be burned to avoid corruption effects as usual.  As an option, the Judge can allow up to 1/2 the wizard's level in bonus Luck to avoid corruption.

Quickest Method (use for minor characters):
  • Roll on Table II for the  number of spell failures that resulted in corruption or patron taint.
  •  Subtract the wizard's Luck bonus from the number of spell failures (negative Luck bonus results in more corruptions).  
  •  Luck can be burned to avoid corruption effects as usual.  As an option, the Judge can allow up to 1/2 the wizard's level in bonus Luck to avoid corruption.
  •  Roll remaining corruption results on the the generic tables (1-3 Minor; 4-5 Major; 6 Greater).

NPC Wizard Corruption in DCC

Well, I won't be winning any awards for regularity in posting...

It occurred to me that there is no system in place for determining corruption for NPC wizards in DCC.  Judges running a hexcrawl with wandering monster checks could roll up an NPC wizard in any of several ways (master of a random castle, member of a bandit gang or pirate crew, etc), and whether that wizard has any lingering corruption from his dealings in magic depends largely on how creative (or lazy) the Judge is on the fly.  But that's just not good enough for me...if there are numbers to crunch, I have to crunch them.

So, it seems to me that the average number of XP gained in an encounter is 2, not simply because the possible outcomes range from 0-4, but also due the dangers involved.  A character who only ever deals with 0XP encounters won't gain any levels, but those who only ever deal with 4XP encounters (generally involving fatalities) are unlikely to live long enough to gain many. 

I further estimate that a wizard will cast about one spell per encounter.  Easy encounters might not need any spellcasting, and desperately dangerous ones might require more than one, but given that, in many cases, spell effects from one casting can carry over into multiple encounters, one spell per encounter doesn't sound too far off.  Summoned creatures can hang around for quite a while, charmed characters will stay charmed for at least a day with a spell check of 14+, etc.  Also, wizards can use magic items without gaining corruption (usually).

Given these estimates, a wizard who goes from level 1 to level 2 has had on average (50-10)/2=20 encounters and cast 20 spells, each with a 1 in 20 chance of a spell fumble.  There's a good chance that he'll get away without any corruption, and a vanishingly small chance that he'll end up with 20 corruptions.  Without going into all the mathematical details, this is a pretty standard binomial distribution, and working out the percentages isn't all that difficult.  Table I shows the range of possible spell fumbles experienced by wizards of different levels, expressed in percentile terms.

 Table I
#failures Level 2 Level 3 Level 4 Level 5 Level 6 Level 7 Level 8 Level 9 Level 10 #failures
0 01-36 01-08 01

1 37-74 09-28 02-06 01

2 75-93 29-54 07-17 02-03

3 94-99 55-76 18-34 04-08 01

4 00 77-90 35-53 09-17 02-03

91-96 54-71 18-30 04-07 01

97-99 72-84 31-45 08-13 02

00 85-92 46-60 14-22 03-04

93-97 61-73 23-33 05-08 01


98-99 74-83 34-46 09-14 02

00 84-90 47-59 15-22 03-04


91-94 60-71 23-31 05-07 01

95-97 72-81 32-42 08-11 02

98-99 82-88 43-53 12-17 03 13

00 89-93 54-64 18-21 04-05 14

94-96 65-74 22-30 06-08 01 15

97-98 75-82 31-40 09-12 02 16

99 83-88 41-50 13-17 03 17

00 89-93 51-60 18-23 04-05 18

94-96 61-69 24-30 06-07 19

97-98 70-77 31-38 08-10 20

99 78-83 39-47 11-14 21

00 84-88 48-56 15-19 22

89-92 57-64 20-25 23

93-95 65-72 26-32 24

96-97 73-79 33-40 25

98 80-85 41-48 26

99 86-90 49-56 27

00 91-94 57-64 28

95-96 65-72 29

97 73-78 30

98 79-84 31

99 85-87 32

00 88-90 33

91-92 34

93-94 35

95-96 36

97 37

98 38

99 39

00 40

 At this point, you need to randomly determine which spell from the caster's spell list was being cast when the failure occurred.  Roll on that spell's table for a spellcheck of 1 to figure out whether that failure ended up with corruption, patron taint, a misfire, or all three.  (Misfires are so fleeting in effect that we're not generally concerned with them here.)  Don't forget the effects of Luck, not only on the chances of a misfire instead of corruption, but also burning a point of Luck to avoid a corruption effect.  As an option, the Judge can allow the NPC wizard a few points of additional Luck only for the purposes of avoiding corruption and patron taint; this should probably not be more than about half the wizard's level, or only the highest level wizards will ever be corrupted.  At any rate, the Judge must decide for the wizard whether to burn Luck to avoid this corruption before moving on to the next corruption roll.