16 Mar, 2009, Lyanic wrote in the 1st comment:
Votes: 0
For some reason, I started thinking about an old mudlab.org forum thread (http://mudlab.org/forum/viewtopic.php?t=...) last night, and I got the urge to resurrect discussion on the topic of unique and interesting NPC designs. I thought it would be fun to hear about the pet monsters that fellow designers have created and what effects they have on the game. I guess I'll go first:

I recently finished beta testing a pair of new NPCs that were originally designed to serve a functional purpose, but ended up taking on a life of their own - the Gnome Sorcerer and the Root Monster. Some background is needed first: The newbie starting area in The 7th Plane is a rose garden, where the roses are being controlled by spirit tentacles attached to their roots (located underground, accessible through a hole in the garden's center) in another plane, thus making the roses vicious and evil. The roses, being in a newbie area, are still obviously low level. They're also some of the few NPCs in the entire game that are immobile (from being rooted into the ground). As such, I've had a problem over the years with higher level player characters coming into the rose garden for easy kills (because of certain class oriented aspects that revolve around accumulation of kills), sometimes preventing actual newbies from killing them.

The Gnome Sorcerer starts in his own secret underground house, just north of the roots. He shifts planes and goes around to the spirit tentacles attached to the roots, healing and casting protective spells on them. He also routinely checks the area for signs of players. If he locates one, he chants himself there and discreetly uses a form of read aura. If the player is over a certain level of stat progression (ie: reasonably should not be in the area), he goes back underground with the roots, but in the physical plane, and performs a ritual to summon the Root Monster. Once it is created, the Gnome Sorcerer whispers the name of the player to the Root Monster, activating its primary routine.

The Root Monster has the ability to instantaneously travel to targets if there is a path of dirt (underground/field) for it to burrow through. It uses this ability to hunt down and attack its victim. In combat, it uses its tendrils as a form of entrapment, with a chance to prevent fleeing/escape. If it successfully incapacitates its victim, it will wrap the victim up in tendrils and drag him or her back through the ground to the central root structure beneath the garden. There, it simply tries to keep the player from getting away until the Gnome Sorcerer arrives. Upon the Gnome Sorcerer's arrival, he gets out a blade and cuts the player's head off. He takes the brain as a trophy, selects from a list of glib remarks to make and returns to his house to preserve the brain in a jar (the jar slowly fills up over time with various brains from his victims).

Since other players can attempt to interfere with the Gnome Sorcerer, there are a few side notes: If his blade is taken from him, he will begin trying to get it back, or even craft a new one if he has to. And since the Root Monster primarily uses 'kick' to keep victims incapacitated, the system implicitly handles the case of someone being stuck (ie: Gnome Sorcerer being prevented from getting there in a timely manner) - fatal wound incurred by being bludgeoned to death from kicks.

As a final note, there is an implicit quest connecting these two new NPCs with the area. If someone manages to kill the Root Monster, a golden rose (valuable) grows from its dead body as it sinks back into the ground, and the Gnome Sorcerer is left defenseless. If someone manages to kill the Gnome Sorcerer, the spirit tentacles are left unprotected. If someone then goes and kills each of the spirit tentacles, then the roses will stop attacking, the garden becomes peaceful and all is right with the world! Joy!

Since its creation, I've dubbed the Gnome Sorcerer my sixth pet (a term of fondness I use in referring to my favorite, and typically most devious, NPCs). Does anyone else out there have any fun pet NPCs? If so, post them!
16 Mar, 2009, Idealiad wrote in the 2nd comment:
Votes: 0
Check that mudlab link, it's getting mangled somehow.

I have nothing else concrete to say right now except your example is solid gold.
16 Mar, 2009, Lyanic wrote in the 3rd comment:
Votes: 0
Sorry about that, here's the link: http://mudlab.org/forum/viewtopic.php?t=...

I guess the parentheses fubar'd it? I'm not sure.

Note: I fixed it in the original post, too - just made it a static, non-clickable link
16 Mar, 2009, elanthis wrote in the 4th comment:
Votes: 0
That was an interesting thread. Your NPCs sound pretty sweet!

For the link thing, btw, just put your links inside of tags (remove the spaces from inside the brackets) and they'll work right always.
16 Mar, 2009, Lyanic wrote in the 5th comment:
Votes: 0
elanthis said:
That was an interesting thread. Your NPCs sound pretty sweet!
For the link thing, btw, just put your links inside of tags (remove the spaces from inside the brackets) and they'll work right always.


Aye, that's how I did it. I just think it's the ( ) on the outside that broke it….but I didn't want to remove those. *shrugs*

Also, I don't feel like revising it anymore. The first follow-up post provided the link, and it's technically there in the original (though, not clickable). I'm just leaving it as is now.
16 Mar, 2009, elanthis wrote in the 6th comment:
Votes: 0
Weird. I've used the url tags inside parenthesis with no problems before. Tried it now in a preview and it worked fine, but maybe actual posts get broke. Not a big deal, just trying to help. :)
17 Mar, 2009, kiasyn wrote in the 7th comment:
Votes: 0
Fixed it.
17 Mar, 2009, Ssolvarain wrote in the 8th comment:
Votes: 0
Using the alias command, I've worked out a way to make a clone of pokeballs for players. On use it'll spawn a monster and force it to follow the ball's holder, while replacing the ball with a different one. When the new ball is used, the mob goes to the purge room and the ball also purges, returning the original one.

Not quite on the level of your pets, but just one of the little toys I've made.
17 Mar, 2009, Fizban wrote in the 9th comment:
Votes: 0
Ssolvarain said:
Using the alias command, I've worked out a way to make a clone of pokeballs for players. On use it'll spawn a monster and force it to follow the ball's holder, while replacing the ball with a different one. When the new ball is used, the mob goes to the purge room and the ball also purges, returning the original one.

Not quite on the level of your pets, but just one of the little toys I've made.


That hardcoded or done with progs? I know that can be done with DG relatively easily but didn't think merc's progs were able to do things that complex.

Fairly sure this would do the same thing though:

Name: 'Pokeball',
Trigger Intended Assignment: Objects
Trigger Type: Command , Numeric Arg: 2, Arg list: *
Commands:
switch %self.vnum%
case 100
if %cmd% == choose
%load% mob 100
%force% %actor.room.people% follow %actor.name%
%force% %actor% say I choose you %actor.room.people.shortdesc%!
%load% obj 101 %actor%
%purge% %self%
else
return 0
end
break
case 101
eval check %%findmob.%actor.room.vnum%(101)%%
if %cmd% == return && %check% > 0
%purge% uniquekeyword
%load% obj 100 %actor%
%purge% %self%
else
return 0
end
break
default
return 0
break
done
17 Mar, 2009, Ssolvarain wrote in the 10th comment:
Votes: 0
Done with progs on ROM-based mud.

the first object:
obj mload 3347
obj force ssolvmoorain follow $n
obj oload 3350 111
obj force $n get empty
obj force $n group ssolvmoorain
obj goto 8


and the second:
if mobhere 3347
obj echo Ssolvmoorain disappears back into its ball.
obj transfer ssolvmoo 8
obj oload 3349 1
obj force $n get ball
obj goto 8
else
obj echoat $n Huh?


I got to use the code tag :D
17 Mar, 2009, Fizban wrote in the 11th comment:
Votes: 0
Ssolvarain said:
Done with progs on ROM-based mud.

the first object:
obj mload 3347
obj force ssolvmoorain follow $n
obj oload 3350 111
obj force $n get empty
obj force $n group ssolvmoorain
obj goto 8


Curious what do the following two lines do exactly:

oload 3350 111
obj goto 8

In the first I assume one of those two numbers is the vnum of the object being loaded, but what is the other?
In the second what is the target? Does the item itself leave the player's inventory and end up in room 8?
and the second:
if mobhere 3347
obj echo Ssolvmoorain disappears back into its ball.
obj transfer ssolvmoo 8
obj oload 3349 1
obj force $n get ball
obj goto 8
else
obj echoat $n Huh?


Is there any way to check for a mob with that vnum in another room with mobhere or something similar? (In DG findmob.<vnum of room>(<vnum of mob>) ie. if %findmob.400(5000)% > 1 checks for a specific mob in a specific room and wasn't sure if rom's could check in a specific room like that. Findmob also can be used to find out how many of the mob are in the room, not only if there is at least 1 there.)

I got to use the code tag :D

… (Had to have something outside the quote tags.)
17 Mar, 2009, Ssolvarain wrote in the 12th comment:
Votes: 0
The second number there is to specify the mob's level. Yes, the object goto's room 8, where all contents are purged at each tick.

I'm not too sure on the second part. I mainly just made it as a toy, so I hadn't considered what would happen if there were multiple instances of people using the item. But I do see where the problem would lie there. I'm sure I could find some kind of workaround to make it work properly, though.
17 Mar, 2009, Scandum wrote in the 13th comment:
Votes: 0
I've got an area where mobs wake up, go to work, go to the pub or do something else after work, then head back home to sleep. If you kill the rooster they'll oversleep, which is instrumental to solving one of the quests, and you generally have to spy on them to figure out how to start and complete most of the quests.

You need variables to do anything decent, which most merc-ish mobprog engines lack.
17 Mar, 2009, Fizban wrote in the 14th comment:
Votes: 0
Scandum said:
I've got an area where mobs wake up, go to work, go to the pub or do something else after work, then head back home to sleep. If you kill the rooster they'll oversleep, which is instrumental to solving one of the quests, and you generally have to spy on them to figure out how to start and complete most of the quests.

You need variables to do anything decent, which most merc-ish mobprog engines lack.


I've done all the work/schedule stuff with DG in the past, but never seen the rooster concept, rather neat idea there.
17 Mar, 2009, Lyanic wrote in the 15th comment:
Votes: 0
Scandum said:
I've got an area where mobs wake up, go to work, go to the pub or do something else after work, then head back home to sleep. If you kill the rooster they'll oversleep, which is instrumental to solving one of the quests, and you generally have to spy on them to figure out how to start and complete most of the quests.

That's brilliant. I love it! Mind if I steal that idea to adapt and repurpose it?

Scandum said:
You need variables to do anything decent, which most merc-ish mobprog engines lack.

Unfortunately, yes. This is why most of my NPCs have semi-hard-coded behavioral routines. Poor game core design makes me a sad, sad architect of virtual worlds. :sad:
17 Mar, 2009, Tyche wrote in the 16th comment:
Votes: 0
Lyanic said:
Scandum said:
You need variables to do anything decent, which most merc-ish mobprog engines lack.

Unfortunately, yes. This is why most of my NPCs have semi-hard-coded behavioral routines. Poor game core design makes me a sad, sad architect of virtual worlds. :sad:


There's something really trivial you can add to mobprogs to great effect.
I dropped it over at http://www.mudlab.org/forum/viewtopic.ph...
17 Mar, 2009, Ssolvarain wrote in the 17th comment:
Votes: 0
Well, I use variables quite a lot. It's not stock but we do have them.
17 Mar, 2009, Fizban wrote in the 18th comment:
Votes: 0
Lyanic said:
Scandum said:
You need variables to do anything decent, which most merc-ish mobprog engines lack.

Unfortunately, yes. This is why most of my NPCs have semi-hard-coded behavioral routines. Poor game core design makes me a sad, sad architect of virtual worlds. :sad:


That's one of the main reasons I love DG so much more than merc-ish progs. DG uses set and eval to establish variables. In essence set creates chars and eval can be used for ints or chars. set num string 3 + 4 saves the string '3 + 4' in a variable that can be accessed via %num%, eval num 3 + 4 actually does the math and saves the result of '7' in %num% instead of the literal string '3 + 4'. You can also embed variables into each other creating pseudo-arrays. You can't create actual arrays, but you can make three variables: num[1], num[2], num[3], and have something randomly access the contents of one of the three much like you would an array as shown below:

Name: '"Array" Example'
Trigger Intended Assignment: Mobiles
Trigger Type: Random , Numeric Arg: 100, Arg list:
Commands:
*give %num% a random value 1-3
set num %random.3%
*create num[1], num[2], num[3]
set string[1] This is the first string of text.
set string[2] This is the second string of text.
set string[3] This is the final string of text.
*create a new variable by embedding %num% inside string[] to end up with one of the three stored strings
eval quote %%num[%num%]%%
say %quote%
17 Mar, 2009, Scandum wrote in the 19th comment:
Votes: 0
Lyanic said:
Scandum said:
I've got an area where mobs wake up, go to work, go to the pub or do something else after work, then head back home to sleep. If you kill the rooster they'll oversleep, which is instrumental to solving one of the quests, and you generally have to spy on them to figure out how to start and complete most of the quests.

That's brilliant. I love it! Mind if I steal that idea to adapt and repurpose it?

I don't mind.

Tyche said:
There's something really trivial you can add to mobprogs to great effect.
I dropped it over at http://www.mudlab.org/forum/viewtopic.ph...

The quest bit snippet I wrote is equally trivial and far more powerful:

http://www.mudbytes.net/index.php?a=file...
0.0/19