[MUD-Dev] Nation of shopkeepers

Adam Wiggins nightfall at user1.inficad.com
Wed Jul 2 00:46:48 CEST 1997


[Matt C:]
> Yeah. Of course, the concept of "a shop" is not necessarily static - it
> can as you allude, refer to something much more mobile, or a trader
> himself.

Yeah - and this is why I've never liked the old concept of 'specific'
shops.  That is, stuff like this:

The Armor Shop
The armorer is standing here.
> list
1. Chainmail   $50
2. Flak Jacket $200
3. Platemail   $150
...

We thought about how to do this better for quite a while and finally
just decided on simplicity.  To make a shop, the builder simply creates
a space (preferably with tables, shelves etc), NPC(s), and behavior scripts
for those NPCs that has them do the things you'd expect a shopkeeper
to do.  Thus a 'shop' is really just a room somewhere with a table with
a bunch of junk on it, and an NPC standing nearby.  If you pick up one
of the objects, they will generally respond with something like 'A juvian
trader just brought that in this morning, only $50 and it's yours.'  If
you try to walk out with the object, they'll stop you.  This gives you
a lot of nice stuff - for instance, you could potentially tie up the
shopkeeper in the closet and start selling his stuff yourself, happily
pocketing the cash.  Of course, someone who knows who the shopkeeper actually
is might come in, at which point you'd best hope you're a fast talker.
It allows you to check out the object in full detail *before* you buy it -
there's nothing worse than hocking your entire wad on a cool-looking weapon
only to find it's way too heavy for you to wield effectively.  Stealing
just becomes a matter of slipping things into your pockets unnoticed and
then sneaking out the door - distracting the shopkeeper somehow is a
good idea, so that she won't be watching you.  (This is a situation where
teams of thieves work best.)  Of course, many 'shops' aren't quite this
simple - you have things like craftsmen who commission work.  The best
armor is that made to exactly your body proportions, for which you need to
place an order (half the $ up front is generally required) and then wait
a few game days for it to be completed.  Plus, NPCs can only work on one
thing at a time, just like players - so even though you might like to
get your sword repaired by the master blacksmith, you find he's so backed
up with work that it's going to be a 6 week wait and just go to that new
guy down the road.  Etc etc.

I like this so well that I'm even using it on my (much more conventional)
work project.  Why bother writing 'shop' code when it's easier to just toss
a few objects on a nearby table and write a quick script to respond to
entry, exit, and object manipulation?




More information about the mud-dev-archive mailing list