Re: [NEWBIE] Numbers of objects and mobs

From: Marc Gale (MARC@BGC.AC.UK)
Date: 11/03/98

> Hi all. I'm a bit puzzled at how at how objects and mobs are worked with in the
> MUD. Obviously if you want 50 loaves of bread in your MUD, you're not going to
> write up 50 objects of the same type in the objects file. You create a
> prototype.
> I get that, but how do you differenciate between prototypes? For example,
> I've got
> the object damage patch installed and I've got two pieces of leather arm armor,
> which are both of the same prototype. But I'm wearing one and Frank is
> wearing the
> other. When someone hits my armor, does it also affect Frank's armor?
> Logically it
> would, as it is affecting the prototype. But this isn't very realistic. Someone
> explain how it works to me please? ;)

Basically, the prototype allows you to create just that, prototypes.
These prototypes are never used in the MUD world.  What happens is
that when an object is loaded up (by a zone resetting, by an immortal
simply loading an object up, etc) a blank object is created, and the
various values and settings are then set according to the prototype
it is based on.

Each object in the world is seperated from the rest of the objects
(those that know more, please don't correct this, for the example it
is correct) which is why eating one bread does not destroy all
breads, and damaging one piece of armour does not harm others.

I hope that explains how it works, but here's a quick summary;

1. Define a whole host of prototypes in the .OBJ files

2. Load up an object

2.1     Create a blank object and hang it in limbo
2.2     Copy all the values from the prototype
2.3     Bung it in the world somewhere


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | |

This archive was generated by hypermail 2b30 : 12/15/00 PST