Page 1 of 1

Level to Resist formula

PostPosted: Sun Jun 10, 2018 8:21 pm
by joeshmoe75
I have been trying to find if official DAoC(with no luck) ever documented their formula or modifier for 'Your level VS Target level' on top of the spell resist formula. Ex: You are level30 attacking a level40 mob with a level30 spell with no skills/RA's.. and other level variations like that. Basically I'm trying to figure out how much more your resistance goes up per level based on the level gap between Player level and Mob level.

What kind of formula does DoL run for this scenario?

Re: Level to Resist formula

PostPosted: Mon Jun 11, 2018 12:31 am
by ontheDOL
this is from a grab bag

Q: Spell resists. Can you give me more details as to how the system works?

A: Here's the answer, straight from the desk of the spell designer:

"Spells have a factor of (spell level / 2) added to their chance to hit. (Spell level defined as the level the spell is awarded, chance to hit defined as the chance of avoiding the "Your target resists the spell!" message.) Subtracted from the modified to-hit chance is the target's (level / 2). So a L50 caster casting a L30 spell at a L50 monster or player, they have a base chance of 85% to hit, plus 15%, minus 25% for a net chance to hit of 75%. If the chance to hit goes over 100% damage or duration is increased, and if it goes below 55%, you still have a 55% chance to hit but your damage or duration is penalized. If the chance to hit goes below 0, you cannot hit at all. Once the spell hits, damage and duration are further modified by resistances.

you can see the actual code inside spellhandler.cs (if you understand code ;) )

Re: Level to Resist formula

PostPosted: Mon Jun 11, 2018 3:36 am
by joeshmoe75
hitchance -= (int)(m_caster.GetConLevel(target) * 10)

So can you explain this to me please? Any math I try throwing at this ends up in wild numbers. Is Caster level and Con level supposed to be subtracted or divided or is that one variable? I understand what variables that the code is plugging in here, I'm just not getting this formula

Re: Level to Resist formula

PostPosted: Thu Jul 26, 2018 10:52 pm
by Sand
It taking the Con level (whether mob is yellow, orange, red, green, purple, etc) multiplying by 10 then subtracting from the hit chance. (not sure the need of int in the equation as I expect value of conlevel would already be an integer but if not it would take say 10.99 and make it 10).

The caster's level is not in this formula directly, it uses conlevel, which is based on a % difference in level between caster and target.

Let's say the hit chance prior to that formula was 50% here is the effect of that formula in a couple situations:
So your level 50 attacking a level 50 or your level 10 attacking a level 10, the con would be 0 so hitpoints remains unchanged at 50%.

A level 50 attacking a level 55 mob or a level 10 attacking a level around 13 so orange con, that be a con of say 1, so your hitchance is now 40%.

A level 50 attacking a level 48 or a level 10 attacking a level 9, con be -1 so you add 10% to your hit chance.

Re: Level to Resist formula

PostPosted: Sat Jul 28, 2018 12:05 am
by PlanarChaosRvrtwo
The caster's level is not in this formula directly, it uses conlevel, which is based on a % difference in level between caster and target.
That is wrong with level 1-9 con varies 1 level 10-19 it varies 2 .... 40-49 it varies 5 and 50 it varies 6 that isnt %.