Lancer(no buff):1.5
Zhuxi’s Lancer(Dali Horses,20%):1.35
Chinese Lancer(Spirit Way,20%):1.23
Ottomans Lancer(Mehter,15%):1.26
Why is there no pattern between them?
No one knows. Sorry.
Very interesting find! You would think there would be a clear pattern, but there may be a difference in how certain values are adjusted. The aoe 4 modding tool came with a manual of sorts, it describes melee attack mechanics this way:
Melee Attacks
Melee attacks are relatively simple, and can only occur when a unit is adjacent to another.The attack speed of melee attacks are governed only by a combination of a unit’s Aim time, their Wind Up/Wind Down time, and their Cooldown time.
Melee units typically have an Aim time of 0, so Aim is often not a factor for them.
At the very least you’ve discovered a bug. Good eye!
Edit: astute observers may have noticed that reload time was adjusted to compensate for the attack speed upgrade Dali Horses:
New Technology – Dali Horses: All Cavalry gain +20% Attack Speed. 75 food 175 gold, 45 seconds.
Available in the Feudal Age.
Imperial Guard reload time adjusted from 1.5 → 1.62 seconds.
Yuan Raider reload time adjusted from 1.5 → 1.62 seconds.
I am not certain if this is true, but I believe it’s likely that attack speed may not be altered using the same mechanic (reload time vs cooldown) in other places, Spirit Way and Mehter atk speed buff for example. It makes no sense that the attack speed would have a different value if the adjustment was the same (20%)
I would even think that the values for the upgrade are just wrong. It’s happened before.
The only problem is all of the listed abilities and upgrades work via state tree references, which means looking at how they work is impossible.
I wouldn’t be too sure that it was a bug - it could be that some values are being affected and others not by design (despite how inconsistent this makes the resulting number).
Sure, here she is:
To start with 1.5 attack rate means → 1.5 seconds / 1 attacks. Attack speed buffs can multiply into the numerator or denominator;
When a description says something ‘increases attack speed’ it means more attack in the same time period. So the denominator is increased.
Chinese lancer → 1.5 seconds / (1 * 1.2) attacks = 1.5 / 1.2 = 1.25
When a description says ‘reduces reload time’ that usually means the numerator is multiplied by the reduction;
Ottoman lancer → (1.5 * [1 - 0.15]) secnds/ 1 attacks = (1.5 * 0.85) / 1 = 1.275
With small variances for rounding. The mehter should multiply the denominator for a final attack rate of 1.3, but eh, text weirdness.
And the question I have for you is whether Zhuxi lancer was the actual lancer or the imperial guard? Because for the imperial guard;
Zhuxi - attack rate 1.625 → 1.625 seconds / (1 * 1.2) attacks = 1.625 / 1.2 = 1.35.
While the lancer should be around 1.25
I got curious and tested it in-game:
Something’s up with the attack speed buffs, you can see it in the torch attack speed as well. Both effects describe an attack speed increase of 20% but they are different for no apparent reason.
Looks like the Dali Horses research increases attack speed by 10% instead of 20%.
The spriit way interaction with the chinese lancer looks on point - the modified torch attack speed fits the x / 1.2 formula. Even for the lance attack rate.
The dali horsemen tech seems to apply the same formula, but is giving the lancer an attack rate improvement of about 11% as opposed to the advertised 20%.
Can you bring up an image of the zhuxi Imperial Guard? May as well check if its just a weird lancer interaction or if the tech itself is bugged.
Sure thing, I’ll get horseman and yuan raider too:
Looks like it’s the upgrade and not the units, the adjustment in attack speed is the same for all Zhu Xi cavalry.
For the Yuan raider and Imperial Guard;
1.62 seconds / (1 * 1.11) attacks = 1.464 attack rate
And for the horseman;
1.75 seconds / (1 * 1.11) attacks = 1.576 attack rate
Well, thats dang close to the nail and repeatiable to boot. Seems that a) the attack speed formula holds, and b) Dali horses is giving around 11% as opposed to the advertised 20%.