Manage D&D 5e character progression with XP tracking, automatic leveling, HP increases, proficiency bonus progression, and spell slot advancement. This skill should be used when conducting combat encounters with character advancement, awarding experience points after victories, or managing character level-ups in the training arena.
Orchestrate D&D 5th Edition character advancement through experience points and leveling. Handle XP awards after combat victories, automatic level-ups when XP thresholds are reached, HP increases, proficiency bonus progression, and spell slot advancement. Progression follows 5e rules for XP thresholds (PHB p.15) and supports levels 1-20.
Access seven Python scripts in the scripts/ directory:
All scripts are located at: ~/.claude/skills/tutorial-5/scripts/
Tutorial 5 introduces experience points and automatic leveling, teaching threshold triggers (automatic level-ups), progressive complexity (features unlock gradually), and calculated growth (stat increases follow formulas).
Experience Points (XP):
Automatic Leveling:
XP Awards by CR:
Each level grants specific benefits:
Hit Points: Gain average hit die + CON modifier
Proficiency Bonus: Increases at levels 5, 9, 13, 17
Spell Slots (casters only): Gain additional slots and access to higher-level spells
For complete progression rules and XP tables, see references/progression-rules.md
Follow this workflow when conducting training arena combat with character progression:
On first use, seed the databases:
python3 ~/.claude/skills/tutorial-5/scripts/bestiary.py seed
python3 ~/.claude/skills/tutorial-5/scripts/spells.py seed
Before combat, verify character has equipment:
python3 ~/.claude/skills/tutorial-5/scripts/equipment.py show CHARACTER_NAME
If no equipment found, equip starting gear:
python3 ~/.claude/skills/tutorial-5/scripts/equipment.py equip CHARACTER_NAME CLASS_NAME
Initialize the combat encounter:
python3 ~/.claude/skills/tutorial-5/scripts/combat.py start CHARACTER_NAME MAX_CR
MAX_CR calculation: Use character_level / 4 as guideline.
This outputs JSON containing character stats (including current XP and level), monster stats (including CR), and initiative.
Parse JSON and display combat start state narratively. See Tutorial 4's references/narrative-guide.md for radio drama narrative style.
Execute turns in initiative order until end condition met.
Character Turn:
combat.py character-attack ...combat.py character-cast ...Monster Turn:
combat.py monster-attack ...End Conditions:
See Tutorial 4 for detailed combat mechanics.
When combat ends, call end combat with monster CR for XP award:
python3 ~/.claude/skills/tutorial-5/scripts/combat.py end CHARACTER_NAME OUTCOME --monster-cr CR_VALUE
OUTCOME: victory, defeat, or fled
--monster-cr: Monster's CR (e.g., 0.25 for Goblin, 0.5 for Orc)
On victory:
Example:
python3 scripts/combat.py end Bob victory --monster-cr 0.25
# ✓ Victory! Bob has been fully healed.
# ✓ Awarded 50 XP to Bob
# Total XP: 250 → 300
#
# 🎉 LEVEL UP! Bob is now level 2!
# Levels gained: 1
# HP increased: 11 → 20 (+9)
# Proficiency bonus: +2
# XP to next level: 600
On defeat or fled:
Manually award XP for quest rewards or special achievements:
python3 ~/.claude/skills/tutorial-5/scripts/progression.py award CHARACTER_NAME XP_AMOUNT
Example:
python3 scripts/progression.py award Bob 150
# ✓ Awarded 150 XP to Bob
# Total XP: 0 → 150
# XP to level 2: 150 more needed
If the XP award crosses a level threshold, automatic level-up occurs with full benefits display.
Display XP thresholds for all levels:
python3 ~/.claude/skills/tutorial-5/scripts/progression.py xp-table
Shows:
Display XP awarded for each Challenge Rating:
python3 ~/.claude/skills/tutorial-5/scripts/progression.py cr-xp
Shows XP earned for defeating monsters of each CR.
Display character info including current XP and progress to next level:
python3 ~/.claude/skills/tutorial-5/scripts/character.py show CHARACTER_NAME
Output includes:
Bob (Fighter, Level 2)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
XP: 350/900 (need 550 more)
STR: 16 (+3)
DEX: 12 (+1)
...
HP: 20/20
Proficiency: +2
Continue using the radio drama narrative style from Tutorial 4 for combat. See Tutorial 4's references/narrative-guide.md for detailed guidance.
Level-Up Narrative: When characters level up, narrate it dramatically:
🎉 LEVEL UP! 🎉
Bob's victories in the arena have forged him into a stronger warrior!
The training master nods approvingly as Bob demonstrates his newfound prowess.
He feels power surge through his body:
• Muscles strengthen, endurance increases (+9 HP)
• Technique refines, strikes land more accurately (+2 proficiency)
• Ready to face greater challenges!
Bob stands tall, no longer a novice but a proven combatant. The arena
awaits his next battle.
Match the narrative tone to the magnitude of the level-up (level 2 vs. level 5 major power spike).
| Level | Total XP | From Prev | Goblin Fights (CR 1/4, 50 XP) |
|---|---|---|---|
| 1 | 0 | — | Starting level |
| 2 | 300 | +300 | 6 fights |
| 3 | 900 | +600 | 12 more fights |
| 4 | 2,700 | +1,800 | 36 more fights |
| 5 | 6,500 | +3,800 | 76 more fights |
Progression slows dramatically at higher levels. Consider fighting higher CR monsters for faster advancement.
~/.claude/data/dnd-dm.dbHandle these common scenarios:
character.py liststart command JSON outputFor detailed information on specific topics, see:
references/progression-rules.md - Complete XP tables, level-up benefits, progression strategy, threshold triggers, and calculated growth formulasreferences/narrative-guide.md - Radio drama combat narrative (still applicable)references/spell-mechanics.md - Spellcasting system detailsreferences/dnd-5e-rules.md - D&D 5e combat rulesLoad these references as needed when conducting combat encounters with character progression.
Tutorial 5 demonstrates three key skill-building concepts:
Automatic events fire when a value crosses a threshold. When XP >= threshold → level-up happens automatically without manual intervention.
Real-world applications:
Features unlock gradually as the system advances. Early levels come quickly with basic improvements, later levels take longer and grant more significant upgrades.
Real-world applications:
Growth follows deterministic formulas, not arbitrary values. Every stat increase is predictable based on class, level, and ability scores.
Real-world applications: