design-npc

Designs NPC behavior with perception, personality, intent, and action state machines in GDScript.

66|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/SummerEngine/summer --skill design-npc-summerengine
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-npc
Source: https://github.com/SummerEngine/summer/tree/main/library/skills/design-npc
Command: npx skills add https://github.com/SummerEngine/summer --skill design-npc-summerengine

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Designing believable enemy, boss, companion, or civilian AI in Godot is hard: NPCs often feel unfair (360° perception, instant attacks) or boring (every spawned instance behaves identically). This Skill walks you through a canonical NPC architecture — perception, personality knobs, an intent layer above an action state machine, telegraphed attacks, and planned defeat handling — and outputs a working GDScript stub plus scene node tree. ## Core Features & Use Cases - Layered AI architecture: Separates an intent layer (IDLE / PATROL / INVESTIGATE / HUNT / KILL / RETREAT / RESCUE_ALLY) from a four-state action state machine (Calm / Alert / Aggressive / Defeated) so behavior stays maintainable. - Personality-driven variety: Four jittered knobs (aggression, patience, caution, punishment) make a squad of identical enemies produce emergent roles like sniper, anchor, flanker, and berserker with zero extra authoring. - Engine-integrated building: Uses Summer MCP tools (summer_add_node, summer_set_prop, summer_connect_signal, summer_save_scene) to construct the CharacterBody3D + Vision Area3D + Sight RayCast3D node tree directly in the scene, with a .tscn text fallback. - Use Case: Ask your agent to design a patrol-and-chase enemy for your Godot 4 project; it proposes the archetype, builds the scene nodes, drops a tuned enemy_ai.gd script with telegraphs scaled by aggression, and verifies it with script-error checks and playtesting. ## Quick Start Ask your AI agent to design a basic patrol-and-chase enemy with personality variation and telegraphed attacks for your Godot project.

Frequently Asked Questions about design-npc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design enemy AI behavior in Godot?

Use a two-layer architecture: an intent layer that reads perception and personality to pick a goal (hunt, kill, retreat), and an action state machine with four states (Calm, Alert, Aggressive, Defeated) that executes it. Add a 0.3–0.7 second telegraph before every attack so players can react.

How do I make NPCs in a squad behave differently from each other?

Give each NPC four personality knobs — aggression, patience, caution, punishment — exported as ranges and jittered by ±0.15 in _ready. Identical scripts then produce emergent roles like sniper, flanker, and berserker without authoring each role manually.

What perception setup should a Godot enemy use?

Use a two-step check: an Area3D with a sphere shape to filter candidates, then a RayCast3D to confirm line of sight. Avoid 360-degree perception or raycasting every target every frame, which feels unfair and costs performance.

When should I use a behavior tree instead of a state machine for NPC AI?

A four-state action machine plus an intent layer covers basic enemies, companions, and civilians. Defer to behavior trees only for high-complexity cases like multi-phase bosses; the overhead is unjustified for grunts and wave mobs.

Why is my Godot enemy not aggroing on the player?

Common causes: the player is not in the 'player' group, the Vision Area3D's shape resource was never assigned, or the Sight RayCast3D has enabled set to false. Also check that personality jitter did not push aggression near zero.

Does this NPC design skill work with Godot 4?

Yes, it targets Godot engine version 4.6 and above, using GDScript with CharacterBody3D, Area3D, and RayCast3D nodes. It can build scenes via Summer MCP tools or fall back to writing .tscn text directly.