OffensiveProc ?

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

OffensiveProc ?

Postby geshi » Fri Jun 25, 2010 11:52 am

Hey guys :)

Procs don't seem to be proccing much on my server and I looked at the OffensiveProc handler and found this..

Code: Select all
int baseChance = Spell.Frequency / 100;


Now, in the DB the Reaver Lifetap Proc has a Frequency of 80 so that means the baseChance for it to proc is 0.8 but then it puts it to 1 if its under 1 so this Spell has a 1% chance of proccing :shock:

Should the / 100 bit be deleted? any thoughts?
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: OffensiveProc ?

Postby Kakuri » Fri Jun 25, 2010 4:42 pm

No, you should adjust the value of the Frequency column in your database as you like.
User avatar
Kakuri
Developer
 
Posts: 803
Joined: Tue Oct 28, 2008 10:40 pm
Website: http://enlight.hostrator.com/

Re: OffensiveProc ?

Postby geshi » Fri Jun 25, 2010 10:42 pm

So I should adjust every OffensiveProc spell in the db...... if I want a spell with 80% chance I must enter 8000??? this seems very long winded to me..

Can someone explain to me the point of that? :confused:
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: OffensiveProc ?

Postby bluraven » Fri Jun 25, 2010 10:48 pm

You really want it to proc 80% of the time? Wouldn't that be crazy over powered (especially if it's a lifedrain or something like that)? 8% would be more sane even that might be kinda often.
Image
bluraven
Support Team
 
Posts: 1484
Joined: Mon Mar 19, 2007 8:18 am
Location: Las Vegas, NV

Re: OffensiveProc ?

Postby Kakuri » Fri Jun 25, 2010 10:55 pm

80% = 0.8 = 80/100
User avatar
Kakuri
Developer
 
Posts: 803
Joined: Tue Oct 28, 2008 10:40 pm
Website: http://enlight.hostrator.com/

Re: OffensiveProc ?

Postby geshi » Fri Jun 25, 2010 11:17 pm

Code: Select all
 

            int baseChance = Spell.Frequency / 100; // 80 / 100  = 0.8 but rounded up to 1.
            //removed the melee wep code from this comment as theres nothing wrong with that..

            if (baseChance < 1)
                baseChance = 1;

            if (Util.Chance(baseChance)) // that will be Util.Chance(1)) and as far as I know if its Util.Chance(10) for example then it will create a random number between 1 and 100, if the number generated is less than 10 it returns TRUE.
            {

So its Util.Chance(1)) ... that is very low.. Spell.Frequency / 10; is 8% and that sounds ok but still I'm sure its more than that since you will probally not get it off vs a tank 1v1 and also since the spell has quite a low delve:)

Correct me if I am wrong please :D
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: OffensiveProc ?

Postby Graveen » Sat Jun 26, 2010 7:44 am

you are right you must enter 800 in spell.frequency for 8% and 8000 for 80%.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: OffensiveProc ?

Postby geshi » Sat Jun 26, 2010 11:10 am

Craziness, ok thanks :shock:
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: OffensiveProc ?

Postby Tinantiol » Sat Jun 26, 2010 12:53 pm

geshi wrote:Craziness, ok thanks :shock:

if you don't like it, change it for your server, geshi =)
Drydruid Druid 10l4 (Deira off)
Driwyth Shadowblade 9l6 (Deira Off)
Dryinfiwyth Infiltrator 5l6 (Deira off)

Drywyth Cleric 11l7 (Eden)
Dryywyth Druid 11l7 (Eden)
Dryywyyth Bard 11l7 (Eden)
Dryywyith Shaman 11l7 (Eden)
http://genesis-daoc.forums-free.com/
Tinantiol
DOL Devotee
 
Posts: 380
Joined: Sat May 09, 2009 10:33 am
Website: http://genesis-daoc.forums-free.com/
Location: Gaeta, Italy

Re: OffensiveProc ?

Postby Dinberg » Sat Jun 26, 2010 1:02 pm

This is an error and I suggest it gets removed. Clearly the author had a different intention to what has been developed.

int baseChance = Spell.Frequency / 100;

There's no such thing as a fractional int. For any frequency less than 100, this will equal zero. For frequencies like 12.5%, the maximum achievable precision is 12%, for which you have to type 1200. It's silly and ridiculous - the system implies a greater accuracy than can be given. I suggest we abort this and stick to Spell.Frequency.
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: OffensiveProc ?

Postby Etaew » Sat Jun 26, 2010 1:04 pm

I agree with Dinny
Retired DOL Enthusiast | Blog
User avatar
Etaew
Inactive Staff Member
 
Posts: 7602
Joined: Mon Oct 13, 2003 5:04 pm
Website: http://etaew.net
Location: England

Re: OffensiveProc ?

Postby Graveen » Sat Jun 26, 2010 3:47 pm

Please provide a corrective SQL for the databases too ;)
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: OffensiveProc ?

Postby Dinberg » Sat Jun 26, 2010 5:34 pm

It seems the change will not be neccessary due to the ever suprising structure of dol:

spell.cs, ctor(DBSpell)
Code: Select all
m_frequency = dbspell.Frequency * 100;


It seems your frequency in the db should just be the percentage chance, and that the division by 100 is to remove this suprising act from the spell constructor.

Code: Select all
333     m_duration = dbspell.Duration * 1000;
334    m_frequency = dbspell.Frequency * 100;
335    m_pulse = dbspell.Pulse;
336    m_pulse_power = dbspell.PulsePower;
337    m_power = dbspell.Power;
338    m_casttime = (int)(dbspell.CastTime * 1000);
339    m_recastdelay = dbspell.RecastDelay * 1000;


Can't say I like that, maybe we need to annotate the spell.cs properties to more openly reflect that they are not the values of the database entries equivalent records.
The Marvelous Contraption begins to stir...
User avatar
Dinberg
Inactive Staff Member
 
Posts: 4695
Joined: Sat Mar 10, 2007 9:47 am
Yahoo Messenger: dinberg_darktouch
Location: Jordheim

Re: OffensiveProc ?

Postby Sand » Sun Jun 27, 2010 12:59 pm

First I was thinking 80% was correct for the proc chance on this but I was thinking of the HP return precentage for their life drain spells (which vary but do return up to 80%).

The proc rate on this I don't recall but 80% seems high though even at that rate it wouldn't be overly powerful because the effect is quite low and if 80 is what we have it's what someone thought it was, it is certainly not as low as .8% and doubt it as low as 8. I am thinking more in the 50%ish area but it's not like spell makes a huge difference if you stick it at 100%.

You only receive less than 10 points of health back if your lucky on yellow con mobs (players or higher mobs would be even less), for the higher versions, which even if going off every hit is small fraction of their health, these days hardly notice it between regular health regen.
Sand
Server Team
 
Posts: 1375
Joined: Sat May 17, 2008 2:05 am

Re: OffensiveProc ?

Postby Yemla » Mon Jun 28, 2010 10:59 pm

Dinberg wrote:It seems the change will not be neccessary due to the ever suprising structure of dol:

spell.cs, ctor(DBSpell)
Code: Select all
m_frequency = dbspell.Frequency * 100;


It seems your frequency in the db should just be the percentage chance, and that the division by 100 is to remove this suprising act from the spell constructor.

Code: Select all
333     m_duration = dbspell.Duration * 1000;
334    m_frequency = dbspell.Frequency * 100;
335    m_pulse = dbspell.Pulse;
336    m_pulse_power = dbspell.PulsePower;
337    m_power = dbspell.Power;
338    m_casttime = (int)(dbspell.CastTime * 1000);
339    m_recastdelay = dbspell.RecastDelay * 1000;


Can't say I like that, maybe we need to annotate the spell.cs properties to more openly reflect that they are not the values of the database entries equivalent records.


m_frequency = dbspell.Frequency * 100; (freq. = 100) -> 10000

10000
int baseChance = (Spell.Frequency) / 100; (10000 / 100 = 100%)

seems legit so basically if you have less than 1% chance it will = 1% chance

Code: Select all
            if (baseChance < 1)
                baseChance = 1;


so according to the math if accurate 10 on freq = 10% chance
Yemla
Contributor
 
Posts: 215
Joined: Sat Feb 02, 2008 3:21 am
Website: http://www.facebook.com/J.D.Snelling
Location: California


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest