aboutsummaryrefslogtreecommitdiff
path: root/building_guide/triggers.md
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-07-10 17:39:15 -0400
committerhistoria <[not public]>2026-07-10 17:39:15 -0400
commit451fdf82ce1385c16d0d88cd5b2a878ba4cba22c (patch)
tree63be73a330254be6809952c6bb44bef4bdbe31d5 /building_guide/triggers.md
parentd02f0d2cdf67f1445a9ccae86b99a2578adab585 (diff)
downloadthehouseoficarus-451fdf82ce1385c16d0d88cd5b2a878ba4cba22c.tar.gz
feat(admin): better toggle on trigger page, removed irrelevant value field for clarity
Diffstat (limited to 'building_guide/triggers.md')
-rw-r--r--building_guide/triggers.md40
1 files changed, 26 insertions, 14 deletions
diff --git a/building_guide/triggers.md b/building_guide/triggers.md
index 7ef9b4c..60b1c82 100644
--- a/building_guide/triggers.md
+++ b/building_guide/triggers.md
@@ -53,7 +53,6 @@ its steps run as a scripted sequence.
aps_node: false
on_player_flag: "" # on_flag_change only
on_global_flag: "" # on_global_flag_change only
- value: null # value-match filter for flag triggers
```
Field meanings:
@@ -66,7 +65,6 @@ Field meanings:
| `steps` | all | Ordered list of Step entries run as a scripted sequence. |
| `on_player_flag` | on_flag_change only | Player flag this trigger watches. |
| `on_global_flag` | on_global_flag_change only | Global flag this trigger watches. |
-| `value` | flag triggers | Optional value-match filter; trigger only fires when the flag changes to this value. |
### Step vocabulary
@@ -261,7 +259,8 @@ triggers watching that flag.
`on_flag_change` and `on_global_flag_change` replace the old room `triggers:` block. Each
entry carries the flag it watches (`on_player_flag` or `on_global_flag`), an optional
-`value` filter, an optional `condition`, and a `steps` list.
+`condition` (use `player_flag`/`global_flag` + `value` to match a specific flag value), and
+a `steps` list.
Key behaviors:
@@ -293,21 +292,28 @@ To migrate the old room `triggers:` block, replace `triggers:` with `on_flag_cha
### Value-matching flag triggers
-By default a flag trigger fires when the watched flag becomes truthy. Add `value:` to
-require a specific value — enabling multi-stage quests off one numeric flag:
+By default a flag trigger fires when the watched flag becomes truthy. Use a `condition` with
+a `player_flag`/`global_flag` + `value` to require a specific value — enabling multi-stage
+quests off one numeric flag:
```yaml
on_flag_change:
- on_player_flag: quest_stage
- value: 1
+ condition:
+ player_flag: quest_stage
+ value: 1
steps:
- messages: ["Quest started — find the crystal shard."]
- on_player_flag: quest_stage
- value: 2
+ condition:
+ player_flag: quest_stage
+ value: 2
steps:
- messages: ["You found the shard — return to the elder."]
- on_player_flag: quest_stage
- value: 3
+ condition:
+ player_flag: quest_stage
+ value: 3
steps:
- messages: ["The ritual begins..."]
- wait: 10
@@ -608,9 +614,11 @@ on_look:
# data/rooms/city/5002_alley.yaml
on_flag_change:
- on_player_flag: investigation
- value: 1
condition:
- room: 5002
+ all_of:
+ - player_flag: investigation
+ value: 1
+ - room: 5002
steps:
- wait: 3
messages: ["You notice a trail of blood leading east..."]
@@ -624,9 +632,11 @@ on_flag_change:
# data/rooms/city/5003_warehouse.yaml
on_flag_change:
- on_player_flag: investigation
- value: 2
condition:
- room: 5003
+ all_of:
+ - player_flag: investigation
+ value: 2
+ - room: 5003
steps:
- wait: 3
messages: ["A glint of metal catches your eye under a crate."]
@@ -639,9 +649,11 @@ spawns boss
# data/rooms/city/5004_docks.yaml
on_flag_change:
- on_player_flag: investigation
- value: 3
condition:
- room: 5004
+ all_of:
+ - player_flag: investigation
+ value: 3
+ - room: 5004
steps:
- wait: 5
broadcast: "A shadow detaches itself from the warehouse wall..."