Skip to contents

In the 2014 version of fifth edition Dungeons and Dragons, encounters are more difficult than the total of the monsters' experience points (XP). Both the number of monsters making attacks and the number of players attacking those creatures can affect the difficulty of an encounter. The 2014 Dungeon Master's Guide (DMG) accounts for this by providing an XP multiplier for given party sizes and numbers of monsters. This function accepts the unmodified total of the monsters' XP and adjusts this as specified in the DMG without the pain of the tables in that book. For the 2024 version, the XP cost is exactly equal to the total monster XP so this function will return a warning and whatever value is passed to the `monster_xp` argument if the 2024 version is specified.

Usage

xp_cost(
  monster_xp = NULL,
  monster_count = NULL,
  party_size = NULL,
  ver = "2014"
)

Arguments

monster_xp

(numeric) XP total across all monsters

monster_count

(numeric) count for the number of monsters in the encounter

party_size

(numeric) value for the number of PCs in the party

ver

(character) which version of fifth edition to use ("2014" or "2024")

Value

(numeric) value for "realized" XP

Examples

# Calculate the realized XP from the raw XP, number of monsters, and number of PCs
dndR::xp_cost(monster_xp = 100, monster_count = 3, party_size = 2, ver = "2014")
#> [1] 250