[not a bug] possible delay_mod bug
Posted: Fri Oct 03, 2008 11:08 pm
If you just want to see what is the bug, go to the red writen paragraph.
I was trying to make some tests using delay_mod attribute from the character object.
I made an attack hook that, in its end, changed the delay mod to:
-1 * CURRENT_SWING_DELAY + X;
so it'd ignore pol's calculated delay and use X as new swing delay.
here is the code: http://darvia.50webs.com/attack.txt
To help you, to just read the attack() function (which is the important one), here it goes:
ws2ms() gets the weapon speed and some value to be used as dexterity and return the time in ms to wait to do another attack.
attackerInfo.cfginfo = "::itemdesc" (it can vary, but this is its value within the test I've made).
attackerInfo.type = object type of intrinsic weapon (it can vary, but this is its value within the test I've made).
weaponSpeed = is holding the intrinsic weapon speed (found in itemdesc) (it can vary, but this is its value within the test I've made).
delayTime = -3000
now, the possible bug is pol core is chancing delay_mod to 0. the output of syslog is returning something like this:
So, as you can see... If you take a look at my code, I never change it to 0, CORE is doing that.
You'll notice, also, that I have two lines like this:
I did it to see if this 0 value was being set while the attack hook is running, but it doesn't helps much, because if CORE change delay_mod to 0 while the script is running, I don't think I can predict where it's going to change.
Before using delayTime, I was using this:
Which would cancel the current delay set and use 500 as the new delay. Same thing, syslog output was alternating between 0 and some negative value (-3212 in that case).
It can be helpful to point out that my pc's dex is very very low, 35 to be exact.
In general, the possible bug here is that POL is changing the value os delay_mod to 0 before using it, which makes it useless.
As a post note here, what I think it is happening is that POL CORE automaticaly changes delay_mod to 0 after using it (tries to), I think this set to 0 thing could be left to the scripter, don't you think?
using:
Windows XP sp2
POL 097 released at: September 01, 2008
when POL is starting, this msg appears, it seems to be a version identifier, so, its here too:
I was trying to make some tests using delay_mod attribute from the character object.
I made an attack hook that, in its end, changed the delay mod to:
-1 * CURRENT_SWING_DELAY + X;
so it'd ignore pol's calculated delay and use X as new swing delay.
here is the code: http://darvia.50webs.com/attack.txt
To help you, to just read the attack() function (which is the important one), here it goes:
ws2ms() gets the weapon speed and some value to be used as dexterity and return the time in ms to wait to do another attack.
attackerInfo.cfginfo = "::itemdesc" (it can vary, but this is its value within the test I've made).
attackerInfo.type = object type of intrinsic weapon (it can vary, but this is its value within the test I've made).
weaponSpeed = is holding the intrinsic weapon speed (found in itemdesc) (it can vary, but this is its value within the test I've made).
delayTime = -3000
now, the possible bug is pol core is chancing delay_mod to 0. the output of syslog is returning something like this:
Code: Select all
[pkg/combat/attack.ecl]: delay mod:0
[10/04 03:43:30] [pkg/combat/attack.ecl]: delay mod:-3000
[10/04 03:43:31] [pkg/combat/attack.ecl]: delay mod:0
[10/04 03:43:34] [pkg/combat/attack.ecl]: delay mod:-3000
[pkg/combat/attack.ecl]: delay mod:0
[10/04 03:43:37] [pkg/combat/attack.ecl]: delay mod:0
[pkg/combat/attack.ecl]: delay mod:-3000
[10/04 03:43:41] [pkg/combat/attack.ecl]: delay mod:-3000
[pkg/combat/attack.ecl]: delay mod:0
[10/04 03:43:44] [pkg/combat/attack.ecl]: delay mod:0
[pkg/combat/attack.ecl]: delay mod:-3000
[10/04 03:43:48] [pkg/combat/attack.ecl]: delay mod:-3000
[pkg/combat/attack.ecl]: delay mod:0
[10/04 03:43:51] [pkg/combat/attack.ecl]: delay mod:0
You'll notice, also, that I have two lines like this:
Code: Select all
attacker.delay_mod := delayTime;Before using delayTime, I was using this:
Code: Select all
(-1 * ws2ms(weaponSpeed, dexterity)) + 500It can be helpful to point out that my pc's dex is very very low, 35 to be exact.
In general, the possible bug here is that POL is changing the value os delay_mod to 0 before using it, which makes it useless.
As a post note here, what I think it is happening is that POL CORE automaticaly changes delay_mod to 0 after using it (tries to), I think this set to 0 thing could be left to the scripter, don't you think?
using:
Windows XP sp2
POL 097 released at: September 01, 2008
when POL is starting, this msg appears, it seems to be a version identifier, so, its here too:
Code: Select all
POL097-2008-09-01 Coregina (VS.NET 2003)
compiled on Sep 1 2008 21:57:58