[not a bug] possible delay_mod bug

Bug Reports relating to the 097 core are moved to this forum once solved.

Moderator: POL Developer

Locked
phao
Grandmaster Poster
Posts: 129
Joined: Fri Aug 31, 2007 2:25 pm
Location: Brazil

[not a bug] possible delay_mod bug

Post by phao »

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:

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
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:

Code: Select all

attacker.delay_mod := delayTime;
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:

Code: Select all

(-1 * ws2ms(weaponSpeed, dexterity)) + 500
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:

Code: Select all

POL097-2008-09-01 Coregina (VS.NET 2003)
compiled on Sep  1 2008 21:57:58
Last edited by phao on Sun Nov 02, 2008 8:02 am, edited 1 time in total.
phao
Grandmaster Poster
Posts: 129
Joined: Fri Aug 31, 2007 2:25 pm
Location: Brazil

Re: possible delay_mod bug

Post by phao »

Hey, this is not a bug, I've talked to turley some weeks ago and I learned how to make that work.

I've writen a guide about it, also.

http://darvia.50webs.com/swing_time_handling.html
Luth
Former Developer
Posts: 200
Joined: Mon Jan 30, 2006 8:10 am

Re: possible delay_mod bug [not a bug]

Post by Luth »

Good work. Much obliged!
Locked