nddipiazza/robos / games/quest-warrior-dragon/.agents/skills/sprite-and-character-setup
sprite-and-character-setup
VerifiedInstructions for referencing NPC character sprite sheets, adding character frames to NPCCharacterData, and handling walk animations.
🚶 Sprite & Character Setup Skill
Use this skill when configuring NPC character sprites, adding walk-cycle frames, or mapping sprite IDs.
🖼️ NPC Character Lookup (scripts/NPCCharacterData.gd)
NPCCharacterData maps sprite keys to 8 directional walk-cycle frames pre-sliced under res://assets/sprites/npc/NNN_rROW_cCOL.png:
const CHARACTERS := {
"sage": {
"display": "Sage",
"row": 2, "col": 8,
"down": ["038_r2_c8.png", "039_r2_c9.png"],
"left": ["040_r2_c10.png", "041_r2_c11.png"],
"up": ["042_r2_c12.png", "043_r2_c13.png"],
"right": ["044_r2_c14.png", "044_r2_c14.png"],
},
...
}
If a character's sheet cell is missing frame 2 (e.g., at the sheet boundary), both directional entries point to the same frame file.
🎨 Steps to Add a New Character Sprite
- Slice 8 frames from source image into
assets/sprites/npc/followingNNN_rROW_cCOL.pngnaming (incrementNNNsequentially). - Add entry to
NPCCharacterData.CHARACTERSwith a unique string key (sprite_id). - Re-import assets:
godot --import --quit --path .
⚙️ Runtime Sprite Classes
scripts/WalkSprite.gd: Generic 4-direction walk-cycle sprite used for hero and NPCs.scripts/NPCSprite.gd: WrapsWalkSpritefor static and roaming map NPCs.scripts/NPCSpriteFiles.gd: Helper for resolving sprite frames toTexture2Dresources.data/v1/sprite_frames.json: Documents monster battle sprite frame layouts.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 192k | Updated | Claude CodeCodex | Verified | Install |