

Document over-hauled by Ironman for updates to the inherit.

This is the basic build document for the BAG inherit, which is
a file that allows you easily to make bags, treasure chests, and other
sorts of objects.
========================================================================

First thing to realize is that BAG uses the basic settings that all
objects use. Please see the %^BLACK%^%^BOLD%^help objects%^RESET%^ for information on the general
settings for objects such as set_name(), set_id(), set_short(), set_long()
, set_weight(), etc.

========================================================================

The functions outlined here are specific to the BAG inherit.
%^GREEN%^%^BOLD%^set_max_internal_encumbrance(%^BLACK%^%^BOLD%^<weight>%^GREEN%^%^BOLD%^);
    This is how much weight the container can hold at most.
    The %^BLACK%^%^BOLD%^<weight>%^RESET%^ is an integer that you must assign a value for.
    The following chart is the balancing requirements for the BAG inherit;

                 very common           less then < 600
                 common                   600 to 900 
                 less common              901 to 1200
                 hard to find             1201 to 1500
                 very hard                1501 to 2500
                 extremely hard           2501 to 3500
                 rare                     3501 to 4000
                 extremely rare           4001 to 4500
                 Quest-grade              4501 to 5000 

*******************************************************************************

This collection of functions are additional to the BAG inherit but are
not required. However, they do make the containers more interesting.

Optional functions:
-------------------
%^GREEN%^%^BOLD%^set_open_long(%^BLACK%^%^BOLD%^<string>%^GREEN%^%^BOLD%^);
%^GREEN%^%^BOLD%^set_closed_long(%^BLACK%^%^BOLD%^<string>%^GREEN%^%^BOLD%^);
         These two functions set strings that a player sees when he looks
         at your container. One for if its open. The other for if it's closed

%^GREEN%^%^BOLD%^set_possible_to_close(1);
	This makes the container closeable and openable.
	Note that the container is created open.  You have to call the function
	%^BLACK%^%^BOLD%^toggle_closed()%^RESET%^ in order to close it.

%^GREEN%^%^BOLD%^toggle_closed();
	This toggles the container that has been set closeable between
	open and closed.  If you want a container to start out closed, you have
	to call this either in the %^BLACK%^%^BOLD%^create()%^RESET%^ function or from the room which
	created the container.

%^GREEN%^%^BOLD%^toggle_lock();
        This function will toggle the BAG closed if its open and open if it is
         closed.

%^GREEN%^%^BOLD%^set_lock("locked");
	This function does 2 things.  First it makes the container lockable.
	Second, it sets the container at start either "locked" or "unlocked",
	depending upon which string you pass as an argument.

%^GREEN%^%^BOLD%^set_key("orc_treasure");
	This function sets the id of the object to be used in unlocking
	the container.  It should never be anything like "key", or
	"silver key", since you only want one key to open your lock.

%^GREEN%^%^BOLD%^set_property("magic hold", 10);
	This is something generally done by a magic spell cast by a player,
	but if you want to make the lock a little harder for a rogue to pick
	a lock, you set a value to this property.  When a rogue tries to pick
	a lock, this value simply is subtracted from the players locks skill,
	such that is the player has a 50 in locks, then the player has a
	40% chance of picking the lock instead of the normal 50% for that
	skill level.

==============================================================================

You may also call the following functions for if() tests on the BAG.
TO is used to represent this_object() in the tests below.

%^GREEN%^%^BOLD%^if(TO->is_bag())

        Use this test to determine if the object in question is in
        fact a BAG.

%^GREEN%^%^BOLD%^if(TO->query_locked())
        This tests to see if the BAG is locked or not.

%^GREEN%^%^BOLD%^if(TO->query_internal_encumbrance())
%^GREEN%^%^BOLD%^if(TO->query_max_internal_encumbrance())

        These two functions will allow you to check how
        much the container can hold and how much it is
        holding.

Signed,

Ironman
