en:yaml:objets
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| en:yaml:objets [2026/05/03 18:47] – Harmonize FR/EN language switch cyrilfiesta | en:yaml:objets [2026/11/04 21:34] (Version actuelle) – Documentation 4.17 : objets, evenements et mise en page verifies cyrilfiesta | ||
|---|---|---|---|
| Ligne 3: | Ligne 3: | ||
| ====== Objects and Inventory (YAML) ====== | ====== Objects and Inventory (YAML) ====== | ||
| - | Objects declared | + | Declarations |
| Important: YAML objects do not support '' | Important: YAML objects do not support '' | ||
| Ligne 38: | Ligne 38: | ||
| ^ Field ^ Effect ^ | ^ Field ^ Effect ^ | ||
| - | | '' | + | | '' |
| + | | '' | ||
| + | | '' | ||
| | '' | | '' | ||
| | '' | | '' | ||
| | '' | | '' | ||
| | '' | | '' | ||
| + | | '' | ||
| | '' | | '' | ||
| | '' | | '' | ||
| Ligne 48: | Ligne 51: | ||
| | '' | | '' | ||
| | '' | | '' | ||
| + | | '' | ||
| + | | '' | ||
| + | | '' | ||
| ===== Furniture, Object and Inventory ===== | ===== Furniture, Object and Inventory ===== | ||
| Ligne 55: | Ligne 61: | ||
| '' | '' | ||
| - | ===== Progressive Stock ===== | + | ===== Several copies of the same object |
| - | Declare | + | Declaring |
| <code yaml> | <code yaml> | ||
| Ligne 63: | Ligne 69: | ||
| - name: coin | - name: coin | ||
| location: chest | location: chest | ||
| - | | + | description: |
| - | | + | |
| - | pickup_text: | + | |
| - name: coin | - name: coin | ||
| - | location: | + | location: |
| - | furniture_description: | + | description: |
| - | description: | + | |
| - | pickup_text: | + | |
| </ | </ | ||
| + | |||
| + | The inventory groups them as '' | ||
| + | |||
| + | ===== How many copies can be held ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | objects: | ||
| + | - name: torch | ||
| + | location: wall | ||
| + | inventory-limit: | ||
| + | inventory-limit-message: | ||
| + | </ | ||
| + | |||
| + | Going over the limit is a normal narrative answer, not an error: the engine states how many copies are already held and what the limit is, then leaves the commands available. The two optional messages accept the usual text processing, including '' | ||
| ===== Object Conditions ===== | ===== Object Conditions ===== | ||
| Ligne 79: | Ligne 97: | ||
| <code yaml> | <code yaml> | ||
| if: " | if: " | ||
| + | </ | ||
| + | |||
| + | Or: | ||
| + | |||
| + | <code yaml> | ||
| if: " | if: " | ||
| </ | </ | ||
| + | |||
| + | ===== Quantity conditions ===== | ||
| + | |||
| + | A structured condition compares the number of copies held. | ||
| + | |||
| + | <code yaml> | ||
| + | events: | ||
| + | - if: | ||
| + | object: coin | ||
| + | quantity: 3 | ||
| + | operator: "> | ||
| + | text: "You have enough coins to pay the ferryman." | ||
| + | </ | ||
| + | |||
| + | The editor offers this setting in its condition builder. | ||
| ===== Add or Remove an Object with do: ===== | ===== Add or Remove an Object with do: ===== | ||
| Ligne 110: | Ligne 148: | ||
| '' | '' | ||
| + | |||
| + | <code yaml> | ||
| + | objects: | ||
| + | - name: map | ||
| + | location: table | ||
| + | description: | ||
| + | pickup_text: | ||
| + | </ | ||
| + | |||
| + | Clicking an object in the inventory automatically runs '' | ||
| + | |||
| + | ===== See also ===== | ||
| + | |||
| + | * [[en: | ||
| + | * [[en: | ||
| + | * [[en: | ||
| + | |||
| + | ===== Display name and identifier ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | objects: | ||
| + | - name: workshop_key | ||
| + | display_name: | ||
| + | location: table | ||
| + | description: | ||
| + | </ | ||
| + | |||
| + | The player can type '' | ||
| + | |||
| + | The inventory numbers distinct objects sharing a display name, for example '' | ||
| + | |||
| + | In the editor, **Display name** expands on demand and stays open when populated. French syntax: '' | ||
| + | |||
| + | ===== Renaming during play ===== | ||
| + | |||
| + | In an interaction' | ||
| + | |||
| + | <code yaml> | ||
| + | do: | ||
| + | - display_name: | ||
| + | value: identified workshop key | ||
| + | </ | ||
| + | |||
| + | The effect changes the display name without changing the identifier or quantities. Saves retain it. Setting '' | ||
| + | |||
| + | ===== Scenery and empty furniture ===== | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | objects: | ||
| + | - name: workshop_key | ||
| + | display_name: | ||
| + | location: table | ||
| + | furniture_description: | ||
| + | description: | ||
| + | - name: empty_table | ||
| + | empty-furniture: | ||
| + | location: table | ||
| + | furniture_description: | ||
| + | - name: statue_scenery | ||
| + | empty-furniture: | ||
| + | location: statue | ||
| + | furniture_description: | ||
| + | furniture_reaction: | ||
| + | </ | ||
| + | |||
| + | Place an empty-furniture entry **after** the ordinary objects on that furniture. The first object still present supplies its description; | ||
| + | |||
| + | '' | ||
| + | |||
| + | ===== Reversible items and commands (4.17) ===== | ||
| + | |||
| + | Taking an item deactivates one declared instance in its furniture. '' | ||
| + | |||
| + | Different items can share furniture. Inspecting furniture uses the first declaration with an item still present. Items are taken in declaration order; deposits fill free slots in reverse order. | ||
| + | |||
| + | <code yaml> | ||
| + | title: 'Wiki 4.17: stacks' | ||
| + | vars: | ||
| + | capacite: 2 | ||
| + | rooms: | ||
| + | - id: atelier | ||
| + | text: A chest and a table. | ||
| + | objects: | ||
| + | - name: piece | ||
| + | location: coffre | ||
| + | description: | ||
| + | inventory_limit: | ||
| + | - name: piece | ||
| + | location: coffre | ||
| + | description: | ||
| + | - name: cle | ||
| + | location: coffre | ||
| + | description: | ||
| + | - empty-furniture: | ||
| + | location: coffre | ||
| + | furniture_description: | ||
| + | choices: | ||
| + | - command: rester | ||
| + | button: Stay | ||
| + | to: atelier | ||
| + | </ | ||
| + | |||
| + | Here, '' | ||
| + | |||
| + | ===== Absent declarations, | ||
| + | |||
| + | '' | ||
| + | |||
| + | <code yaml> | ||
| + | title: 'Wiki 4.17: activation' | ||
| + | rooms: | ||
| + | - id: atelier | ||
| + | text: A table, a chest and a box. | ||
| + | objects: | ||
| + | - name: cle | ||
| + | location: table | ||
| + | - name: cle | ||
| + | location: coffre | ||
| + | absent: true | ||
| + | - name: bille | ||
| + | location: boite | ||
| + | absent: true | ||
| + | actions: | ||
| + | - verb: ranger | ||
| + | target: all | ||
| + | button: Store the key | ||
| + | do: | ||
| + | object: cle | ||
| + | to: coffre | ||
| + | - verb: apparition | ||
| + | target: all | ||
| + | button: Reveal the marble | ||
| + | do: | ||
| + | object: bille | ||
| + | activate: boite | ||
| + | choices: | ||
| + | - command: rester | ||
| + | button: Stay | ||
| + | to: atelier | ||
| + | </ | ||
| + | |||
| + | After '' | ||
| + | |||
| + | ===== Inventory limit selection ===== | ||
| + | |||
| + | The first active declaration specifying a limit is used in the current room. If none specifies it, the last encountered limit is retained; otherwise the default is 1. A reference such as '' | ||
| + | |||
en/yaml/objets.1777826863.txt.gz · Dernière modification : de cyrilfiesta
