Changing Objects and Rooms During the Game

You can change an object's alias, prefix, description and more by altering its properties using the property script command. You can also read tags such as an object's look tag in the same way as you'd read an object property - for example #lamp:look# returns the lamp's look tag.

Some object tags aren't just text, but scripts. These tags can be changed by changing the corresponding action, using the action script command, and you can run the scripts using the doaction command.

In the table below, a tick in the "Read Property" column means that tag can be read by reading it as a property, e.g. the #lamp:look# example above. A tick in the "Write Property" means the tag can be set by setting it as a property, e.g.:

property <lamp; look=This is a nice lamp.>

A tick in the "Action" column means you can set script for the tag using the action command, e.g.

action <lamp; look> picture <lamp.bmp>

If an action is set, that takes priority over an equivalent property.

TagRead
Property
Write
Property
Action
Objects
look
examine
speak
take
alias
prefix
suffix
detail
displaytype
gender
article
gain
lose
use
  See below
give
  See below
hidden
  Boolean
invisible
  Boolean
container
  Boolean
surface
  Boolean
transparent
  Boolean
opened
  Boolean
parent
open
close
add
remove
list
list empty
list closed
Rooms
look
alias
prefix
indescription
description
script

You can set default prefix, look etc. tags for everything in the game by adding these properties to a define type <default> block.

 

"Use" Actions

action <object name; use> (script)
action <object name; use 'other object name'> (script)
action <object name; use on 'other object name'> (script)
action <object name; use anything> (script)
action <object name; use on anything> (script)

Are equivalent to changing the following tags, respectively:

use (script)
use <other object name> (script)
use on <other object name> (script)
use anything (script)
use on anything (script)

"Give" Actions

action <object name; give> (script)
action <object name; give 'other object name'> (script)
action <object name; give to 'other object name'> (script)
action <object name; give anything> (script)
action <object name; give to anything> (script)

Are equivalent to changing the following tags, respectively:

give (script)
give <other object name> (script)
give to <other object name> (script)
give anything (script)
give to anything (script)

 

< Back