From c55d0e4150b23f2c5c9f96bbc3d4dc2fc6dbaa36 Mon Sep 17 00:00:00 2001 From: historia <[not public]> Date: Thu, 25 Jun 2026 19:37:20 -0400 Subject: feat: yaml conversation trees more robust --- building_guide/mobs.md | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) (limited to 'building_guide/mobs.md') diff --git a/building_guide/mobs.md b/building_guide/mobs.md index d10f685..32ee408 100644 --- a/building_guide/mobs.md +++ b/building_guide/mobs.md @@ -77,18 +77,46 @@ ranged_defense: 3 ### Protected/Unique Mobs -Mob with talk behavior — can be talked to via `talk:` inline config: +Protected mobs cannot be attacked. All combat and stat fields (`attack`, `strength`, +`defense`, `hp`, `speed`, `attack_type`, `attack_bonus`, `strength_bonus`, +`*_defense`, `weakness`, `size`, `drops`, `aggressive`, `respawn_ticks`) are +**optional for protected mobs** — omit them entirely. Protected mobs don't show +a combat level in room listings or when examined. + +Minimal protected mob (shopkeeper, quest giver, NPC): +```yaml +name: flight attendant +description: A smiling flight attendant in a crisp uniform. +unique: true # displays as "Flight attendant" not "a flight attendant" +protected: true # cannot be attacked, combat stats are optional +idle_descriptions: + - adjusts her name badge + - smiles politely at passengers +talk: # inline talk config + nodes: + start: + message: "\"Welcome aboard!\"" + options: + - text: "\"What should I do?\"" + goto: check_sign + - text: "\"Goodbye.\"" + check_sign: + message: "\"Review the safety information.\"" + options: + - text: "\"Will do.\"" +``` + +Protected mob with combat stats (for internal testing or debug purposes): ```yaml name: "Guard" -talk: # inline talk config (no separate behavior file) +unique: true +protected: true +talk: nodes: start: message: "\"Halt! Who goes there?\"" options: - text: "\"Just passing through.\"" - end: true -unique: true # displays as "Guard" not "a guard" -protected: true # cannot be attacked attack: 5 strength: 5 defense: 5 @@ -106,7 +134,6 @@ science_defense: -5 ranged_defense: 12 idle_descriptions: - "scans the area with a watchful eye" - - "adjusts the grip on his weapon" ``` Note: `wander_rooms` and `wander_interval` are NOT set on the mob definition. Wander config -- cgit v1.2.3