| name | new-npc |
| description | Create a new NPC with character scene, Dialogic character, timeline, sprite art, and room integration |
NPC Creation
Create a complete NPC with all required components. Argument: NPC name and brief description.
Steps
-
Generate NPC sprite using the art-gen skill:
- Idle animation (minimum 2 frames)
- Talk animation (minimum 2 frames)
- Size: 24x32 or 32x32 per frame
- Must use the shared palette
-
Create the character scene at game/scenes/characters/<npc_name>.tscn:
- Root:
CharacterBody2D (or StaticBody2D for non-moving NPCs)
AnimatedSprite2D with idle and talk animations
CollisionShape2D for interaction area
- Attach script from step 3
-
Create the NPC script at game/scripts/rooms/<npc_name>.gd (or a shared NPC script):
class_name declaration
hotspot_name export var for StatusBar display
- Handle Talk verb: start Dialogic timeline
- Handle Look verb: show description text
- Manage animation states (idle <-> talk)
-
Create Dialogic character at game/dialogic/characters/<npc_name>.dch:
- Display name
- Color for dialogue text
- Portrait/sprite reference
-
Create Dialogic timeline at game/dialogic/timelines/<npc_name>_intro.dtl:
- Initial greeting dialogue
- At least one branching choice
- Use custom events where appropriate (stat checks, class gates, items)
-
Add NPC to room:
- Instance the character scene under the room's
NPCs node
- Position the NPC in the room
- Connect interaction signals
-
Verify:
make sprites
make run
NPC Checklist