Page MenuHomeWildfire Games

tweak citizen cavalry and elephant footprints
Needs ReviewPublic

Authored by Nescio on Dec 21 2019, 5:56 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

Practically all fauna have a 2:1 length to width footprint ratio. However, citizen cavalry has a 3:2 ratio and worker elephants a circular footprint. This patch changes their footprints to the more appropiate 2:1 ratio.
Before:


After:

A larger footprint also makes units more vulnerable to long range projectiles (e.g. arrows), so this patch makes citizen cavalry a smaller target. For comparison:

  • citizen infantry footprint: 7
  • cavalry footprint: 24→18
  • champion and hero cavalry footprint: 19.6 (circular because of selection marker)
  • worker elephant footprint: 50→32
  • elephant archer footprint: 38→32

Also tweaked footprint height to:

  • infantry: 4.5
  • cavalry: 6
  • kush and ptol camel: 7.5
  • maur elephant archer: 9
  • maur worker elephant: 8
Test Plan

Agree this is an improvement.

Event Timeline

Nescio created this revision.Dec 21 2019, 5:56 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/841/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1357/display/redirect

Nescio updated this revision to Diff 10754.Dec 23 2019, 1:07 PM
Nescio retitled this revision from tweak citizen cavalry and worker elephant footprints to tweak citizen cavalry and elephant footprints.
Nescio edited the summary of this revision. (Show Details)

included elephant archer footprint

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/870/display/redirect

Nescio updated this revision to Diff 10756.Dec 23 2019, 1:13 PM

unnecessary replace=""

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/871/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1386/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1387/display/redirect

elexis added a subscriber: elexis.Dec 23 2019, 3:41 PM

See #3786 for the last time someone reworked all footprints to make them fit esthetically (selection ring matching visual actor size).

A larger footprint also makes units more vulnerable to long range projectiles

Is that true? I expected it uses the obstruction size, but I didn't look at the related code for a long time.

If it is true, it changes balancing slightly, so author or reviewer may want to consider that.
I guess the only relevant change is Cavalry 4 -> 3 width change, which makes it slightly harder for ranged units and structures to hit it. I don't know by how much without testing (probably not a dealbreaker but you never know).

Is that true? I expected it uses the obstruction size, but I didn't look at the related code for a long time.

Unit templates don't have a static obstruction defined in their templates, so I assumed their effective target size is based upon their footprint.

If it is true, it changes balancing slightly, so author or reviewer may want to consider that.
I guess the only relevant change is Cavalry 4 -> 3 width change, which makes it slightly harder for ranged units and structures to hit it. I don't know by how much without testing (probably not a dealbreaker but you never know).

Only at long range, because of spread. If anything, this patch would make differences between maximum range and point-blank less pronounced. E.g. at maximum range 40 infantry archers might beat 40 horse archers (due to the smaller infantry footprint), whereas at point-blank 40 horse archers could massacre the 40 infantry archers (due to the higher cavalry health). Just an example I didn't test myself, though.

Nescio edited the summary of this revision. (Show Details)Dec 23 2019, 3:57 PM
Nescio removed a reviewer: borg-.Jan 18 2020, 2:34 PM

Unit templates don't have a static obstruction defined in their templates, so I assumed their effective target size is based upon their footprint.

The related code (Attacking.js-helper; L137 onwards) shows that footprints are indeed used.

Nescio edited reviewers, added: Restricted Owners Package; removed: Restricted Owners Package.Jan 19 2020, 11:27 AM
Nescio added a subscriber: ValihrAnt.
Nescio updated this revision to Diff 11389.Feb 17 2020, 8:41 PM
Nescio edited the summary of this revision. (Show Details)

status bars

Nescio added inline comments.Feb 17 2020, 8:44 PM
binaries/data/mods/public/simulation/templates/template_unit_cavalry.xml
33

<StatusBars/HeightOffset> minus 0.5

binaries/data/mods/public/simulation/templates/template_unit_infantry.xml
59

<StatusBars/HeightOffset> minus 0.5

binaries/data/mods/public/simulation/templates/units/kush_cavalry_javelinist_merc_b.xml
9–11

Because camels are taller than horses.

binaries/data/mods/public/simulation/templates/units/ptol_cavalry_archer_b.xml
3–5

Because camels are taller than horses.

Nescio edited the summary of this revision. (Show Details)Feb 17 2020, 8:45 PM
Nescio added a subscriber: bb.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1785/display/redirect

Freagarach added a reviewer: Restricted Owners Package.Fri, Mar 27, 2:23 PM

Actually I don't think adjusting footprints really distorts gameplay balance.

It will do, albeit only slightly.

True, there is a very small (neglible?) effect, but that affects all civs equally.
More importantly, footprint dimensions are determined by what looks good in game, not by balance considerations; otherwise any commit that introduces new actors would be a gameplay patch.

Freagarach removed a reviewer: Restricted Owners Package.Fri, Mar 27, 2:41 PM

True that.

(Nonetheless, I still hope a team member is willing to review and commit this patch, as well as D2502 (walls) and D2640 (traders). Though footprints are not terribly important, aesthetics matter.)

I also think it might affect balance. Here it is not the balance between civs but the balance between units which is also important (to compare, right now champions aren't really viable compared to citizen soldier which is a problem). If cav become harder to hit it would buff them. Now i don't know if this patch actually noticeably changes balance or not, but to me it would be the kind of patch that could use some testing to be on the safe side of things.
If it does affect balance but we still want that patch then maybe cavalry would have to be nerfed in some other stats.

For what's it worth, I believe I ran a few AI vs AI test games when I proposed this patch in December, and didn't notice any difference. Cavalry footprint area is still much larger than that of Infantry, footprint length is unchanged, and Structure attack spread is typically low.
You can implement the patch with arc patch D2496 and try it out yourself.