Page MenuHomeWildfire Games

Tweak melee cavalry and infantry max range
ClosedPublic

Authored by Grugnas on Oct 28 2017, 7:10 PM.

Details

Summary

this patch modify max range of melee units in order to give more natural feeling by modifying the range at which units are able to attack and slaughter.
A clear example are champion infantry units which attack range doesn't match the weapon animation reach and it seems not natural.
OLD:


NEW:

Test Plan

start a game without the patch and check the differences with the patch in.

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

Grugnas created this revision.Oct 28 2017, 7:10 PM

(see with artists, but indeed sword < spear < pike)

Nescio added a subscriber: Nescio.Oct 28 2017, 9:33 PM

Let's make a comparison of current maximum melee attack ranges:

                 citizen  champion  hero
female           4.0
infantry  sword  2.0      5.0       5.0
cavalry   sword  6.0      6.0       6.0
infantry  spear  4.0      5.0       5.0
cavalry   spear  6.0      5.0       6.0
infantry  pike   8.0      8.0       8.0
battering ram             6.5
Grugnas updated this revision to Diff 5887.Feb 23 2018, 1:14 PM
Grugnas retitled this revision from Tweak melee cavalry max range to Tweak melee cavalry and infantry max range.
Grugnas edited the summary of this revision. (Show Details)
Grugnas edited the test plan for this revision. (Show Details)
temple added a subscriber: temple.Feb 24 2018, 3:09 PM

Can you update the patch to just the range changes?
Did you test with large armies? Did the battles have different outcomes (i.e. do we need to rebalance attack stats too)?

Grugnas updated this revision to Diff 5915.Feb 24 2018, 3:15 PM

Out of curiosity, how have you chosen these specific ranges? E.g. why 3.5 and not 3 or 4?

Grugnas planned changes to this revision.Feb 24 2018, 3:23 PM
In D988#54449, @temple wrote:

Can you update the patch to just the range changes?
Did you test with large armies? Did the battles have different outcomes (i.e. do we need to rebalance attack stats too)?

I thought i uploaded the right patch. Sorry.
Just re-uploaded the proper patch.
I didn't test armies since the intent was only to correctly match animations and attack ranges.
Battles results shouldn't have significant changes if none at all ( 1 or 2 hits more by swordsmen )( i.e. citizen soldier swordsmen and spearmen have same max range now while they had 1 of difference).
Champions infantry had their attack range significantly reduced but they can move by the changed 3.5 mts less than 1 sec.

In D988#54458, @Nescio wrote:

Out of curiosity, how have you chosen these specific ranges? E.g. why 3.5 and not 3 or 4?

I tried to fit best the animations and keep proportions between ranges (i.e. pikemen double other soldiers units).
This doesn't want to be a balance patch but a correct attack-animation matching fix.
Any better fitting value is welcome.
Also I looked at sieges but, since they interact with buildings, it seemed more complex and envolved other stuff that aren't units. A clear example is any sieges attacking roman Fortress where the ram body interesects the building body, thus the whole tree ( the ram'head) enters in the texture even while idle.

Grugnas updated this revision to Diff 5916.Feb 24 2018, 3:52 PM

athen_infantry_spearman_b.xml now correctly inherit max range from template_unit_infantry_melee_spearman.xml instead of having own MaxRange entry.

temple requested changes to this revision.Feb 27 2018, 8:09 PM

Making champions and heroes consistent with citizen-soldiers is good.
The new values are sword 3.5, spear 3.5, pike 7. But it seems to me like spears should have a longer range than that? It looks like 5 is good.
The new values for cav are sword 4.5, spear 5. But here I think they should have the same range as their infantry counterparts -- their weapons aren't any longer. You can use the actor viewer in atlas to compare. So I'd do sword cav 3.5, spear cav 5.
Rams and elephant are siege, hard to judge. But women maybe 3, dogs 2, what do you think?

Sword infantry max range was changed in rP16285 for balance, but if their range remains smaller than spear then there shouldn't be much of a difference in gameplay. Otherwise doesn't look like ranges have been adjusted. There's D981 which changes how range is used, so all the range values might have to be revisited in the future.

This revision now requires changes to proceed.Feb 27 2018, 8:09 PM

I remind you that the patch is intended to be an estetic patch only. Any gameplay change is unwanted thus I am still open for suggestions.

In D988#54967, @temple wrote:

Making champions and heroes consistent with citizen-soldiers is good.
The new values are sword 3.5, spear 3.5, pike 7. But it seems to me like spears should have a longer range than that? It looks like 5 is good.

I tried 4.5 for spears and apparently it was good too ( for hellenic spears at least ) as there wasn't any significant change from the esthetic point of view. Still i agree that spears should have longer range than swords. While higher range suits good for hellenic spearsmen, other type of spearsmen ( i.e. celtic ) are equiped with shorter spears and 3.5 seemed to be a good compromise. Still 4.5 seems good.

The new values for cav are sword 4.5, spear 5. But here I think they should have the same range as their infantry counterparts -- their weapons aren't any longer. You can use the actor viewer in atlas to compare. So I'd do sword cav 3.5, spear cav 5.

This seems reasonable.

Rams and elephant are siege, hard to judge. But women maybe 3, dogs 2, what do you think?

Sure, I'll have a look at women and dogs animations too. Sieges and elephants are hard to judge as they interact with buildings which seems to have smaller obstruction than their textures size. Matter of fact rams intersect roman fortress while attacking and workers intersect with gaul fortress while repairing/building.

Sword infantry max range was changed in rP16285 for balance, but if their range remains smaller than spear then there shouldn't be much of a difference in gameplay. Otherwise doesn't look like ranges have been adjusted. There's D981 which changes how range is used, so all the range values might have to be revisited in the future.

What really changes is just the first hit an unit can perform when he reaches the enemy unit. I didn't really notice if the hit is performed when the unit reaches the opponent instantly or if it waits attack rate time before the first hit.
Lower range unit will get closer to perform his hits anyway, too long range for short range animation/weapon looks not natural in game as they can't even reach each other ( the clear example are champions with the same max range ).

Grugnas updated this revision to Diff 5984.Mar 1 2018, 1:25 PM

Referred max range reduced to 3.5 for parent templates.
Spearmen add 1 max range ( 5 was too much ).
Pikemen multiply basic max range * 2 ( for a total of 7.0 ).
Dogs and women have 2.5.

While units get better looking while attacking face to face, it can't be said the same when units attack another one from side. This is because their bounding box ( i suppose it is the one which describes the animations area ) is a parallelepiped and not a cube, thus attacking from flank produces that "hit from distance" effect.

temple added a subscriber: Stan.Mar 2 2018, 7:15 PM

I think you should use absolute values not relative, since this is dependent on the animations. It's just coincidence that pike range is twice sword range.
You adjusted champion and hero capture range (which should stay at 4m). They don't inherit the melee attack so you have to change the max ranges all individually.
You adjusted women's slaughter range instead of melee range. But on that note, it looks like everyone's slaughter should be much smaller too, say 2m.

Maybe @Stan has an opinion on the numbers?

Grugnas updated this revision to Diff 5999.EditedMar 2 2018, 8:21 PM
Grugnas edited the summary of this revision. (Show Details)

sorry for the funny mistakes.
Slaughter max range has been fixed to 2

temple accepted this revision.Mar 8 2018, 4:56 AM

Looks good. There's different animations and different weapons, so there's no way to get this perfect. That said, I think I'll do dogs and women 3 instead of 2.5, they lunge a bit.

A couple things I noticed, which I'll put in separate diffs:

  • Spear cavalry still attack really slow. Maybe 1s is too much but 1.5s looks better than the current 2s.
  • Dogs don't have a slaughter animation and I guess it's weird that they slaughter at all? (Champions don't slaughter.) So we could either remove the slaughter attack (then dogs will attack sheep the same as they do deer) or use the melee animation.
This revision is now accepted and ready to land.Mar 8 2018, 4:56 AM
This revision was automatically updated to reflect the committed changes.