Browsing articles tagged with " affiliation"

Some Pseudo Math for Dominance in the Social Network Dungeon Experiment

Aug 7, 2013
Mark
Comments Off on Some Pseudo Math for Dominance in the Social Network Dungeon Experiment

I’m a full fledged old school gamer so I haven’t used much of the newer mechanisms for encounter balancing. Still, the underlying math attempts to approximate an a metric for dominance levels of creature groups in a constrained environment.

The Challenge Rating (CR)

This is fuzzy math to determine how one creature may measure up against either another average party level and/or another creature. I stumbled on Kaww’s post describing Vorpal Tribble’s approach for determining CR of a creature on the fly.

#1. Divide creature’s average HP by 4.5 to 6.5.
4.5 for 5 HD or lower, 5 for 6-10 HD, 5.5 for 11-15 HD, 6 for 16-20 HD., 6.5 for 20-25 HD.

#2. Add 1 for each five points above 10 its AC is, subtracting 1 for every 5 below.

#3. Add 1 for each special attack (+2 to +5 or more if its got a decent number of spells in its spell-like abilities).

#4. Add 1 for each quality unless you deem it worthy of more. Add 1 for each resistance and 10 points of DR it has, and 2 for each immunity. Subtract 1 for each vulnerability.

#5. Add 1 for every two bonus feats it has.

#6. Divide total by 3. This should be its rough CR

I have a couple of issues with this. The first (#1) is the segmentation of the average HP calculation. While dividing by HD might be more elegant, simplicity is key so I will just use the average in the middle of 5.5.

Most of the games I play use descending not ascending AC so just invert #2. #3 is judgement call so to automate it, I’ll just use the raw number of special attacks. #4 will just use the number of special abilities. Designating one ability over another is complicated so roughly speaking they will just all be the same. My systems of choice have no feats so it will just be ignored. Others may choose to include it.

The simplified calculation is:

CR = (HP / 5.5) + 1 * (#Special Attacks) + 1 * (#Special Abilities)

This ignores AC for now. I will need to source a table that gives some indicator of descending to ascending armor class comparisons. Given the descending nature, I think one bonus CR per 3 points of AC below 10 (9) would work reasonably at first glance. So we could add:

CR += abs(10 – AC) % 3

Then divide it all by 3 per the original calculation.

CR /= 3

Apply this on a per creature basis then average for the group of creatures. This will give a baseline CR for the group. So now there is a rough CR for the creature(s) as a group. Couple that with the number appearing and you can begin to resolve the CR relationship.

CR is Non-Linear

Based on the explanations I’ve read, CR is a non-linear relationship. There is little explanation that determines how 1n CR = 2 CR(n-2) or 1n CR = 4 CR (n-4). There is probably an obvious calculation this non math guy is missing.

My buddy, Keith, came to rescue with a simple approximation

#Appearing * (CR^2) = Dominance Level (DL)

Dominance Level is similar to encounter level in some contexts. Both break down at the extreme of disparate levels. As a rough approximation, it allows for large numbers of lower level creatures to exist within the space of a far more dominant monster.

It is not a perfect metric as Keith explains:

For the moment, though, I would suggest when considering dominance use an exponential-based relationship. The square of the HD would be dead easy, but in D&D 3.x the CR is perhaps a better measure, and one creature of CR n is roughly equated to four creatures of CR n-4 (and two creatures of CR n-2).

By this math 8 CR 3 creatures might be considered roughly equivalent Dominance to a single CR 9 creature (and nowhere near the dominance of a CR 24 creature, 8*3=24 notwithstanding).

Squaring and adding, on the other hand, would give 8*3*3 = 72, while a single CR 9 creature would be 1*9*9 = 81… not so far off, really. For even lower-level creatures you might see 9 CR 1 = 9*1*1 = 9 vs. a single CR 3 = 1*3*3 = 9.

I’m not sure which works better. Nine CR 1 creatures against a single CR 7 creature can be a kind of even fight in the right circumstances (focused fire has some happy effects), but it’ll be touch and go and the CR 1 guys can expect a lot of casualties, possibly TPK. This suggests to me that a lower-CR creature could effectively hold dominance (the single CR 3 creature might be enough to balance them ‘socially’ — equal Dominance score). They could probably beat him if it came to a fight, but would it be worth the trouble and the possibly (likely) casualties?

Dominance Level

DL is not the end-all-be-all metric. It is one of many drivers within a simulated social network driven dungeon. The overall relationships including friendship will determine if one group tries to overtake another. On one hand, if you used it without consequence, the dominant groups would overrun the dungeon. However, those same groups are aligned with other groups or perhaps co-exist so they have no desire to overrun less powerful creatures wholesale.


Comments Off on Some Pseudo Math for Dominance in the Social Network Dungeon Experiment

Affiliation Graphs for Dungeon Stocking — Raw, Random Thoughts

Jul 31, 2013
Mark
Comments Off on Affiliation Graphs for Dungeon Stocking — Raw, Random Thoughts

Random thoughts come with random generators. Early in the week, I was cleaning up a bunch of files from prior programs at work and a good part of it was relationship graph code that was targeted at a program which ended prematurely. Arriving at home, I decided to do a functional check of various random generators. One of those was the monster stocker. As I was testing and looking at the raw output, it struck me that rather than having to manually figure out how the monsters fit in a dungeon it would be cool to build up a relationship model. Keith over at In My Campaign has written about Node Based Megadungeon Design. He also happens to be on G+ so I tossed the idea at him last night. His input is intermixed with my own thoughts and I’ve tried to designate his insight appropriately.

Generating random affiliations is a complicated problem. Ad hoc language is easy to describe verbally — the bugbears in areas #2, #7, and #9 have subjugated the kobolds in #3, #5 and #6. Coding that is significantly more difficult. However, if you simplify the relationship into a few definable terms, one can begin to construct the nature of the affiliations between groups. From there, you begin to place those creatures in actual locations in the dungeon. For now, I am going to ignore physical space and just consider building up a rational model of the creatures within a dungeon.

Step 1 – Plausible Population

Assuming a map is available and general metric of the power rank of the creatures, it is simple enough to generate random population of plausible creatures. For simplicity, I will start with a single level dungeon with a single entrance into the world. Say 30 rooms with about 2/3rds of them populated with one creature or another. Just generating 20 creatures is unlikely to be an interesting population. Instead, pick out your random table of choice and do 3-6 times that number of creatures. Massive list, right?

Make it more interesting. Add in a fractional percentage of higher level creatures. Say we did 3X the number of rooms to start. Add in 1/2X creatures from the next level of power. 1/4 from the 2+ the starting point and perhaps 1/8th from 3+. So we end up with a starting population of 90 plausible rank 1 creatures, 15 rank 2, 7 rank 3, and 3 rank 4+. All told, there are 115 possible creatures for a mere 30 rooms of which only 20 will be actively occupied.

Step 2 – Density

Now we have a major pile of creatures that need to be pruned downwards. Nothing gets culled at this stage. Instead, the target population is evaluated for occurrence of the same beasts. This should not be a simple count of Creature Y showed up Z times. Evaluation should consider the number of creatures that could plausibly appear for each room / encounter. So if kobolds show up 3 times in the initial population but 12 of them can occur each time, the kobold density metric is 3*12=36 rather than 3. Thirty six creatures vs a singular purple worm that showed up from one of the upper level tables is significantly different.

Sum up the total creatures plausible then calculate possible density (total # / total possible). The value is between 0 and 1. Honestly, its slightly above 0 and 1 should hopefully never show up in a rational random table.

Step 3 – Segmentation

Next up, divide the population into two groups — actors and outliers. The actors are the top 10% (or whatever cutoff you choose) of the density metric. The rest are not dominant players in the dungeon but may be present. The group of creatures with the highest density is the starting target of the “lair” monster. Assign every creature an appropriate boolean actor flag.

Step 4 – Starting Relationships

Initial seeding of group dynamics can take many forms. Keith suggested a seeding metric based on alignment, Friendship. I considered one based on hit dice, Dominance. For alignment, depending on your preference, you either have 3 or 9 different models. On the ease of use stand point, use Law/Neutral/Chaos. Those with the same alignment get a 1 for friendship, 0 for one step removed and a -1 for opposing views. Granularity for the 9 could be added but I’m keeping the idea as simple as possible.

For Dominance, just look at HD vs HD at a group level. Nine 1-HD creatures can be treated at the 9 HD metric vs something with 3 HD. This is a rough metric; certainly not useful for with something with special abilities and/or other powers. I think a better metric might be using XP per creature as the relationship value.

Both Friendship and and Dominance are a 1-to-1 relationship. Every creature has a friendship and dominance model to every other one.

Next Steps

I’m out of time for the evening. This is a rough, raw look at how I’d begin to assemble a population in code. The outliers of the population need more significant relationships to the actors. Then cycle the “life” of the dungeon a few times to erode/enhance friendship and dominance. Sprinkle in a few more relationship metrics. Rinse, repeat, or deviate. I cannot predict where the idea is going to flow.


Comments Off on Affiliation Graphs for Dungeon Stocking — Raw, Random Thoughts