跳到正文
Skillpedia
通用编程6.6k · #13812

rpg

它能做什么

该技能指导构建角色成长、收集装备并接取任务的角色扮演游戏。适合制作 RPG、JRPG 或动作 RPG 的开发者。

适用场景

  • ✓当你在构建属性会成长、装备很重要的 RPG 时。
  • ✓当你需要物品栏、装备槽和任务状态系统时。
  • ✓当你希望升级曲线和伤害公式感觉公平时。

技能链接

https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/genres/rpg/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/gamedev-skills/awesome-gamedev-agent-skills/blob/main/skills/genres/rpg/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我正在制作一款 RPG。你能设置角色等级、带装备的简单物品栏,以及一个能追踪进度的任务吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会定义属性和升级曲线,添加物品栏和装备模型,并构建任务状态机。它会把对话和战斗连接到同一份数据,并保存进度。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

These systems also apply to custom/proprietary engines. Keep the project's engine and bind the concepts below to its documented data, events, UI, and save interfaces. Inspect local source/SDK examples before choosing APIs; the router's custom-engine fallback guides that mapping. Godot/Unity bindings below are examples, not prerequisites.

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)

# 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

# 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

# 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 =
常见问题

它能用于自定义游戏引擎吗?

可以。该技能指出,这些概念可以映射到自定义引擎的数据、事件和界面上。

它涵盖对话吗?

涵盖,通过对话系统技能实现。RPG 技能会指向该技能提供对话引擎。

它适用于永久死亡的游戏吗?

不适用。没有持久角色的永久死亡地下城更适合由肉鸽技能处理。

详情

作者的原始描述

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.

repo: gamedev-skills/awesome-gamedev-agent-skills

热度

GitHub 星标
6.6k
排名
#13812
许可证
Apache-2.0
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能