Properties in Inform 6

From IFWiki

What is a property?

Using properties

Creating new properties

Initializing properties

Assigning new values to properties

Getting the value of a property

Testing if an object provides a particular property

Pre-defined properties

48 properties:

  • add_to_scope. Either a list of other objects that should be put in scope when this one is, or a routine to put other objects in scope.
  • after. A routine called during the processing of an action on this object, after it has happened (but before it has been reported).
  • article. The indefinite article to use with this object's printed name.
  • articles. For non-English games, a list of articles to use with this object's printed name.
  • before. A routine called during the processing of an action on this object, before it has happened.
  • cant_go. The default message that prints if the player tries going an invalid direction from this room.
  • capacity. How many objects that this container, supporter, or player character can hold.
  • d_to. The room or door that's below this room, or the routine to run when the PC goes down from here.
  • daemon. A routine to run at the end of every turn. The daemon can be switched on and off.
  • describe. Something extra to print in the room description about this object.
  • description. The long description of this object or room.
  • door_dir. The direction in which this door or compass direction goes.
  • door_to. The room this door leads to.
  • e_to. The room or door that's east of this room, or the routine to run when the PC goes east from here.
  • each_turn. A routine to run at the end of every turn, after daemons and timers, while this object is in scope.
  • found_in. Which rooms this object can be found in. Used for objects found in multiple locations.
  • grammar. A routine to help parse things said to characters and talkable objects.
  • in_to. The room or door that's inward from this room, or the routine to run when the PC goes in from here.
  • initial. A description of this object in its initial location, printed after the room description.
  • inside_description. The description that appends to or replaces the room description When the PC is inside this container.
  • invent. A routine used to control how this object appears in inventory listings.
  • life. A special routine for handling particular actions involving characters.
  • list_together. A number, string, or routine that controls how similar objects are grouped together in listings.
  • name. The list of words that the player can type to refer to this object.
  • n_to. The room or door that's north of this room, or the routine to run when the PC goes north from here.
  • ne_to. The room or door that's northeast of this room, or the routine to run when the PC goes northeast from here.
  • number. A numeric value with no predefined meaning.
  • nw_to. The room or door that's northwest of this room, or the routine to run when the PC goes northwest from here.
  • orders. A routine that processes any orders directed to an NPC or a talkable object.
  • out_to. The room or door that's outward of this room, or the routine to run when the PC goes out from here.
  • parse_name. A routine that overrides how the object can be referred to by the player.
  • plural. The plural name of this object, when there's more than one.
  • react_after. A routine called during the processing of an action on some object in the scope of this one, after the action has happened.
  • react_before. A routine called during the processing of an action on some object in the scope of this one, before the action has happened.
  • s_to. The room or door that's south of this room, or the routine to run when the PC goes south from here.
  • se_to. The room or door that's southeast of this room, or the routine to run when the PC goes southeast from here.
  • short_name. The printed name of the object.
  • short_name_indef. For non-English games, the printed name of the object after an indefinite article.
  • sw_to. The room or door that's southwest of this room, or the routine to run when the PC goes southwest from here.
  • time_left. Number of turns left until this object's timer runs out.
  • time_out. The routine to run when this object's timer runs out.
  • u_to. The room or door that's above this room, or the routine to run when the PC goes up from here.
  • w_to. The room or door that's west of this room, or the routine to run when the PC goes west from here.
  • when_closed. Something extra to print in the room description when this object is closed.
  • when_open. Something extra to print in the room description when this object is open.
  • when_on. Something extra to print in the room description when this object is switched on.
  • when_off. Something extra to print in the room description when this object is switched off.
  • with_key. The object that can lock or unlock this object; this object's key.

Technical details

Code Compare

Links

  • DM4 §A2  Library properties
This article is a stub. You can help IFWiki by expanding it.
TODO: This page is a work-in-progress. I need to fill in the missing sections. -- David Welbourn 17:03, 10 January 2009 (PST)