|
Narrow Alley
Generic Automaton (#192):
----
The Generic Automaton is an easy-to-program robot which responds to simple
commands. It can have multiple MOODS, each one of which has a different
description and set of RESPONSES. Commands trigger an announced response and
can also trigger a TRANSITION to another mood. For example, a trivial robot
might be made as follows:
@create #192 named robot
@describe robot as "A crash-test dummy."
@setresponse robot with hug,kiss: %vs the %t. It smiles.
@setresponse robot with hit,kick: %vs the %t. It frowns.
The pattern %v will be substituted with the verb name, and %vs will be
substituted with the third-person form of the verb. So, if Calkins types
"kiss robot" or "hit robot", we will see:
Calkins kisses the robot. It smiles.
Calkins hits the robot. It smiles.
This trivial automaton has only one mood (called "initial"), but things don't
really get interesting until multiple moods are created. Moods and
transitions between moods form a sort of MENTAL LANDSCAPE or personality
which other players can explore, somewhat like rooms and exits. To make a
new mood (or switch to an existing mood), use @setmood. For example, we can
make our trivial robot slightly more interesting:
@setmood robot to initial
@transition robot with hit,kick:angry
@setmood robot to angry
@describe robot as "A very angry test dummy."
@setresponse robot with hug,kiss: %vs the %t. It relaxes.
@transition robot with hug,kiss:initial
@setresponse robot with hit,kick: %vs the %t. It %vs %n!
Now kicking the robot will make it mad, and when it's mad it will react more
violently to being kicked again. Kissing or hugging it will calm it down
(transition to initial mood). If an automaton is left alone in a room, it
automatically returns to the "initial" mood, if it has one.
To design an automaton think of what moods or states it should have. Pick a
set of basic commands to trigger responses and mood transitions. Draw a
TRANSITION DIAGRAM! Complex automatons have over a dozen moods and are
impossible to design without making a diagram. Here is the diagram of a
three-mood stray dog:
+-------<---------------<---------------+
| |
feed +---+ V +-->--+ +---+ |
pet | | | | pet | | | kick |
\ V | \ V pet \ V |
HAPPY---+ INITIAL<---<---ANGRY------>----+
| ^ | | ^ ^ feed
| | feed | | kick | |
| +---<-----<--+ +--->----+ |
+------->------->------->------->---+
kick
Besides setting responses and transitions, you can use @rminputs to erase a
response and @actions
You see an old wooden box with a broken lid. You are in a narrow dark alley way between two brick buildings. The ground is littered with trash, old newspapers, empty cans, bricks set up as a fireplace with an arrangement of pipes over it. Beside it is an army messpan, inside filled with dirty snow and ice. At the east end of the alley is a fence, behind you is the street. |
| Home, Back to Dhalgren |