1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-07 17:44:22 +03:00
inform7/resources/Documentation/Examples/PoliticsAsUsual.txt
2023-07-24 11:56:58 +01:00

24 lines
1.1 KiB
Plaintext

Example: * Politics as Usual
Location: Changing the status line
RecipeLocation: The Status Line
Index: Map region listed in status line
Description: Have the status line indicate the current region of the map.
For: Z-Machine
Suppose a game with a large map entirely subdivided into regions. We could define:
{*}"Politics as Usual"
When play begins:
now the right hand status line is "[map region of the location]".
Washington is west of Idaho.
Red is a region. Blue is a region. Idaho is in red. Washington is in blue.
Test me with "e / w".
Note that, since regions can be stacked, we technically can be within more than one region at once. In the Port Royal example, for instance, the Tavern region is inside the Inland region. If there is any ambiguity, "the map region of the location" will be construed as "the smallest region that the location belongs to": so we would see "Tavern" rather than "Inland" in the status bar, when the player was in the Feathers or the Feathers Bedroom.
Some extra finesse would be necessary if the names of map regions were very long or if there were some rooms that were not considered to belong to any region at all.