View Single Post
rob
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 8,232

Old January 20th, 2011, 03:13 PM
Quote:
Originally Posted by Adammar View Post
Is there a way to make a racial feature that would add an additive +1 to armour? What I was able to get seems to give a +1 armour but when I equip Leather it doesn't add.
The standard mechanism for armor does NOT stack, which is why you're not gaining the bonus. If you want armor that DOES stack, you'll need to bypass the built-in mechanism for armor and handle the bonus separately. There are four fields on the hero associated with armor - one for each location. If you apply the bonus directly to these fields, it will bypass the armor mechanism and stack.

The four fields you'll need to modify are on the hero and named "acDefTorso", "acDefHead", "acDefArms", and "acDefLegs". If you want the natural armor to stack in all four locations, you'll need the following lines of script:

Code:
herofield[acDefTorso].value += 1
herofield[acDefHead].value += 1
herofield[acDefArms].value += 1
herofield[acDefLegs].value += 1
The armor is processed at a timing of PreTraits/5000 to assign the proper defense ratings. The defense rating is used at PreTraits/6000 to determine the hero's Toughness adjustment. So the above lines of code will need to be executed between those two timings. If you schedule your Eval script for your race to occur at PreTraits/5500, you ought to be able to achieve the results you're seeking.
rob is offline   #4 Reply With Quote