[CF-Devel] Change in equip method.

David Hurst dnh at hawthorn.csse.monash.edu.au
Mon Jun 3 09:47:22 CDT 2002


>
     
      Currently, the type of object determines how man you can wear, and if you 
     
     >
     
      can wear it at all.  It is hard coded that you can wear 2 rings, 1 helmet, 
     
     >
     
      1 suit of armor, etc.  some of the flag_can_use_armor refine this in a very 
     
     >
     
      primitive way.
     
     
yeah it sucks..

>
     
      The change would basically modify equipable objects to specify whay body 
     
     >
     
      location (or equip location) they go on.  For example, helmets would have a 
     
     >
     
      line added like 'equip_location head', armor would have 'equip_location 
     
     >
     
      torso', rings 'equip_location finger', etc.  Objects could specify multiple 
     
     >
     
      locations - 'equip_location weapon_hand,shield_hand' could be used to allow 
     
     >
     
      2 handed weapons.
     
     
Before I go any further, i would like to point out (and yes this is
through experience) that a weapon arm and a shield arm are the same
thing. For example, florentine is the style whereby a fighter uses two
weapons. I know we have been over the problem of being able to equip two
weapons, but I think it worth pointing out, that perhaps just 'arm'
would be more useful in the long term =). I suppose it doesn't make a
great deal of difference (a player special florentine (sword master)
type character could be devised that maps shield arm to weapon arm but
in the interests of logic.... ).

>
     
      Internally, these verbal descriptions would get converted into a bitmask 
     
     >
     
      used in the object.  This imposes some limitations (can't have something 
     
     >
     
      like equip_location weapon_hand,weapon_hand' so say it should use 2 weapon 
     
     >
     
      hands). The advantage of using a bitmask for this is that it is small 
     
     >
     
      enough it can efficiently been sent to the client to make use of.
     
     
Why does this limit 2 handed weapons? I don't follow your logic, surely
having that equip location would block the use of the shield thus
behaving like a two hander?

>
     
      Now each monster would have a body type, like 'body_type humanoid' or 
     
     >
     
      'body_type quadriped' or whatever else. Descriptions for them might be like:
     
     
Would it be better to be able to use either format? or even just be able
to modify anything you want? for example if you want an ettin, its just
a humanoid with head: 2?

>
     
      humanoid:
     
     >
     
      head 1
     
     >
     
      torso 1
     
     >
     
      weapon_hand 1
     
     >
     
      shield_hand 1
     
     >
     
      finger 2
     
     >
     
      neck 1
     
     >
     
      feet 1
     
     >
     
      ...
     
     >
     
     
     >
     
       And the quadriped (horse or other 4 legged creature):
     
     >
     
     
     >
     
      feet 2
     
     >
     
      weapon_hand 0
     
     >
     
      shield_hand 0
     
     >
     
      ...
     
     >
     
     
     >
     
       This is where the semantic differnce of using body location vs 
     
     >
     
       equip_location comes in.  Saying a humanoid has 2 fingers and 1 feet isn't 
     
     >
     
      really right.  But it means that they are only allowed 2 fingers and 1 pair 
     
     >
     
      of boots.  If instead these are described as 'ring' and 'boot', it makes 
     
     >
     
      more sense.
     
     
yes, but it causes more confusion when using something which isn't
specifically called a 'boot'. You end up with items like sandles (boot)
which is what we currently have of course.

>
     
       As I type this, going with equipment type location may make more sense - 
     
     >
     
       you could add to the quadriped something like:
     
     >
     
     
     >
     
      barding 1
     
     >
     
     
     >
     
       Which means it really needs special armor.
     
     
cool. dragon_body 1, means it can wear that specially crafted dragon
suit made by the blacksmith in moria or something ;).

>
     
       Now the player/monsters will have a copy of the body_type information in 
     
     >
     
       the object structure in addition to the one in the archetype.  Whenever an 
     
     >
     
      object is equipped/unequipped, this copy information is added.
     
     >
     
     
     >
     
       So for example, when you equip something, the equip logic sees what flags 
     
     >
     
      (equip location) are set.  Then looks in the body_spaces information in the 
     
     >
     
      object to see if there are spaces available.  IF so, it applies the object, 
     
     >
     
      and updates teh body_spaces information.  If not, it unapplies the needed 
     
     >
     
      spaces if applicable.
     
     
coolness

>
     
       One thing this allows in addition to two handed weapons is further 
     
     >
     
       refinement for different races.  Eq, the fireborn could be set up with 
     
     >
     
      'rings 3 and amulets 2' to let them wear more of those protective devices 
     
     >
     
      since they can't wear anything else.  The Q should certainly be allowed to 
     
     >
     
      wear a shield, even if it can wear armor.  You could add ettin races, which 
     
     >
     
      let you were 2 helmets, etc.
     
     
yuppo, coolness

>
     
       Now, for things like religions or classes which prevent use of certain 
     
     >
     
       items, the logic there could add appropriate force objects that use up the 
     
     >
     
      slots for the objects.  Eg, a force for a god that doesn't allow weapon use 
     
     >
     
      would have something like 'equip_location weapon_hand'.  Force objects 
     
     >
     
      would be special in the sense that they bypass the normal equip logic and 
     
     >
     
      just use up the slots, so even if the race doesn't have a weapon_hand, the 
     
     >
     
      force will still be equipped.
     
     
good work around.

>
     
       Now the only really noticable aspect to this to players would be changing 
     
     >
     
       the range locations.  They current range location is really a leftover from 
     
     >
     
      long ago.  With this change, I would make it so there is only 1 range slot 
     
     >
     
      (which horns, bows, wands, skill tools, etc, would all vie for).  This 
     
     >
     
      simplifies the code a great deal on the server, and probably makes more 
     
     >
     
      sense anyway.
     
     
I know I certainly very rarely use range weapons. The only one I ever
use is the bow which gives str +1 and only for the bonus.

>
     
       I'm not sure how noticable this really would be to most people - I pretty 
     
     >
     
       much never use teh ability to rotate through the range of row slots - much 
     
     >
     
      easier to bind the actions to certain keys.
     
     >
     
     
     >
     
       Thoughts/suggestions?
     
     
Well summarised, I like my idea even more when you explain it ;).

One other interesting side effect is the ability for a client to
generate a 'body map' very easily. the DX/SDL clients already did this,
by mapping every item to an area, this is a rather yucky way to do it
(every new item breaks it, as in it does go in the right spot, or at
least that was my experience).

It may also be quite useful for the monster code, in that when you equip
a monster it is is more logical, or something.. not sure about this
point now ;).

I feel this is a very positive base change which allows alot easier
feature creation, a very important part of any game platform. I think it
will make alot of ideas suddenly become very viable, the most obvious
are special combo items that block other times, like a two handed
sword.. but i'm sure through time those clever map makers will devise
devious and creative uses for this code.

*tick* (the Darth_bob tick of approval ;))

dnh

    
    


More information about the crossfire mailing list