=== The #OBJECT block

Last modified by Samson, Dec. 25, 2006

Objects add life to an otherwise boring place. Afterall, people came to this place to loot!
A well constructed area should have several objects available in it. Whether they are available
as loot, used by the Mobiles in the area, or just purely decorative, is entirely up to you.

You may have as many objects as you like, within the assigned vnum range of the area.
They can be placed in any order you wish in the file, but each section must obey the syntax.

The syntax of an #OBJECT block is:

#OBJECT
-------
String literal. This is required to mark the beginning of an object block.

Vnum         <#>
----------------
An integer value > 0. This value must fall within the range assigned to the builder who owns this area, or in the event
that this area is installed, it must fall within the vnum range specified in the #AREAHEADER section of the file.

Keywords     <string>~
----------------------
A set of words which will be used to interact with this object. They can be practically anything you want, but they
should also make sense. The use of color codes in keywords is inadvisable since it will not be obvious to players.

Type         <string>~
----------------------
The typoe of object this instance represents.
Choose from the following table:

   "NONE", "light", "scroll", "wand", "staff", "weapon", "scabbard",
   "treasure", "armor", "potion", "clothing", "furniture", "trash",
   "container", "drinkcon", "key", "food", "money", "pen", "boat",
   "corpse", "corpse_pc", "fountain", "pill", "blood", "bloodstain",
   "scraps", "pipe", "herbcon", "herb", "incense", "fire", "book", "switch",
   "lever", "pullchain", "button", "dial", "rune", "runepouch", "match", "trap",
   "map", "portal", "paper", "tinder", "lockpick", "spike", "disease", "oil",
   "fuel", "piece", "tree", "missileweapon", "projectile", "quiver", "shovel",
   "salve", "cook", "keyring", "odor", "campgear", "drinkmix", "instrument", "ore"

The "none" type is a placeholder and probably should not be used for anything.
( Be aware that not all of the item types are working )

Short        <string>~
----------------------
The one or two word "name" this object is displayed as in inventory and equipment lists.

Long         <string>~
----------------------
The long-description is the description used when a character walks in the
room and the object is visible.

Action       <string>~
----------------------
A message this object should display when used or otherwise activated.
This feature is not fully supported.

Flags        <string>~
----------------------
A space separated list of flags this object has.
Choose from the following table:

FLAG NAME       | DESCRIPTION
----------------------------------------------------------------------
glow            | Item glows.
hum             | Item makes noise, thieves can't sneak.
metal           | Item has +20% resistance to damage. ( metallic composition )
mineral	        | Currently inactive.
loyal           | Item returns to PC when disarmed (PK only).
organic         | Item has +20% suceptibility to damage.
invis           | Item cannot be seen without detect invisible.
magic           | Item is magical, cannot be enchanted.
nodrop          | Item cannot be dropped, is cursed.
bless           | Item has +20% resistance to damage. ( magical resistance )
antigood        | Item cannot be used by Good alignment. (>+350)
antievil        | Item cannot be used by Evil alignment. (<-350)
antineutral     | Item cannot be used by Neutral alignment (-350 to +350)
anticleric      | Item cannot be used by clerics.
antimage        | Item cannot be used by mages.
antirogue       | Item cannot be used by rogues.
antiwarrior     | Item cannot be used by warriors.
antibard        | Item cannot be used by bards.
antidruid       | Item cannot be used by druids.
noremove        | Item cannot be removed when worn, is cursed.
twohand         | Item requires two hand to use it.
dark            | Currently this flag does nothing.
evil            | Item will glow red with detect evil spell.
donation        | Prevents "get all" when item is a container.
hidden          | Item is hidden, need search skill to locate it.
poisoned        | Item has poison damage.
covering        | Item is able to cover other items (see 'help layers' in game)
deathrot        | Item disappears when owner dies.
buried          | Item is underground, and needs to be dug up.
proto           | Item is a prototype. Used only by OLC system.
nolocate        | Item cannot be located using the locate object spell.
groundrot       | Item rots when on the ground.
antimonk        | Item cannot be used by monks.
brittle         | Item breaks easily.
resistant       | Item has a +20% natural resistance to damage.
immune          | Currently inactive.
antimen	        | Item cannot be used by males.
antiwomen       | Item cannot be used by females.
antineuter      | Item cannot be used by neuters.
antiherma       | Item cannot be used by hermaphrodytes.
antisun         | Currently inactive.
antiranger      | Item cannot be used by rangers.
antipaladin     | Item cannot be used by paladins.
antinecro       | Item cannot be used by necromancers.
antiapal        | Item cannot be used by antipaladins.
onlycleric      | Item can only be used by clerics.
onlymage        | Item can only be used by mages.
onlyrogue       | Item can only be used by rogues.
onlywarrior     | Item can only be used by warriors.
onlybard        | Item can only be used by bards.
onlydruid       | Item can only be used by druids.
onlymonk        | Item can only be used by monks.
onlyranger      | Item can only be used by rangers.
onlypaladin     | Item can only be used by paladins.
onlynecro       | Item can only be used by necromancers.
onlyapal        | Item can only be used by antipaladins.
personal        | A personal item. Must also set the item's owner to use this.
sindhae         | A Sindhae prize item.
mustmount       | Item can only be used while mounted.
noauction       | Item cannot be auctioned.
thrown          | Item is classified as a throwable.

WFlags       <string>~
----------------------
A space separated list of body locations the object can be worn on.
Choose from the following table:

FLAG NAME       | DESCRIPTION
----------------------------------------------------------------------
take            | Item can be picked up by players.
finger          | Worn on fingers (2 slots)
neck            | Worn on neck    (2 slots)
body            | Worn on the body
head            | Worn on the head
legs            | Worn on the legs
feet            | Worn on the feet
hands           | Worn on the hands
arms            | Worn on the arms
shield          | Used as a shield
about           | Worn about the body
waist           | Worn on the waist
wrist           | Worn on the wrists (2 slots)
wield           | Used as a weapon
hold            | Item is held in hand
throw           | Item can be thrown (no code support yet)
dual            | Weapon can be dual wielded
ears            | Worn on the ears
eyes            | Worn over the eyes
missile         | Weapon is a missile shooter
back            | Worn on the back
face            | Worn on the face
ankle           | Worn on the ankle (2 slots)

Values         <#0> <#1> <#2> <#3> <#4> <#5> <#6> <#7> <#8> <#9> <#10>
----------------------------------------------------------------------
Object values which determine characteristics of the object when applied.
Each value has meaning based on what object type is being affected, and not
all objects require all 11 values to be specified. Due to how the code works
the values begin counting up from 0, so value[0] is valid.

If there are unused values listed prior to a used value, those unused slots
need to be occupied with zeros. 

A value listed as "sn #" requires a slot number from the game's spell tables.
These values are covered in the Values.txt file. A 0 or negative number in these
types of positions means no spell is applied.

Choose the values based on the following table:

Item type: light
   value[0] unused
   value[1] unused
   value[2] hours of light available, 0 is dead, -1 is infinite

Item type: scroll
   value[0] level
   value[1] sn 1
   value[2] sn 2
   value[3] sn 3

Item type: wand
   value[0] level
   value[1] max charges
   value[2] current charges
   value[3] sn

Item type: staff
   value[0] level
   value[1] max charges
   value[2] current charges
   value[3] sn

Item type: weapon/missileweapon
   value[0] base condition
   value[1] number dice	  v1 and v2 are optional and will be
   value[2] size dice	  autogenerated if set to 0
   value[3] damage type ( Not relevant to missile weapons ):
      01 slash
      02 stab
      03 hack
      04 crush
      05 lash
      06 pierce
      07 thrust
   value[4] weapon skill:
      00 barehand
      01 sword
      02 dagger
      03 whip
      04 talon ( talonous arms )
      05 mace ( includes hammers )
      06 archery ( bows and crossbows )
      07 blowgun ( missileweapon )
      08 sling ( missileweapon )
      09 axe
      10 spear
      11 staff
   value[5] projectile type ( for missile weapons only ):
	( Determines the type of projectile this weapon can fire )
	00 bolt
	01 arrow
	02 dart
	03 stone
   value[6] current condition
   value[7] available rune/gem sockets

   The following 3 settings override most of the above. See Itemgen.txt for details.
   value[8] Weapon type
   value[9] Weapon material
   value[10] Weapon quality

Item type: projectile
   value[0] base condition
   value[1] number dice	  v1 and v2 are optional and will be
   value[2] size dice	  autogenerated if set to 0
   value[3] damage type:
      01 slash
      02 stab
      03 hack
      04 crush
      05 lash
      06 pierce
      07 thrust
   value[4] projectile type:
      00 bolt
      01 arrow
      02 dart
      03 stone
   value[5] current condition

Item type: treasure ( This type uses no values )

Item type: armor
   value[0] AC adjust/current condition
   value[1] Original AC
   value[2] available rune/gem sockets

   The v3 and v4 settings override much. See Itemgen.txt for details.
   value[3] Armor type
   value[4] Armor material

Item type: potion
   value[0] level
   value[1] sn 1
   value[2] sn 2
   value[3] sn 3

Item type: furniture
   value[0]  unused
   value[1]  unused
   value[2]  See below. Add the BV values to get the value of value[2].

FLAG     -     BV  - DESCRIPTION
------------------------------------------------------------
NORMAL   -       0 - Just a regular piece of furniture.
SIT_ON   -       1 - Can be sat on.
SIT_IN   -       2 - Can be sat in.
SIT_AT   -       4 - Can be sat at.
STAND_ON -       8 - Can be stood on.
STAND_IN -      16 - Can be stood in.
STAND_AT -      32 - Can be stood at.
SLEEP_ON -      64 - Can be slept on.
SLEEP_IN -     128 - Can be slept in.
SLEEP_AT -     256 - Can be slept at.
REST_ON  -     512 - Can be rested on.
REST_IN  -    1024 - Can be rested in.
REST_AT  -    2048 - Can be rested at.

Item type: trash ( This type uses no values )

Item type: container
   value[0] weight capacity
   value[1] flags: 1 closeable, 2 pickproof, 4 closed, 8 locked, 16 eatkey
   value[2] key vnum
   value[3] durability
   value[4] unused
   value[5] identifies matching key on value[5] of a key.
		If these values do not match, the key will not open the lock.
		Primarily used with the camping system to safeguard the strongbox.

Item type: drinkcon
   value[0] capacity
   value[1] current quantity
   value[2] liquid number (see 'liquids table' in values.txt)
   value[3] if non-zero, drink is poisoned

Item type: key
   value[0] unused
   value[1] unused
   value[2] unused
   value[3] unused
   value[4] Number of retries before key breaks if used in wrong lock.
   value[5] identifies matching lock on value[5] of a container.
		If these values do not match, the key will not open the lock.
	
Item type: food
   value[0] hours of food value
   value[1] (condition)
   value[2] unused
   value[3] if non-zero, food is poisoned

Item type: money
   value[0] value in gold pieces

Item type: boat ( This type uses no values )

Item type: fountain
   value[0] unused
   value[1] Number of drinks (any value = infinite )

Item type: pill
   value[0] level of spells
   value[1] sn 1
   value[2] sn 2
   value[3] sn 3

Item type: switch
   value[0] flags
   value[1] vnum or sn
   value[2] vnum
   value[3] vnum/value
   ( See lever flags in values.txt for switches, levers, pullchains, and buttons )

Item type: lever
   value[0] flags
   value[1] vnum or sn
   value[2] vnum
   value[3] vnum/value

Item type: pullchain
   value[0] flags
   value[1] vnum or sn
   value[2] vnum
   value[3] vnum/value

Item type: button
   value[0] flags
   value[1] vnum or sn
   value[2] vnum
   value[3] vnum/value

Item type: dial
   value[0] flags
   value[1] vnum or sn
   value[2] vnum
   value[3] vnum/value

Item type: trap
   value[0] charges
   value[1] type
   value[2] level
   value[3] flags ( See Trap Flags and types in values.txt )
   value[4] minimum damage
   value[5] maximum damage

Item type: campgear
   value[0] Type of camping gear:
     1 - Bedroll. Used to sleep on while camped.
     2 - Gear. Miscelaneous things such as utensils etc.
     3 - Firewood. Required to light the campfire.

Item type: ore
   value[0] Type of ore material:
     1 - Iron
     2 - Gold
     3 - Silver
     4 - Adamantine
     5 - Mithril
     6 - Blackmite*
     7 - Steel
     8 - Bronze
     9 - Titanium
    10 - Dwarven Steel
    11 - Elven Steel

     * - Magical ore found only in Arthmoor's palace.

   value[1] Purity of the ore from 1-100%, affects cost/skill roll for forging weapons and armor.

Item type: piece
   value[0] Vnum of other half of the object.
   value[1] Vnum of the combined object.

Stats       <#1> <#2> <#3> <#4> <#5> <string1> <string2> <string3>
---------------------------------------------------------------
Other statistics which affect this object.

#1 = Weight. How much this object weighs in pounds.
#2 = Cost. What this object costs in gold pieces.
#3 = Ego. The relative power or personality this item holds, usually calculated automatically.
#4 = Limit. The hard limit of how many copies of this object are allowed to exist in play.
     This limit is enforced even with players who are logged off if the item's "ego" value
     is over 25. For non-limited items, specify 9999 here.
#5 = Layers. The layer number this object operates in.
     Code for this is not working properly so this could be unpredictable.
String1, String2, and String3 are for socketed items.
If this item is not intended to be socketed when it loads, then all three of these values
should read "None". See Runes.txt for more information on rune names and socketed items.

Affect      <Format varies>
---------------------------
Affects will be listed based on location, types, and other data associated with them.
These are best left to handle via the OLC as the format is different depending on the
location of the particular affect. An object can have as many affect sections as are
appropriate, but should be kept within reason or the object could be overbalanced.

Spells      '<string>' '<string>' '<string>'
--------------------------------------------
Spell names are added based on the object type.

A pill, potion or scroll should contain 3 strings. Specify "none" if one or more need to be left empty.
A staff or wand uses only the first string. Extras will be ignored.
A salve uses the first two slots. The third is ignored.

The single quotes around the spell names re required.

#EXDESC
#ENDEXDESC
----------
See the Misc.txt file for the format of Extra Description blocks. These are optional.

#MUDPROG
#ENDPROG
--------------
See the Misc.txt file for the format of Mudprog blocks. These are optional.

#ENDOBJECT
----------
String literal. This ending tag is required to mark the end of an #OBJECT block.
If it is left out, the file will be assumed to be corrupt.

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

An example of a completed object follows:

#OBJECT
Vnum      11028
Keywords  firewood pile twigs~
Type      tinder~
Short     Some dry twigs and firewood~
Long      A pile of dry twigs lies in a heap.~
WFlags    take~
Values    3 0 0 0 0 0 0 0 0 0 0
Stats     2 0 50 9999 0 None None None
#EXDESC
ExDescKey    firewood pile twigs~
ExDesc       A rather unimpressive heap of dry twigs and leaves. It appears to be
useful if you wanted to start a fire going.
 
To build a fire, follow the steps below:
1) Drop the firewood onto the ground where you want to build the fire.
2) Say "strike flint" to strike the tinder with some small flint stone.
3) Enjoy the warmth and light of your newly built fire.
~
#ENDEXDESC

#MUDPROG
Progtype  speech_prog~
Arglist   p strike flint~
Comlist   mpechoat 0.$n You strike the tinder with the flint and sparks fly...
mpechoat 0.$n The twigs catch fire and soon, you have a fire cackling.
mpechoat 0.$n The tinder and flint is consumed in building the fire.
mpoload 11002
mposet fire timer 15
mppurge firewood-pile-twigs
~
#ENDPROG

#ENDOBJECT

This completes an #OBJECT block.
Refer to Rooms.txt to continue building your area file.
