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/objects.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'building_guide/objects.md') diff --git a/building_guide/objects.md b/building_guide/objects.md index 110eb56..87b9710 100644 --- a/building_guide/objects.md +++ b/building_guide/objects.md @@ -120,9 +120,22 @@ talk: - text: "\"What do you have?\"" goto: shop - text: "\"Goodbye.\"" - end: true ``` +On-look action (runs when a player examines an object with `look `): +```yaml +name: sign +aliases: [notice, board] +description: "A wooden signpost with faded writing." +on_look: + set_player_flags: + read_sign: true +``` +`on_look` fires the action AFTER showing the object's description. It uses the same +`NodeAction` type as talk nodes — supports `set_player_flags`, `set_flags`, +`give_item`, `take_item`, `teleport`, `heal`, `cost`, and everything else in the +[node action reference](behaviors.md#node-action-reference). + See the [Talk section of behaviors](behaviors.md#talk-dialog-trees) for the full dialog tree format. See [Stealable Objects](#stealable-objects) for theft mechanics. -- cgit v1.2.3