Home » Fable TLC » Discussion » Definition Editing » Need help modding Armor Ratings and Damage Reduction...
Need help modding Armor Ratings and Damage Reduction... [message #52373] 
Mon, 29 June 2009 15:34 
Drake1132
Messages: 4 Registered: June 2009




Hi Everyone,
So I'm trying to mod my Fable TLC so that I can have Archon armor stats on nonArchon armor items so that I can choose the look that I want. I'm also doing some texture recolor work for basically the same purpose. But I'm running into some trouble, due to confusion, with respect to adjusting Armor Ratings and I also would like to better understand the damage calculation formula that the game uses.
Now I've read through the following...
http://forums.projectego.net/guidechangingarmorrating350 4/page2/
http://fabletlcmod.com/wiki/doku.php?id=def_editing:amour_ty pes
http://fabletlcmod.com/forum/index.php?t=msg&goto=27378& amp;&srch=armor+rating
Thanks to the information from those sources I can find what to modify, but I'm confused about the values that I should be aiming for... The first link talks about modifying Armor Rating, but it gives the formula of <value>*384.5=AR where <value> is what you would enter in the ArmourPercentage section of the CAppearanceModifierDef. This gives us <desiredAR>/384.5=<value>, so using that formula you could take a desired AR value, such as 1000 and determine the ArmourPercentage value that would need to be entered into the CAppearanceModifierDef. But the problem is that that formula doesn't work. For example, for Villager armors (BOWERSTONE) the formula is actually <desiredAR>/500=<value> and for Chainmail armors the formula is <desiredAR>/833.3=<value>.
So I can theoretically figure out what the individual formulas should be for each armor set type by setting ArmorPercentage to 100 for one or more armor items from any given set, then use those formulas to get the desired AR that I actually want, but I don't want to do that sort of thing if I don't have to. Additionally, I'm not totally understanding if the CAppearanceModifierDef will actually change the armor rating used for damage calculations or if it is only cosmetic.
With those things in mind then, here is my question...
What is the damage calculation formula? Please use actual Fable Explorer def values and constants.
What I mean is that if the damage reduction aspect of the calculation is (DamageTypeResponse * ArmourPercentage), and let's say that I have an item with a DamageTypeResponse of 0.33 and an ArmorPercentage of 0.5, how would that apply to actual damage reduction? Does it create a percent modifier that the base damage is multiplied against, such as 0.165 so that actual damage taken is reduced to 16.5% (damage * 0.165) of the original, or does it create a reduction modifier so that damage is reduced by 16.5% (damage * (1  0.165)), or is it handled some other way?
If someone could please provide those sorts of specifics for me then I could plan out desired values based on desired damage reductions rather than trying to duplicate everything from the Archon armor set.
With respect to the listed damage calculation from the wiki, what does it mean when it says (Divided by 500) after the DamageTypeResponse value? How does that come into play in the full calculation for damage taken where damageTaken = baseDamage  damageReduction ? Does that mean that the equation is ((DamageTypeResponse / 500) * ArmourPercentage), or does it mean that the calculation is simply (DamageTypeReponse * ArmourPercentage) and the (Divided by 500) is a commentary on the DamageTypeResponse value?
I realize that I'm asking about something that has more or less been covered, but because of my confusion I need explicit clarification... a simple, straightforward equation without commentary in the equation, but with explanations and commentary following the equation is what I'm looking for... and please use symbols for mathematical operators instead of words ("*" instead of "times" or "multiplied by", "/" instead of "divided by", "+" instead of "plus", etc.). Also, I would like to see operation priority ordering explicitly indicated with parenthises, because something like X + Y * 10 can be interpreted as ((X + Y) * 10) or (X + (Y * 10)), and while the rules of math stipulate a normal/standard order, it's easier for me to understand if it is explicit, especially since I don't remember the standard order from math class (I think it's Parenthises, Exponents, Roots, Multiplication, Division, Addition, and lastly Subtraction, but I don't recall for sure).
Thnks in advance,
Drake





Re: Need help modding Armor Ratings and Damage Reduction... [message #52380 is a reply to message #52379] 
Mon, 29 June 2009 18:26 
jwc2200
Messages: 841 Registered: March 2008 Location: Texas

Administrator



Lots of stuff gets shared, just look around. I mean that the info you are talking about is so 'in depth' that few of us will even know about it. The few who might know are not as active, having moved on to other things I guess, or are so busy that something like this probably wouldn't be worth the time and effort it would take to teach someone, when there is nothing to be gained by it.
I could easily be wrong, OldBoy or JohnDoe may come on here and explain it all in 50 words or less, but I spent a while trying to figure it out and had no luck. Finally I realized that even if I had figured it out, it means nothing to the game or modding of the game. By all means, take all the time you want to on it, and if you figure it out please let me know.



Re: Need help modding Armor Ratings and Damage Reduction... [message #52385 is a reply to message #52373] 
Tue, 30 June 2009 00:57 
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




Re: Need help modding Armor Ratings and Damage Reduction... [message #52406 is a reply to message #52373] 
Tue, 30 June 2009 11:58 
Drake1132
Messages: 4 Registered: June 2009




Well, some of the sets do have vulnerabilities to certain damage types by default. For example, the naked set (any unmodified No Shirt, No Shoes, No Service areas) will take extra damage from melee and ranged weapons as well as from explosions, but will only take base damage from spells. Archon's armor is slightly vulnerable to lightning damage, as are Plate and Chainmail armors, and the crossdressing pieces (dress, corset, red wig, etc.) are vulnerable to melee damage. Everything else either takes base damage (modified by ArmourPercentage) or has protections.
But it is an interesting prospect to know that we can change protections and vulnerabilities individually. And since there are other ARMOUR sets, such as ARMOUR_JACK_OF_BLADES_ARMOUR or AROUMOUR_BALVERINE, this theoretically should mean that we could make monsters and npcs more or less vulnerable to specific attacks. So if, for example, you're like me and feel that the fights with Jack of Blades are too easy if you have max Lightning spells to use against him, then you could change his Lightning DamageTypeResponse to increase his protections.
I also might be able to learn more about the general damage calculation by setting DamageTypeResponse values to 1.0 and ArmourPercentage values to 0.0 in order to get a baseline for each armor set (which might be the same for all armor sets), and then change those DamageTypeResponse and ArmourPercentage values individually and see what changes are made, and then change them together to see again what changes are made... that might let me figure out at least something of the damage reduction calculation. But that's for a later time... right now I want to play
jwc2200 wrote on Tue, 30 June 2009 01:15  Glad to see someone who wants to do more than make a sword that does a million damage.

Yeah, I used to be like that with games about ten years ago... anytime I modded or used cheats or trainers or whatever it was to make myself more powerful... then I started to realize that I enjoyed the games substantially less if they were easy, so I started getting in the habit of making only minor changes to reduce frustration or to make cosmetic adjustments because I didn't like a particular texture or whatever. And that's what I'm looking to do here as well is to simply be able to have the "best" armor in the game with respect to stats but look the way I want to look.
Drake
[Updated on: Tue, 30 June 2009 12:10] Report message to a moderator



Goto Forum:
Current Time: Sun May 24 16:19:29 PDT 2020
Total time taken to generate the page: 0.01092 seconds
