[Crossfire-wiki] [Crossfire DokuWiki] page changed: dev:objects

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Fri Dec 1 07:39:33 CST 2006


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2006/12/01 07:39
User        : ryo
Edit Summary: format

@@ -791,8 +791,9 @@
  Note: The enforcement of item power is currently not in use as of this
  writing (Aug 2002).  Further refinement is needed on the power rating
  for items.  However, if you are creating a new magic item, setting
  an appropriate item_power would save work later on. FIXME it's in use, no?
+ 
  
  ===== Body Location =====
  
  The body locations information determines where the item is equipped onto
@@ -811,52 +812,52 @@
  Thus something that has body_neck -1 and body_head -1 means that both the
  head an neck must be available.
  
  Currently defined list of locations:
- load/save name	 # for humans	What object types use it
- body_range		1	Rod, horn, wand
- body_arm		2	bows (2), weapon, shield
- body_torso		1	armour
- body_head		1	helmet
- body_neck		1	amulet
- body_skill		1	skills (holy symbols, talismen, lockpicks,
- 					writing pens)
- body_finger		2	rings
- body_shoulder		1	cloak
- body_foot		2	boots
- body_hand		2	gloves
- body_wrist		2	bracers
- body_waist		1	girdle
  
- Using body locations:
- Using this information is quite easy - for objects, just add the approprate
+ ^ load/save name	^ # for humans	^ What object types use it ^
+ | body_range		| 1	| Rod, horn, wand |
+ | body_arm		| 2	| bows (2), weapon, shield |
+ | body_torso		| 1	| armour |
+ | body_head		| 1	| helmet |
+ | body_neck		| 1	| amulet |
+ | body_skill		| 1	| skills (holy symbols, talisman, lockpicks, writing pens) |
+ | body_finger		| 2	| rings |
+ | body_shoulder		| 1	| cloak |
+ | body_foot		| 2	| boots |
+ | body_hand		| 2	| gloves |
+ | body_wrist		| 2	| bracers |
+ | body_waist		| 1	| girdle |
+ 
+ ==== Using body information ====
+ 
+ Using this information is quite easy - for objects, just add the appropriate
  body_.. with a negative value.  For monsters, put those in with a positive
- value.  If a monster has a location to use an object, is is presumed in the
+ value.  If a monster has a location to use an object, it is presumed in the
  code that the monster should pick up/equip objects into that location.
  Thus, setting these for monsters may not really match what they have,
  eg, kobolds have arms, but it is still set to 0 so that they won't equip
  things.  The above information largely replaces the CAN_USE information.
  
  Note that the unqualified names above only refer to human locations.  New
  locations for dragons or other creatures can easily be added.
  
- Adding body locations:
+ ==== Adding body locations ====
  
  The steps for adding a body location is as follows:
- 1) Update the table above for documentation purposes.
- 2) Update the NUM_BODY_LOCATIONS in include/object.h.
- 3) Update the body_locations structure in common/item.c.  Be sure to read
-    the comments above the structure.
- 4) recompile
- 5) create some items that use these new locations.
+   - Update the table above for documentation purposes.
+   - Update the NUM_BODY_LOCATIONS in include/object.h.
+   - Update the body_locations structure in common/item.c.  Be sure to read the comments above the structure.
+   - recompile
+   - create some items that use these new locations.
  
  Note that most the code itself sees all this as abstract - it doesn't know
  what goes in what location, or even what each location is called.
  However, a few bits do care - the skill stuff checks to see if you have
  any arms free - thus, BODY_ARMS is defined so we know if the player
  does or does not.  The alternative to this would be to have the
  skill stuff do a strcmp, but then we are defining the name - easier
- to just presume that the location won't change in teh body_locations
+ to just presume that the location won't change in the body_locations
  table - there is no reason that it should.
  
  ===== Meaning of certain attributes for certain items =====
  


IP-Address  : 213.174.127.3
Old Revision: http://wiki.metalforge.net/doku.php/dev:objects?rev=1164980000
New Revision: http://wiki.metalforge.net/doku.php/dev:objects

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list