I am trying to make a library for emulating some 5th edition Dungeons and Dragons game mechanics in Dialog games. The first thing I have coded is ability and skill checks, optionally with (dis)advantage. Because ability score modifiers can be negative I use my Signed Math Library. Here is a simple test:
The hero is level 5, and she has stats (STR = 10, DEX = 10, CON = 10, WIS = 10, CHA = 10), proficiency in [athletics arcana] and expertise in [acrobatics]. Making an acrobatics check with advantage: [+ 22] Making an intimidation check with strength as the ability score: [+ 19]
Here is the test code:
#dungeon (room *) #hero (name *) hero (female *) (singleton *) (* is #in #dungeon) (* is level 5) (* has @strength score 10) (* has @dexterity score 10) (* has @constitution score 10) (* has @intelligence score 10) (* has @wisdom score 10) (* has @charisma score 10) (* has proficiency in @athletics) (* has proficiency in @arcana) (* has expertise in @acrobatics) (intro) (banner) (#hero is level $Level) (#hero has @strength score $Str) (#hero has @dexterity score $Dex) (#hero has @constitution score $Con) (#hero has @intelligence score $Int) (#hero has @wisdom score $Wis) (#hero has @charisma score $Cha) (The #hero) (is #hero) level $Level , and (it #hero) (has #hero) stats \( STR = $Str , DEX = $Dex , CON = $Con , WIS = $Wis , CHA = $Cha \), proficiency in (collect $C) *(#hero has proficiency in $C) (into $Proficiencies) $Proficiencies and expertise in (collect $C) *(#hero has expertise in $C) (into $Expertises) $Expertises . (par) Making an acrobatics check with advantage: (check skill @acrobatics with @advantage for #hero into $Check1) $Check1 (par) Making an intimidation check with strength as the ability score: (check skill @intimidation using @strength for #hero into $Check2) $Check2
My next plan is to tie in perception and stealth checks to the Dialog world model, allowing you to try to hide from monsters and monsters to try to hide from you. I’ll want to add tool checks for thieves’ tools lockpicking, and then move on to character hit points and armor class and such. Ultimately I’d like to have simplified combat, traps and spellcasting, though that’s clearly a bit ambitious.
One thing that I found I can’t do according to the 5e Systems Resource Document is experience based leveling: Dialog doesn’t support numbers large enough. I’m not bothered by this because I prefer milestone leveling anyway, if experience based leveling is needed you’ll need to make a Dialog Large Numbers Library, I suppose.