diff options
Diffstat (limited to 'building_guide/hidden_objects.md')
| -rw-r--r-- | building_guide/hidden_objects.md | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/building_guide/hidden_objects.md b/building_guide/hidden_objects.md deleted file mode 100644 index 1866d67..0000000 --- a/building_guide/hidden_objects.md +++ /dev/null @@ -1,92 +0,0 @@ -## Hidden Objects - -Objects with `hidden: true` don't appear in the room's object listing. Players discover them by reading room descriptions or trying commands. The object is still fully interactable — `push gate`, `look gate`, etc. - -**The filename is the ID** (`secret_lever.yaml` → `secret_lever`); don't add an `id:` field (see `objects.md`). - -```yaml -# data/objects/secret_lever.yaml -name: stone lever -hidden: true -description: "A cleverly concealed lever behind a loose stone." -on_use: - - condition: - global_flag: secret_passage_open - value: true - not: true - message: "You pull the lever. A grinding sound echoes from the east." - action: - set_global_flags: - secret_passage_open: true -``` - -Room description hints at it: -```yaml -description: "A dusty corridor. One of the wall stones looks slightly out of place." -``` - -### Multiple names (`aliases`) - -By default an object matches its `name` (word-prefix matching) and the words in -its `id`. Add `aliases` to accept extra names: - -```yaml -name: landing craft # matches "landing", "craft", "landing craft" -aliases: [shuttle, ship] # also matches "shuttle" and "ship" -hidden: true -``` - -If a player's input matches more than one distinct object, `look` lists the -candidates ("That's ambiguous, which one?") instead of guessing — so keep aliases -specific enough to avoid overlap between objects in the same room. - -### Descriptions that react to flags - -An object's `description` can be a plain string or a list of conditional variants -(first matching condition wins). This is the simplest way to fake per-player -scenery — a crowd that becomes a queue, an NPC that "appears" partway through a -scene — without spawning real objects or mobs. - -**If none of the variants match, the object is treated as absent for that -player** — `look <it>` reports nothing is there. Combined with `hidden: true`, the -same shared object can appear only while a player's flags warrant it (e.g. during -an intro) and vanish on return visits. - -```yaml -name: crowd of people -aliases: [people, crowd, passengers] -hidden: true -description: - - condition: # after the pilot arrives - all_of: - - player_flag: boarded - not: true - - player_flag: lined_up - text: "The passengers have formed a single-file line." - - condition: # before the pilot arrives - all_of: - - player_flag: boarded - not: true - - player_flag: lined_up - not: true - text: "A couple dozen anxious passengers mill about the pad." - # once `boarded` is set, no variant matches -> the crowd is gone -``` - -A bare string in `description:` maps to a single unconditional entry, so a plain -object is always present as before. - -### Safespot Objects - -Safespot objects should always be `hidden: true`. They only become visible in `look` when the player's effective safespot tier meets the object's `safespot.tier` requirement. This creates a natural discovery mechanic: completing quests and achievements reveals new coverage opportunities. - -Players can discover safespots by: -- Reading room descriptions for hints -- Trying `hide <object_name>` (name matching works even for hidden objects) -- Using `look <object>` once they know the name -- Gaining tier through progression, which reveals safespots in `look` - -See [Safespots](objects.md#safespots) for the full YAML format. - ---- - |
