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:
- 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.
- 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:
- A time. Like an alarm clock. It sits and waits until
its time has expired.
- 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.
- 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.
- Actuator Type. Like Pushbutton or Counter or Monster
Generator or Disabled (do nothing).
- 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.
- 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.
- 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.
- A flag that causes a 'Click' sound when the Actuator is activated.
- A time to be set in the Timer message. This is the delay
before the Timer message is delivered to its target.
- Graphic. Like Gold Keyhole (wall) or Square Pad (floor) or
'None'.
- 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:
- Pushbuttons. Operated by the Party. Placed in
walls. Any Wall Decoration can be specified. Some do not
look like pushbuttons. Alcoves. Torch Holders.
Keyholes. Alcoves are somewhat special in that they act very much
like Pressure Pads.
- Pressure Pads. Operated by Party, Monsters, Objects. Any
Floor Decoration can be specified.
- Object Holders. Operated by Party. Any Wall Decoration.
Takes and gives. Like a Torch Holder.
- Counter. Operated by a Timer message. Counts up
and down and is 'Active' when the count is zero. Used, for
example, when two coins are required to open a door.
- And/Or Gate. Operated by Timer message. Implements
the logical operation of 'And' and/or 'Or' (no pun
intended). As an example....open a door if a Mummy is standing on
Pressure Pad A and a Mummy is standing on Pressure Pad B and a Mummy is
standing on Pressure Pad C and a Mummy is standing on Pressure Pad D.
- Monster Generator. Operated by Timer message. This
Actuator produces no Timer message (a white lie!). Instead it
creates a Monster. So the fields within its definition are used
somewhat differently than the other Actuator types.
- Missile Launchers. Operated by Timer message. Any
Wall Decoration. Sometimes called 'Shooter'. Launches an
Object (Dagger, Worm Round, etc.) or a Magic Spell (Fireball, etc).
- A non-standard Actuator known as a 'Designer Specified Actuator'
(DSA). Implemented as a n-input, m-state machine that can
reference and modify the dungeon state and contents. Somewhat
'script-like'.