Page 1 of 1

Is it possible to make "wandering monsters"??

Posted: Mon Apr 30, 2007 9:27 pm
by AyounTheDark
I've been trying to peek some more at the DM-client, and came to wonder if there's means of making "wandering monsters". A term some may have known/used in their PnP days (and maybe still do).

I was thinking along of these two possibilities.:

1) As I've seen some tavern maids "wander" in strange "patterns", that could be one to use, to create more randomness in dungeons/encounters.
But could this be possible with a small group moving together? (Some small patrol for example)

2) I thought about if it was possible to make an area with a %-age chance for some spawn to appear, and at random what kind/strength of the spawn too. - Again to add to the unpredictability of a dungeon/encounter.


Does anyone bright out there know how to do either, or both of the above?


Thanks.

Posted: Mon Apr 30, 2007 9:40 pm
by Talwin Hawkins
For the wandering maid thing that is easy. All you need is waypoints. They are invisble flags that the NPCs follow in whatever order you give them. AFAIK this cannot be done in the DM client, though someone smarter can confirm this.

As for the %chances, im almost certain that something like this can be entered in the onarea event of the trigger. Again someone smarter can explain this further.

Posted: Mon Apr 30, 2007 10:12 pm
by Final Shinryuu
These are both easily doable.

Posted: Tue May 01, 2007 12:56 am
by Cassandros
There is a variable you can apply to creatures in the Toolset that makes them wander around, look bored/tired etc but they will not wander into other areas.

Posted: Tue May 01, 2007 7:07 am
by AyounTheDark
Sounds good. Now all I have to figure is how to get that dun.

But say in option 2, I can choose to have several variables to make the following:

Trigger area with 20% to spawn a bunch of critters;

01-10 Kobold swat team
11-25 Gnoll fanatics
26-50 Frenzied maidens of Dre'ana
51-75 ...


Can it be dun like that, or how?

Posted: Tue May 01, 2007 12:47 pm
by Horred the Plague
AyounTheDark wrote:Sounds good. Now all I have to figure is how to get that dun.

But say in option 2, I can choose to have several variables to make the following:

Trigger area with 20% to spawn a bunch of critters;

01-10 Kobold swat team
11-25 Gnoll fanatics
26-50 Frenzied maidens of Dre'ana
51-75 ...


Can it be dun like that, or how?
This 'can' be done, and it does not even take an "encounter trigger" to do so. A system could be set up to look for local variables set on the trigger, with a universal script to spawn them. Put this script in the trigger's OnEnter event slot. This type of system could be set up a number of ways, depending on preferrences.

If dealing with a specific area, you could even choose the location that each spawning creature appears at, and/or when they appear. It has to be done on a per case basis, and would require a little more scripting...plus some planning to pick the right locales. This is definitely the 'neatest' way to set them up, but it requires more work than a generic system would.

Posted: Tue May 01, 2007 1:01 pm
by Rhissaerk Jalesh
Wandering monsters supposedly generate lag. I could be wrong on that but it's why I've never used any. Even when I really wanted too...*sniffs*

I had a random encounter system but it also, sadly, generated lag, so I had to scrap it. There is a way to do one that DOESN'T generate lag though, but it's beyond my meager crappy coding skills. Infact, so is the random encounter system I HAVE, someone else coded it FOR me. *chuckles*

If lag isn't an issue for you though, I think I still have that random encounter code lying around here somewhere, I could send it to you.

Posted: Tue May 01, 2007 6:02 pm
by Mabus
I wouldn't mind gettting that code myself.

Posted: Wed May 02, 2007 7:33 am
by AyounTheDark
Rhissaerk Jalesh wrote:If lag isn't an issue for you though, I think I still have that random encounter code lying around here somewhere, I could send it to you.
I'd appreciate it, at least to puzzle with it and test it some. :)

Posted: Wed May 02, 2007 12:50 pm
by mhogar
let me guess:

Code: Select all

int nValue = Random(100) + 1; /* creates a random number between 1 and 100 */
string sCreature;
location lLoc;

if (nValue == 100){

   /* create an encounter with Whisper the Snake */

   sCreature = "WHISPERSNAKE";
   lLoc = GetLocation(OBJECT_SELF);
   ActionDoCommand(ActionCreate(sCreature, lLoc));

}
/* and more if's */
:lol:

Some day I may start coding ....