Ok, going through various weapons reveals the following common fields. There may be a few additional special ones for magical weapons and artifacts. 1 Item number 2 Item type (obj_t_weapon) 3 size (size_tiny, size_small, size_medium, size_large) 4 material (mat_wood, mat_metal) 5 "numeric variable" - probably some figure denoting general weapon group (blades, axes, polearms) 6 "numeric variable" - usually is in the range of 10000+... reference to picture of weapon?? 7 magic - denotes whether item is magical (OIF_IS_MAGICAL) 8 no loot - denotes whether item can be picked up? (OIF_NO_LOOT) 9 no NPC pickup - denotes whether NPC can loot item? (OIF_NO_NPC_PICKUP) 10 "numeric variable" - some kind of grouping system. Don't have a clue as to what it does. EDIT: This field denotes item weight (Thanks to Liquid Damage for finding it out!) 11 price - price of item, MW adds 30000, +1 adds 230000, +2 adds 830000, +3 adds 1830000 12 "numeric variable" - reference to picture of weapon??? 13 special variable - this variable seems to appears only when item is magical. Use? 14 equipable slot - OIF_WEAR_WEAPON_PRIMARY OIF_WEAR_WEAPON_SECONDARY, OIF_WEAR_WEAPON_PRIMARY, OIF_WEAR_2HAND_REQUIRED. 15 type of 2handed - OWF_TWO_HANDED, OWF_RANGED_WEAPON 16 "numeric variable" - this variable seems to appear only on a ranged/throwable weapon. Perhaps this denotes 'range increment' which indicates the distance in feet that you can use a ranged weapon without suffering a -2 attack penalty. 17 "string variable" - this variable denotes corresponding projectile?? arrow/bolt/throwing_axe, etc... 18 crit multiplier - axes and polearms get 3, heavy picks and scythes get 4, default seems to be 2 19 damage type - slashing/piercing/bludgeoning 20 damage dice - 1d4/1d6/1d8/1d10/1d12/2d4/2d6... etc... 21 weapon class - Longsword, Warhammer, light_hammer, Club... etc... 22 crit range - default is 20?? 19 for swords, 18 for rapiers/scimitars, 19-20 for Great Cleaver?? Does not seem to be working properly 23 to hit bonus - 1 0, 2 0, 3 0 24 damage bonus - 1 0, 2 0, 3 0 (sometimes to hit and damage bonuses are written as Weapon Enhancement Bonus X, where X=1,2,3) 25 Weapon Masterwork 26 miscellaneous fields for special powers For example: Weapon Frost 0 0 Elemental Resistance per round Fire 10 Weapon Flame tongue 0 1 I'm not sure how "reach" is encoded here. Perhaps field 10. But it doesn't quite fit. EDIT: Here's Field 10 just for interest: 1 Dagger 2 Light Hammer, Shortsword, Rapier 3 Club, Shortspear, Spear, Handaxe, Single Axe 4 Light mace, Quarterstaff, Longsword, Scimitar 5 Warhammer 6 Heavy Pick, Bastard Sword, Gnome hooked hammer 7 - 8 Heavy Mace, Greatclub, Greatsword, Dwarven Waraxe 9 Longspear 10 Heavy Flail, Glaive, Scythe, Spiked Chain 11 - 12 Greataxe, Guisarme, Ranseur Can't pick out anything in common here and am utterly stumped. Looking at the reach weapons: Glaive, Guisarme, Ranseur, Spiked Chain, Longspear reveals little in common. I hope I've not missed something dreadfully obvious. I also hope it's not something hard coded... I would like to compare and consolidate this list of fields with the existing one at: http://www.co8.org/forum/showthread.php?threadid=98 EDIT: There are a few other characteristics apart from reach which I am trying to link with fields: 1)Finessable 2)Light 3)Simple/Martial/Exotic I don't think I can firmly link any of the above at present to a particular field. Any help/comment/correction is very welcome indeed.
Thanks for all the documentation of the fields. I'm guessing the weapon types have range individually recorded. I'm going to try to make a 2 handed sword with weapon type = glaive and see if it has a 10' range.
Doh. <slaps self on the head> So it was something obvious after all. Thanks for chipping in. Perhaps reach, finessable and light are all hardcoded qualities for each individual weapon. Any ideas?
changing weapon type *Wouldn't that change the required feat for proficiency, focus, specialisation as well? * Yes it most certainly would. Just trying to see whether the reach is a property of weapon class or something else. Take a shortsword, change only its weapon class to a polearm in protos, and see if it suddenly becomes a reach weapon. If it does, its hardcoded in the weapon class, as is weapon focus etc. If not, its somewhere else. I'll give this a try when I'm off work.
results Forgot to post my results. Changes a longsword to have longspear as weapon type. This changes it to a reach weapon. It also changes the animation to thrust. SO both of these variables seem to be linked to weapon type, since nothing else about the sword changed.