New-Coder 101:
 
You may know some of this stuff already, and if so, bear with me:
 
Inheriting files:
You may understand now that #include is used to bring external definitions
into room or even monster code.  What though if you want to use a function
or have other files run during your room/monster code or accessible from
within that same code?  The MUD uses the inherit command to do this.  For
example, you may have already noticed the following line:
 
    inherit "/std/room";
 
What this tells the mud is that the code following this statement is going
to be located inside.  It also interprets some of the functions that you use
in creating the room, like set_long, add_item, etc.  Without inheriting
this file, you will probably get errors.  Outside rooms have a similar
file that needs to be used:
 
    inherit "/std/outside";
 
What are the differences between these two?  For one, even though it doesn't
always seem to work, weather is confined to outside rooms.  That means, when
you are inside, you won't see things like "It is snowing."  The same thing
goes with changes in lighting.  A room stays constantly lit at whatever
level you set it at, while outside rooms the lighting will fluctuate 
depending on the time of day.  Because of this, inheriting the "/std/outside"
allows you to use 'set_dark_long' to write a different, more appropriate
description after the sun goes down.  I'll go into this more later on, but
remember it for now.
 
Some special rooms inherit other files that will be used to deal with
certain commands used in a room.  For example, pubs inherit "/std/pub" and
guildrooms where you can join and learn spells use "/std/guildroom".  They
allow you to define menu items, handle things like buying and advancing for
players, and in general make it so you don't have to know complex code to
add a pub or store.
 
The other purpose for inherit is to inherit a function that you have that is
external from the code for the room.  Say for instance you want monsters
to be randomly loaded into an area.  You could, if you wanted to, code this
into every single room, writing stuff that makes sure the monsters are still
alive, if they aren't determine how many should be there, and then stock
the room with the amount desired.  At a minimum, this would add about ten
lines on to each one of your rooms.  The easier way is to inherit a file
that takes care of this for you.  I'll give you an example later on along
with giving the file you need to inherit to perform this function.
 
