Page 1 of 1

OffensiveProc ?

PostPosted: Fri Jun 25, 2010 11:52 am
by geshi
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?

Re: OffensiveProc ?

PostPosted: Fri Jun 25, 2010 4:42 pm
by Kakuri
No, you should adjust the value of the Frequency column in your database as you like.

Re: OffensiveProc ?

PostPosted: Fri Jun 25, 2010 10:42 pm
by geshi
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:

Re: OffensiveProc ?

PostPosted: Fri Jun 25, 2010 10:48 pm
by bluraven
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.

Re: OffensiveProc ?

PostPosted: Fri Jun 25, 2010 10:55 pm
by Kakuri
80% = 0.8 = 80/100

Re: OffensiveProc ?

PostPosted: Fri Jun 25, 2010 11:17 pm
by geshi
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

Re: OffensiveProc ?

PostPosted: Sat Jun 26, 2010 7:44 am
by Graveen
you are right you must enter 800 in spell.frequency for 8% and 8000 for 80%.

Re: OffensiveProc ?

PostPosted: Sat Jun 26, 2010 11:10 am
by geshi
Craziness, ok thanks :shock:

Re: OffensiveProc ?

PostPosted: Sat Jun 26, 2010 12:53 pm
by Tinantiol
Craziness, ok thanks :shock:
if you don't like it, change it for your server, geshi =)

Re: OffensiveProc ?

PostPosted: Sat Jun 26, 2010 1:02 pm
by Dinberg
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.

Re: OffensiveProc ?

PostPosted: Sat Jun 26, 2010 1:04 pm
by Etaew
I agree with Dinny

Re: OffensiveProc ?

PostPosted: Sat Jun 26, 2010 3:47 pm
by Graveen
Please provide a corrective SQL for the databases too ;)

Re: OffensiveProc ?

PostPosted: Sat Jun 26, 2010 5:34 pm
by Dinberg
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.

Re: OffensiveProc ?

PostPosted: Sun Jun 27, 2010 12:59 pm
by Sand
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.

Re: OffensiveProc ?

PostPosted: Mon Jun 28, 2010 10:59 pm
by Yemla
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