🧑🌾 NPC Schema
Describes non-player characters in the game — their roles, behaviors, and interactions.
✅ Field Rules & Accepted Values
Field | Type | Required | Notes |
---|---|---|---|
id | string | ✅ Yes | Must be unique |
name | string | ✅ Yes | In-game display |
sprite | string | ✅ Yes | Path to image/sprite |
levels | number[] | ✅ Yes | Level IDs where NPC appears |
role | enum | ❌ No | Predefined behavior types |
interactable | boolean | ❌ No | Default is true |
interactionLimit | number | ❌ No | Max interaction count |
behavior | string | ❌ No | e.g., 'give_quest_on_talk', 'unlock_item' |
spawnIf | object | ❌ No | Appears only if conditions met |
dialogId | string | ❌ No | For connecting to dialog later |
sound | object | ❌ No | Optional FX triggers |
quests | string[] | ❌ No | Quest IDs this NPC provides |
itemsForSale | string[] | ❌ No | If vendor, what items they sell |