You are in a beastiary book

In here is the repository of all hack-n-slash creatures that one may randomly encounter, based on the zone name.

Only aggressive creatures should be placed here. A bunny or turtle that randomly enters a room and kills players makes no sense. Make them rabid or something.

When building your rooms, be sure to use the setzone command to mark rooms with the zone name.

You can place creatures in this beastiary for the zone material to access.

First, make sure there is an object in this beastiary's inventory whose class matches your zone name.

If there isn't an object matching the zone name, you can create or give or drop one into the beastiary. Inside the beastiary is a little white button. Go into the beastiary (use the into command) and push that button to make sure new zone objects are set up correctly (a button with the beastiary material will be placed in it).

You can enter zone object, then set up a version of your creature. Maybe create it with some worth if you want players to receive the amount when they kill it. Give it a decent info. Set the description and pose to a number between 0 and 10.

Encounter's stats will depend on the description (extra) and pose:
aim = extra * 10
dodge = extra * 10
caps on the above = (extra 1) * 10
health = healthmax = (extra 1) * 10
mana = manamax = pose * 10
manacap = (pose 1) * 10

The if appropriate, create some items for it to wield, wear, carry, or give items to it.

Then this is important: after your creature has all the equipment and you are ready, push the little white button in the zone object. This will make sure it is set up for encounters.

How encounters are generated
As players roam about the marked zones, there is a slight chance the zone material set in locations will trigger an encounter.

When this happens, it will find an object matching the zone name in the beastiary inventory.

Then it will choose a random object within the zone-named object's inventory. If the random object is hosted to another, then it will choose the host object (this makes sure you encounter the wizard instead of his wand).

Then it will copy this object, use the object's extra to determine skills, mana, and health, then place it in the location from where it was triggered, and switch it on.

It will also copy anything hosted to the original and host them in the same way to the copy.

Also it will copy the inventory of the original and place them in the copy's inventory.

Then it will send a message to the new encounter and wake it up, causeing it to attack the player who triggered the whole encounter.

The encounter material will monitor the creature's health. If it dies, it will drop,unlock, and transfer ownership of all things wielded, worn, carried or inside to the player it attacked. Then it will decay and be erased.

Send any questions to Thorn.

readall the beastiary book

Related:
read the command called setzone
read the material called zone
read the material called encounter
read the material called beastiary