Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2010, 11:20 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Also, I believe the calculation for post max level decay is incorrect. It is my understanding that a 30% focus effect that falls off 5% per level would completely decay in 6 levels. 95% of focus effects fall off 5% per level, even ones that have a focus effect of 75%, with a few at 10%. It appears the code only takes off 5% of 30, which would be 28.5% after 1 level, and would take 20 levels to completely fall off.

Code:
int lvlModifier = 100;

.....


case SE_LimitMaxLevel:{
			int lvldiff = (spell.classes[(GetClass()%16) - 1]) - focus_spell.base[i];

			if(lvldiff > 0){ //every level over cap reduces the effect by spell.base2[i] percent
				lvlModifier -= spell.base2[i]*lvldiff;
				if(lvlModifier < 1)
					return 0;
			}
			break;
		}

....

return(value*lvlModifier/100);
So currently, for a 1 level difference, lvlModifier -= spell.base2[i]*lvldiff would be 100 -= 5*1 which equals 95. Then, it would return 30 * 95/100, which would be 28.5.

It seems like it should be
Code:
int lvlModifier = 0;

.....

case SE_LimitMaxLevel:{
			int lvldiff = (spell.classes[(GetClass()%16) - 1]) - focus_spell.base[i];

			if(lvldiff > 0){ //every level over cap reduces the effect by spell.base2[i] percent
				lvlModifier = spell.base2[i]*lvldiff;  //%perLvl * lvls
				if(lvlModifier >= value)  //too many lvl diff. - effectiveness now 0
					return 0;
			}
			break;
		}

....

return(value - lvlModifier);
So with this code, for a 1 level difference, lvlModifier = spell.base2[i]*lvldiff would be lvlModifier = 5*1 which equals 5. Then, it would return 30 - 5, which would be 25, leaving it at 25% focus effect.

Unless I am incorrect in my understanding of how the falloff works, then I guess disregard. But as a Magician summoning focus effect items all the time, I'm almost certain I remember talk of focus effects losing effectiveness after 4-5 levels.
Reply With Quote
  #2  
Old 02-03-2010, 08:11 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Do we know if the 5% reduction after max level is 5% of the total or 5% of the reduction? In other words, the correct formula would be what I use for one of the following two examples:

lets assume the following
max focus = 30%
reduction after max level = 5%
current level is five levels over max

option one:
the reduction is a direct reduction of the focus percentage
0.30 - (5 * 0.05) = 0.05
resulting focus is 5%

option two:
the reduction is a percentage of the focus that is reduced
0.30 - (5 * 0.05 * 0.30) = 0.225
resulting focus is 22.5%

I never found that information referenced anywhere but perhaps someone else knows. This should also be pretty easy to test on live.
Reply With Quote
  #3  
Old 02-03-2010, 09:26 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Hmm.. It appears I was wrong. I did some more reasearch and found two examples of charts showing the reduction per level, and it was 1.5 per level. (i.e. 30 * 5% per level) It just seems off that focus effects are still 50% effective after 10 levels. Reminds me how long ago I played on live.
Reply With Quote
  #4  
Old 02-03-2010, 10:28 PM
gaeorn
Developer
 
Join Date: Apr 2009
Location: USA
Posts: 478
Default

Quote:
Originally Posted by bad_captain View Post
Hmm.. It appears I was wrong. I did some more reasearch and found two examples of charts showing the reduction per level, and it was 1.5 per level. (i.e. 30 * 5% per level) It just seems off that focus effects are still 50% effective after 10 levels. Reminds me how long ago I played on live.
I suppose it could be argued either way. The biggest reason why I would agree with the smaller reduction is back when I played live, there were items that were difficult for a level 65 (max back then) to obtain that had a 25% focus with 5% reduction per level. That would make them worthless to a level 65 if it were the larger reduction per level. In any case, I'm glad the correct formula was confirmed.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:07 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3