Skip to main content
skill CX Codex

rpg — Claude Code skill: character progression, quests, and combat

Skill for building RPGs with character progression, inventory, quests, branching dialogue, and combat. Use it to design stat systems, damage formulas, quest state machines, and equipment mechanics.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill rpg -a claude-code
Open on GitHub

What rpg does

A compositional skill that weaves data-driven content, dialogue, and persistence into a cohesive system. Inside are patterns for derived stats (recomputed from base attributes to prevent corruption), XP curves and leveling, quest state machines, inventory with equipment modifiers, and versioned save formats.

The core loop runs: explore → encounter (fight, talk, solve) → earn rewards (XP, loot, story) → grow (level, gear, unlock) → tackle harder content. The skill walks through common pitfalls: mutating base stats instead of layering modifiers, storing derived stats as ground truth, unchecked numerical growth, and stacked buffs that multiply instead of sum.

Built around Godot and Unity patterns; designed to compose with other skills for dialogue (dialogue-systems), saves (save-systems), content data (godot-resources, unity-scriptableobjects), enemy AI (game-ai), and UI (game-ui-ux).

What it helps with

  • design an XP curve that paces power progression
  • build a damage formula with predictable scaling
  • structure inventory and equipment to layer stat modifiers cleanly
  • implement a quest state machine that branches on player choices
  • persist character progress with save versioning and migration

Example prompts for the agent

  • Show me a pattern where base attributes feed derived combat stats without storing them as truth
  • What XP curve shape gives fast early levels but slows down at the end?
  • How do I save mid-quest state so a reload doesn't lose progress?

How to install rpg

1Skills CLI (Vercel)

npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill rpg -a claude-code

2Manually: put the files in place

~/.claude/skills/rpg/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/rpg/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about rpg

How do I install the rpg skill in Claude Code?

Run npx skills add gamedev-skills/awesome-gamedev-agent-skills --skill rpg -a claude-code. The skill will be available at ~/.claude/skills/rpg/SKILL.md.

What does the rpg skill do?

It provides patterns for RPG systems: character progression through XP and levels, inventory and equipment with stat modifiers, quests with objective tracking, branching dialogue conditioned on game state, combat mechanics, and versioned save/load.

When should I use rpg instead of roguelike or visual-novel?

Use rpg when you need a persistent character with growing stats, an inventory, quests, and branching story. For permadeath dungeon runs, pick roguelike; for pure branching narrative, use visual-novel.

Source text

SKILL.md · Apache-2.0
---
name: rpg
description: >
  Build an RPG: stats and leveling, inventory and equipment, quests, branching dialogue, save/load,
  and combat. Use for an RPG/JRPG, or designing stat, inventory, quest, or combat systems.
---

# RPG

A playbook for role-playing games — stats and progression, inventory/equipment, quests,
dialogue, and combat. This is a **compositional** skill: it ties data-driven content,
dialogue, and saving together. It does not re-teach those primitives; it defines the systems
that make growth and choice feel meaningful, and points to the skills that implement each.

## When to use

- Use when building an RPG/JRPG/action-RPG: the player has **stats that grow**, an
  **inventory**, **quests**, **dialogue**, and persistent progress.
- Use when designing a leveling curve, a damage formula, an inventory/equipment model, or a
  quest state machine.

**When *not* to use:** permadeath dungeon runs with no persistent character → `roguelike`.
Pure conversation/branching story → `visual-novel`. Open-world needs/crafting/base-building →
`survival-crafting`. For the dialogue engine itself, use `dialogue-systems`.

## Core loop

**Explore → encounter (fight / talk / solve) → earn rewards (XP, loot, story) → grow
(level up, gear up, unlock) → take on harder content.** The fantasy is *getting stronger and
shaping who your character is*; every system should feed that growth-and-choice loop.

## Must-have systems

1. **Stats + leveling** — base attributes, derived combat stats, XP curve, level-up gains.
2. **Inventory + equipment** — data-defined items, stacking, slots, stat modifiers.
3. **Combat** — turn-based or action; damage formula, status effects, win/loss.
4. **Quests** — objectives, state machine (available→active→complete→turned-in), rewards.
5. **Dialogue** — branching lines, conditions on game state, choices that matter.
6. **Save/load** — persist character, inventory, quest progress, world flags, with versioning.
7. **Economy + progression gating** — gold/shops; gate power behind level/quest/region.
8. **UI** — HUD, inventory, quest log, dialogue box, character sheet.

## Design knobs

| Knob | Effect | Notes |
|------|--------|-------|
| XP curve shape | pacing of power | Fast early, slow late (see refs). |
| Stat→derived scaling | build diversity | One attribute shouldn't dominate. |
| Damage formula | tactical feel | Subtractive vs. ratio mitigation (refs). |
| Random variance / crit | swinginess | ±10% and ~1.5× crit are safe defaults. |
| Drop rates / economy | reward cadence | Avoid trivializing shops with loot. |
| Power gating | difficulty gating | Level/region/quest locks. |
| Reversible modifiers | buff/gear correctness | Layer mods; never edit base stats. |
| Choice consequence | role-play weight | Quest/dialogue flags should branch outcomes. |

## Patterns

### 1. Derived stats from base attributes (recompute, never store as truth)

```python
# Pseudocode. Base attributes are the only "truth"; combat stats are derived each time.
def derive(base, mods):
    s = apply_modifiers(base, mods)          # base + flat adds + percent, then clamp
    return {
        "max_hp":  20 + s["VIT"] * 8,
        "attack":  s["STR"] * 2,
        "defense": s["VIT"] + s["AGI"] * 0.5,
    }
# Equipping pushes a modifier; unequipping pops it. HP/attack recompute automatically.
```

### 2. XP curve + level-up

```python
# Pseudocode. Quadratic curve: fast early levels, long late ones.
def xp_to_next(level, base=100): return base * level * level

def gain_xp(actor, amount):
    actor.xp += amount
    while actor.xp >= xp_to_next(actor.level):
        actor.xp -= xp_to_next(actor.level)
        actor.level += 1
        actor.base["STR"] += 2; actor.base["VIT"] += 2   # grant gains / skill points
        on_level_up(actor)                                # heal, unlock, notify
```

### 3. Quest objective update driven by game events

```python
# Pseudocode. Game events advance matching objectives; completion grants rewards.
def on_event(kind, data):
    for q in active_quests:
        if q.state != "active": continue
        for obj in q.objectives:
            if obj.event == kind and matches(obj, data) and not obj.done:
                obj.count = min(obj.count + 1, obj.needed)
                if obj.count >= obj.needed: obj.done = True
        if all(o.done for o in q.objectives):
            q.state = "complete"                # turn-in grants xp/gold/items once
```

## Pitfalls / failure modes

- **Editing base stats for buffs/gear** → values drift and corrupt on save/reload. Keep a
  modifier layer; push/pop it (Pattern 1).
- **Storing derived stats as truth** → desync after a stat change. Recompute from base.
- **Runaway XP/damage numbers** → either an exponential curve with no cap or a subtractive
  formula at huge values. Pick a curve and a formula family deliberately (refs).
- **Stacked buffs explode** → percent modifiers multiplied together. Sum percents within a layer
  unless a rule says otherwise (refs §1).
- **Content as code** → every item/quest hardcoded. Define items, enemies, and quests as
  **data** (`godot-resources` / `unity-scriptableobjects`).
- **Save format with no version field** → old saves break on update. Add a `version` and a
  migration path from day one (see `save-systems`).
- **Choices without consequences** → dialogue branches that reconverge immediately feel hollow.
  Set flags that actually change later quests/world state.
- **Quest progress not persisted** → reloading loses mid-quest state. Save quest state, not
  just completion.

## Composition (build it from these skills)

- **Dialogue:** `dialogue-systems` (Yarn Spinner / Ink) — branching lines, conditions, variables.
- **Persistence:** `save-systems` — character, inventory, quest flags, world state, versioning.
- **Content data:** `godot-resources` / `unity-scriptableobjects` — items, enemies, quests, skills as assets.
- **Combat AI:** `game-ai` for enemy behavior; for turn order reuse the scheduler idea in `roguelike`.
- **UI:** `game-ui-ux` for HUD/menu layout, resolution scaling, and controller/keyboard nav; `godot-ui-control` for the concrete inventory, quest log, character sheet, and dialogue box.
- **World:** `level-design` plus your engine's tilemap/3D skill (`godot-tilemap`, `godot-3d-essentials`).

## References

- For stat/damage formulas, leveling curves, turn-vs-action combat timelines, inventory/equipment
  data shapes, and the quest state model, read `references/stats-combat-quests.md`.

© gamedev-skills · Apache-2.0 · gamedev-skills/awesome-gamedev-agent-skills

Similar skills

Everything for Game dev and 3D: Unity, Unreal, Godot, Blender →

From the same set77

godot-nodes-scenes Teaches the agent to build a Godot 4.7 project from nodes and scenes: reusable .tscn files, runtime instancing, autoload singletons, and node lookups that survive renames. CX Codex +1 6,400installs godot-gdscript Guides coding assistants in writing statically typed GDScript 2.0 for Godot 4.7 and porting legacy scripts from Godot 3.x. Helpful when structuring node lifecycles and signals. CX Codex +1 6,500installs godot-shaders A skill that teaches your agent to write canvas_item and spatial shaders in the Godot Shading Language, with TIME animation, uniforms and screen reading. For 2D and 3D effects in Godot 4.7. CX Codex +1 6,500installs godot-physics Configures Godot 4.7 2D and 3D physics bodies, collision layers, Area triggers, and raycasts. It prevents jitter and collision mask misconfigurations. CX Codex +1 6,300installs godot-signals-groups Sets up event-driven architecture in Godot 4.7 with typed signals and node groups. Helps wire scene communication without direct node coupling or legacy Godot 3.x syntax. CX Codex +1 6,200installs prototype-fast A gamedev skill that turns one mechanic into a playable greybox prototype under a hard timebox, then helps you decide whether to keep it. CX Codex +1 6,300installs godot-resources This skill shows the agent how to model Godot game data as custom Resource classes with class_name and @export, then save and load them as .tres. CX Codex +1 6,000installs godot-2d-movement Implements 2D kinematic movement in Godot 4.7 using CharacterBody2D. Useful for coding platformers, top-down controllers, and debugging move_and_slide() behavior. CX Codex +1 6,100installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor