Author Topic: armor_types.h  (Read 7682 times)

Offline foxtwo

  • Acquaintance
  • *
  • Posts: 0
    • View Profile
armor_types.h
« on: September 11, 2006, 10:33:18 AM »

#ifndef __ARMOR_TYPES_H__

#define __ARMOR_TYPES_H__



#define A_RING              (1 << 1)

#define A_GLOVE             (1 << 2)

#define A_LONG_GLOVE        (1 << 3)

#define A_BOOT              (1 << 4)

#define A_LONG_BOOT         (1 << 5)

#define A_SOCK              (1 << 6)

#define A_LONG_SOCK         (1 << 7)

#define A_HELMET            (1 << 8)

#define A_VISOR             (1 << 9)

#define A_PANTS             (1 << 10)

#define A_BELT              (1 << 11)

#define A_SHIRT             (1 << 12)

#define A_CLOAK             (1 << 13)

#define A_VEST              (1 << 14)

#define A_WEAPON            (1 << 15)

#define A_SHIELD            (1 << 16)

#define A_ARMOR             (1 << 17)

#define A_AMULET            (1 << 18)

#define A_COLLAR            (1 << 19)

#define A_EARRING           (1 << 20)

#define A_SHEATH            (1 << 21)

#define A_PACK              (1 << 22)

#define A_BRACELET          (1 << 23)

#define A_BODY_ARMOR        (1 << 24)



#define A_MAX_ARMOR_BIT    A_BODY_ARMOR



#endif /* __ARMOR_TYPES_H__ */


Offline foxtwo

  • Acquaintance
  • *
  • Posts: 0
    • View Profile
armor_types.h
« Reply #1 on: September 11, 2006, 10:37:08 AM »

RACE ewok

PLAYER_RACE 0

SENSITIVITY 25:75

LANGUAGE Ewokish

SKILL psionic defense:2:3:4:5

STATS agility:33:3

STATS charisma:33:2

STATS coordination:33:2

STATS durability:30:4

STATS intelligence:50:1

STATS luck:10:3

STATS speed:20:3

STATS strength:10:4

STATS wisdom:50:3

LIMB torso:0:1:A_SHIRT,A_CLOAK,A_VEST,A_SHIELD,A_ARMOR,A_BODY_ARMOR,A_BELT,A_AMULET,A_PACK

LIMB neck:torso:1:A_COLLAR,A_AMULET

LIMB head:neck:1:A_HELMET,A_VISOR,A_AMULET

LIMG ears:head:5:A_EARRING

LIMB right leg:torso:2:A_LONG_BOOT,A_LONG_SOCK,A_PANTS,A_BODY_ARMOR

LIMB left leg:torso:2:A_LONG_BOOT,A_LONG_SOCK,A_PANTS,A_BODY_ARMOR

LIMB right foot:right leg:4:A_BOOT,A_LONG_BOOT,A_SOCK,A_LONG_SOCK

LIMB left foot:left leg:4:A_BOOT,A_LONG_BOOT,A_SOCK,A_LONG_SOCK

LIMB right arm:torso:2:A_LONG_GLOVE,A_SHIELD,A_CLOAK,A_ARMOR,A_BODY_ARMOR,A_BRACELET

LIMB left arm:torso:2:A_LONG_GLOVE,A_SHIELD,A_CLOAK,A_ARMOR,A_BODY_ARMOR,A_BRACELET

LIMB right hand:right arm:4:A_RING,A_GLOVE,A_LONG_GLOVE,A_WEAPON,A_SHIELD

LIMB left hand:left arm:4:A_RING,A_GLOVE,A_LONG_GLOVE,A_WEAPON,A_SHIELD

HAND right hand:5

HAND left hand:5


Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
armor_types.h
« Reply #2 on: September 11, 2006, 10:43:01 AM »

This is a valid armor_types file, but because you've

changed things around, it's important to remove and add

all races, so that the races daemon understands what to do with

armor slots.

The commands are:



removeraces

addraces



This will set all the races to re-read their config files and

the races daemon will recalculate which slots do what.



Offline dhavid

  • Acquaintance
  • *
  • Posts: 2
    • View Profile
armor_types.h
« Reply #3 on: September 27, 2006, 02:03:55 PM »

Is there a limit to the number of body slots that can be used?  Also, is the order of the body slots important (i.e. Does A_BODY_ARMOR have to be last in the list?)



Here's an example of something I was working on about a year ago, but haven't touched very much in the last 6-8 months.  I'm trying to re-incarnate it, but I forgot a lot of the stuff I was doing back then.



Right now, there are numerous limbs which each have the ability to carry multiple body slot items.  I want to change this around a bit and can't decide the easiest way to go about it.



What I want:  14 body slots like Wrists, Ankles, Waist, Neck, etc. which can only hold one piece of gear on each slot.  For example, "gem studded ankleguards" would only go on the Ankles, etc.  



I don't care if I put all the pieces of gear on one limb (i.e. torso holds all 14) and simply keep the remainder of the limbs functional as to not break code, but make damage not affect them at all.  



I was also thinking that I can make 14 limbs each named the same (or similar) to the body slot so that there would be a limb named Elbows, then a body slot named Elbows which only attaches to the Elbows limb.  I'd have to add in some damage calls to get all limbs receiving damage and providing armor protection, but if that's the best way to go, I'd do that.



I don't need the most robust, feature-rich method, just a simple method for 14-15 body slots, each taking one piece of equipment each, and each adding into the total AC of the character.



As a side note, the mud will be 12-20 races deep, each with different abilities and statistics, but each with EXACTLY THE SAME body slots.



Any suggestions on a path to take would be greatly appreciated, and if somebody has a demo mud with something similar already in production or open, let me know and I'll check it out.



Thanks in advance,



-Dhavid


Offline cratylus

  • Your favorite and best
  • Administrator
  • ***
  • Posts: 1020
  • Cratylus@Dead Souls <ds> np
    • View Profile
    • About Cratylus
armor_types.h
« Reply #4 on: September 27, 2006, 02:13:12 PM »

Currently the max number of armor types you can use is 32. This is

because armor slots are in fact bit shifted registers, and the standard

build of the DS MudOS driver is 32 bit.



You could exceed that limit by developing an armor system

that does not use bit shifting, or you could try to compile your

driver in 64 bit mode.



Both procedures (for DS) are undocumented. There may

be docs out there on compiling MudOS in 64 bit mode, but

if so, I'm unaware of them.