1 npc definition catalog
forgejo-actions edited this page 2026-07-11 12:38:13 +00:00

NPC Definition Catalog

What This System Is

The NPC definition catalog owns reusable NPC definitions: presentation, outfits, dialogue topics, quest and relationship references, AI profiles, combat references, and generated tileset NPC definitions.

How It Works

Scene-local NPC placements reference reusable catalog definitions. Catalog I/O merges authored definitions with generated tileset-derived NPC definitions, validates references, and saves snapshots. Presentation code resolves outfits, state variants, and visual data for preview and runtime.

How Authors Use It

Create reusable definitions when multiple scenes or tools should refer to the same NPC identity. Do not hand-author duplicates for generated tileset NPCs. Keep NPC IDs, outfit IDs, topic IDs, quest IDs, relationship profiles, AI profiles, and combat references stable.

Use catalog refactor support when renaming IDs so scenes, dialogue, quests, and services move together.

Rules And Invariants

Definitions are reusable identity records; placements are scene-local instances. Generated definitions should remain generated. Presentation references must resolve before runtime. Dialogue, quest, AI, and combat references must validate together.

Validation And Debugging

Run NPC catalog validation after edits. Missing topics, outfits, presentation assets, AI profiles, or combat references should be fixed in the catalog or referenced source, not patched in scene placements. Use refactor tooling for renames.

Examples

If npc.blacksmith appears in several scenes, edit the reusable catalog definition for its outfit, topics, and presentation. If a scene needs a unique instance position or schedule, edit the scene placement. If the NPC ID must change, use catalog refactor support so dialogue, quest, and scene references move together.