Outils pour utilisateurs

Outils du site


en:yaml:objets

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
en:yaml:objets [2026/10/19 03:27] – Wiki 4.17 : exemples et tableaux manquants en anglais cyrilfiestaen:yaml:objets [2026/10/20 22:11] (Version actuelle) – Mod?les sur_place, port?e des encadr?s et objets 4.17 cyrilfiesta
Ligne 39: Ligne 39:
 ^ Field ^ Effect ^ ^ Field ^ Effect ^
 | ''name:'' | Object identifier. Required. | | ''name:'' | Object identifier. Required. |
 +| ''display_name:'' | Player-facing name, without changing the identifier. |
 +| ''secret: true'' | Scenery accessible only through its furniture. |
 | ''location:'' | Furniture or place where the object is located. Default: ''invisible''. | | ''location:'' | Furniture or place where the object is located. Default: ''invisible''. |
 | ''description:'' | Text shown when the player examines the object. | | ''description:'' | Text shown when the player examines the object. |
Ligne 161: Ligne 163:
   * [[en:yaml:actions|Custom actions]]   * [[en:yaml:actions|Custom actions]]
   * [[en:yaml:medias|Sounds, images and videos]]   * [[en:yaml:medias|Sounds, images and videos]]
 +
 +===== Display name and identifier =====
 +
 +''name:'' remains the stable identifier used by conditions, effects and saves. ''display_name:'' supplies a readable player-facing name:
 +
 +<code yaml>
 +objects:
 +  - name: workshop_key
 +    display_name: workshop key
 +    location: table
 +    description: A small iron key.
 +</code>
 +
 +The player can type ''take workshop key'', ''examine workshop key'', or use ''workshop_key''. Display-name matching ignores case, accents and repeated spaces. Commands, aliases, identifiers and explicit action targets keep priority; furniture and variables can still be examined even if an object shares their display name.
 +
 +The inventory numbers distinct objects sharing a display name, for example ''drink 1'' and ''drink 2''; these labels can be typed. Copies of the same identifier remain grouped. Always use identifiers in conditions and effects. ''t_action_target_t'' also contains the resolved identifier.
 +
 +In the editor, **Display name** expands on demand and stays open when populated. French syntax: ''nom_affiche:''.
 +
 +===== Renaming during play =====
 +
 +In an interaction's ''do:'' block:
 +
 +<code yaml>
 +do:
 +  - display_name: workshop_key
 +    value: identified workshop key
 +</code>
 +
 +The effect changes the display name without changing the identifier or quantities. Saves retain it. Setting ''value: ""'' restores the identifier ''workshop_key'', even if the original declaration supplied another display name. This effect is not allowed inside loop bodies. In the editor, use **Rename an item**, with the object and its new display name. French syntax: ''nom_affiche'' and ''valeur''.
 +
 +===== Secret scenery and empty furniture =====
 +
 +''secret: true'' reserves an entry for its furniture description. The player can examine the furniture, but cannot take or examine the secret object itself. Its object description, display name, pickup text and object/pickup buttons are ignored; use ''furniture_description'' and optionally ''furniture_reaction''.
 +
 +<code yaml>
 +objects:
 +  - name: workshop_key
 +    display_name: workshop key
 +    location: table
 +    furniture_description: A key rests on the table.
 +    description: A small iron key.
 +  - name: empty_table
 +    secret: true
 +    location: table
 +    furniture_description: The table is empty.
 +  - name: statue_scenery
 +    secret: true
 +    location: statue
 +    furniture_description: An old stone statue.
 +    furniture_reaction: Examine the statue
 +</code>
 +
 +Place an empty-furniture entry **after** the ordinary objects on that furniture. The first object still present supplies its description; after taking the key, ''examine table'' shows "The table is empty." The statue illustrates permanent scenery.
 +
 +''secret'' differs from ''location: invisible'', which retains the object's historical uses. Do not combine ''secret: true'' and ''remove: true'': removal takes priority and the linter reports that secret is ignored. The editor hides unused secret fields while preserving their values, and allows contradictory imports to be corrected. French syntax: ''secret: true'', ''endroit'', ''desc_meuble'' and ''reaction_meuble''.
  
en/yaml/objets.txt · Dernière modification : de cyrilfiesta