$npx -y skills add thedivergentai/GD-Agentic-Skills --skill godot-genre-action-rpgComprehensive blueprint for Action RPGs including real-time combat (hitbox/hurtbox, stat-based damage), character progression (RPG stats, leveling, skill trees), loot systems (procedural item generation, affixes, rarity tiers), equipment systems (gear slots, stat modifiers), and
| 1 | ## Godot 4.7 Baseline |
| 2 | |
| 3 | - Expert patterns in this skill target **Godot 4.7+** (stable, 2026-06-18). |
| 4 | - Consult the [Godot 4.7 migration guide](https://docs.godotengine.org/en/4.7/tutorials/migrating/upgrading_to_godot_4.7.html) when upgrading projects from 4.6. |
| 5 | - **NEVER** assume 4.6 defaults (stretch mode, audio area_mask, RichTextLabel percent flags) without checking 4.7 migration notes. |
| 6 | |
| 7 | # Genre: Action RPG |
| 8 | |
| 9 | Expert blueprint for action RPGs emphasizing real-time combat, character builds, loot, and progression. |
| 10 | |
| 11 | ## NEVER Do (Expert Anti-Patterns) |
| 12 | |
| 13 | ### Combat & Progression |
| 14 | - NEVER use linear damage scaling for progression; strictly use an **exponential curve** (e.g., `base * pow(1.15, level)`) to maintain the power fantasy. |
| 15 | - NEVER allow defense stats to stack linearly to 100%; strictly use a **Diminishing Returns** formula (e.g., `armor / (armor + 100.0)`) to prevent invincibility. |
| 16 | - NEVER skip Hit Recovery (Stagger); strictly implement a brief stagger state (0.2s - 0.5s) on significant hits to prevent "floaty" combat. |
| 17 | - NEVER hide critical stats from the player; strictly provide a detailed character sheet for theory-crafting (Crit Chance, Resistance, etc.). |
| 18 | - NEVER make loot drops visually identical; strictly differentiate rarities with color-coded beams (purple/gold) and distinct sound cues. |
| 19 | - NEVER calculate hitboxes, knockbacks, or combat movement in `_process()`; strictly use `_physics_process()` for deterministic results. |
| 20 | - NEVER evaluate exact floating-point equality (==) for combat thresholds; strictly use `is_equal_approx()`. |
| 21 | - NEVER use the ! (NOT) operator in AnimationTree Advance Condition expressions; strictly use explicit boolean equality (`is_walking == false`). |
| 22 | |
| 23 | ### Technical & Architecture |
| 24 | - NEVER store character stats or massive inventories as Nodes; strictly use **Resource-based data containers** for lightweight memory overhead. |
| 25 | - NEVER forget to call `duplicate()` on shared Resources; modifying one goblin's stats must not affect all other instances. |
| 26 | - NEVER rigidly couple combat detection to specific classes; strictly use **Duck-Typing** (e.g., `if body.has_method(&"take_damage")`) for interaction. |
| 27 | - NEVER rely on the UI SceneTree as the source of truth for inventory; strictly separate data logic from visualization. |
| 28 | - NEVER recalculate stats every frame; strictly trigger recalculation only on gear changes or level-ups. |
| 29 | - NEVER parse massive RPG save files synchronously; strictly offload heavy parsing to the `WorkerThreadPool`. |
| 30 | - NEVER synchronize complex Resource types over the network; strictly serialize changes into primitive Dictionaries or PackedByteArrays. |
| 31 | - NEVER manage character state by coupling child nodes to parent existence; strictly use signals for loose coupling ("Signal Up, Call Down"). |
| 32 | - NEVER use standard Strings for high-frequency AI state identifiers; strictly use `StringName` for optimized hash comparisons. |
| 33 | |
| 34 | ### Performance & AI |
| 35 | - NEVER instantiate/destroy hundreds of objects (projectiles, damage text) per second; strictly use **Object Pooling**. |
| 36 | - NEVER delete active combat entities via `free()`; strictly use `queue_free()` for safe deferred disposal. |
| 37 | - NEVER calculate complex loot drops or parse massive late-game inventories on the main thread; strictly offload heavy RNG rolls and array iterations to the **WorkerThreadPool**. |
| 38 | - NEVER use nested if/elif blocks for complex Boss AI; strictly use a modular **StateMachine** or pattern matching. |
| 39 | - NEVER iterate through the SceneTree for global state changes; strictly use **Signal Groups** (`call_group()`). |
| 40 | - NEVER move `OccluderInstance3D` nodes attached to dynamic characters; this causes CPU BVH rebuild stalls. |
| 41 | |
| 42 | --- |
| 43 | |
| 44 | ## 🛠 Expert Components (scripts/) |
| 45 | |
| 46 | ### Original Expert Patterns |
| 47 | - [damage_label_manager.gd](scripts/damage_label_manager.gd) - High-performance pooled system for floating damage numbers and critical hits. |
| 48 | - [telegraphed_enemy.gd](scripts/telegraphed_enemy.gd) - Advanced AI component for Soul-like wind-ups, AOE indicators, and timed attacks. |
| 49 | |
| 50 | ### Modular Components |
| 51 | - [character_stats_resource.gd](scripts/character_stats_resource.gd) - Modular data container for base RPG attributes and scaling logic. |
| 52 | - [entity_stat_duplicator.gd](scripts/entity_stat_duplicator.gd) - Pattern for ensuring unique death/health state for instanced enemies. |
| 53 | - [duck_typed_hitbox.gd](scripts/duck_typed_hitbox.gd) - Safe combat interaction sys |