Resist

For ideas on how to make Second Age a better shard. Can it get any better? Maybe.
Forum rules
Posts in this forum are expected to be constructive, realistic and civil. Inflamatory or off topic posts will be removed.
Mikel123
UOSA Subscriber!
UOSA Subscriber!
Posts: 4607
Joined: Wed Jun 24, 2009 7:44 pm

Resist

Post by Mikel123 »

So, I hate to bring this up, but Resist skill gain is in need of some major fixes.

According to Nightshark, you can currently gain Resist to 55.0 with Fire Field, 65.0 with Lightning, and 85.0 with Energy Bolt.

A couple things strike me as odd here. First, since skill gain is a function of success rate, and success rate of resisting a spell is purely based on spell circle, there should be no difference between Fire Field and Lightning. The exception being that here we have skill gain chance based also on damage done. Perhaps this needs another look.

Second, and this is perhaps more critical since the data so obviously points to issues with our shard... check out Blade's Resist Chart:

http://web.archive.org/web/200003061213 ... tchart.htm

This is a chart created in 1999 by a guy with too much time on his hands.

Notice... he gained Resist with Lightning up until at least 80.3 Magic Resist skill! And he gained Resist with Energy Bolt up to at least 90.6 via Energy Bolt.

At the very least, we need to adjust numbers to cap Lightning at something >=80.3 and Ebolt at something >=90.6.

User avatar
nightshark
UOSA Subscriber!
UOSA Subscriber!
Posts: 4550
Joined: Mon Apr 20, 2009 10:47 pm

Re: Resist

Post by nightshark »

Resist is really messed up here, doesn't gain like OSI at all. I made a post like this a long while back...

Gaining resist does not seem to check vs magery skill at all, you can gain to 65.0 resist with lightning regardless of your magery level, doesn't matter if you have 65 mage or GM, it just caps at 65.0 resist. That is RunUO default (has been the same on every RunUO shard I have played).

There are a lot of recollections I have about gaining resist skill back in T2A, which match up with what is shown on Blade's resist chart, specifically the fact that he fails to gain a single point at 67.6 resist from 1000 ebolt casts (then, switches back to using lightning).
<green> grats pink and co. .... the 3 of you f---ing scrubs together can blow up a bard. IMPRESSIVE

Mikel123
UOSA Subscriber!
UOSA Subscriber!
Posts: 4607
Joined: Wed Jun 24, 2009 7:44 pm

Re: Resist

Post by Mikel123 »

I find that weird though, because you have a non-zero chance to resist Energy Bolt at 67.6 resist (27% chance to resist, according to the stratics calculator). Which means you have a non-zero chance to gain Resist.

Maybe I'm forgetting something, but AFAIK, it was a universal rule that as long as your chance to succeed at something was between 0% and 100% (exclusive), you had a chance to gain skill.

User avatar
Faust
Posts: 6247
Joined: Mon Sep 22, 2008 7:01 pm

Re: Resist

Post by Faust »

Based on my understanding resist gain was based on the damage received and not the spell circle or magery skill of the spell caster.

Here are all the functions with the key code sections involved with resist gain from the original code...

Code: Select all

  if(testAndLearnSkill(usedon, 0x1A, Q42P(damage), 0x32) > 0x00)
  {
    systemMessage(usedon, "You feel yourself resisting magical energy!");
    return((damage + 0x01) / 0x02);
  }

Code: Select all

  if(Q5ZJ(usedon, 0x1A, Q42P(damage), 0x28) > 0x00)
  {
    systemMessage(usedon, "You feel yourself resisting magical energy!");
    return((damage + 0x01) / 0x02);
  }

Code: Select all

  if(testAndLearnSkill(usedon, 0x1A, Q42Q(Q52T), 0x32) > 0x00)
  {
    systemMessage(usedon, "You feel yourself resisting magical energy!");
    return(0x01);
  }

Code: Select all

  if(Q5ZJ(usedon, 0x1A, Q42Q(Q52T), 0x28) > 0x00)
  {
    systemMessage(usedon, "You feel yourself resisting magical energy!");
    return(0x01);
  }
I am not a hundred percent positive which are used in what case scenario. However, there are two facts with each of these functions... the two that return a value of one are obviously used for magic damage reduction in guard zones and the other key fact is that two use a value of 0x32 and 0x28 in the fourth argument of the function. The third argument is the damage value calculated in the resist chance/gain of the skill. The argument with 0x1A represents the magic resist skill.

User avatar
nightshark
UOSA Subscriber!
UOSA Subscriber!
Posts: 4550
Joined: Mon Apr 20, 2009 10:47 pm

Re: Resist

Post by nightshark »

.
Last edited by nightshark on Tue Oct 25, 2011 10:57 pm, edited 1 time in total.
<green> grats pink and co. .... the 3 of you f---ing scrubs together can blow up a bard. IMPRESSIVE

Roser
UOSA Subscriber!
UOSA Subscriber!
Posts: 3367
Joined: Sat Jan 30, 2010 12:01 am
Location: In your tree house with binoculars
Contact:

Re: Resist

Post by Roser »

It cost him 276,100 gp to get Magery and Resist to the high 90's?

No wonder so many people on UOSA have GM magery/resist. If this chart is accurate then UOSA skill gain is way to easy in this area. It probably costs closer to 80k to GM magery/resist on UOSA.
Image

User avatar
nightshark
UOSA Subscriber!
UOSA Subscriber!
Posts: 4550
Joined: Mon Apr 20, 2009 10:47 pm

Re: Resist

Post by nightshark »

Rose wrote:It cost him 276,100 gp to get Magery and Resist to the high 90's?

No wonder so many people on UOSA have GM magery/resist. If this chart is accurate then UOSA skill gain is way to easy in this area. It probably costs closer to 80k to GM magery/resist on UOSA.
He was also using greater heal regs to heal himself though, and was not using the most efficient method to GM his magery. It definitely is easier on UOSA though, IMO.

he uses 4600 FS regs from
88.5-95.6 magery
89.6-94.3 resist

doesn't sound too bad...
<green> grats pink and co. .... the 3 of you f---ing scrubs together can blow up a bard. IMPRESSIVE

Roser
UOSA Subscriber!
UOSA Subscriber!
Posts: 3367
Joined: Sat Jan 30, 2010 12:01 am
Location: In your tree house with binoculars
Contact:

Re: Resist

Post by Roser »

nightshark wrote: he uses 4600 FS regs from
88.5-95.6 magery
89.6-94.3 resist

doesn't sound too bad...

Yea I suppose. We need to get some comparison chart action going on in here. Anyone currently macroing magery/resist please input data.

Overall it looks high compared to UOSA, especially considering hes far from GM.
Image

Pirul
Posts: 5754
Joined: Wed Jan 27, 2010 8:19 pm
Location: New Windmere

Re: Resist

Post by Pirul »

It's been a while since I worked these skills, but the last time I did, I burnt through 4.5k FS regs to get from 82 - GM magery, and roughly 12k to get from ~78 - GM resist. If I would have healed with magery, then 270k sounds reasonable.
Image
<ian> 2 chicks making out are not gay

Mikel123
UOSA Subscriber!
UOSA Subscriber!
Posts: 4607
Joined: Wed Jun 24, 2009 7:44 pm

Re: Resist

Post by Mikel123 »

By my math, our resist skill gain here is slightly harder than Blade's chart - at least at the upper end, where both he and I cast Flamestrike for some portion of time, so I can compare apples to apples. Remember too, he wasn't GM magery, so he was fizzling a lot more than we would, because with our skill gain, we're typically GM magery before we finish Resist.

I don't know how skill gain formulas work here, but I'd be happy to fit Blade's data to the types of formulas we use in the code here if needed... it seems like a rather manual task. My biggest concern though is fixing things so you can go higher in Resist from Lightning and Energy Bolt, because we're 100% sure that's accurate.

Kaivan
UOSA Donor!!
UOSA Donor!!
Posts: 2923
Joined: Wed Aug 13, 2008 11:07 pm

Re: Resist

Post by Kaivan »

After a rather exhaustive search through the demo regarding resist, I have this rather long write up regarding resisting spells. My hope is to make it clear why I believe that even during T2A, resist gains were directly based on the damage received from a spell.

First, I would like to walk through the process that all direct damage spells go through before the resist calculation. This is important to understanding exactly how damage is done.

Once all checks in the script for the specific spell have finished, and the damage delay has passed, several pieces of information are passed to a new function. These include the following:
  • The spell itself.
  • The caster.
  • The victim.
  • The damage type.
  • Whether the spell was reflected or not.
The first thing that's done with this information is to determine the circle of the spell. Once that's done, the next thing that's done is the base damage for the spell is calculated, based on the circle of the spell. Once this basic information has been calculated, the script will double the damage done, if the target is an NPC. Next, the script will calculate the skill of the caster, and apply the following equation to the base damage based on the caster's skill:

Code: Select all

damage = (damage * (caster skill + 50)) / 100
Effectively, the above equation is identical to the tactics modifier for weapon damages, but it is recursive in the sense that magery both determines the damage bonus and the success rate.

In any event, once the damage modifier has been applied, the script finally does the resist check. This is done by first checking to see if the victim is inside guards zone. If they are, then the following piece of code is run:

Code: Select all

integer Q4BI(object user, object usedon, integer damage)
{
  if(isDead(usedon))
  {
    return(0x00);
  }
  if(Q5ZJ(usedon, 0x1A, Q42P(damage), 0x28) > 0x00)
  {
    systemMessage(usedon, "You feel yourself resisting magical energy!");
    return((damage + 0x01) / 0x02);
  }
  return(damage);
} 
However, if they are not inside guard zone, this code runs:

Code: Select all

integer Q4BH(object user, object usedon, integer damage)
{
  if(isDead(usedon))
  {
    return(0x00);
  }
  if(testAndLearnSkill(usedon, 0x1A, Q42P(damage), 0x32) > 0x00)
  {
    systemMessage(usedon, "You feel yourself resisting magical energy!");
    return((damage + 0x01) / 0x02);
  }
  return(damage);
}
So at this point, we now have the following information regarding the way resist functioned in the demo:
  • The effective spell damage is based on the Magery of the caster.
  • The base spell damage is based on the circle of the spell.
Given this information, we can see that the effective formula for resisting a spell (and gaining) is entirely different from the one presented on stratics. This begs the question: which one is accurate? A highly likely answer comes in the form of the fire field spell. For anyone who played on OSI servers, one of the most common tactics for actually gaining magic resist throughout T2A and UOR was to use fire field up until about 55 - 60 skill (and energy field up until the high 80's during UOR). Using this particular method, we can compare the effectiveness of both methods with some basic facts. The relevant facts are as such:
  • If you have no chance to fail at something, you cannot gain in it.
  • The magery of the "caster" of a fire field is considered to be zero, because the caster is the fire field itself.
  • The base damage for 4th circle is 8 - 29.
So, without getting into the complexities of the success formula itself, let's take a look at the chance to resist a fire field spell using the stratics formula at various levels:
  • Skill of 0 = Success chance of 46.8%
  • Skill of 25 = Success chance of 93.6%
  • Skill of 50 = Success chance of 143.6%
It turns out that using the stratics formula, the chance to resist damage from fire field reaches 100% at only 28.6 skill, thus making it impossible to gain from resist at that point. This is quite obviously an incorrect value as this is approximately half of what should be expected.

Conversely, let's look at the average chance to resist damage from fire field using the demo formula (I say average because the base damage is part of the calculation):
  • Skill of 0 = Success chance of 14%
  • Skill of 25 = Success chance of 64%
  • Skill of 50 = Success chance of 114%
It turns out that your gains begin to decrease once you hit a base skill of 33, because some of the possible damages from fire field can actually be low enough to be 100% resistible. However, the same is true in the other direction. Even when you reach a base skill of 43, it is still possible to gain off of resist for quite some time, due to the fact that 50% of the damages for resist are still high enough to give you the opportunity to gain. Ultimately, it turns out that resist will cease giving you skill gains at 53 real skill (sound familiar?), due to the fact that all of the values for fire field become 100% resistible at that point.

In any case, the point of this is to show that the stratics formula is likely to be just about dead wrong in this department. In order for their formula to work, the algorithm for determining success rates would have to be completely different from the one in the demo, and we have several pieces of information that show this not to be the case.
UOSA Historian and former staff member: August 11, 2008 - June 19, 2016

Useful links for researching T2A Mechanics

Stratics - UO Latest Updates - Newsgroup 1 - Noctalis - UO98.org

Mikel123
UOSA Subscriber!
UOSA Subscriber!
Posts: 4607
Joined: Wed Jun 24, 2009 7:44 pm

Re: Resist

Post by Mikel123 »

Few questions for you:

1) was the demo code before Eval Int was factored into spell damage? It would appear so, given that Magery is the only modulator of damage in your example. So it's clear that the formula for spell damage was changed significantly since the demo.

2) According to stratics, the minimum damage is always >=1 for these spells. Is Fire Field different because of its 0 magery?

3)
It turns out that using the stratics formula, the chance to resist damage from fire field reaches 100% at only 28.6 skill, thus making it impossible to gain from resist at that point. This is quite obviously an incorrect value as this is approximately half of what should be expected.
Can you expand on this? Plugging in Lightning (4th Circle) and a Magery of 0, I'm not following this at all.

4)
Ultimately, it turns out that resist will cease giving you skill gains at 53 real skill (sound familiar?), due to the fact that all of the values for fire field become 100% resistible at that point.
53 is not 55.

* * * * *
Thanks for looking into this - I don't find anything particularly persuasive here, especially since we know for certain that Eval Int entered these calculations between the demo and Nov 1999, and the demo doesn't take into account that skill at all.

In any case, the first thing that should be done is adjusting the skill to which one can gain from Lightning and Energy Bolt. That, we should be 99% certain of.

Mikel123
UOSA Subscriber!
UOSA Subscriber!
Posts: 4607
Joined: Wed Jun 24, 2009 7:44 pm

Re: Resist

Post by Mikel123 »

BTW - what would you math say is the point at which gains would stop for Lightning and Energy Bolt?

User avatar
Faust
Posts: 6247
Joined: Mon Sep 22, 2008 7:01 pm

Re: Resist

Post by Faust »

Mikel123 wrote:was the demo code before Eval Int was factored into spell damage? It would appear so, given that Magery is the only modulator of damage in your example. So it's clear that the formula for spell damage was changed significantly since the demo.
The evaluating intelligence skill only scaled the damage of magery based on the skill itself not determine the base values.

IE: Using 100 magery on the demo was no different than using 100 magery and 100 eval during t2a.

I don't see any reason why it would have affected the way resist gains worked outside of being below 100 with the eval skill due to the scaled damage being lowered by it. Also, the resist functions follow the magery functions(this includes damage calculation) according to Kaivan's data. The damage is sent as an argument to the resist function and it would make absolutely no sense from a programming or even a game stance for that matter for the resist function to calculate the damage after the base function that checks for resist skill gain.

Mikel123 wrote:In any case, the first thing that should be done is adjusting the skill to which one can gain from Lightning and Energy Bolt. That, we should be 99% certain of.
There is no reason to modify the skill in any particular fashion based on specific conditions. This would just shift the pendulum from one inaccurate location to a different placing us no closer to the way it actually worked back then.

What needs to happen is the implementation of the original skill gain code(which we don't use here) since that affects everything from resist to any other skill in the game when determining various situations. That code has been fully decompiled by Batlin and it's only a matter of time until it's implemented on UOSA. We should obviously wait until a major key factor in producing resist gains is actually put in place before proclaiming it's inaccurate when it's already inaccurate to begin with in my opinion.

User avatar
nightshark
UOSA Subscriber!
UOSA Subscriber!
Posts: 4550
Joined: Mon Apr 20, 2009 10:47 pm

Re: Resist

Post by nightshark »

Someone please correct me on any points here of my understanding:

This is a problem with the way the resist skill works entirely, not just the way it gains.

If it were changed to work more like the demo, the chance to resist a low end dice roll ebolt would be higher than the chance to resist a high end ebolt. So, we would see more ebolts than previously that either do high end or low end damage vs players with GM resist.

Eval will now be factored into the chance to resist, since the base damage received (before factoring resisting spells) is part of the calculation in resisting the spell.

Does this also mean spell damages (vs magery/eval) are going to need looking into? This sounds like it's going to end in a magery overhaul, which might be a good thing for PvP on this shard.
<green> grats pink and co. .... the 3 of you f---ing scrubs together can blow up a bard. IMPRESSIVE

Post Reply