[MUD-Dev] Dealing with cloned NPCs

Sasha Hart hart.s at attbi.com
Thu Jun 19 15:20:32 CEST 2003


[Thomas Sullivan]

> I want the user to be able to attack "a desert rat" and be able to
> tell his friends to attack *the same* rat.. (grouping, etc..)

Approach 1:

> (a)Jum Jum Joey, (b)a desert rat, (c)a desert rat..

Approach 2:

> Do I make the descriptions different for each npc? Have cloned
> copies with a column in the npc table saying what "attribute" this
> npc has? So there can be: a field rat, a mangy field rat, a rabid
> rat?  Sounds like they would have different physical attributes as
> well.

Approach 3:

> In typing this it seems like simply attacking the first version of
> the same npc would be a worthy solution but I wonder what others
> do?

I look at it as a parser issue.

The only way I see to resolve the problem once and for good is to
give a unique pointer to the individual. That looks ugly, so
consider hiding it away (e.g., having some command which shows the
condition of the mobs in the room also show their IDs). But it is
also possible to handle 95% of the functionality by looking at how
the feature would actually be used.

The only times I ever cared which rat I was attacking were:

  (1) When one was sensible to attack, and the other was too
  powerful

  (2) When one was the one who was wounded and I wanted to finish,
  and the other was just some rat I didn't want to get started on.

These will differ as you build in different success landscapes to
the game (e.g., these mattered because the major considerations in
most combat are how big he is compared to me, and how close I am to
killing him - if the game is different then maybe other
considerations would open up).

The first case must be handled by not calling a very powerful rat
the same thing as a less powerful rat. They could just have
different names, or a different word in their name (omnipotent rat
vs. sewer rat). Otherwise people are poring over descriptions of
rats differentiated only by IDs.

I've never seen this, but the second case could be basically handled
by having a 'wounded' adjective apply to them. 'attack wounded rat'
would serve for every condition but the bizarre one where there are
multiple wounded rats, and it is very important for you to get the
right one.

Often there is a system of 'kill the first rat' which works great in
most cases and avoids the clunkiness of unique IDs. The pathology of
this approach is: once the first one dies, then the one who was the
second on the list would now be the first on the list. This is an
idiom which many have already learned, but you could develop a
better idiom by giving each client the same list of pointers to
individuals that you presented to them last time they saw the room
or what have you. Then the player might type 'kill the first rat'
and get 'The first rat is dead,' but if he typed 'look' after the
old first rat died, then the system would reset what his word
'first' referred to.

I think if you implement a few different approaches then there will
rarely be problems, since people who really care will switch
strategies. Usually I either see this, or just not fully handling
the problem.

The idea of attaching different adjectives is actually quite easy
and will help in a lot of cases. I never thought of it as an
approach to this problem. I would suggest not bothering to connect
this with 'physical' attributes unless you are doing some kind of
system such that rats could breed. For all of the purposes that
matter, the rat is white and mangy if you put the words in front of
its name. If I went with omnipotent/sewer/wounded, I would handle
those apart from the more ad hoc adjectives like mangy etc.

Have fun.
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev




More information about the mud-dev-archive mailing list