Armor Rating on Pets

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

Armor Rating on Pets

Post by Devlin »

I'm updating the wiki and I'm curious as to the exact effects of armor rating on pets. All I could find is what I put on the wiki and an old thread that had people chatting on the same topic, including Blaze. That topic never seems to have been resolved; That forum thread can be found here.

I was under the impression that 70 AR adds 10% damage reduction from phys damage only. It may have been Blaze that told me this, but I can't remember.

Supposing this is true... And taking into how resists work (full 75 resists on a pet means 75% dmg reduction to each element.) Would that 10% damage reduction apply as 10% more phys res, or 10% off the remainder? That is to say, a pet with max resists can take either:
15% dmg (-75% from resists, -10% from 70 AR)
22.5% dmg (-75% from resists, extra 10% off the rest. So it takes 25% dmg )

So is the 10% phys dmg reduction from 70 AR true? And if so, is it off the top (max resist/AR = 15% dmg taken), or applied to the remainder (max resist/AR = 22.5% dmg taken.) Or am I barking up the wrong tree, in the wrong town, a state over?

This is taken from a post made by Blaze in that thread: (I bumped the old thread to avoid ripping parts from posts, not giving credit, etc. But this is the most important part I think. "This is on RunUO 2.0 so it may be slightly different for us."-Blaze)

Code: Select all

int virtualArmor = defender.VirtualArmor + defender.VirtualArmorMod;

if ( virtualArmor > 0 )
{
   double scalar;

   if ( chance < 0.14 )
      scalar = 0.07;
   else if ( chance < 0.28 )
      scalar = 0.14;
   else if ( chance < 0.43 )
      scalar = 0.15;
   else if ( chance < 0.65 )
      scalar = 0.22;
   else
      scalar = 0.35;

   int from = (int)(virtualArmor * scalar) / 2;
   int to = (int)(virtualArmor * scalar);

   damage -= Utility.Random( from, (to - from) + 1 );
}
return damage;
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
User avatar
Devlin
Legendary Scribe
Posts: 652
Joined: Thu Mar 18, 2010 12:50 pm

Re: Armor Rating on Pets

Post by Devlin »

playing with the runuo code...
the chance bit, as blaze said, involves what piece of armor will be hit and lose durability. That means the scalar will always be .35 So the formulas look like:

int from = (AR * .35 )/2
int to = (AR * .35 )

damage = (from, (from - to + ) +1 )

So let's plug in some numbers.
At 70 AR:
From = 12.25
To = 24.5
Damage = (12.25, 13.25)

At 35 AR:
From = 6.125
To = 12.25
Damage = (6.125, 7.125)

At 10 AR:
From = 1.75
To = 3.5
Damage = (1.75, 2.75)

Im guessing x and y represent the min-max damage that is negated with AR. Key word: guessing. The minimum doubles as the AR doubles (so 10 AR has 1.75 min, 20 AR has 3.5min, 40 has 7 min, etc.) The maximum is always +1 the min.

From this, it appears that 70 AR would be twice as effective as 35 AR, and four times as effective as 17/18 AR. Again. I can't confirm all this, hence why I'm asking you all :P It SEEMS sound. But so do a lot of bad ideas.
Last edited by Devlin on Sun Nov 30, 2014 8:38 pm, edited 1 time in total.
Resident Wiki Editor/Village Idiot

EasyUO Scripts
ReArmer
ReArmer (Old Version)
ReReader
Separate Journal for Guild or Public Chat (Old)
---------------------------------------------
Combat Focus Guide (Godmode Formula)
Shindaril
Grandmaster Scribe
Posts: 96
Joined: Tue Jul 01, 2014 12:11 pm

Re: Armor Rating on Pets

Post by Shindaril »

I haven't looked at the RunUO (core) source code since the last shard I was a developer for was ran down due to the lack of actual admin in the staff. I have been developing the core during 1.0 and 1.1, though and the original meaning to include the armor rating into 1.1 was to hold on the possibility that someone wanted to put up a Pre-AoS shard. The virtualArmor seen in the script is actually seen on both, AoS and Pre-AoS routines and is generic damage reduction variable which in Pre-AoS only concerns physical damage while AoS has one routine which is calculated separately by each resistsnce (multiple routine calls)

That being said, I have absolutely no knowledge how Excelsior is put together. I can make guesses based on what I can see, but actually testing anything like the question here - Does Armor Rating on pets really affect anything? - would require months of testing and keeping track of the results to actually remove the possibility for the derivation in damage from the results. It'd be perfect if this could be tested by using a constant damage creature dealing the damage, but I'm quite sure it's not possible as I do doubt that if Armor Rating does affect, it will do so only against non-tamed creatures.

However, the fact that there are Armor Rating Ointments and that it's included into the levelable pet's ability list, I don't see a reason why it wouldn't affect anything. I sincerely do doubt that the staff here left or added it into the system only to get people spending items, time and gold for nothing.

All in all, at this moment's prices and the easy access to the ointments should one really hunt in Felucca and collect those (the [claim does collect those as well, so no need to add it into a looting script/macro), if you collect your own ointments and buy the Green Thorns from [exex, it'll cost you 120,000gp's per pet, which really isn't that much on an imprisoned pet. Now, you must be thinking if I said only imps, there are the ability points on levelable pets. True, spending those on Armor Rating if it doesn't do a thing, would be waste, but as the pet system is at the moment, other pets than imps are replaceable and without the need to replace them, there would be no real market for any other pets than imps. Nobody would breed pets as it wouldn't be worth their time and effort if one set of pets would last a lifetime.

I might take a deeper look into RunUO 1.0 RC1 or RunUO 1.1 RC0 sources to find some info about the possible means to use Armor Rating in AoS system, but I do hope you can see my reasoning why I'd rather just go with Armor Rating than leave it alone, not thinking about the cost and possible savings while doing it as I think that the stat is cheap compared to the very likely possibility that it does have it's use and never thinking about if it really does matter at all. I do admit, though, that there are players among us who do wish to know as much as they can and don't want to waste anything to something what isn't needed. To them, I'll just say: I'm also a powergamer, but resources are not an issue, but the time and dedication to your character are what matters. On most things I do wish to know exactly how it works so I can get the most out of it, but if it's cost is only that of maybe 30 mins to an hour of grinding for imps or just finding a common pet with enough ability points to spend to be able to afford adding it, in my opinion, it's a no-brainer.

I will add, though, that it'd be much more likely that the Armor Rating would be calculated after the normal damage reductions based on the pet's resistances. This is based on the fact that the added bonus from Armor Rating (if existing) has so minor returns. It's also possible that this bonus would only affect against physical damage and it's also possible that this is due to a bug which has been taken into the equation and not seen as an error, but a welcome addition and thus the ointments and the possibility to increase it via the pet's ability points have been added. As I said, I cannot know this, just tossing around the possibilities which come to my mind.
Dementika
Journeyman Scribe
Posts: 21
Joined: Tue Nov 25, 2014 4:06 pm

Re: Armor Rating on Pets

Post by Dementika »

edit for tests, values to come
Locked