Resist Gains

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.
User avatar
Gunslinger
Posts: 43
Joined: Sat Nov 28, 2009 3:48 pm

Re: Resist Gains

Post by Gunslinger »

This has become an epic nerd thread.

Dagon
Posts: 949
Joined: Tue Jun 16, 2009 11:09 am

Re: Resist Gains

Post by Dagon »

Actually, after decompiling again at home, and seeing that I didn't miss anything .. I'm going to go with any claims about resist gains are pure speculation. There is -no- evidence that I can find in the source files about resist gains, or how the damage value is used in that determination.

testAndLearnSkill is apparently compiled in the client, and would need to be looked at in a disassembler to find out what's going on.. Batlin or someone else proficient with ASM would have to do that.

There are 4 functions that apparently deal with resist .. and the first one is where Hemp got his one liner from, and the others are very similar so I'll just use this one for example.

Code: Select all

function 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);
}
Here's the Q42P function that is being used in the testAndLearnSkill call

Code: Select all

function integer Q42P(integer damage)
{
  integer Q527 = damage * 0x19;
  if(Q527 > 0x03E8)
  {
    Q527 = 0x03E8;
  }
  return(Q527);
}
If my hex is correct, this function is saying
new_damage_value = passed_damage_value x 19
if new_damage_value > 1000
new_damage_value = 1000

so the maximum value that can be passed to testAndLearnSkill is 1000, otherwise it's (guessing) the spell damage * 19, and the spell damage is most likely determined prior to this call when the spell is cast .. based on caster's magery ,etc.

so tracking back and looking at the calling function closer
if(testAndLearnSkill(usedon, 0x1A, Q42P(damage), 0x32) > 0x00)
{
systemMessage(usedon, "You feel yourself resisting magical energy!");
return((damage + 0x01) / 0x02);
}
return(damage);
if testAndLearnSkill returns a value greater than 0, you resist the spell and the damage applied is (damage+1)/2, otherwise you get full damage.

Like I said before, this is not in dispute as it's damage calculation, but it proves beyond anything that Hemp's one line quote has absolutely nothing to do with skill gain (at least that anyone can prove) and is in fact only used in determining whether or not you resist the spell. THAT's why damage value is used, so it can look at your resist level and determine whether or not you resist the spell in the first place.

testAndLearnSkill seems to suggest that this function also deals with skill gain.. but we have no source code to this function so it's pure speculation how skill gain is determined, and without evidence or patch notes, there is nothing to change.

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

Re: Resist Gains

Post by Mikel123 »

Dagon wrote:and is in fact only used in determining whether or not you resist the spell. THAT's why damage value is used, so it can look at your resist level and determine whether or not you resist the spell in the first place.
So you're saying that when I ebolt someone, the actually rolls I get for damage are used in determining whether or not the spell is resisted?! Wouldn't this mean that Evaluate Intelligence *would* impact one's chance to resist?

My understanding, based on the calculators of the era, was that it was purely a function of the spell circle.

User avatar
Rendar
UOSA Donor!!
UOSA Donor!!
Posts: 177
Joined: Thu Feb 25, 2010 5:07 am

Re: Resist Gains

Post by Rendar »

God I hate programmers.
Lord Rendar
Knight, UDL
http://www.undeadlords.net
Catskills/Siege Perilous
Your soul for Myrkul!

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

Re: Resist Gains

Post by Faust »

Dagon wrote: testAndLearnSkill seems to suggest that this function also deals with skill gain.. but we have no source code to this function so it's pure speculation how skill gain is determined, and without evidence or patch notes, there is nothing to change.
Would be wise to further analyze this function inside the core before jumping to any conclusions. It does seem odd that damage would be sent to this function though. So it appears to be highly plausible that damage is calculated in it. However, this routine definitely looks like the check for skill gain in the code.

Dagon
Posts: 949
Joined: Tue Jun 16, 2009 11:09 am

Re: Resist Gains

Post by Dagon »

Mikel123 wrote:
Dagon wrote:and is in fact only used in determining whether or not you resist the spell. THAT's why damage value is used, so it can look at your resist level and determine whether or not you resist the spell in the first place.
So you're saying that when I ebolt someone, the actually rolls I get for damage are used in determining whether or not the spell is resisted?! Wouldn't this mean that Evaluate Intelligence *would* impact one's chance to resist?

My understanding, based on the calculators of the era, was that it was purely a function of the spell circle.
no, it's pretty much speculation on my part as well since I can't see how the damage value is used in the testAndLearnSkill function and what role it plays inside that function.. it could very well not be used at all and it's just there because the gave devs thought they would use it for something at some point ... we just dont know without seeing the code for that function.

But back to a comment I made about going to trammel for resist gains without taking damage --- if the assertion was true that it was damage based then why would you be able to gain with no damage in trammel if on the non-trammel side you had to take damage ... it doesn't make sense that the devs would have ever overlooked that and basically created one big exploit for resist. there is no documentation on resist ever being changed in any way that relates to this topic, so i think it's fair to assume that gains while taking no damage in trammel = gains while taking no damage in non trammel = the way it always was and is currently here, because nothing says it was ever different.

BlackFoot
UOSA Donor!!
UOSA Donor!!
Posts: 7668
Joined: Fri May 16, 2008 9:33 am
Location: Canada

Re: Resist Gains

Post by BlackFoot »

Biohazard wrote:its kinda already way past the time to even worry about it isnt it?
NEVER TO LATE TO FIX BROKE STUFF
Image
<IronfistMax> tell me where you are in game, and ill come thank you personally
Mad_Max: blackfoot you sent everyone to a slaughter
<Derrick> We will not negotiate with terrorists.
UOSA Society of Adventure and History [UoH]

User avatar
Hemperor
UOSA Subscriber!
UOSA Subscriber!
Posts: 4368
Joined: Sat Jul 19, 2008 9:15 am

Re: Resist Gains

Post by Hemperor »

But back to a comment I made about going to trammel for resist gains without taking damage --- if the assertion was true that it was damage based then why would you be able to gain with no damage in trammel if on the non-trammel side you had to take damage ... it doesn't make sense that the devs would have ever overlooked that and basically created one big exploit for resist. there is no documentation on resist ever being changed in any way that relates to this topic, so i think it's fair to assume that gains while taking no damage in trammel = gains while taking no damage in non trammel = the way it always was and is currently here, because nothing says it was ever different.
Please do not post baseless assumptions that derail the discussion. There was never a point in which you took no spell damage in Trammel. I'll have more conclusive evidence in a second to post.
Image

[22:26] <ian> why am i making 3750 empty kegs
[22:27] <ian> 1125000 for 3750 empty kegs
----------------------------------------
[10:44] <ian> a good cat is a dead cat

User avatar
Hemperor
UOSA Subscriber!
UOSA Subscriber!
Posts: 4368
Joined: Sat Jul 19, 2008 9:15 am

Re: Resist Gains

Post by Hemperor »

Unforunately Batlin's Demo compiler will not work with huge script that involves resist, so I was unable to replace "damage" with a huge number. However, it is pretty clear that the call of "TestAndLearnSkill" is the chance to gain as it is the only thing called inside other skills that gain such as stealing.

EDIT:

Also, I left an extra piece in the initial quote by accident, which threw you off. Here is the complete quote:
if(testAndLearnSkill(usedon, 0x1A, Q42P(damage), 0x32) > 0x00)
{
systemMessage(usedon, "You feel yourself resisting magical energy!");
return((damage + 0x01) / 0x02);
}
0x00 being false, anything larger (0x01) meaning they resisted. As RunUO is also setup, check and gain are within the same functions.
Image

[22:26] <ian> why am i making 3750 empty kegs
[22:27] <ian> 1125000 for 3750 empty kegs
----------------------------------------
[10:44] <ian> a good cat is a dead cat

Dagon
Posts: 949
Joined: Tue Jun 16, 2009 11:09 am

Re: Resist Gains

Post by Dagon »

Yeah but the ONLY code we are seeing is the practical use of the skill -- whether you resist the spell or not. We cannot see _anything_ that relates to the skill gain process. You are assuming, with no evidence, that successful skill use (the part we are seeing) = skill gain, which is not a correct assumption.

Just because you resist the spell does not mean there was or was not skill gain involved - that's a completely different aspect of it. You can resist a spell without a gain (you do not receive a gain for each 2000 flamestrikes that you resist while trying to GM solo, for example).

at this time, you have no idea what is going on inside of the testAndLearnSkill function, and you can't just presume to know what's going on.

for all we know the function is doing this (simplified for understanding):

Code: Select all

function testAndLearnSkill(target, damage)
{
  ->skill gain routine
  if skill gain check passes set skill +1
  [i]we have no idea what this involves since we can't see any of it![/i]

  -> make an assumption of how damage might be used, which could be wrong especially since resist chance can be something like this [Your_Chance_to_Resist = Your_Resistance - (( Attackers_Magery - 20 )/5 + Spell_Circle*5))]

  if resist_skill_level_of(target) is high enough to resist(damage)
  {
  --> theres obviously something along these lines since you dont always resist a spell
    if dice roll chance of success > 1
      return 1
    else
      return 0
  }
  else
    return 0
}
I am speculating just as much as you are on how and what the testAndLearnSkill function does..... and without knowing that function you cannot offer a valid argument to support changing the way resist gains are distributed.


Gaining Resisting Spells

So, how exactly does one go about gaining this skill? Well, you will here get a very general guideline of how you can do it, divided into two parts; the first being much easier if you're a mage, and the second working for everyone.

5x.x/6x.x - 120.0

There are a few ways to raise resist at this point;

* Method 1: Quit your guild (if you're in one) and find an enclosed area somewhere in Trammel (sorry Siege folks; this won't work for you -- well, it will, but you'll die lots and lots ). Summon a pair of air elementals and tell them to "kill" you. They'll attack, but since you're in Trammel, you take no damage, but you still get gains. Gains are slow with this method, but it's completely safe, and it works all the way to 120.0 (although, I would do the last points differently). This method is very similar to what tamers have been doing for years with their pets.

User avatar
Biohazard
UOSA Donor!!
UOSA Donor!!
Posts: 629
Joined: Thu Feb 12, 2009 10:45 pm

Re: Resist Gains

Post by Biohazard »

BlackFoot wrote:
Biohazard wrote:its kinda already way past the time to even worry about it isnt it?
NEVER TO LATE TO FIX BROKE STUFF
i was just saying everyone already has GM resist.. more of a joke. no need for caps lol.

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

Re: Resist Gains

Post by Kaivan »

Dagon wrote:Yeah but the ONLY code we are seeing is the practical use of the skill -- whether you resist the spell or not. We cannot see _anything_ that relates to the skill gain process. You are assuming, with no evidence, that successful skill use (the part we are seeing) = skill gain, which is not a correct assumption.

Just because you resist the spell does not mean there was or was not skill gain involved - that's a completely different aspect of it. You can resist a spell without a gain (you do not receive a gain for each 2000 flamestrikes that you resist while trying to GM solo, for example).

at this time, you have no idea what is going on inside of the testAndLearnSkill function, and you can't just presume to know what's going on.

for all we know the function is doing this (simplified for understanding):

Code: Select all

function testAndLearnSkill(target, damage)
{
  ->skill gain routine
  if skill gain check passes set skill +1
  [i]we have no idea what this involves since we can't see any of it![/i]

  -> make an assumption of how damage might be used, which could be wrong especially since resist chance can be something like this [Your_Chance_to_Resist = Your_Resistance - (( Attackers_Magery - 20 )/5 + Spell_Circle*5))]

  if resist_skill_level_of(target) is high enough to resist(damage)
  {
  --> theres obviously something along these lines since you dont always resist a spell
    if dice roll chance of success > 1
      return 1
    else
      return 0
  }
  else
    return 0
}
I am speculating just as much as you are on how and what the testAndLearnSkill function does..... and without knowing that function you cannot offer a valid argument to support changing the way resist gains are distributed.


Gaining Resisting Spells

So, how exactly does one go about gaining this skill? Well, you will here get a very general guideline of how you can do it, divided into two parts; the first being much easier if you're a mage, and the second working for everyone.

5x.x/6x.x - 120.0

There are a few ways to raise resist at this point;

* Method 1: Quit your guild (if you're in one) and find an enclosed area somewhere in Trammel (sorry Siege folks; this won't work for you -- well, it will, but you'll die lots and lots ). Summon a pair of air elementals and tell them to "kill" you. They'll attack, but since you're in Trammel, you take no damage, but you still get gains. Gains are slow with this method, but it's completely safe, and it works all the way to 120.0 (although, I would do the last points differently). This method is very similar to what tamers have been doing for years with their pets.
It should be pointed out that this guide is far outside our target era and reflects magic resist functions and gain methods that do not reflect era mechanics. Additionally, these functions and changes are documented in the post UOR patch notes.

Also, to clarify the point made by Hemperor, the testAndLearnSkill function must necessarily have a chance to gain in it. To exemplify this, we'll use Hemperor's example of the stealing script. In the script, no call to any script that might indicate a gain other than the testAndLearnSkill function is made. Since no other such call is made, we must conclude only one of two things: the testAndLearnSkill function does gain you skill, or it is impossible to gain skill in stealing. Since we know the latter to be false, we must conclude that the former is true and the function must gain skills. Applying this to the resist checks, the same conclusion must be drawn here as well.
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

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

Re: Resist Gains

Post by nightshark »

UOSA uses RunUO resist gains to some extent I know. I would PvP on Oceania with 9x.x resist and would gain from people ebolting me. This continued even until I had 98+ resist, before I finally decided to finish off the last few points at trinsic river LLs. Here (like all RunUO shards) ebolt caps at 85.

Also, every shard I played on, my cash cow would be a 50 resist lich slaying dexer. I would earn upwards of a million gold and my resist would never increase beyond 55 or so - reason being that you can gain on this shard when you have basically no chance to resist, on production servers you would only gain from 3rd circle at that level. On this shard, the counterpart character I have (my lich slaying dexer), rocketed up to 70 resist from 50 np. Only reason it stopped raising is that I never get hit by spells anymore.

IMO skills on this server are a lot easier than they ever were on OSI. I've posted a thread before that you should not gain from fails during era, but the demo actually disproves this point. But at no point in T2A could you gm swords in 4 hours by hiring an NPC mage with 30 wrestling. By the time you get to 80-90 swords, you are literally hitting the mage every time. Bone wall was a great skill gainer for a reason, here you are making a mistake even hiring a paladin.
Dagon wrote:[hey, is this a bug report too? currently EQ does 50% to all players... should it be more proportionate to the number of players affected?]
I don't remember anyone using EQ in 99, I can't claim anything about it. I do remember it first became useful around publish 16 when they changed it to damage 50% of a player's hp (and it definitely did not spread the damage). I would use it at fire temple to kill heaps of dragons/deamons at the same time, while they were stuck downstairs and I was on the roof.
<green> grats pink and co. .... the 3 of you f---ing scrubs together can blow up a bard. IMPRESSIVE

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

Re: Resist Gains

Post by Faust »

The early indication from Batlin's work is that the damage argument above is the starting 'chance' for skill gain if I am not mistaken. This means that damage does play a role in the gaining of resist. There is still a lot more work to do for the entire process but Hemperor and Kaivan appears to be right here.

The shard will eventually have a completely accurate skill gain system in place thanks to Batlin's great work as always.

Batlin will eventually post the information over at JoinUO when he finishes like he always does.

Hicha
UOSA Donor!!
UOSA Donor!!
Posts: 2264
Joined: Tue May 05, 2009 10:03 am
Location: out selling permits

Re: Resist Gains

Post by Hicha »

A lot of the claims in this thread about "I don't remember <tactic> on OSI" are irrelevant. You're talking about a 10 year old game where people continue to find new and improved ways to maximize skill efficiency, advancement, and entire game play structure and tactics.

"Archer bots didn't exist." Because people didn't have the tools or concept to implement them, that's why.

"You couldn't gain resist by casting meteor swarm on a group." Because the 'known' and 'proven' methods to gain resist were letting LL cast on you. Are there notes indicating people even attempted to test and/or verify if gains were possible?

"There was no resist gain in trammel." Funny, cause I never played in Felucca, I was sitting around 80 resist when I quit on my trammie mage.

When did the anti-macro code get implemented anyway (the whole 8x8 method.) If it was implemented T2A, that would've definitely kept people from attempting resist sessions solely based that they wouldn't even gain anyway.
Last edited by Hicha on Tue May 11, 2010 11:51 am, edited 1 time in total.
Image
"I consider most of you NPC's that inhabit the single player game that I am here to enjoy." - MatronDeWinter

Post Reply