Page MenuHomeWildfire Games

[gameplay] Adjust cavalry movement speed (and melee attack range)
ClosedPublic

Authored by wraitii on Jan 27 2021, 2:16 PM.

Details

Summary

See https://code.wildfiregames.com/D3482#153560. This adjust stats to reduce instances of units phasing through each other, to a level that should be acceptable for the release.

The problem is that melee cavalry in MP can move by 10 meters in one go, which means they tend to overshoot their target (range = 4). By reducing that to 9 meters per turn, and increasing range to 6, it's more likely that the cavalry will end up in the happy path.

Comparison with D3482:

Test Plan

See video.

Event Timeline

wraitii created this revision.Jan 27 2021, 2:16 PM
Owners added a subscriber: Restricted Owners Package.Jan 27 2021, 2:16 PM

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext_dbg.a(tinygettext.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblobby_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libglooxwrapper_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file

See https://jenkins.wildfiregames.com/job/macos-differential/3076/display/redirect for more details.

wraitii requested review of this revision.Jan 27 2021, 3:49 PM
Stan retitled this revision from Adjust stats to fix chasing to [gameplay] Adjust stats to fix chasing.Jan 27 2021, 3:50 PM
Stan added a reviewer: Balancing.
wraitii updated this revision to Diff 15725.EditedJan 27 2021, 4:26 PM
wraitii added a subscriber: Nescio.

Proper change.

Per @Nescio in D3476, this leaves Cavalry with a 2.0 multiplier, removes the 1.1 from Melee cav, and changes ranged to 0.8 multipler.
Speeds go:

Melee cavalry: 19.8 > 18
Ranged cavalry: 16.2 > 14.4
The speed ratio remain basically the same. Note that ranged Infantry is at 10.8, melee infantry at 9.

The cavalry walk speed reductions are fine by me, melee cavalry being twice as fast as melee infantry seems reasonable.
However, why is the run multiplier reduced for citizen cavalry, but not for champions or heroes?
And what is the cavalry melee attack range increases?
A better explanation in the summary would be nice.

borg- added a subscriber: borg-.Jan 27 2021, 5:59 PM

To me it looks good for melee cavalry, safer, especially for champion cavalry, but not sure about ranged cavalry, maybe it seems a little too slow, are you willing to accept 15.0?

However, why is the run multiplier reduced for citizen cavalry, but not for champions or heroes?

I think I've fixed that in the latest diff.

And what is the cavalry melee attack range increases?

This is part of the fix. The problem is that cavalry will under/overshoot the target when chasing it, since in MP they move by 9 meters per second. So one turn they're 7 meters away, the next they're -2 meters away, which looks bad / collides (but I'll merge D3482 so it'll look bad). Obviously, if the range is greater than the movement speed, this can't happen. However a range of 9 is really big. 6 is still better than 4, but not too high.
It's basically more likely that the cavalry will be 'lucky' and start a turn in the 0-6 range than in the 0-4 range.

wraitii edited the summary of this revision. (Show Details)Jan 27 2021, 6:01 PM
In D3483#153685, @borg- wrote:

To me it looks good for melee cavalry, safer, especially for champion cavalry, but not sure about ranged cavalry, maybe it seems a little too slow, are you willing to accept 15.0?

15 works too, but to be honest I'm not sure it makes much of a difference. It's multiplier of 0.83 vs 0.8. It's still fairly hard to inflict much damage, because the chaser stops when it attacks.

I think I've fixed that in the latest diff.

Yes, you did. I must have been looking at the wrong file, or scrolling too quickly.

This is part of the fix. [...]

Thank you for the explanation. How long is a turn in single-player? 100 ms? The longer range looks bad, though.

To me it looks good for melee cavalry, safer, especially for champion cavalry, but not sure about ranged cavalry, maybe it seems a little too slow, are you willing to accept 15.0?

Both 0.8× (i.e. 14.4) and 0.85× (i.e. 15.3) seem reasonable values, 0.9× (i.e. 16.2) is probably too fast to quickly intercept and 0.75× (i.e. 13.5) too slow to be effective vs infantry.

This is part of the fix. [...]

Thank you for the explanation. How long is a turn in single-player? 100 ms? The longer range looks bad, though.

200ms, meaning cavalry moves at most by 3.6 meters, which is inside the range of 4.
I fear the range increase is necessary at the moment, but I have a diff (D3275) that should make it possible to reduce MP turns for A25.
TBH I think it looks OK for spearmen, and for the others it's not great but not awful, because the head of the horse isn't too far from the target.

Both 0.8× (i.e. 14.4) and 0.85× (i.e. 15.3) seem reasonable values, 0.9× (i.e. 16.2) is probably too fast to quickly intercept and 0.75× (i.e. 13.5) too slow to be effective vs infantry.

I'd rather err on the side of too little, because ranged cavalry still takes several hits to die by melee cav, and while One cav can path well, several will block each other.

About the run multiplier, have you considered simply lowering the value in template_unit.xml, e.g. from 1.67× to 1.5×? If the current number is problematic for cavalry, then it's probably problematic for animals, elephants, infantry, traders, etc. as well, isn't it?

This is part of the fix. [...]

Thank you for the explanation. How long is a turn in single-player? 100 ms? The longer range looks bad, though.

200ms, meaning cavalry moves at most by 3.6 meters, which is inside the range of 4.
I fear the range increase is necessary at the moment, but I have a diff (D3275) that should make it possible to reduce MP turns for A25.
TBH I think it looks OK for spearmen, and for the others it's not great but not awful, because the head of the horse isn't too far from the target.

If it's necessary for multiplayer right now, then maybe commit it separately, and with a message that it is to be reverted later.

Nescio retitled this revision from [gameplay] Adjust stats to fix chasing to [gameplay] Adjust cavalry movement speed (and melee attack range).Jan 27 2021, 6:31 PM

About the run multiplier, have you considered simply lowering the value in template_unit.xml, e.g. from 1.67× to 1.5×? If the current number is problematic for cavalry, then it's probably problematic for animals, elephants, infantry, traders, etc. as well, isn't it?

While yes, the same 'trick' can be used (putting units in formation to make them move faster), the effect is greater for cavalry since it's already faster. Infantry goes from 10.8 to 18, whereas melee cav goes up to 30, and ranged cavalry to around 25.

It's also a bigger problem for cavalry because it's more likely that players will use formation-cavalry to avoid damage, by ordering them to retreat in formation. The higher speed makes them disproportionately hard to catch for infantry.
Ranged infantry could perhaps use a reduction also, but it's caught up reasonably easily by ranged cavalry as-is and I don't think it's nearly as easy to "kite" damage that way.

The other unit types are slow enough IMO that's irrelevant.

While yes, [...]

Basically it's only problematic for formations? Shouldn't that be changed then?
template_formation.xml has a <Formation/SpeedMultiplier> of 1 but a <UnitMotion/RunMultiplier> of 100.

wraitii added a comment.EditedJan 27 2021, 6:41 PM

Basically it's only problematic for formations? Shouldn't that be changed then?
template_formation.xml has a <Formation/SpeedMultiplier> of 1 but a <UnitMotion/RunMultiplier> of 100.

That's actually a different thing. RunMultiplier acts as a "max speed" for formations. For units, it's currently only used when in formation (which is why it's only problematic for formations), when units need to "catch up" to their position. Edit: well and chasing, but cavalry is already so much faster than whatever can flee that it doesn't matter much.

Reducing the formation run multiplier would just give a max speed to formation controllers, but wouldn't affect individual unit's ability to move faster within.

wraitii updated this revision to Diff 15730.Jan 27 2021, 6:46 PM

Multiply ranged by 0.835 to give them a nice round "15" walk speed in-game.

RunMultiplier acts as a "max speed" for formations. For units, it's currently only used when in formation (which is why it's only problematic for formations), when units need to "catch up" to their position.

If I understand correctly, that means units without formations move at their walk speed, whereas units in formations move at somewhere between their walk speed and run speed.
Lowering the run speed multiplier only for cavalry means infantry benefits relatively more from being in a formation; that seems rather undesirable.

Multiply ranged by 0.835 to give them a nice round "15" walk speed in-game.

Unnecessarily precise. Relative speed matters, absolute numbers are unimportant.

binaries/data/mods/public/simulation/templates/template_unit_cavalry_ranged.xml
35

Please keep this in *_archer.xml and *_javelineer.xml, for symmetry with their champion and hero counterparts.

If I understand correctly, that means units without formations move at their walk speed, whereas units in formations move at somewhere between their walk speed and run speed.

Yes and no. The formation walk speed is the minimum speed of units within (so don't put rams in your formation). However, units that aren't at their designated position in the formation will "catch up" and move faster, up to their run multiplier. It's generally only for a short period of time.

Lowering the run speed multiplier only for cavalry means infantry benefits relatively more from being in a formation; that seems rather undesirable.

Relatively, yes, but I think absolute numbers do matter here. I mean I could just lower it to 1.4 for everyone, I don't think it's particularly important.

Unnecessarily precise. Relative speed matters, absolute numbers are unimportant.

It is shown in the GUI, where arguably 15 is better than 14.9

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library

See https://jenkins.wildfiregames.com/job/macos-differential/3087/display/redirect for more details.

It's generally only for a short period of time.

Then why is it imperative the cavalry run speed is reduced?

Relatively, yes, but I think absolute numbers do matter here. I mean I could just lower it to 1.4 for everyone, I don't think it's particularly important.

It would be easier to understand, though, at least for me.

It is shown in the GUI, where arguably 15 is better than 14.9

Keep in mind there are also technologies and auras modifying cavalry speed, so you'll get a decimal anyway sooner or later.
Regardless, how something is displayed in the interface shouldn't matter when deciding upon a value in a simulation template.

Then why is it imperative the cavalry run speed is reduced?

Because that short amount of time matters a lot when you can cover a long distance in a short time to get away from enemy fire.

Regardless, how something is displayed in the interface shouldn't matter when deciding upon a value in a simulation template.

While I see your point, I have no particular reason to pick 0.8, 0.85 or any other value, so "how it looks in the interface" is as good a discriminant as any.

Because that short amount of time matters a lot when you can cover a long distance in a short time to get away from enemy fire.

The formation as a whole can't move faster than its slowest unit, right? So while individual units may run, a cavalry-only formation as a whole can move away from the enemy only at the walk speed. Or am I mistaken?
I'm genuinely trying to understand, yet I still fail to see why the run speed is particularly problematic.

Because that short amount of time matters a lot when you can cover a long distance in a short time to get away from enemy fire.

The formation as a whole can't move faster than its slowest unit, right? So while individual units may run, a cavalry-only formation as a whole can move away from the enemy only at the walk speed. Or am I mistaken?

You're correct but the formation controller "pops" into existence in the middle of all units. SO if a few units stay back (which is common if you're trying to kite damage), then your entities at the front will get a large speed boost.

You're correct but the formation controller "pops" into existence in the middle of all units. SO if a few units stay back (which is common if you're trying to kite damage), then your entities at the front will get a large speed boost.

Sorry, I don't understand. If a few units stay back, then I can see those stragglers temporarily move faster to catch up with the rest of their formation. However, how does this give the units in front “a large speed boost”?

Sorry, I don't understand. If a few units stay back, then I can see those stragglers temporarily move faster to catch up with the rest of their formation. However, how does this give the units in front “a large speed boost”?

I'll try with a 1d schema. X is your units, F is the formation controller, O is the enemy, '.' is empty space.
Say you have units like that:

XX....X..O
XX....X..O
XX....X..O

If you order them all back in formation, the controller will appear there:

XX....X..O
XXF...X..O
XX....X..O

And so the units on the right will move very quickly away from the enemy.

XXX...<..O
XFX...<..O
XXX...<..O

Yes, the units at the back, not those in front.
And to compensate for the formation as a whole, the units in front move slower than they could, don't they?

Yes, the units at the back, not those in front.
And to compensate for the formation as a whole, the units in front move slower than they could, don't they?

well, at the "combat front", but in the back wrt to the formation.
No units in the front will move at the same speed as the formation, i.e. their regular walk speed.


I actually have a rather dumb but good reason to not switch all units to 1.4: their animation flickers because of rP24456 (since a > 1.2 speed is actually often achieved). It doesn't happen with cavalry so much since it moves faster and the animation changes less.

well, at the "combat front", but in the back wrt to the formation.

Fleeing soldiers don't fight.

No units in the front will move at the same speed as the formation, i.e. their regular walk speed.

The formation as a whole moves at the walk speed of its slowest member, right? And the formation's position is basically the average of all its members' positions, isn't it? So members that are ahead of their perfect formation position will move more slowly to compensate, just like members left behind will move faster to catch up?

The formation as a whole moves at the walk speed of its slowest member, right? And the formation's position is basically the average of all its members' positions, isn't it? So members that are ahead of their perfect formation position will move more slowly to compensate, just like members left behind will move faster to catch up?

Yes, but there are probably more opportunity to have a few stragglers behind than a lot, depending on the situation. Anyways, the entities that are fleeing are important, the ones in front, don't care what happens to them.


I do have to merge this, and I would rather do it soon so it gets tested, and so far you've been the only one to voice your opinion on the 1.4 / 1.67 thing - It seems rather a reasonable change to me, so I'll go ahead with it, and I'll see if we need to lower all entity multipliers at a later time, possibly for A25.

I do have to merge this, and I would rather do it soon so it gets tested, and so far you've been the only one to voice your opinion on the 1.4 / 1.67 thing - It seems rather a reasonable change to me, so I'll go ahead with it, and I'll see if we need to lower all entity multipliers at a later time, possibly for A25.

To be clear, I'm not necessarily opposed to a run speed reduction, I'm merely trying to understand why it's necessary.

Yes, but there are probably more opportunity to have a few stragglers behind than a lot, depending on the situation. Anyways, the entities that are fleeing are important, the ones in front, don't care what happens to them.

It matters when the formation is moving towards an enemy. A reduction in run speed means that stragglers will cause the formation as a whole to reach enemy artillery later.

To be clear, I'm not necessarily opposed to a run speed reduction, I'm merely trying to understand why it's necessary.

I can't really prove it's necessary, but it helps on the balance front & the chasing bug front, by making the cavalry move slower, pretty much.

It matters when the formation is moving towards an enemy. A reduction in run speed means that stragglers will cause the formation as a whole to reach enemy artillery later.

"As a whole", yes, but the formation controller is not slowed down by stragglers. If that wasn't clear (and I think it wasn't), when I say that the formation moves as fast as the slowest unit, I'm talking about theoretical walk speed, "base" walk speed, not the actual movement speed.

borg- added a comment.Jan 27 2021, 9:55 PM

I can't prove it without a lot of games, but I'm pretty sure that the reduced speed of the champion cavalry is a good change. I know that is not the focus of this patch, but it is an improvement anyway.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 27 2021, 10:22 PM
This revision was automatically updated to reflect the committed changes.