You must be logged in to post messages.
Please login or register

Scenario Design and Discussion
Moderated by Sebastien, Mr Wednesday

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Quirks with units attack speed / projectiles / spread, my findings so far. DE editor
posted 01-10-20 05:08 PM CT (US)   
I will update this thread with pictures and videos show casing what I am discussing. Also if anyone has any cool tricks or findings please share I would love to experiment with some new combinations.

I made a list of noteworthy unit / attribute combinations at the bottom.


Just an impromptu thought dump from my testing these past few days designing heroes for this map I am making.

All modifications done to the units below are with the DE editor only, thus we are limited by the editor.

So with the new DE editor we get a lot of features previously only accessible with Trigger Studio (Projectile id, Attack reload Speed, Max / Total missiles) and I have been playing around with different combinations on different units to see what kind of interesting / unique effects I can create.

Perhaps this has been discussed before but the search function is a bit tedious so I apologize if my findings are redundant.


I will be mostly talk about Projectile id, Attack reload Speed, Max / Total Projectiles, Accuracy and how it relates to certain units and some very interesting combinations I have seen.








Projectile ID - This complete replacement of the projectile. I.E if you change a foot archer to fire ballista bolts it will have all the mechanics of the ballista bolt (unit pass through, speed, travel angle). It is not just a graphic replacement.




Attack Reload Speed - The time between the each subsequent projectile. There is a hard cap on how fast units can fire. Different units have different caps, and they are usually limited by the "back and front swing" animation.

I.E An arbalest will not fire the next shot until he finishes his reloading animation.

However there are a few unique exemptions which I will explain in more depth below.

Lower = Faster. IIRC setting this to Zero will give that unit maximum attack speed.


There are few special units that I know of that essentially bottom out at the lowest reload speed (fastest attack) possible. Perhaps units can attack even faster with mods or maybe this is the fastest they can get due to engine limitations. There is probably more units that have the bottomed out reload speed however these are the ones I personally tested and verified.

These units that I found are:
Jannisary line
Flamethrower
Sharkatzor

I think these are also but I have not tested them and I cannot confirm:
Fire Ship
Cobra Car

These units attack so fast that if you give them a low total / max missiles count it almost seems like they are firing them all at once however they are not Concurrent units (More on Sequential and Concurrent below).

It is interesting that all these units have no attack animation, except for the Jannisary line. At first I thought perhaps the reason for units not being able to achieve the fastest reload speed was due to the need for the front and back swing animations however the Jannisary disproves of this theory.




Accuracy - The % chance of the projectile hitting the target. There can be some interesting tricks you can use with accuracy and there is some information I am not 100% sure on. I know there is a (not sure the name) attribute that actually affects the deviation of the projectile from its original target but there does not seem to be one in the DE editor currently.

It appears there is a minimum base accuracy, a unit will still be able to hit the target even after setting Accuracy to zero or a negative percentage. Missed projectiles will hit and damage adjacent targets depending on the projectile. More on this later as it can be a nice setup for AoE attacks.

As far as I know there are maybe four values affecting the deviation of the projectile from its target.

Projectile - some projectiles have minor to no deviation, even with zero accuracy I.E. ballista bolts. (The deviation on the projectiles cannot be changed in the DE editor currently)

Accuracy - Not only affects how often the projectile hits the targeted object but also the deviation allowed, wont go over what is allowed for that unit. (This explanation may be incorrect as I do not know how the mechanics work. It may be possible that accuracy DOES set the maximum amount of deviation but unit accuracy cannot be adjusted below its base value)

Range - The further the targeted object the more deviation of the projectile.

Unknown value - Maximum allowed deviation of the projectile. I believe this is tied to the unit. (This explanation may be incorrect as I do not know how the mechanics work. It may be possible that accuracy DOES set the maximum amount of deviation but unit accuracy cannot be adjusted below its base value thereby providing different deviations for different units with the same projectile ID.)

Also it appears that blast width only procs when the projectile actually hits a unit. So missed shots that hit the ground do NOT proc blast width while shots that misses the targeted object but hits another target does.



The reason I am going over deviation so much is you can actually create some interesting effects / attacks, more about deviation below.






Before I go into Max / Total Missiles I would like to separate the types of units based on the way they "spawn" projectiles. I haven't tested every unit but I can put most units into 2 categories and a 3rd unique modifier.



Sequential - Fires 1 projectile directly after the other

Concurrent - Fires all projectiles at once

Sequential Unique - Fires 1 projectile however also firing its original projectile ID. *EDIT* This secondary projectile cannot be edited in the current DE editor.




SEQUENETIAL

Most units fall under this category. They will fire / spawn their projectile


CONCURRENT

Fires all of their projectiles at once. I only know of two units that can do this, there may be more but I have not tested. Bombard Cannon and Mangonels. I assume the Bombard cannon re-uses the same code as the Mangonel line since it is odd for it to have that behaviour considering it only fires one projectile unedited.*EDIT* "As far as I can tell melee units fire concurrently, ie. champions and teutonic knights can fire all missiles at once. Typically they fire at the start of their attack animation, not the end, which is why melee units never 'miss', even if they attack a fast unit that has moved almost a tile away by the time the sword comes down.

As a side note, you seem to have limited your tests to projectile firing units, but all units that attack can have a projectile. In the data, a melee unit just has a projectile set of '-1', but change that to arrows and away it will fire." -MR WEDNESDAY



SEQUENTIAL UNIQUE

Hard coded original projectile, cannot be changed in DE editor. Will spawn with every attack animation. I only know of two units that can do this, there may be more but I have not tested. The Cho Ku Nu and Flamethrower. If you change either one of their projectile ID's and add additional projectiles via Total / Max missiles they will shoot with their original projectile and the projectile ID that was edited. This is why the Cho Ku Nu's additional arrow damage cannot be adjusted, its a separate mechanic. This is also why if you use this function to give another archer unit a similar attack like the Cho Ku Nu, all the extra missiles will do the full damage.

*EDIT* "All units have a 'Projectile Unit ID' and a 'Secondary Projectile Unit ID'. For most units the secondary projectile is set to -1, but Chu Ko Nu's have both set to the same Arrow. If you modded the dat file, you could make both another same projectile, but because 'Modify Attribute' only affects the primary projectile, it can't be changed in the editor alone." -MR WEDNESDAY

I.E
Cho Ku Nu
Projectile ID: 1595 "Laser Beam"
Total Missile: 3
Max Total Max Missile: 3

Cho Ku Nu will fire 1 laser beam with the original Cho Ku Nu Arrows per attack animation 3 times at maximum attack speed.


Flamethrower
Projectile ID: 1595 "Laser Beam"
Total Missile: 1
Max Total Max Missile: 1

Flamethrower will shoot a laser and spew the fire attack in the same attack animation.




Max Total Missiles / Total missiles - You will need to have both of them activated. I believe the integer value has to match. I have not tested to see what happens if they do not. This has some interesting effects depending on what projectile ID is used.


There are some quirks, however.


If the unit spawns the projectiles Sequentially (Discussed above), they will essentially burst/volley fire the projectile at 0 reload speed (fastest possible that unit can attack) until it finishes spawning the Max / Total Missiles. The unit will then obey it's given reload speed and continue the process again.

Oddly enough for Sequentially firing units they appear to be capped at 2 projectiles per attack and 1 projectile every other attack during its burst.

I.E if you set an Arbalest Total / Max missiles to 10 they will spawn 2 arrows simultaneously in the first attack animation and then 1 arrow in the next attack animation and then 2 arrows again at its fastest attack speed until the total missiles spawned equals 10. The maximum missiles per shot appears to be 2 for Sequential units.

Now, there is another type of unit that fires Concurrently. As mentioned above I only know of the Bombard Cannon and Mangonel that do this.
These units will fire ALL of the set Total / Max missiles in one attack animation. Usually setting the missile count to anything over around 7 gets you overlap (Depends also on the projectile and its deviation). At a certain point you cannot notice the extra projectiles as they simply overlap each other, they still do damage however.



Bombard firing all projectiles at once



Before I get into the unit combinations I want to talk a little bit about deviation. Deviation is not an attribute that we can modify in DE editor currently. Deviation is the amount of distance that the projectile can miss the targeted object by.


Here is a quick image to what I am talking about:



The blue circles (Deviation) dictates the amount of possible distance a projectile can miss the targeted object by. The interesting factor here is that missed projectiles can still damage another target. Combine this with one of the lowest reload speed units and the right projectile and you can create a AOE dealing unit that does not hurt friendly forces and visually simulate that AOE effect as well.

High deviation is only really valuable when paired with a unit that has the lowest base reload speed.



Jannisary with zero reload, zero accuracy and 676 flame projectile ID. Blankets a large area with fire causing damage to the units caught within it.




Projectiles and units both seem to have their own code for deviation. For example Ballista bolts will always fly straight regardless of what unit spawns it while the 1595 laser beam would depend solely on the units accuracy and base deviation of the unit (if there is one).

For example, giving the flamethrower and sharktazor both lasers, zero accuracy, range and reload speed; The Flamethrower's laser will hit a roughly 7x7 area with deviated projectiles while the sharktazor will hit a roughly 4x4.














Here are some cool attribute and unit combinations I felt was worth mentioning. Promise to update with pictures and videos soon. These are all using Modify Attributes effect.


Flamethrower - Fire AoE unit
Projectile ID: 676
Total Missile - add 2
Max Total Missile - add 2
Accuracy - set 0
Reload Rate - set 0
LOS - add or set // The units Range if higher than default
Range - set 20 or more.



Shoots a stream of fire that slowly falls down to the ground covering an area roughly 7x7. Randomly damaging units that are under it.

At + 50 attack fully upgraded Pallys only last about 3 - 4 ticks

Note: The reason im adding the projectile ID 676 and increasing the missile count is I get an extra fire projectile spawning at the same time the first one is due to the Sequential unique modifier on the Flamethrower. It should spawn 2 - 3 fireballs per sequence. To be honest there is so much flame sprites that its hard to even notice the difference. Also increasing the total missiles anymore than that tends to bug out some of the sprites. It seems like if you have too many things going on at once it sprites will fade out. Also, the fire tends to overlap as well so you will get one powerful stream and the remainder of area will be roughly the same damage as before. Balance with damage and/or minimum range



Flamethrower - Laser AoE unit
Projectile ID: 1595
Accuracy - set 0
Reload Rate - set 0
LOS - add or set // The units Range if higher than default
Range - set 20 or more.

Blasts a roughly 7x7 area with lasers. Functionally the same as the Fire AoE Flamethrower but with lasers and explosions. Balance with damage and/or minimum range.




Hand Cannoneer - Fire AoE unit Infantry
Projectile ID: 676
Accuracy - set 0
Reload Rate - set 0
LOS - add or set // The units Range if higher than default
Range - set 20 or more.

Functionally the same as the Fire AoE Flamethrower but using the Hand Cannoneer instead. It seems like the hand cannoneer actually as more deviation than the flamethrower, so the AoE might actually be bigger. This works for the Hand Cannoneer since like the flamethrower it has the fastest reload speed. The amount of Flame sprites looks about the same as the flamethrower even without the Unique Sequential modifier of the flamethrower.




Hand Cannoneer or Hero - Laser AoE unit infantry
Video: https://www.youtube.com/watch?v=zT7Icx4sgyg
Projectile ID: 1595
Accuracy - set 0
Reload Rate - set 0
LOS - add or set // The units Range if higher than default
Range - set 20 or more.

Functionally the same as the Laser AoE Flamethrower but with I believe bigger deviation. I see lasers fly maybe 1 - 2 tiles more to the sides than the flamethrower. I personally dont like this setup as the unit doesn't quite look as good doing it. The projectile will spawn infront of the Hand cannoneer but since he has the maximum reload speed he never fully completes his front swing while firing. So it never looks like the laser is actually coming out of his gun. I guess the Flamethrower unit pulls this off better as all the laser beams spawn at his nozzle which is static. The Hand Cannoneer Flame unit is better at hiding this animation flaw since the balls of fire kinda cover up his frontal area.




Bombard Cannon or Hero - Ballista Shotgun
Projectile ID: 1114 // There are a few different options here
VIDEO: https://www.youtube.com/watch?v=tSaKPIn_rbY
Total Missile - add 7 or more
Max Total Missile - add 7 or more
Accuracy - Default // Does not matter, Ballista bolts do not deviate.
LOS - add or set // The units Range if higher than default
Range - I like setting it high (20) but its up to you.

Functionally a scorpion where the ballista bolt has a wider AoE during pass through (maybe 2 tiles wide). Bombard cannon will shoot all the bolts at once. The pattern in which they spawn out appears to be the same everytime. Its hard to tell but I believe the maximum amount of bolts visually shown leaving the bombard is 7. Any more missiles added will overlap and you wont visually notice anymore bolts but it will do more damage. There are also a few different projectile ID's you can use for the ballista bolts. There is a few for the scorpion, heavy scorpion and the elephant, you can pick the one you like the look of the most. I don't think Galleon bolts can passthrough but the Caravel bolts should work too.




Flamethrower - Laser gatling tank (Experimental)
VIDEO:https://www.youtube.com/watch?v=FowmVQiZrAs

Trigger 1 - base stats
Default on / Non Looping
Projectile ID: 1595
LOS - add or set // The units Range if higher than default
Range - set 20 or more.
Accuracy - set 0
Reload Rate - Set 3


Trigger 2 - Check for Wind up
Default on / Non Looping
Condition - Object has Target
Display Instructions - Beginning Wind up
Activate Trigger 3

Trigger 3 - Wind up
Default Off / Non Looping
Condition Timer 7
Reload Rate - Subtract 1
Display Instructions - Winding up
Activate Trigger 4

Trigger 4
Default off / Non Looping
Condition timer 10
Accuracy - add 10 // Balance and visuals
Reload Rate - Subtract 1 // This is the cap
Display Instructions - Almost full speed
Activate Trigger 5

Trigger 5
Default off / Non Looping
Condition timer 13
Accuracy - add 20 // We are already at max reload speed, increasing accuracy makes it look like we are shooting even faster.
Object Change - add 25 damage // I have been having issues with Object Change Attack so not sure if this will even work.
Blast Width - Add 1 // Not sure if it will work that well, need some more testing
Display Instructions - Full Power
Activate Trigger 7

Trigger 7 - Loop Back
Default off / Non Looping
Conditions - Timer 30
Accuracy - set 0
Reload Rate - Set 3
Activate Trigger 2


Not sure if I want to de-power it after X amount of time and i want to cancel the wind up mechanic if Object target is not met but I havent had time to play with the different triggers, still experimenting with it.

Due to the isometric nature of the map, reducing the deviation (increasing accuracy) of the projectiles provides the illusion that the unit is attacking faster.

[This message has been edited by dooderek (edited 01-10-2020 @ 10:20 PM).]

Replies:
posted 01-10-20 05:49 PM CT (US)     1 / 5  
Awesome post! I have been experimenting as well. Allow me to add a few things:

Attack Reload Speed - This is actually the break between attacks. That means that if a unit takes 1.1 seconds to fire, then pauses for 0.4 seconds, then fires again, the 'reload' is the 0.4. The reason you can't get a unit to go past a certain limit is even if you set the reload to 0, the attack is still 1.1 seconds long, for this example.
It appears there is a minimum base accuracy, a unit will still be able to hit the target even after setting Accuracy to zero or a negative percentage. Missed projectiles will hit and damage adjacent targets depending on the projectile. More on this later as it can be a nice setup for AoE attacks.
I believe a missile that hits the 'wrong' unit, ie. not the one it was originally aimed for but an adjacent unit, does 50% damage. Not 100% sure though.
only know of two units that can do this, there may be more but I have not tested. Bombard Cannon and Mangonels.
As far as I can tell melee units fire concurrently, ie. champions and teutonic knights can fire all missiles at once. Typically they fire at the start of their attack animation, not the end, which is why melee units never 'miss', even if they attack a fast unit that has moved almost a tile away by the time the sword comes down.

As a side note, you seem to have limited your tests to projectile firing units, but all units that attack can have a projectile. In the data, a melee unit just has a projectile set of '-1', but change that to arrows and away it will fire.
Hard coded original projectile, cannot be changed in DE editor. Will spawn with every attack animation. I only know of two units that can do this, there may be more but I have not tested. The Cho Ku Nu and Flamethrower. If you change either one of their projectile ID's and add additional projectiles via Total / Max missiles they will shoot with their original projectile and the projectile ID that was edited. This is why the Cho Ku Nu's additional arrow damage cannot be adjusted, its a separate mechanic. This is also why if you use this function to give another archer unit a similar attack like the Cho Ku Nu, all the extra missiles will do the full damage.
All units have a 'Projectile Unit ID' and a 'Secondary Projectile Unit ID'. For most units the secondary projectile is set to -1, but Chu Ko Nu's have both set to the same Arrow. If you modded the dat file, you could make both another same projectile, but because 'Modify Attribute' only affects the primary projectile, it can't be changed in the editor alone.

"And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
posted 01-10-20 06:06 PM CT (US)     2 / 5  
Some other notes:

Max missiles vs max total missiles, the second one is for garrisoned objects, such as town centers, which fire extra missiles based on garrison capacity being full.

"And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
posted 01-10-20 09:55 PM CT (US)     3 / 5  
omg THANK YOU FOR EXPLAINING THIS!!!! I shall edit and fix the things you mentioned.
posted 01-11-20 08:18 AM CT (US)     4 / 5  
Good work, dooderek!

A few things I'd like to point out.

(1)

Some units, such as the scorpion / rattan archer / etc., will not fire all projectiles at the same time, but you can force them to .

All you need is use the effect
Modify Attribute > set the Frame Delay Quantity to 0.

After that, if you give the unit multiple projectiles, it will fire all projectiles at the same time for each attack.

For more details, please see this thread here:
https://aok.heavengames.com/cgi-bin/forums/display.cgi?action=ct&f=4,44666,,10
_____________

(2)

Attack Reload Speed (more like "Attack Reload Time").
The smaller the reload time, the faster the unit attacks.
What I have noticed is that when the time is set to 0, it has no effect in speeding up the attack.

To get the reload time to be shorter than 1 second, what worked from my experience is first set the time to 1. Then, use divide and enter a number like 10. This makes the time 1/10 of a second or 0.1 second.

_____________

(3)

Modify Attribute > Blast Width
This will give a unit an area damage. The larger the width, the larger the area of damage. (Note: We modify the Unit, not the projectile)

For example, if you modify the Blast Width of a ranged unit, such as a Mameluke, it will cause an area damage to all units around where the knife hits. It will damage friendly units, just like an onager rock.

If you modify the Blast Width of a melee unit, such as a cavalier, it will do an area damage to the surrounding enemy units every time it hits with the sword. It will not cause friendly damage.

_____________

(4)

Modify Attribute > Blast Level
This will give a unit an area damage against other units, as well as trees. (Note: We modify the Unit, not the projectile)

Blast Level 2 = damage other units
Blast Level 1 = damage units and trees
Blast Level 0 = damage units, trees, and resources (such as forage bush)

Example: If we give a cavalier Blast Level 1, whenever it attacks, it will damage the surrounding trees.

[This message has been edited by Alexandergreat3 (edited 01-11-2020 @ 12:15 PM).]

posted 01-11-20 10:36 AM CT (US)     5 / 5  
There is a blast mode integer in the data, which governs how a unit deals blast damage. Some can only damage enemy units, some friendly units as well, and some Gaia objects like trees. As far as I know this can only be changed through mods.

"And Matt is a prolific lurker, watching over the forum from afar in silence, like Batman. He's the president TC needs, and possibly also the one it deserves." - trebuchet king
Age of Kings Heaven » Forums » Scenario Design and Discussion » Quirks with units attack speed / projectiles / spread, my findings so far. DE editor
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Kings Heaven | HeavenGames