D&D 5E Computational Deconstruction: "Lost Mine of Phandelver" *** spoilers ***

CodeFlayer

Explorer
While prepping this adventure for a group of new players (and I myself am new to 5e) one of my players suggested this might interesting to a broader audience.

Code:
ItemTable tbt_day_stock {
    :2: 1#8+2 stirge(.cr. 1/8),
    :2: ogre(.cr. 2),  
    :2: 1#6+3 goblin(.cr. 1/4),  
    :2: 1#4+2 hobgoblin(.cr. 1/2),
    :2: 1#4+2 orc(.cr. 1/2),
    :1: 1#4+2 wolves(.cr. 1/4),
    :1: owlbear(.cr. 3)
}

ItemTable tbt_night_stock {
    :3: 1#8+2 stirge(.cr. 1/8),
    :1: 1#4+1 ghoul(.cr. 1),
    :1: 1#6+3 goblin(.cr. 1/4),    
    :1: 1#4+2 hobgoblin(.cr. 1/2),
    :2: 1#4+2 orc(.cr. 1/2),
    :2: 1#4+2 wolves(.cr. 1/4),
    :2: owlbear(.cr. 3)
}

Here are the day and night wandering monster encounter tables from from part III of the adventure. This code, or bespoke rolled table language, is meant to be fed to a python program - mt01.py (for Monsters & Treasure). Let us look at one typical line -

:2: 1#6+3 goblin(.cr. 1/4),

The value between the colons indicate the chances, in terms of parts per whole, that this entry will be rolled. Both tables have 12 total parts each, as intended for a d12 roll. The next is the number of creatures (1d6+3), the object name, and properties to be assigned. Here is one roll on the night table -

$ python mt01.py dd1.tables.txt roll tbt_night_stock 1 loading: dd1.tables.txt cmd: roll --- tbt_night_stock 1 5 stirge, cr = 1/8 mob count/base exp: 5 125 per_char_battle_exp 60.3125 suggested party levels (DMG/XGE) 1 1

Because these objects have the property "cr", they are treated as mobs and the appropriate algorithms are invoked. 5 stirges, of cr 1/8, have been generated, and according to my implementations and adaptations of the difficulty assessment algorithms from the DMG, and separately, XGE, both these agree this a good encounter for (4) first level characters (respectively).

Most interestingly perhaps, is that if we roll on these tables many thousands of time and average the results, an average party level of 2.5 is seen, which is fits the adventure design, where characters generally exit part II as 3rd level characters. For game masters who have run these tables, does that match your experience? Details are welcome.

My purposes here are to share something fun that I have a passion for, and perhaps give something back to the world. Probability tables, as envisioned by the early designers of RPGs, somehow bring a world to life. Questions are welcome as I not explained all particulars or perhaps not all that clearly. I can expound on the variant difficulty calculations, or share more complicated tables that create immersive details, the real goal of this tool.

Thanks for reading.

--CodeFlayer
 

log in or register to remove this ad

CodeFlayer

Explorer
Today I'd like to talk about about part I. I've divided the encounters into two tables, shell and core. Shell encounters are those of medium/hard (DMG) or standard (XGE). They act as a sort of moat in this model that the players must traverse to get to the core encounters.

Code:
ItemTable part_1_shell {
    4 goblins(ambush, .cr. 1/4),
    2 goblins(hidden, cave mouth, .cr. 1/4),
    3 wolves(kennel, chained and starving, .cr. 1/4),
    1 goblin(overpass, lazy watch, .cr. 1/4),
    3 goblins("twin pool's cave", .cr. 1/4),
}

This is not a wandering monster table, but if I roll on it thousands of times and average them (as above) then I get suggested party levels (SPL) of 1.2 / 1.0 for DMG/XGE respectively. The difference is that pesky 4 goblin encounter that stock DMG rates as deadly but XGE rates as standard.

The most interesting thing about working on and testing this part of the adventure is that it revealed that in some spots in the XGE ratio tables two successive lines of the low level ratio tables can have the same ratio. This gives my algorithms problems, but it is easily corrected. For example, 1/4 CR monsters have a ratio of "1:2" for both 2nd and 3rd level parties. I have therefore amended my entry for "2nd Level, CR 1/4" from "1:2" to "3:4". Which is midway between "1" and "1/2", which so far yields good results. I read these ratios, "X:Y", as, it takes X characters to take down Y creatures.
 

CodeFlayer

Explorer
and the core encounter table.

Code:
ItemTable part_1_core {
    [ 1 goblin(Yeemick, .cr. 1/4, disloyal),
        5 goblins(den, .cr. 1/4),
        dwarf(prisoner, Sildar Hallwinter) ],
    [ 1 bugbear(Klarg, .cr. 1),
        1 wolf(.cr. 1/4),
        2 goblins(.cr. 1/4) ]
}

with averaged SPLs of
suggested party levels (DMG/XGE) 2 2.5

For Yeemick, the algorithms agree on a level 2 party (4 characters, which can be changed). They disagree for Klarg, but because the algorithm searches for the party of size 4 closest to standard. This may also be regarded as hard for 4 2nd levels as well. These values tell me as a GM to be especially careful with these core encounters, and all me a ready tool to re-balance and re-evaluate, as this is intended for a 1st level party of 4. Likely these are meant to be blunted or mitigated by foreshadowing or other game mechanisms.

With these treasures added in (not shown for clarity, but indented appropriately) and further property notes, this begins to form a one page outline I would use at table (printed out).

Deconstruction always loses detail, and is not meant to replace other methods of analysis or the adventure text itself. Instead, it is intended to compliment them.

Thanks for reading.

--Code Flayer
 
Last edited:

CodeFlayer

Explorer
My XGE based suggested party level (SPL) calculations have been off - I wasn't taking into account how solo mob CRs are handled. This was interesting to implement because I wanted to do a direct lookup, and after a try or two I came up with (python code) -

Code:
        solo_cr_to_lvl_map = {
                                        1:[1, 1, 1],
                                        2:[2, 1, 1],
                                        3:[3, 2, 2],
                                        4:[4, 3, 2],
                                        5:[5, 4, 3],
                                        6:[5, 5, 4],
                                        7:[5, 5, 5]
                                    }
Which is a dictionary (look up table in python code) of CR values (left of the colon), and an array of values that give the SPL for either four, five, or six adventurers. It may yet contain errors, as an inference of the table from XGE (the book).

Moving onto part 2 of the adventure (suitable for 2nd level party of 4) here is the table form (my created language to express roll-able tables) -

Code:
ItemTable part_2 {
    4 ruffians(street fight, .cr. 1/2),
    3 ruffians(barracks, .cr. 1/2),
    3 skeletons(crypts, .cr. 1/4),
    2 ruffians(slave pens, .cr. 1/2),
    1 nothic(crevasse, .cr. 2)[ chest ["+1 longsword"(.lb.5), "silver chased scabbard"] ],
    [3 bugbears(guard barracks, .cr. 1), 1 goblin(.cr. 1/4)],
    4 ruffians(common room, .cr. 1/2),
    1 evil mage("wizard's workshop", .cr. 1)
}

Both methods give the SPL (over thousands of rolls) as 2.1 and 2.2. The solo monster lookup is really important here because of the solo nothic. Without this change to the python code in XGE SPL of 2.5 is generated but drops to 2.2 with the new python code. My confidence in this method grows when the values correlate this way.

The adventure text doesn't really tell the GM what to do if the goblin hide out isn't explored, only that it might occur. In the next post I hope to share a part weather, part combat set of encounters that I might use to take the place of the gobin hide out is missed. It will involve an icy magic storm blowing up off the nearby mere of the dead that lies south of Neverwinter and not far from the Tri-Boar Trail.

Thanks for reading.
 

CodeFlayer

Explorer
I've added a new mode to the program which "flays" a table by visiting every top level table entry one or more times. This mode is intended to evaluate all table elements in a concise format (there is also a long format mode not shown). What follows is the program output of mt01.py for all of the primary encounter sites in the adventure for a party size of 4 (which is fixed). The SPL is the suggested party level for that encounter to be consider of "standard" difficulty. The notion of a standard difficulty for the XGE algorithm is implicit, for the DMG algorithm the target value is mid way between medium and hard and is configurable.

Code:
$ python mt01.py t1.tables.txt flay p1_lair 2 p2_manor 2 p3_ruins 2 p3_castle 2 p4_wave 2
loading: t1.tables.txt
cmd: flay

------------  p1_lair ------------
Goblin Ambush   : SPL (DMG/XGE) 2.0 1.0
Cave Mouth      : SPL (DMG/XGE) 1.0 1.0
Kennel          : SPL (DMG/XGE) 1.0 1.0
Overpass        : SPL (DMG/XGE) 1.0 1.0
Goblin Den      : SPL (DMG/XGE) 2.0 2.0
Twin Pools Cave : SPL (DMG/XGE) 1.0 1.0
Klarg's Cave    : SPL (DMG/XGE) 3.0 3.0


------------  p2_manor ------------
Street Challenge  : SPL (DMG/XGE) 3.0 3.0
Barracks          : SPL (DMG/XGE) 2.0 2.0
Crypts            : SPL (DMG/XGE) 1.0 1.0
Pens              : SPL (DMG/XGE) 1.0 2.0
Crevasse          : SPL (DMG/XGE) 2.0 3.0
Guard Barracks    : SPL (DMG/XGE) 4.0 4.0
Common Room       : SPL (DMG/XGE) 3.0 3.0
Wizard's Workshop : SPL (DMG/XGE) 1.0 2.0


------------  p3_ruins ------------
Westernmost Cottage : SPL (DMG/XGE) 1.0 1.0
Blighted Cottages   : SPL (DMG/XGE) 1.0 1.0
The Brown Horse     : SPL (DMG/XGE) 2.0 1.0
Blighted Farmhouse  : SPL (DMG/XGE) 2.0 1.0
Ruined Store        : SPL (DMG/XGE) 2.0 3.0
Dragon's Tower      : SPL (DMG/XGE) 7.0 9.0
Old Smith           : SPL (DMG/XGE) 1.0 1.0
Old Garrison        : SPL (DMG/XGE) 2.0 2.0
Weaver's Cottage    : SPL (DMG/XGE) 1.0 1.0
Dragon Cultists     : SPL (DMG/XGE) 1.0 1.0


------------  p3_castle ------------
Archer Post        : SPL (DMG/XGE) 1.0 1.0
Ruined Barracks    : SPL (DMG/XGE) 1.0 1.0
Hobgoblin Barracks : SPL (DMG/XGE) 3.0 3.0
Banquet Hall       : SPL (DMG/XGE) 4.0 3.0
Dark Hall          : SPL (DMG/XGE) 2.0 3.0
Goblin Shrine      : SPL (DMG/XGE) 1.0 1.0
Guard Barracks     : SPL (DMG/XGE) 1.0 2.0
Owlbear Tower      : SPL (DMG/XGE) 3.0 4.0
King's Quarters    : SPL (DMG/XGE) 5.0 5.0
Hunting Party      : SPL (DMG/XGE) 4.0 3.0


------------  p4_wave ------------
Mine Tunnels        : SPL (DMG/XGE) 2.0 3.0
Old Entrance        : SPL (DMG/XGE) 3.0 2.0
Old Guardroom       : SPL (DMG/XGE) 4.0 3.0
South Barracks      : SPL (DMG/XGE) 4.0 4.0
Great Cavern        : SPL (DMG/XGE) 7.0 6.0
North Barracks      : SPL (DMG/XGE) 5.0 5.0
Smelter Cavern      : SPL (DMG/XGE) 7.0 5.0
Wizard's Quarters   : SPL (DMG/XGE) 3.0 4.0
Forge of Spells     : SPL (DMG/XGE) 3.0 4.0
Collapsed Cavern    : SPL (DMG/XGE) 5.0 6.0
Temple of Dumathoin : SPL (DMG/XGE) 5.0 5.0

Except for the Dragon's Tower encounter, all sites conform for to the notion that the the SPL should not be more than one or two higher than the party level which supports the adventure design in terms of apparent difficulty.
 

Remove ads

Top