Go Back   EQEmulator Home > EQEmulator Forums > Support > Spell Support

Spell Support Broken Spells? Want them Fixed? Request it here.

Reply
 
Thread Tools Display Modes
  #1  
Old 10-14-2008, 06:05 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ok, I think I have proc chance worked out so it will actually be more in line with how it should be working to add a percentage:

Code:
	ProcBonus += float(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 100.0f;
	
	ProcChance = 0.05f + float(mydex) / 9000.0f;
	ProcBonus += (ProcChance * ProcBonus);
	ProcChance += ProcBonus;
	mlog(COMBAT__PROCS, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
	return ProcChance;
Edit: I tried this code and it didn't work lol. Proccing 100%. Back to the drawing board...
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 10-14-2008 at 04:50 PM..
Reply With Quote
  #2  
Old 10-14-2008, 07:08 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

After looking at it further, it looks like much of the code for proc chance/bonus is bad throughout attack.cpp. I think most of the math needs to be rewritten in order to calculate everything properly. As it is, I don't think it is working anywhere near the way it should be. I will go through the code line by line and see if I can figure out exactly what is being done and if I can find a way to do it the right way or at least better than it is handled now.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 10-14-2008, 08:04 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Before I go through and do this, I want to see if people agree that I am correct in assuming the following:

itembonuses.ProcChance = The total of +Combat Effects from all equiped items
(So, 3 items each with 5 Combat effect on them would total 15, so that means this is getting 15 as the total, or is there some other math going on somewhere?)

spellbonuses.ProcChance = Supposed to be a percentage increase to base ProcChance that is added to the total.
(So, 100% spellbonus would effectively double your base ProcChance, which means a 10% proc chance is now 20% +other bonuses)

Base ProcChance = .05 + (Dex / 9000)
(So, 380 dex (cap at level 75 with all AAs) would be 0.092 base ProcChance)

AABonus = Number of points * 5
(So, 1 point is 5, 2 is 10, 3 is 15, 4 is 20 and 5 is 25 - Defined in the AA for WeaponAffinity)

If that is all correct, then the way I think it should work is to do"(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 100" to equal the total percentage increase.

So, if we have 25 from the AA (+25%), 35 from Combat Effects on items (+35%), and maybe 50 from spellbonuses (50%), our total is 110%. So, we would increase the base ProcChance by another 110%. To do that, we should only need to do ProcChance * ProcBonus and then add that to ProcChance.

The weird part is that sounds correct to me, but that is what I submitted here and it definitely wasn't right:

Code:
	ProcBonus += float(itembonuses.ProcChance + (spellbonuses.ProcChance / 10) + AABonus) / 100.0f;
	
	ProcChance = 0.05f + float(mydex) / 9000.0f;
	ProcBonus += (ProcChance * ProcBonus);
	ProcChance += ProcBonus;
	mlog(COMBAT__PROCS, "Proc chance %.2f (%.2f from bonuses)", ProcChance, ProcBonus);
	return ProcChance;
Using the examples I gave above, 380 Dex with 5 points in Weapon Affinity AA, 35 Combat effects from Items and a buff that adds 50% to Proc Chance, our base will be 0.092 and with the 110% (really more like 210%) increase, it would be 0.193. That is like going from procing 1 out of 10 swings (10% of the time) to 1 out of 5 swings (20% of the time).

I think that sounds close to right even though the base ProcChance calculation may be higher than it should be to work properly with this.

Now, I just need to go through the rest of the proc code for augs and items :P
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 10-14-2008, 08:17 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

what about proc chance field found on items? arent they supose to increase proc chance of that specific item?
Reply With Quote
  #5  
Old 10-14-2008, 08:20 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ya, that is calculated elsewhere. And they can increase or decrease the proc rates. By setting that field to 100, you are basically making the item not add or subtract anything to/from ProcChance. If you set it to 50, it will proc 50% less, and by setting that field to 200, it will proc 200% more.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 10-14-2008, 08:26 PM
ChaosSlayer
Demi-God
 
Join Date: May 2007
Posts: 1,032
Default

what is the default proc chance % btw? and what is exact DEX formula for procs?

bwt do Reactive/Defensive procs allready coded into emu? they were introduced into EQ with DoN expansion
Reply With Quote
Reply


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:25 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3