Randomizing the location of mobs

For builders to discuss and ask building questions.
Post Reply
User avatar
Kregor
Sword Grand Master
Sword Grand Master
Posts: 1474
Joined: Sun Jul 11, 2004 6:14 am
Location: Baldur's Gate

Randomizing the location of mobs

Post by Kregor » Sun Jul 10, 2005 10:29 pm

I was looking through one of the Smaug builder instruction sites, and I saw a cool hint that I don't recall seeing here in the forums that seems like a really cool trick.

Say you have a forest area with random critters that come out in different places every reset, or a busy city where merchants, patrons, etc. may be in different parts of the city every day, and/or maybe you don't want people to figure out which room they pop into at each reset. You can add unpredictability for the appearance of different mobs using what a guy named Locke at CthulhuMUD termed the MobChute:

1) devote one room vnum as a distribution room for the mobs you want to randomize their location. This room will have an exit out in each direction (N,S,E,W,U,D) to one of six rooms you want the mobs to randomly appear. This room is not accessible from the outside (eg, no exits into it, all room flags against teleporting, recall, etc should be included, much like a petshop storeroom):

Code: Select all

#QQ50
The Locke MobChute~
This room delivers mobs randomly around the city, and should not be
reachable to player characters.  Thanks to Locke of Cthulhu mud for
use of this idea!
~
0 ROOM_NO_MOB|ROOM_INDOORS|ROOM_NO_SUMMON|ROOM_NO_ASTRAL SECT_INSIDE 0 0 0
DDIR_NORTH
~
~
0 0 QQ25
DDIR_SOUTH
~
~
0 0 QQ13
DDIR_EAST
~
~
0 0 QQ08
DDIR_WEST
~
~
0 0 QQ16
DDIR_UP
~
~
0 0 QQ37
DDIR_DOWN
~
~
0 0 QQ34
S
2) You would then code your resets to load non-sentinel mobs into this room, be they travelling merchants, roaming patrons, stray dogs, etc. When they make their first move, they move in one of the six directions, emerging out of the MobChute room into the room the exit leads to. This also randomizes the time of their appearance slightly, letting them stagger their appearance into the areas as they make their move, rather than all appearing immediately in place at the reset.

To further randomize the mob on a daily basis, the mobs could have a time_prog on them to mpgoto room 99 for holding overnight, then their morning time_prog would make them mpgoto the MobChute again, rather than mpregoto back to where they left for the night.
"There is no safety for honest men except by believing all possible evil of evil men."

Kregor - Ranger of Tangled Trees
Rozor - Lady Luck's Duelist
Tygen - Ranger-Bard of Mielikki
Post Reply