[MUD-Dev] Solutions for smarter NPCs

info at castwide.com info at castwide.com
Thu Feb 5 16:49:28 CET 2004


--<cut>--
Note: This message was written via the list web archives.  There is
no guarantee that the claimed author is actually the author.
--<cut>--
Original message: http://www.kanga.nu/archives/MUD-Dev-L/2004Q1/msg00282.php

On Mon, 02 Feb 2004 20:29:44 -0800
<ext.Christer.Enfors at tietoenator.com> wrote:

> However, I've yet to come across an actual implementation of good
> AI in a MUD (not that I've looked very hard though). I've read
> many articles about how wonderful AI systems could be created, but
> noone seems to have acutally implemented it. What I'm referring to
> is NPCs who have their own virtual lives; NPCs who go to work in
> the morning, and go to the pub after work. NPCs who buy groceries
> at the market, take them home to make dinner, then go to bed. NPCs
> who go hunting in the forest, and then sell the pelts at a local
> market. NPCs who perhaps even cut down trees to build their own
> home.

> All this should be possible - but I've yet to see it implemented.

I've seen text-based MUDs where NPCs are capable of the type of
behavior you describe.  I can also cite two examples from my own
graphical MUD:

  1. Miners.  These guys have three basic states.  If they have
  money, they drink at the pub.  If they're broke, they sell ore to
  the refinery.  If they don't have ore, they go to the mines to
  work.  After acquiring ore, they sell it, go back to the pub, and
  start the cycle over.

  2. The gunsmith.  This guy wants to sell bullets to the gun shop,
  but he needs the materials to make them.  First, he sits in the
  diner and offers to buy gunpowder, which players (or NPCs, for
  that matter) can try to steal from another town.  After he buys
  enough gunpowder, he goes to the refinery to buy lead.  With the
  core materials acquired, he goes to his workshop to make the
  bullets.  Then he sells the bullets to the gun shop.  Finally, he
  returns to the diner with his money and starts looking to buy
  gunpowder again.

In both cases, I was able to implement the behavior with only a
couple dozen lines of script.  It was a simple matter of determining
which state of behavior to initiate based on the NPC's needs (has
ore but no money, has gunpowder but no lead, etc.) and scheduling
actions that fulfill those needs.  The hard part was making the
scripting and command systems robust enough to handle sufficiently
complex behavior.
_______________________________________________
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