Page 3 of 3

Re: Unit Attack Speed

Posted: Sun May 02, 2010 6:53 am
by CRC
I had some experimentation to test these matters. I've done just for warrior. Fomula must be following;

whole ticks = starting ticks + attack ticks + recovery ticks

starting ticks = randomly 1 or 2 ticks, frame is also randomly chosen from Moving sequence
attack ticks = total attack frames * ticks per frame
recovery ticks = random ticks but its average must be (17.5 + (RT - RTED) * 30), can't be less than 1, frame is randomly chosen from Holding For Attack sequence

17.5 is somehow I called Default Recovery Time. Kills are up to 5 as mentioned above. Starting ticks is probably not a part of attack sequence but it is just needed to transition once to Moving sequence to start another attack sequence. But anyway, it causes attack delay which affects dps (damage per second).

So warrior attack speed average will be;

1.5 + 6 * 2 + 17.5 + (0.1 - 0.1 * kills) * 30 = 34 - 3 * kills (ticks)
(1.13 - 0.1 * kills (seconds)).

This is guessed only by using warrior, so I can be wrong. I might test a bit more.

Re: Unit Attack Speed

Posted: Sun May 02, 2010 9:09 am
by ThreeTigerSilverWind
I've noticed that the faster a unit moves (terrain speed), there is an increased delay in the unit's attack and consequently the unit's overall damage per second (dps).

I once changed a unit's speed from its default 0.039 to 0.080 and the unit performed the hold for attack sequence, prior to attacking, far more often at the higher speed. At faster movement speeds, units seems to collide into their targets more often before actually attacking.

In "real life" we associate faster movement speed with the ability to hit your opponent first, but here, faster movement only results in getting hit first.

Re: Unit Attack Speed

Posted: Mon May 03, 2010 3:35 pm
by CRC
Tested on the other units, Stygian Knight, Bowman (both arrow and knife), and Trow (punch and kick). Now I'm pretty sure my fomula is correct. Simplified fomula will be following:

Average Attack Speed = (attack frames * ticks per frame) + (19 + (RT - RTED * kills) * 30) (ticks).

RT means Recovery Time, while RTED means Recovery Time Experience Delta. 2nd term is 2.5 at minimum. 30 ticks is one second and kills are 5 at maximum as you already know.

And about unit moving speed, I don't know if it really changes attack speed as you say ThreeTigerSilverWind. What I meant in my last post is, game engine prevents direct transition from attacking sequence to another attacking sequence. So sequences need to transition from attacking sequence to moving sequence, and then another attacking sequence. There is not moving speed involved I think, but I can be wrong.

Re: Unit Attack Speed

Posted: Tue May 04, 2010 12:48 pm
by Deqlyn
If you want a faster attacking warrior just use Jade and get it from Heroes and Madmen. Toecutter changed the animation to as fast as possible I believe.

Re: Unit Attack Speed

Posted: Tue May 04, 2010 3:13 pm
by Pyro
I don't think he is looking for a faster unit. I think he is just trying to understand the specifics of the game engine. Jade wouldn't help with what you think, Deq. You likely mean Amber or Oak.

Re: Unit Attack Speed

Posted: Tue May 04, 2010 3:39 pm
by Deqlyn
I see its all drawn out in that 1.5.1 link i think of max and mins. Jade would be used to extract Toe's HG from HAM

Re: Unit Attack Speed

Posted: Tue May 04, 2010 11:11 pm
by Fury IX
Jade is for overheads and bitmaps

Chaos or untag would be the tools to use.

Re: Unit Attack Speed

Posted: Tue May 04, 2010 11:34 pm
by Deqlyn

Re: Unit Attack Speed

Posted: Wed May 05, 2010 12:52 am
by Pyro
As Fury has stated, Jade can only import bitmaps for the creation of overhead maps and netgame pregames.

To alter collections, you use Amber or Oak. Though Amber and Oak can do what Jades does as well. To extract tags from plugins, you can use UnTag or Oak. Chaos can extract specific sets of tags from local folders, I don't recall if it can extract them from plugins. Whatever Toe did to his Heron can easily be done with a collection editor (Amber or Oak). All you would have to do is alter a value (ticks per frame), or even remove bitmaps so the sequence is shorter.

And I don't know what 1.5.1 link you are referring to.

Re: Unit Attack Speed

Posted: Wed May 05, 2010 8:19 am
by Deqlyn
I was thinking of untag. You could use untag to steal Toes HG. The link is in my other post ^^^ pyro. Must have posted at the same time or you missed it.

Re: Unit Attack Speed

Posted: Wed May 05, 2010 10:54 am
by Pyro
I don't see any other post in this thread with a link to anything untag related or 1.5.1 related. But I guess you are referring to the Fear doc link, that is not 1.5.1 related. Each update comes with that file and has been updated along the way. It came with changes in the 1.7.1 version though.