Learn R Programming

dndR (version 3.0.0)

pc_level_calc: Calculate Player Character (PC) Level from Current Experience Points (XP)

Description

Uses total player experience points (XP) to identify player character (PC) level and proficiency modifier. Only works for a single PC at a time (though this is unlikely to be an issue if all party members have the same amount of XP). Big thanks to Humberto Nappo for contributing this function!

Usage

pc_level_calc(player_xp = NULL)

Value

(dataframe) current player level, XP threshold for that level, and the proficiency modifier used at that level

Arguments

player_xp

(numeric) total value of experience points earned by one player

Examples

Run this code
# Calculate player level from XP earned
dndR::pc_level_calc(player_xp = 950)

Run the code above in your browser using DataLab