Introduction to Dungeon Master/Chaos Strikes Back Actuators

Actuators in DM/CSB are Objects that receive signals, process the signals to make decisions, and produce signals as a result.  The signals are generally of two types:
  1. Actions of the party or of monsters.  Examples are placing a Torch in a Torch Holder, stepping on a Pressure Pad, dropping a Screamer Slice in a Wall Niche.
  2. Internally generated Timer messages.  These are created by other Actuators.
The entire Dungeon is pretty much controlled by Timer messages.  A simple example is the process of opening a Door with a key.  The keyhole is an Actuator.  It is of a type that is operated by a special Object (a Gold Key, for example), has a Wall Decoration (a golden keyhole, for example), and sends a Timer message when it is activated by the proper Object (the key).  The Timer message is directed at a dungeon Cell where a Door is located.  The message is queued and when its time expires it causes the Door to open.  Often the time will be set to zero, causing the Door to open immediately.  Nevertheless, the message is the 'middle-man' between the keyhole Actuator and the Door.

The Timer messages have several parts:
  1. A time.  Like an alarm clock.  It sits and waits until its time has expired.
  2. A target.  This is a location in the dungeon.  A Level, an X and Y, and a Position.  The Position is a number 0 through 3.  How it is used depends on the target itself.  Sometimes it is used as a position within the cell. 0=North, 1=East, 2=South, and 3=West.  Sometimes it is used for other purposes.
  3. An Action.  Set, Clear, or Toggle.  The when the target receives the message it decides what 'Set', 'Clear', and 'Toggle' mean.  A door, for example, will open if it receives a 'Set', close if it receives a 'Clear', and will change its state when it receives a 'Toggle'.
When a Timer message is received at a particlar Cell in the dungeon, all Actuators and other Objects at that location receive the same message.  This is very basic and useful.  Because a Timer message can only be directed to a single location, how would we open a Door and close a Pit with the single action of stepping on a Pressure Pad.  Commonly this is accomplished by having the Pressure Pad send a message to a Cell containing two Actuators.  One of the Actuators causes the Door to open and the other Actuator causes the Pit to close.

Actuators are defined by a structure containing the following basic parts.
  1. Actuator Type.  Like Pushbutton or Counter or Monster Generator or Disabled (do nothing).
  2. A 'Once-Only' flag.  As soon as the Actuator sends its first message it is Disabled.  This is very common for keyhole-type Actuators, for example.  Once the key has been inserted, the keyhole becomes inactive.  However, its decoration remains.  The decoration is the reason the Actuator is marked as Disabled rather than being removed entirely.
  3. Action to be performed by the resulting Timer message.  Set, Clear, Toggle.  But there is usually a fourth option called 'Hold'.  This generally means that a 'Set' message is sent when the Actuator is activated and a 'Clear' message when the Actuator is deactivated.  A common example....a Pressure Pad that 'Holds' a door open so long as a Boulder is on the pad.  When the Boulder is placed on the Pressure Pad the pad is 'activated' and it sends a 'Set' message to open the Door.  When the Boulder is removed the Pressure Pad is deactivated and sends a 'Clear' message to close the Door.
  4. A flag to reverse the operation.  In the preceeding example, setting this flag would cause the Boulder to 'Hold' the door closed rather than open.  In other words it causes a 'Clear' to be sent instead of a 'Set' and vise versa.
  5. A flag that causes a 'Click' sound when the Actuator is activated.
  6. A time to be set in the Timer message.  This is the delay before the Timer message is delivered to its target.
  7. Graphic.  Like Gold Keyhole (wall) or Square Pad (floor) or 'None'.
  8. A rather strange flag that suppresses the sending of a Timer message and, instead, causes some local action to occur.  One of the most clever of these 'Local Actions' is to cause the list of Actuators in the Cell to be 'Rotated'.  The first Actuator is removed from the cell's list of Actuators and is put back at the end of the list.  Since the last Actuator encountered in the list takes precedence for the purposes of displaying a decoration, this causes the decoration to change.  A very common example is the Torch Holder.  The Torch Holder is actually two! Actuators....a Pushbutton with an empty holder graphic and a Pushbutton Actuator with a full holder graphic.  One Pushbutton sends a message when the Torch is taken and the other has this 'Local Action' of 'rotating' the Actuator list, thereby making it appear as if the Torch has been removed from or placed into the holder.

Notice the orthogonality of all this.  All these fields are pretty much independent of one another.   For example, the graphic is completely independent of the Actuator Type.  A keyhole need not look like a keyhole.  Instead it might look like a hole in the wall near the floor operated by a Screamer Slice.  And so on.  This makes for seemingly endless possibilities for the dungeon designer.  A Torch Holder operated by a Gor Coin (strange, but possible).  A Pressure Pad that Holds a Door open but Toggles an input to an And-Gate. 

Actuators are of many basic types:

Paul Stevens
BACK