en:txt: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:txt:objets [2026/05/03 18:47] – Harmonize FR/EN language switch cyrilfiesta | en:txt:objets [2026/08/31 20:47] (Version actuelle) – Wiki : fins de pages homogènes, liens Discord retirés cyrilfiesta | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| **Language / Langue :** [[fr: | **Language / Langue :** [[fr: | ||
| - | ====== | + | ====== Objects and states (.txt format) |
| + | |||
| + | ===== Collectable objects ===== | ||
| + | |||
| + | Objects are declared on **line 3** of a room (the objects/ | ||
| + | |||
| + | < | ||
| + | object_name|place|place_description|pickup_text|object_description | ||
| + | </ | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | Example: | ||
| + | < | ||
| + | lamp|table|A table with four legs. There is a lamp on it!|You pick up the lamp.|The lamp lets you light your way. | ||
| + | </ | ||
| + | |||
| + | For several objects in the same room, separate them with '' | ||
| + | |||
| + | ===== Invisible objects and states ===== | ||
| + | |||
| + | Invisible objects do **not** appear in the visible inventory: they act as states, conditions, classes, and so on. The keyword is '' | ||
| + | |||
| + | < | ||
| + | state_name|invisible|unused_note|acquisition_text|state_description | ||
| + | </ | ||
| + | |||
| + | They are **acquired automatically** when the player enters the room, with no need for the '' | ||
| + | |||
| + | To check that a player holds a state as a room condition: | ||
| + | < | ||
| + | 2|tired_state|You are far too tired!|You enter the room. | ||
| + | </ | ||
| + | |||
| + | To check that they do **not** hold it (negative condition): | ||
| + | < | ||
| + | 2|-tired_state|You are not tired any more.|Good, you may enter. | ||
| + | </ | ||
| + | |||
| + | ===== Removing an object automatically ===== | ||
| + | |||
| + | Put a '' | ||
| + | |||
| + | < | ||
| + | -lamp|invisible|note|The lamp breaks as it falls.|The lamp. | ||
| + | </ | ||
| + | |||
| + | ===== Several copies of an object ===== | ||
| + | |||
| + | Repeat the object several times in the same room. The player can take it as many times as there are copies: | ||
| + | |||
| + | < | ||
| + | lamp|table|There are two lamps on the table!|You take a lamp.|The lamp. | ||
| + | lamp|table|One lamp is left on the table.|You take the last lamp.|The lamp. | ||
| + | empty|table|The table is empty now.|How did you find that? | ||
| + | </ | ||
| + | |||
| + | The third object, '' | ||
| - | Legacy TXT objects are defined on the variable/ | ||
en/txt/objets.1777826878.txt.gz · Dernière modification : de cyrilfiesta
