[MUD-Dev] New topic: AI and NPCs

Jon A. Lambert jlsysinc at ix.netcom.com
Fri Aug 29 21:36:48 CEST 1997


On 27 Aug 97 at 9:17, Caliban Tiresias Darklock wrote:
>
[snipped some good fun]
 
> Has anyone managed to implement something resembling tactical intellect
> in MUD mobs? 

Yes.  I include a repost from rgma last year.  I haven't looked at 
this issue in awhile.  There have been other interesting diversions.
I've snipped up the post a bit, since it rambled between different
issues.

--cut--
From: "Jon A. Lambert" 
Subject: Re: Talking Mobs (was Re: Realistic MUDs: Mob behavior)
x-netcom-date: Tue Oct 15 10:12:02 PM CDT 1996
newsgroups: rec.games.mud.diku,rec.games.mud.admin,rec.games.mud.lp

Chris Lawrence (Contra)  wrote in article
<snip>    
> Instead I use object inheritance and what I
> call Combat Packages to dynamically spuff up mobile's combat
> capabilities at runtime.  I expect it to be rather nasty when a mobile
> just happens to grab a new (comparitively very high level) combat
> package in the middle of a fight.
> 

I'd be interested in hearing your ideas on these "combat packages".
Is this a script-type language that you are working on or more
similar to the hardcoded MOB special procedures?

In the system I am working on, I have three classes of "mobiles", a
PLAYER class, an NPC class and a MOB class.  
<snip>
The MOB class is used to
depict non or semi-intelligent mobiles (animals, reptiles, various
fantastic creatures).  In order to implement the MOB class
behavior I have attached two pieces of information:

1) Outlook - this is a bit string for a MOB reaction to a player's
entrance or approach.  I have 19 possible values defined currently
that range from JUMPY. TIMID,  NORMAL, HOSTILE PASSIVE,
GREEDY,  CRUEL, HUNGRY to name a few.  The MOB may have
one or more of these bits switched on.  They determine whether the
MOB will attack and the motive of the attack.  

2) Attack Script - this is stored as a string but loaded into as a
linked list at init time.  A sample script looks similar to this:

Buffalo      -  50MHo70/60LBa30/70LTs<<

If you familiar with the Rolemaster system, you will recognize
this notation.  What it attempts to describe is an realistic attack
sequence for the particular MOB.  The buffalo has three attack 
methods
each separated by slashes.  The 1st attack has a 70% chance of 
being picked and will be a 50 attack strength medium horn attack.
The 2nd attack has a 30% chance of being picked and will be a 60
attack strength Light Bash attack.  The 3rd attack is a conditional
attack.  It will occur in the same round if the 2nd attack method is
successful and is a 70 attack strength Light Trampling attack.

The notation is much more complex than my example.  It can
also be used to describe spell and other special attacks.  I have
only implemented the physical attack pieces as of this point.  

I have done little work on realistic intelligent mobile response thus
my interest in your "combat-packages".  I have defined same
general modes of attack for my NPCs though.  A great majority
of intelligent MOBs will not have KILL as their primary mode of
attack.  Mobiles in cities for instance generally attempt to
incapacitate rather then kill.  Thieves, for instance, will attempt
to render their victims unconscious, loot and flee.  Or engage
in hit-and-run type behavior if things don't go well.  While normal
citizens will generally flee, shout or attempt to disarm their
attackers.  City guards may subjugate or kill depending on
the local justice system.  Of course in the wilderness, death
is more often the objective of the attack, but not always.
For example the buffalo I described would general leave off
the attack once the character drops to an unconscious state.
As long as the character is not bleeding they will regain
consciousness within a given period of time.  Mobiles flagged
as hungry would of course devour the most of the corpse leaving
it unretrievable. 

This is still very fuzzy though as to how I will implement this
type of behavior.
--end cut--


	  

         
  
 
   
   




 
Jon A. Lambert



More information about the mud-dev-archive mailing list