Page MenuHomeWildfire Games

[gameplay] Fix chasing range cavalry - multipronged approach.
ClosedPublic

Authored by wraitii on Jan 17 2021, 7:24 PM.

Details

Reviewers
None
Group Reviewers
Balancing
Commits
rP24708: [gameplay] Fix chasing range cavalry
Summary

Ranged cavalry currently cannot be efficiently chased by melee cavalry. This is very problematic.

This fixes that in a few different, complementary ways:

  • Standardise the range of melee cav to 4.
  • Decreases the speed of ranged cavalry slightly (rP24435 slowed swordsman down, spearmen were already a bit slow).
  • Fixes UnitMotion to better chase units, by increasing direct-range distance and making "total" short paths recompute paths better.
  • Gives some free rotation time for slight angles to units. This is necessary to fix chasing. If you check the 'avoidance' scenario in the attached map, you'll see that this is necessary for some angles. It doesn't seem to impact dancing much beyond that, particularly with D3225.
Test Plan

Run the test map. Chase Ranged Cavalry with Melee Cav.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Jan 17 2021, 7:24 PM
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Jan 17 2021, 7:24 PM

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
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 file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framewor

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

wraitii requested review of this revision.Jan 17 2021, 8:24 PM
Nescio retitled this revision from Fix chasing range cavalry - multipronged approach. to [gameplay] Fix chasing range cavalry - multipronged approach..Jan 17 2021, 8:25 PM
Nescio added a subscriber: Nescio.Jan 17 2021, 8:29 PM

Don't forget the champion and hero templates.

binaries/data/mods/public/simulation/templates/template_unit_cavalry_melee_maceman.xml
11 ↗(On Diff #15439)

Let's give them the same as axemen and swordsmen.

Attack range is useful when units are massed. While I'm not opposed to giving melee cavalry a bit more range (or at least standardize to 4), I fail to see how this helps with chasing: it's simply the distance at which they stop moving and start attacking, isn't it?

Attack range is useful when units are massed. While I'm not opposed to giving melee cavalry a bit more range (or at least standardize to 4), I fail to see how this helps with chasing: it's simply the distance at which they stop moving and start attacking, isn't it?

It is. It helps because they have to chase less far away to hit, and it increases the "window of opportunity" in which the unit can land a hit, because of movement speed & timing issues it's better to not have that too small.

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

Dont know about decrease about new move speed.

In D3402#151186, @borg- wrote:

Dont know about decrease about new move speed.

I don't think it's a huge debuf, makes the meta less "get ranged champ cavalry" IMO. What are your doubts ?

As @ValihrAnt wrote elsewhere:

@ValihrAnt wrote:
@wraitii wrote:
@Nescio wrote:

By the way, there is still an open patch by @ValihrAnt reducing cavalry archer speed: D2585 A lot has changed since then; is it still relevant?

I'm lowering the speed of all ranged cavalry in D3402. I'm not sure if we need a specific nerf for the archer early rush still.

With the now reduced archer range I don't think it's needed as tower defense should now be viable to defend the Phase 1 Ptolemie camel rush.

I'm not sure the movement speed reduction is necessary either.

I'm not sure the movement speed reduction is necessary either.

I think it makes a large difference to the effectiveness of the melee cavalry when chasing, and makes the ranged cavalry less dominant at map control. IMO it should be kept, though maybe bumped from 0.9 to 0.92/95 ?

How about making melee cavalry a bit faster instead?

wraitii added a comment.EditedJan 19 2021, 8:19 AM

How about making melee cavalry a bit faster instead?

I'd rather not, it's already really fast compared to infantry and others.


For comparison's sake, AoE 2 has inf melee at 0.9, inf archer at speed 0.96, heavy cav at 1.35, light cav at 1.5, Archer cav at 1.4 . Our speed ratio is more like 9 > 20.

I can imagine points 1, 3 and 4 already fix the issue?

I can imagine points 1, 3 and 4 already fix the issue?

Without the patch, the ranged unit is not killed in 5 minutes. With 1, 3, 4 it's killed in 76 seconds. With 2 on top, it's killed in 40 seconds. If I set it to 0.95, it's killed in 53 seconds.
That's twice as fast.
I don't think we can do without the speed reduction, no.

wraitii updated this revision to Diff 15511.Jan 19 2021, 10:20 AM

Update Hero & Champions templates too. Fix Hero melee cav not having the speed bonus while at it.

I reduced the range of the Melee cav to the same as the Melee infantry because, on second thought, this probably gives an unfair advantage to cavalry against melee, particularly since their counter (spearmen) have a range of 4.
However, this does require reducing movement speed to 0.9, with a speed of 0.93 I get 57 seconds (thus proving that the range has an impact, too).

Freagarach added inline comments.Jan 19 2021, 10:23 AM
binaries/data/mods/public/maps/scenarios/unit_dancing_test_triggers.js
153 ↗(On Diff #15511)

Different map then?

wraitii added inline comments.Jan 19 2021, 10:25 AM
binaries/data/mods/public/maps/scenarios/unit_dancing_test_triggers.js
153 ↗(On Diff #15511)

Not going to add a hundred maps :p
It's a similar enough problem IMO.

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
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 file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//CoreVideo.framewor

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

Freagarach added inline comments.Jan 19 2021, 10:27 AM
binaries/data/mods/public/maps/scenarios/unit_dancing_test_triggers.js
153 ↗(On Diff #15511)

We could have a folder, unit_motion_integration_tests ;)

I'd rather not, it's already really fast compared to infantry and others.

Changing ranged cavalry movement speed alters their effectiveness vs infantry. Melee cavalry can't hit from a distance, so their movement speed affects other entities (e.g. melee infantry) less strongly.

I reduced the range of the Melee cav to the same as the Melee infantry because, on second thought, this probably gives an unfair advantage to cavalry against melee, particularly since their counter (spearmen) have a range of 4.

For comparison, cavalry has a footprint radius of 3, infantry of 1.5, so a range of 4 means two rows of infantry spearmen could hit the unit in front of them, at least in theory; the equivalent melee cavalry range would be 7.
A range of 4 for all melee cavalry is actually better than 3 and it's fair, it's basically half their footprint + 1; that's also what I've been using for animals.

Changing ranged cavalry movement speed alters their effectiveness vs infantry.

yes, but that's actually part of the plan here. This is a straight debuff to ranged cavalry.
@Feldfeld seems to think this is a move in the right direction.

A range of 4 for all melee cavalry is actually better than 3 and it's fair, it's basically half their footprint + 1; that's also what I've been using for animals.

So I should change everything to 4?

@Feldfeld seems to think this is a move in the right direction.

Fine by me then.

So I should change everything to 4?

All melee cavalry attacks, yes. In my opinion that's something that should have been done anyway, regardless of this patch.

wraitii updated this revision to Diff 15524.Jan 19 2021, 2:17 PM

Standardize melee cav to 4

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/libengine_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 file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//Force

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

wraitii updated this revision to Diff 15529.Jan 19 2021, 5:21 PM
wraitii edited the summary of this revision. (Show Details)

Quick rebase.
Based on the comments above, I intend to merge this as-is, the change to ranged cavalry can be reverted / amended if it is deemed necessary (but I doubt that, as ranged cav are currently arguably the strongest units).

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/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 file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceF

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

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