Skip to content

Attribute reference

Reference for all built-in Quest attributes.

The “alias” attribute is a string, and is the displayed name of the object - the one that the player sees. If the object has no alias, the displayed name will be the same as the “name” attribute for the object element.

“allobjects” is a stringlist attribute. It specifies which words the parser will understand as meaning “all” in commands such as “take all”.

The “alt” attribute is a stringlist of alternative names that the player can use to refer to this object.

“appendobjectdescription” is a boolean attribute. If set to “true”, when room descriptions are printed, the description tag of the objects inside the room is appended.

“article” is a string attribute. In English games it is usually “it” for inanimate objects, or “him” or “her” for characters.

It is usually used when constructing default responses, for example “You can’t take it”, “You can’t take him”, etc.

See also gender.

“ask” is a scriptdictionary. Keys are topics, and values are the scripts to run when the object is asked about that topic.

See also Tutorial: Ask and Tell, askdefault, tell.

“askdefault” is a script which is the default script to run when an object is asked about a topic. If none of the topics in the ask scriptdictionary match the player’s input, the askdefault script is run.

“autodescription” is a boolean attribute. If set to true, a room description automatically includes a generated list of the objects and exits within the room.

When autodescription is turned on, the following attributes of the game object configure how the description is displayed:

autodescription_description
int Position of room description text within description. Default line 4.

autodescription_description_newline
boolean Whether to put an extra linebreak after the room description.

autodescription_youarein
int Position of “You are in (room name)” within description. Default line 1.

autodescription_youarein_useprefix
boolean Whether to display “You are in” before the room name. Default true. If set to false, print just the room name.

autodescription_youarein_newline
boolean Whether to put an extra linebreak after the “You are in (room name)” line.

autodescription_youcango
int Position of “You can go (exits)” within description. Default line 3.

autodescription_youcango_newline
boolean Whether to put an extra linebreak after the “You can go (exits)” line.

autodescription_youcansee
int Position of “You can see (objects)” within description. Default line 2.

autodescription_youcansee_newline
boolean Whether to put an extra linebreak after the “You can see (objects)” line.

“autodisplayverbs” is a boolean attribute. If set to “true”, an object’s display verbs are dynamically generated by taking the base displayverbs list and adding any verbs which have been defined for the object. If set to “false”, only the base displayverbs are used, so the object should be manually set to have the relevant display verbs which you want to display.

“autoopen” is a boolean attribute, specifying whether to automatically open an object when it is unlocked.

“autounlock” is a boolean attribute, specifying whether to automatically unlock the object when the player tries to open it (but only if they have the key)

“backgroundimage” is a string attribute. It specifies the image filename to use as a background.

“backgroundopacity” is a double attribute. It specifies the opacity of the background, from 0.0 to 1.0.

“beforefirstenter” is a script attribute. It is run the first time that a player enters an object (room), before the room description is printed.

Quest keeps track of whether a room has been visited before by checking the value of the visited attribute.

See also firstenter, enter, visited.

“canlockopen” is a boolean attribute, specifying whether an object can be locked while it is open (thereby locking it open, so the object would have to be unlocked before it could be closed).

“clearframe” is a boolean attribute, which is only relevant if useframe is turned on. If clearframe is set to true, if a room does not define a picture attribute, the static picture frame is cleared for that room. If clearframe is set to false, the previous room’s image would remain on the screen.

“close” is a boolean attribute specifying whether the object can be closed.

See also closescript, open.

“closescript” is a script attribute. If specified, when the object is closed, the script will run. If not specified, the object will be closed automatically.

See also close.

“compassdirections” is a stringlist attribute, specifying the names of the compass directions (north, south etc.)

The order is important as this is used to give the correct direction name to the compass buttons in the player interface.

The directions should be listed in this order:

NW, N, NE, W, E, SW, S, SE, Up, Down, In, Out

The “container” type is defined in CoreTypes.aslx. It implements an open container by straightforwardly inheriting the container_open type.

By inheriting the “container” type in an object, it becomes by default openable and closable. “Open” and “Close” are added as displayverbs.

The “container_base” type is defined in CoreTypes.aslx. It implements base functionality for the container types, so you shouldn’t need to inherit this directly - you should use container_open, container_closed, container_limited or surface instead, unless you are defining your own container type.

The “container_closed” type is defined in CoreTypes.aslx. It implements a closed container.

By inheriting the “container_closed” type in an object, it becomes by default openable and closable. “Open” and “Close” are added as displayverbs.

The “container_limited” type is defined in CoreTypes.aslx. It implements a container which can only accept a certain number of objects (via the maxobjects attribute). If the player tries to add more objects, they are told that the container is full.

The rest of the container functionality is automatically inherited from the container type.

The “container_lockable” type is defined in CoreTypes.aslx. It implements locking and unlocking functionality. It does not inherit any other container types, so one of container_open, container_closed or container_limited should also be inherited.

By inheriting the “container_lockable” type in an object, script is added to the open and close attributes to implement the check to see whether the object is locked before allowing open/close. The “lock” and “unlock” verbs are added to the object. The container is locked by default, and the autoopen and autounlock attributes are set to “true”.

The “container_open” type is defined in CoreTypes.aslx. It implements an open container.

By inheriting the “container_open” type in an object, it becomes by default openable and closable. “Open” and “Close” are added as displayverbs.

“containerfullmessage” is a string attribute, used only when the object is a limited container (container_limited type). If specified, it is used instead of the ContainerFull template when the player tries to add an object inside the container when it is full.

“contentsprefix” is a string attribute specifying the text to print before listing the object contents in a room description. The default comes from the ContainerContentsPrefix (“containing”) or SurfaceContentsPrefix (“on which there is”) templates.

“dark” is a boolean attribute. If set to true, the room is dark.

“darklevel” is a boolean attribute used internally by the room darkness code. You should use dark to set whether the room is dark.

“defaultbackground” is a string attribute which should be set to a valid HTML colour name. It specifies the default background colour for the game.

“defaultfont” is a string attribute which should be set to a valid font name. It specifies the default font for the game. If web fonts are available, the defaultwebfont will be used instead.

“defaultfontsize” is an int attribute. It specifies the default font size for the game.

“defaultforeground” is a string attribute which should be set to a valid HTML colour name. It specifies the default foreground colour for the game.

“defaultlinkforeground” is a string attribute which should be set to a valid HTML colour name. It specifies the default hyperlink foreground colour for the game.

The “defaultobject” type is defined in CoreTypes.aslx. It is automatically inherited by all objects so there is no need to inherit this directly.

This type defines default behaviour for an object:

“defaultwebfont” is a string attribute which should be set to a valid web font name. It specifies the default web font for the game. This is used in preference to the defaultfont if web fonts are available.

“descprefix” is a string attribute specifying the text to print before the room name in a room description. The default comes from the YouAreIn template (“You are in”).

“description” is an object attribute which can be either a string or a script. It is used to describe the room when the player enters.

  • If it is a string, an automatic room description is generated which lists the objects in the room and available exits (if autodescription is turned on). Then the string is printed.
  • If it is a script, no automatic room description is generated. The script is run instead.

This attribute is only usually used for objects which are rooms. But if you have appendobjectdescription turned on, it is also used for objects within rooms. In this case, it is a string which is appended to the parent room description when the player enters.

“displayroomdescriptiononstart” is a boolean attribute. If set to “true”, the room description for the player start room is displayed when the game begins.

“displayverbs” is a stringlist attribute, defining the verbs that appear when the object’s hyperlink is clicked. The verbs also appear as buttons when the object is selected in the “Places and Objects” pane.

See also inventoryverbs.

“drop” is an attribute that can be either boolean or script.

  • If boolean, a value of “true” means the object can be dropped, and “false” means the object cannot be dropped. A default response (using the DropSuccessful or DropUnsuccessful template) is printed when the user drops (or tries to drop) the object, unless a dropmsg attribute is defined.
  • If script, the script will be run when the user tries to drop the object.

See also take, dropmsg.

“dropmsg” is a string attribute, specifying the text to print when the user drops (or tries to drop) the object. Only applicable if the drop attribute is boolean.

“echohyperlinks” is a boolean attribute. If set to “true”, when the player uses an object hyperlink, the echoed version of the command (shown in the interface as “>” followed by the generated command text) also includes a hyperlink.

For example if the user clicks an “apple” object and selects “Eat” from the display verbs menu, the echoed command looks like:

> eat apple

If echohyperlinks is turned on, this echoed command also contains an “apple” hyperlink allowing the user to choose from the display verbs menu there, without having to scroll back up.

The “edible” type implements an “eat” verb for an object. If showhealth is enabled, when the object is eaten, the player’s health can be increased or decreased by the amount specified in the “eathealth” attribute (an int)

Used by the Editor so it can distinguish between objects that are intended to be rooms, and objects that are intended to be objects inside rooms.

Used by the Editor so it can distinguish between objects that are intended to be rooms, and objects that are intended to be objects inside rooms.

“enablehyperlinks” is a boolean attribute specifying whether hyperlinks are enabled in the game.

“enter” is a script attribute. It is run every time that a player enters an object (room), after the room description is printed.

See also beforefirstenter, firstenter, onexit.

“exitslistprefix” is a string attribute, specifying text to print in the room description before the list of exits. If not specified, it defaults to the value of the GoListHeader template (“You can go”).

The “female” type is defined in CoreTypes.aslx. It sets the gender and article as appropriate for a female character, and sets the displayverbs to “Look at” and “Speak to”.

The “femaleplural” type is defined in CoreTypes.aslx. It sets the gender and article as appropriate for female (plural) characters, and sets the displayverbs to “Look at” and “Speak to”.

“firstenter” is a script attribute. It is run the first time that a player enters an object (room), after the room description is printed.

Quest keeps track of whether a room has been visited before by checking the value of the visited attribute.

See also beforefirstenter, enter, visited.

“gender” is a string attribute. In English games it is usually “it” for inanimate objects, or “he” or “she” for characters.

It is usually used when constructing default responses, for example “He says nothing”, “It is already closed”, etc.

See also article.

“give” is an attribute that can be either a scriptdictionary or string.

  • If not specified, the object cannot be given objects.
  • If a scriptdictionary, the keys of the dictionary specify objects that can be given to this object. The script values specify scripts to run when that object is given.
  • If a string, that string is printed whenever an object is given to this object.

See also useon, giveanything.

“giveanything” is a script attribute. It is the fallback for give - if the object being used does not appear in the “give” list, this script if specified will run instead. The script can read the “object” variable to see what object is being used.

“givesingle” is a script attribute. It is run when the player types “give (object)” on its own.

“giveto” is an attribute that can be either a scriptdictionary or string.

It is used in the same way as give, except that it allows you to define a “give A to B” relationship the other way around - “give” is an attribute defined on object B, whereas “giveto” is defined on object A.

See also givetoanything.

“givetoanything” is a script attribute. It is the fallback for giveto - if the object being used does not appear in the “giveto” list, this script if specified will run instead. The script can read the “object” variable to see what object is being used.

“grid_border” is a string attribute. It specifies the HTML colour name to use for the border colour for this room on the map.

“grid_bordersides” is an int attribute. It specifies which sides of the square should be drawn for for this room on the map.

You shouldn’t need to set this directly, as there are types set up to make it easier to choose the correct value.

The default (as defined by defaultobject) draws all four sides of the square. To draw different sides, use one of these types:

gridborder_path_ew
An East-West path (so draw top and bottom)

gridborder_path_e
A path goes East (so draw top, bottom, left)

gridborder_path_w
A path goes West (so draw top, bottom, right)

gridborder_path_ns
A North-South path (so draw left and right)

gridborder_path_n
A path goes North (so draw left, right, bottom)

gridborder_path_s
A path goes South (so draw left, right, top)

The attribute value itself encodes the sides as individual bits (for NESW).

“grid_borderwidth” is an int attribute. It specifies the width of this room’s border on the map, in pixels.

“grid_fill” is a string attribute. It specifies the HTML colour name to use for the fill colour for this room on the map.

“grid_label” is a string attribute. It specifies the text to display in the centre of this room on the map.

“grid_length” is an int attribute. It specifies the length (in grid units) of this room on the map.

“grid_parent_offset_auto” is a boolean attribute. It specifies whether to display this room in the default position on the map. If set to false, use grid_parent_offset_x and grid_parent_offset_y to specify where this room should appear in relation to its parent room.

“grid_parent_offset_x” is an int attribute. It specifies the offset of this room from its parent on the X axis.

“grid_parent_offset_y” is an int attribute. It specifies the offset of this room from its parent on the Y axis.

“grid_render” is a boolean attribute. It is used by the Core library so it can keep track of which rooms have been drawn on the grid, so it should not be set directly.

“grid_width” is an int attribute. It specifies the width (in grid units) of this room on the map.

“gridmap” is a boolean attribute. If set to “true”, the automatically generated grid-based map is displayed.

“hidechildren” is a boolean attribute. On a container object, when set to “true” it specifies that children of this object are not in scope until this object has been looked at. When the object is looked at, “hidechildren” is automatically set to “false” so the children become in scope.

“inventoryverbs” is a stringlist attribute, defining the verbs that appear when the object’s hyperlink is clicked (when the object is in the inventory, so after the user types “inventory”). The verbs also appear as buttons when the object is selected in the “Inventory” pane.

See also displayverbs.

“isopen” is a boolean attribute - a value of “true” means the object is open, and a value of “false” means the object is closed.

“key” is an object attribute, used for locked containers to specify which object is the “key” object that unlocks this object.

“languageid” is a string attribute. It is metadata specifying the game’s language code - this will be used by the textadventures.co.uk site to filter games by language.

“lightstrength” is a string attribute specifying the level of illumination this object provides.

Valid values are:

weak
The object will be shown when the room is dark, but other objects in the room will not be shown

strong
The object will illuminate the room, showing other objects even if they are not themselves light sources

“listchildren” is a boolean attribute, specifying whether to list child objects when this object is looked at or opened.

See also listchildrenprefix.

“listchildrenprefix” is a string attribute, used when listing children of an object. It only applies when listchildren is set. The default is the ObjectContains template.

“locked” is a boolean attribute, used on a container to specify that it is locked.

“lockmessage” is a string attribute, used to specify the text to print when the player locks the container. If not specified, the LockMessage template is the default.

See also unlockmessage.

“look” is an attribute that can be either string or script. It specifies what happens when the player looks at the object.

  • If not specified, the DefaultObjectDescription template is printed (“Nothing out of the ordinary”).
  • If string, that is printed.
  • If script, that is run.

“lookonly” is a boolean attribute on an exit. If set to true, the exit is excluded from the exit list shown to the player (via GetExitsList) and from the automatically generated map, and the player cannot move through it with “go” - attempting to do so gives the same response as an unrecognised direction. It’s intended for exits that exist only to be referred to by name in a “look” context (e.g. “look north”), not as a way to actually move between rooms.

The “male” type is defined in CoreTypes.aslx. It sets the gender and article as appropriate for a male character, and sets the displayverbs to “Look at” and “Speak to”.

The “maleplural” type is defined in CoreTypes.aslx. It sets the gender and article as appropriate for male (plural) characters, and sets the displayverbs to “Look at” and “Speak to”.

“mapscale” is an int attribute. It specifies the length in pixels of one grid unit.

“mapsize” is an int attribute. It specifies the height in pixels of the map display area.

“maxobjects” is an int attribute, used when the container_limited type is in use for a limited container. It specifies the maximum number of objects that can be placed inside the container.

“menubackground” is a string attribute which should be set to a valid HTML colour name. It specifies the default background colour for menus.

“menufont” is a string attribute which should be set to a valid font name. It specifies the font for menus.

“menufontsize” is an int attribute. It specifies the font size for menus.

“menuforeground” is a string attribute which should be set to a valid HTML colour name. It specifies the default text colour for menus.

“menuhoverbackground” is a string attribute which should be set to a valid HTML colour name. It specifies the background colour to use when hovering over a menu item.

“menuhoverforeground” is a string attribute which should be set to a valid HTML colour name. It specifies the text colour to use when hovering over a menu item.

The “namedfemale” type is equivalent to female, but also turns off usedefaultprefix so no prefix is displayed. Use this for named female characters, e.g. “Sue”.

The “namedmale” type is equivalent to male, but also turns off usedefaultprefix so no prefix is displayed. Use this for named male characters, e.g. “Bob”.

“nokeymessage” is a string attribute, used with locked containers. It is printed when the player attempts to lock or unlock the object, but don’t have the object specified by the key attribute in their inventory. If not specified, the NoKey template is used.

“objectslistprefix” is a string attribute, used when printing the room description, before the list of objects in the room. If not specified it defaults to the SeeListHeader template (“You can see”).

“onclose” specifies the script to run after the object is closed.

“ondrop” specifies the script to run after the object is dropped.

“onexit” is a script attribute. It is run every time that a player leaves an object (room).

See also enter.

“onlock” specifies the script to run after the object is locked.

“onopen” specifies the script to run after the object is opened.

“onswitchoff” specifies the script to run after the object is switched off.

“onswitchon” specifies the script to run after the object is switched on.

“ontake” specifies the script to run after the object is taken.

“onunlock” specifies the script to run after the object is unlocked.

“open” is a boolean attribute specifying whether the object can be opened.

See also openscript, close.

The “openable” type is defined in CoreTypes.aslx.

It marks the object as openable and closeable, and adds “Open” and “Close” to the displayverbs, but it is not a container type. It is intended for objects which can be opened and closed but which are not containers, for example windows and doors.

“openscript” is a script attribute. If specified, when the object is opened, the script will run. If not specified, the object will be opened automatically.

See also open.

“parent” is an object attribute, specifying the parent of the object.

It does not normally need to be included in the XML, as the convention is to nest child elements within a their parent. This will implicitly set the “parent” attribute on all child elements.

“parserignoreprefixes” is a stringlist attribute specifying a list of words which the parser should ignore if they appear at the beginning of object names - for example “the”, “a”, “an”.

“picture” is a string attribute specifying the filename of the picture to display in the static picture frame when the player enters this room.

The “plural” type is defined in CoreTypes.aslx. It sets the gender and article as appropriate for plural inanimate objects.

“pov_alias” is a string attribute. When an object becomes the player object, the alias will be set to this value.

“pov_alt” is a stringlist attribute. When an object becomes the player object, the alt attribute will be set to this value.

“pov_article” is a string attribute. When an object becomes the player object, the article attribute will be set to this value.

“pov_gender” is a string attribute. When an object becomes the player object, the gender attribute will be set to this value.

“pov_look” can be a string or script. When an object becomes the player object, the look attribute will be set to this value.

“prefix” is a string attribute, specifying text which appears before the object name when it is printed in a room description.

See also suffix.

“scenery” is a boolean attribute. If set to true, the object is not automatically listed in room descriptions or in the “Places and Objects” list. It is still within ScopeVisible though, so the player can look at and interact with the object.

“selfuseanything” is a script attribute. It is the fallback for selfuseon - if the object being used does not appear in the “selfuse” list, this script if specified will run instead. The script can read the “object” variable to see what object is being used.

“selfuseon” is an attribute that can be either a scriptdictionary or string.

It is used in the same way as useon, except that it allows you to define a “use A on B” relationship the other way around - “useon” is an attribute defined on object B, whereas “selfuseon” is defined on object A.

See also selfuseanything.

“setbackgroundopacity” is a boolean attribute. If set to true, the opacity specified in backgroundopacity will be applied.

“showdescriptiononenter” is a boolean attribute specifying whether the room description is automatically displayed when the player enters a room.

“showhealth” is a boolean attribute. If set to true, a health status variable will be created for each player (POV) object.

“showpanes” is a boolean attribute specifying whether the panes on the right of the screen (“Inventory”, “Places and Objects” and “Compass”) should be displayed.

“showscore” is a boolean attribute. If set to true, a score status variable will be created on the game object.

“start” is a script attribute specifying script to run when the game begins.

“statusattributes” is a stringlist attribute, only applicable for the game and player objects. See Status attributes.

“suffix” is a string attribute, specifying text which appears after the object name when it is printed in a room description.

See also prefix.

The “surface” type is defined in CoreTypes.aslx. It implements a surface by setting up the object as a transparent, open container which cannot be closed.

The “switchable” type is defined in CoreTypes.aslx.

It marks the object as switched off (switchedon = false), and adds “turn on/switch on” and “turn off/switch off” verbs to the object. These provide a default implementation so that sensible responses are printed when the player tries to switch on an object twice etc. The verbs simply toggle the state of the switchedon attribute. You can use onswitchon and onswitchoff to trigger events in the game when the player switches the object on or off.

“switchedoffdesc” is a string attribute, specifying additional text to print after the object description when the object is switched off.

See also switchedondesc.

“switchedon” is a boolean attribute specifying whether the object is switched on.

“switchedondesc” is a string attribute, specifying additional text to print after the object description when the object is switched on.

See also switchedoffdesc.

“switchoffmsg” is a string attribute, specifying text to print when the user switches off the object. If not specified, the SwitchedOff template is printed.

See also switchonmsg.

“switchonmsg” is a string attribute, specifying text to print when the user switches on the object. If not specified, the SwitchedOn template is printed.

See also switchoffmsg.

“take” is an attribute that can be either boolean or script.

  • If boolean, a value of “true” means the object can be taken, and “false” means the object cannot be taken. A default response (using the TakeSuccessful or TakeUnsuccessful template) is printed when the user takes (or tries to take) the object, unless a takemsg attribute is defined.
  • If script, the script will be run when the user tries to take the object.

See also drop, takemsg.

“takemsg” is a string attribute, specifying the text to print when the user takes (or tries to take) the object. Only applicable if the take attribute is boolean.

“tell” is a scriptdictionary. Keys are topics, and values are the scripts to run when the object is told about that topic.

See also Tutorial: Ask and Tell, telldefault, ask.

“telldefault” is a script which is the default script to run when an object is told about a topic. If none of the topics in the tell scriptdictionary match the player’s input, the telldefault script is run.

“transparent” is a boolean attribute. If “true”, it means that objects inside the container can be seen (but not reached) even when the container is closed.

“underlinehyperlinks” is a boolean attribute. If set to true, hyperlinks will be underlined.

“unlockmessage” is a string attribute, used to specify the text to print when the player unlocks the container. If not specified, the UnlockMessage template is the default.

See also lockmessage.

“use” is a script attribute, specifying script to run when the player types “use (object)”

“useanything” is a script attribute. It is the fallback for useon - if the object being used does not appear in the “useon” list, this script if specified will run instead. The script can read the “object” variable to see what object is being used.

“usedefaultprefix” is a boolean attribute. If set to true, the object’s prefix is ignored if set, and a default prefix is used instead - for English games, “a” or “an” is used.

“useframe” is a boolean attribute specifying whether a static picture frame should be displayed above the game text.

No longer used - all games can use the static picture frame, without having to turn this attribute on.

“useon” is an attribute that can be either a scriptdictionary or string.

  • If not specified, objects cannot be used on this object.
  • If a scriptdictionary, the keys of the dictionary specify objects that can be used on this object. The script values specify scripts to run when that object is used.
  • If a string, that string is printed whenever an object is used on this object.

See also give, useanything.

“visible” is a boolean attribute. If set to false, the object is not displayed - the effect is the same as if the object’s parent is set to null.

“visited” is a boolean attribute. Quest’s core library sets the “visited” attribute of an object to true when the player enters that object (room). There should usually be no need to set the visited attribute yourself, but you can read its value to see if the player has been to a room in your game.

“volume” is an int attribute. It specifies the volume of the object. This can then be used with container_limited to limit the size of objects which can be put inside a container.