A4:Room

From IFWiki
Jump to: navigation, search

The Add a Room (or Edit a Room) dialog window of the ADRIFT Generator defines a room, a basic location in an ADRIFT game. It need not refer to a literal room but may define any sort of place that the player character can potentially visit.

Rooms are one of the five basic building blocks of an ADRIFT game. (The other four are Objects, Tasks, Events, and Characters. There are other building blocks, but those are the main five.)

In the unregistered version of ADRIFT Generator 4.00, the author is limited to 10 Rooms. After registering, the author may define as many rooms as he or she likes.

Creating, Editing, and Deleting Rooms

The author can start creating a new room by:

  • Selecting the Create|Room... menu item, or
  • Clicking the Add Room icon on the icon bar, or
  • Right-clicking in the Rooms pane and selecting Add room from the context menu.

The author can edit an existing room by:

  • Double-clicking the room's name on the Rooms pane, or
  • Selecting the room's name on the Rooms pane, then right-clicking and selecting Edit room from the context menu, or
  • Selecting the Window|Browser menu item and double-clicking the room's name, or
  • Double-clicking the room's name in a Dependencies screen (see Task).

The author can delete an existing room by:

  • Selecting the room's name on the Rooms pane, then right-clicking and selecting Delete room from the context menu.

Properties of a Room

Most rooms should be defined with both a short and long room description and at least one direction. (Note: The names of fields, checkboxes, and radio buttons as used below were determined from ADRIFT Module File usage.)

  • Short room description (SHORTDESC). This is the name of the room. If you want to define two or more rooms with the same name, you may append an angle-bracketed comment to help tell them apart. For example: "Twisty Maze <1>" and "Twisty Maze <2>", or "Long Hallway <W>" and "Long Hallway <E>". If the short room description needs to change during the game, use the NEWSHORTDESC field (see below) or use an ALR trick.
  • Long room description (LONGDESC). This is the long description of the room.
  • Directions (e.g. NORTH, NORTHEAST, EAST, etc.):
    Valid exits from the room are defined on a separate Directions tab, with one row for each of the twelve standard directions.
    • Move Direction to Field begin.pngchosen roomField end.png.
    • only if one of the following travel conditions:
      • Field begin.pngTaskField end.png Field begin.pngchosen taskField end.png is Field begin.pngCompleted -or- Not CompletedField end.png, or
      • Field begin.pngObjectField end.png Field begin.pngchosen objectField end.png is Field begin.pngchosen stateField end.png.
    • Notes:
    1. Travel conditions are, of course, optional.
    2. Only objects with variable states are listed as possible objects for the travel condition.
    3. By default, the diagonal directions (NorthEast, SouthEast, SouthWest, and NorthWest) are initially disabled. To enable them, go to Adventure|Options and select (checked) Enable 8-Point compass.
    4. The ADRIFT Generator will automatically prompt the author if s/he wants the reverse connection between rooms. Otherwise, the author is only defining a one-way connection at a time.
    5. There are no options on the Direction tab of the Edit Room dialog that lets the author specify a travel message (e.g. "You tumble down the steep hill.") or a denial of travel message (e.g. "The hedges prevent you from going that way.") or variable destinations (such as in the Round Room of Zork II). For all such effects, the author must craft a Task instead.

The following fields and options are used less often, but it's important to understand how alternate descriptions work if you want a location's description to change during the course of a game.

  • (checked) Dont show on map (NOTONMAP = True). This option is mostly useful for locations in a maze where either you don't want the location to be auto-drawn by the ADRIFT Runner's mapping feature, or the location just confuses the mapping feature too much.
  • Alternate descriptions (ALTDESC):
    • If one of the following conditions
      • Field begin.pngTaskField end.png Field begin.pngchosen taskField end.png Field begin.pngis Completed -or- is NOT CompletedField end.png, or
      • Field begin.pngObjectField end.png Field begin.pngchosen objectField end.png Field begin.pngis chosen stateField end.png, or
      • Field begin.pngPlayerField end.png Field begin.pngis (NOT) holding/wearing/in same room asField end.png Field begin.pngappropriate objectField end.png.
    • then display (THENSHOW)
    • else display (ELSESHOW)
    • Change Short description to (NEWSHORTDESC).
    • (checked) and hide objects in room (HIDEOBS = True)
    • Display when
      • (selected) Start room description with this one (SHOW Immediately)
      • (selected) Start directly after Long Room description (SHOW After Main)
      • (selected) Append to other descriptions (SHOW After Any)

Putting the Room description together

ADRIFT roomdesc train.png

All the parts of a complete room description are connected up, end-to-end like the cars of a train, into one paragraph unless the author inserts a pair of line breaks ("<br><br>") where a paragraph break is wanted.

For an alternate description THENSHOW field to be applicable, the task/object/person-related condition specified for it must be true. For an alternate description ELSESHOW field to be applicable, the task/object/person-related condition specified for it must be false.

The parts are as follows:

  1. Either the main long room description (LONGDESC) or the last applicable alternate description, if any, marked with (selected) Start room description with this one (SHOW Immediately) is first. The alternate description replaces the main description. Only the last applicable ALTDESC in the list is used; ALTDESCs higher up in the list are ignored.
  2. The last applicable alternate description, if any, marked with (selected) Start directly after Long Room description (SHOW After Main) is second. Only the last applicable ALTDESC in the list is used; ALTDESCs higher up in the list are ignored.
  3. All applicable alternate descriptions marked with (selected) Append to other descriptions (SHOW After Any) are third, in the order specified.
  4. All initial descriptions (INITIALDESC) of all applicable Objects directly in the Room are fourth. Both static and dynamic Objects may be listed. Objects are listed in the order they were defined. Various checkboxes on the Objects' Advanced tab control whether or not the initial description should be printed. In general, dynamic objects are usually mentioned and static objects are usually unmentioned.
  5. All other Objects directly in the Room are mentioned fifth in the "Also here is [list of Objects]." statement. (Again, this usually means dynamic Objects, but static Objects can be mentioned here as well.)
  6. All Characters in the Room whose TEXTHERE fields end in " is here." are mentioned together sixth in a single "[Characters] are/is here." statement.
  7. All other Characters in the Room are mentioned seventh, using their TEXTHERE field values as is. If a Character's TEXTHERE field is blank, the Character isn't mentioned.
  8. Event messages are eighth.
Code Compare: Room
ADRIFT 4:The Room dialog box
(Add a Room/Edit Room)
Hugo:The room class
Inform 6:The Object class
Inform 7:The room kind
TADS 2:The room class
TADS 3:The Room class