Re: Resist Gains
Posted: Thu May 06, 2010 5:02 am
This has become an epic nerd thread.
A forum for discussion of Second Age UO Shard
http://forums.uosecondage.com/
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);
}
Code: Select all
function integer Q42P(integer damage)
{
integer Q527 = damage * 0x19;
if(Q527 > 0x03E8)
{
Q527 = 0x03E8;
}
return(Q527);
}
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.if(testAndLearnSkill(usedon, 0x1A, Q42P(damage), 0x32) > 0x00)
{
systemMessage(usedon, "You feel yourself resisting magical energy!");
return((damage + 0x01) / 0x02);
}
return(damage);
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?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.
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 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.
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.Mikel123 wrote: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?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.
My understanding, based on the calculators of the era, was that it was purely a function of the spell circle.
NEVER TO LATE TO FIX BROKE STUFFBiohazard wrote:its kinda already way past the time to even worry about it isnt it?
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.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.
0x00 being false, anything larger (0x01) meaning they resisted. As RunUO is also setup, check and gain are within the same functions.if(testAndLearnSkill(usedon, 0x1A, Q42P(damage), 0x32) > 0x00)
{
systemMessage(usedon, "You feel yourself resisting magical energy!");
return((damage + 0x01) / 0x02);
}
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
}
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.
i was just saying everyone already has GM resist.. more of a joke. no need for caps lol.BlackFoot wrote:NEVER TO LATE TO FIX BROKE STUFFBiohazard wrote:its kinda already way past the time to even worry about it isnt it?
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.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):
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.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 }
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.
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.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?]