Fable: The Lost Chapters Mod Scene
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Fable TLC » Discussion » Definition Editing » Need help modding Armor Ratings and Damage Reduction...
Re: Need help modding Armor Ratings and Damage Reduction... [message #52385 is a reply to message #52373] Tue, 30 June 2009 00:57 Go to previous messageGo to previous message
Drake1132
Messages: 4
Registered: June 2009
Well I've done some poking around and some trial and error number changes, and while I can't say I know how the damage calculation works, I can say that I've figured out at least a fair bit about how Armor and Armor Ratings work. Here's what I've learned so far...

1. game.bin -> ARMOUR -> ARMOUR_HERO_<armorSetType> contains DamageTypeResponse values for each of 7 or more different possible damage sources. These values are given as float data types (decimal numbers) and *seem* to be used as a value for DamageReduction such that the amount of damage taken is equal to (baseDamage * DamageTypeResponse) where the DamageTypeResponse used is the one that applies to the source damage type, so a value of 0.25 in the second entry (array index 1) would indicate that melee damage is reduced to 25% of base damage. Smaller values equal greater protections.

2. One of those values (I haven't tried to figure out which yet) will also impact the listed Armor Rating for items that link to this armor type (linked via CAppearanceModifierDef -> ArmourDefIndex), such that cutting the DamageTypeResponse value in half will double the Armor Rating reported for the items linked to the armor set type.

3. The values given by default in CAppearanceModifierDef -> ArmourPercentage are standard for a single armor location... that is, all Boots from all armor sets have an ArmourPercentage value of 0.05, and all Trouser armor pieces have a value of 0.35, while all Shirt pieces have a value of 0.4, etc.

4. Changing the ArmourPercentage values for an item will change Armor Ratings for that single item, while changing DamageTypeResponse values will change Armor Ratings for every item that is linked to that class of armor. As with DamageTypeResponse values, these values are given as float data types, but rahter than smaller numbers being better, larger numbers are better.

This means that Armor Ratings and DamageReduction are aparently based on both values, though I'm still not sure what the interaction is between the two. Additionally, if someone wanted to make an a particular set of armor more vulnerable to a particular damage type, they could do that. For example, one could make all Plate armor highly vulnerable to Lightning damage (on the premise that metal armor would increase Lightning damage rather than decrease it) by adjusting the third array index to a value greater than 1.0 (some armor types already have these sorts of vulnerabilities built in by default).

So then, in order to do what I want, that is, in order to change the protection values of certain items to be identical to those of Archon's Battle Armor, all I really have to do is change the linked ArmourDefIndex value in CAppearanceModifierDef from its default value to 411 so that it links armor protections to the Archon class of armor rather than the original class of armor. This makes it so that a full and complete understanding of the damage and damage reduction calculations isn't actually necessary, so my original questions become academic (though they could perhaps be useful to others who want to create new and totally customized items).


I'd still like more information on actual formulas for damage and damage reduction, just because I have a curious mind and I like to know how things work, but for now, I can do what I want.

Drake
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Playing w/ Spells
Next Topic: How to Spawn Using Only FE
Goto Forum:
  


Current Time: Sun Apr 28 11:41:29 PDT 2024

Total time taken to generate the page: 0.01139 seconds