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.
Kaivan
UOSA Donor!!
UOSA Donor!!
Posts: 2923
Joined: Wed Aug 13, 2008 11:07 pm

Re: Resist

Post by Kaivan »

Mikel123 wrote: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.
Evaluating intelligence scaled the damage after the base damage was calculated, and after resist was accounted for, so the demo calculations are still valid.
Mikel123 wrote:2) According to stratics, the minimum damage is always >=1 for these spells. Is Fire Field different because of its 0 magery?
It's possible that it could do 0 damage, depending on how it was coded. Take the minimum damage for fire field as an example. The minimum base damage is 8. Then the damage is scaled based on the Magery of the caster, which is 0. This gives us 4 damage. Then, damage is resisted based on the scaled damage, cutting the damage down to 2. Then at this point things get a bit fuzzy. Depending on how eval is applied, and the damage application is done, it is potentially possible that a spell could do 0 damage, but that is only possible for extremely low magery values (near zero) and extremely low eval values (again, near zero) versus extremely high resist values (roughly 100 skill).
Mikel123 wrote: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.
Well, the scenario is the same using Lightning and Fire field with 0 Magery, so I'll use fire field again. Basically, the idea is that the actual function that determines whether you gain a skill or not takes in an input variable that is first run through a success chance equation. If that equation returns a value of 1000 or better, then the rest of the skill gain function isn't even run. The inputs to that equation can be seen in the actual function call:

Code: Select all

if(testAndLearnSkill(usedon, 0x1A, Q42P(damage), 0x32) > 0x00)
For this function, the inputs are the object that was cast on, the skill number for magic resist, the damage (after being run through a function), and the number 50.

When these numbers are input into the base success equation, we can determine exactly where certain certain scenarios can no longer gain you any skill.

To make this more concrete, let me run this example using a base damage of 18, a magery skill of 0, and the following equation that describes the modifications to spell damage:

Code: Select all

damage = ((base damage * magery scalar) * 20)
Using this equation, we get a value of 180. This value is put directly into the function as follows:

Code: Select all

testAndLearnSkill(usedon, 26, 180, 50)
When these inputs are run through the equation that checks success, we can figure out the exact minimum skill where this will give us a value of 1000. Again, without getting into any details of that equation, this yields a minimum skill of 43.0.

So, if we apply the same base success formula for skill gain using the stratics formula, we need to account for the spell of the circle and the magery of the caster. Using their equation, the input value to the equation is just 16. So, our function call would look like this:

Code: Select all

testAndLearnSkill(usedon, 26, 16, 50)
Running this code, it turns out that a skill of 26.6 (the 28.6 is a typo in the first post), we reach the point where all 4th circle spells cast by something with 0 magery are guaranteed to produce a value of 1000 in the success equation.
Mikel123 wrote: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.
That was an off the cuff statement from OSI experience. A search on the newsgroups from 1998 and 1999 can confirm that 55 is a very good approximation. It just turns out that we can figure out the exact skill, which is 53.0.
Mikel123 wrote:BTW - what would you math say is the point at which gains would stop for Lightning and Energy Bolt?
This is dependent on the Magery of the caster, and can give you a range of success chances for the same spell. But, to give you a rough idea, at 75 Magery and the average damage for a 4th circle spell, your gains in resist will stop at 69.0 skill. However, if your magery is 100 and we account for average damage, then your gains will stop at 91.0 skill, and can gain you all the way until 100, provided you get higher damage rolls.
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 »

Faust wrote: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.
??

Right now Lightning stops at 65. We know it stopped somewhere >= 80.3. How does changing it to 80.3 make it "no closer" to era accuracy?
Kaivan wrote:A search on the newsgroups from 1998 and 1999 can confirm that 55 is a very good approximation. It just turns out that we can figure out the exact skill, which is 53.0.
Reports on the newsgroups seem pretty consistent about 55.0. If we're dealing with approximations, I'd guess that people would err on the side of switching to another spell sooner, i.e. perhaps when the gains slow down at 51.0. Just my .02.

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

Re: Resist

Post by Faust »

Mikel123 wrote:How does changing it to 80.3 make it "no closer" to era accuracy?
:arrow:
Faust wrote: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.
Again, there is no point in modifying the current inaccurate skill gains into a different version of inaccuracy... wait until the real skill gain code gets fixed and than proceed with the complaints. There is really no reason to comment about an inaccurate function and suggest that it should be fixed through another inaccurate fashion.

That just does not make much sense at all in my honest opinion.

What does make sense is fixing/making the skill gain to be era accurate and this known problem will more than likely be resolved...

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

Re: Resist

Post by Mikel123 »

First, please stop saying this:
Faust wrote:placing us no closer to the way it actually worked back then.
It is factually false. Accuracy is >=80.3. We're at 65.0. Any number between 65.1 and 80.3 would put is closer to the way it worked back then.

As for "why worry about this when we can just overhaul the whole system and hope this gets fixed when that happens", that sounds silly. You could make this skill more accurate with somewhere between 1 and 5 minutes of tinkering and patch it in tomorrow. For one of the most commonly used skills in the game, it seems worthwhile to spend 5 minutes fixing it now, rather than waiting to overhaul the entire skill gain system. I don't want to see anyone wasting time duplicating effort, but given how far off an overhaul of the skill system might be, it seems like a worthwhile use of a band-aid IMO.

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

Re: Resist

Post by Faust »

Where did you get 80.3 out of curiousity? Did you get that from the decompiled code?

The C++ code from Batlin's skill decompilation was recently converted by me over to the C# language that RunUO utilizes and it will only be a matter of time for me to know the exact results.

Post Reply