Page MenuHomeWildfire Games

separate elephant archer from cavalry templates
Needs ReviewPublic

Authored by Nescio on Jan 23 2020, 6:55 PM.

Details

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

Currently the Mauryan elephant archer has template_cavalry_ranged_archer.xml as its parent, but changes many stats, including removing the Cavalry class.
This is problematic, as tweaking one (e.g. D2585) would affect the other (D2575), something that's easily overlooked.
This patch therefore introduces separate elephant templates, so horse and elephant archers no longer depent on each other, making things easier for balancing, mods, and future additions.

D1035/rP20649 (kennel) and D1036/rP20682 (maceman) were similar patches.

[EDIT] Further changes:

  • included footprint changes from D2496
  • made it more similar to template_unit_champion_elephant.xml:
    • removed slaughter attack
    • removed wedge formation
    • gave it the same sound groups
    • increased vision range to 100
Test Plan

Check for mistakes and omissions.

Event Timeline

Nescio created this revision.Jan 23 2020, 6:55 PM
Nescio updated this revision to Diff 11162.Jan 23 2020, 6:57 PM

now with svn add

Build failure - The Moirai have given mortals hearts that can endure.

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

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

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

Stan added a subscriber: Stan.Jan 28 2020, 4:14 PM
Stan added inline comments.
binaries/data/mods/public/simulation/templates/template_unit_elephant_ranged_archer.xml
12 ↗(On Diff #11162)

I assume that's for the arrows trajectories?

Nescio added inline comments.Jan 28 2020, 7:15 PM
binaries/data/mods/public/simulation/templates/template_unit_elephant_ranged_archer.xml
12 ↗(On Diff #11162)

It was introduced by rP23144, I don't know why, but I suppose there must be a good reason, since it was also changed in other templates.

Angen added a subscriber: Angen.Feb 5 2020, 8:27 PM
Angen added inline comments.
binaries/data/mods/public/simulation/templates/template_unit_elephant.xml
71

attack_ranged and attack_impact_ranged are specific sounds for weapon types so should be moved to specific templates _archer, _slinger, _javelinist (if they exist)

Nescio added inline comments.Feb 5 2020, 9:25 PM
binaries/data/mods/public/simulation/templates/template_unit_elephant.xml
71

They are listed here for consistency, because they are present in:

template_unit_cavalry.xml
template_unit_champion.xml
template_unit_hero.xml
template_unit_infanry.xml
Angen added inline comments.Feb 8 2020, 2:27 PM
binaries/data/mods/public/simulation/templates/units/maur_elephant_archer_b.xml
68

in result this is 0.975 * template_unit.walkspeed, not changed in new templates

Nescio added inline comments.Feb 9 2020, 9:35 AM
binaries/data/mods/public/simulation/templates/units/maur_elephant_archer_b.xml
68

True, cavalry practically doubles walk speed (×1.95), which is subsequently halved for elephants (×0.5). Multiplying by ×0.975 seemed unnecessarily precise and about the same as ×1.0, therefore I omitted it. I believe the difference is negligible and won't distort gameplay balance. For comparison:


New (left) vs old (right).

Nescio added inline comments.Feb 9 2020, 9:37 AM
binaries/data/mods/public/simulation/templates/template_unit_elephant_ranged_archer.xml
12 ↗(On Diff #11162)

Maybe it would make sense to remove this line here and change the <Gravity> in the _ranged.xml template, where the <Projectile/Speed> is defined.

Angen added a subscriber: borg-.Feb 9 2020, 9:43 AM

@ValihrAnt @borg- thoughts on elephant speed change?

Nescio added a comment.Feb 9 2020, 9:46 AM

@ValihrAnt @borg- thoughts on elephant speed change?

(A difference of 2.5%, i.e. 9.0 instead of 8.8.)

bb added a comment.Jun 1 2020, 5:35 PM

Needing a rebase

binaries/data/mods/public/simulation/templates/template_unit_elephant.xml
36

Well you are probably the expert: where elephant able to walk in formation at all? Maybe it is good to keep the standard formations, but wedge formation sounds odd

71

refs secondary attacks probably, these things should then be renamed to attack_bow and such. For now meh

binaries/data/mods/public/simulation/templates/template_unit_elephant_ranged.xml
9–27 ↗(On Diff #11162)

I see why you add it, not sure if we should. In my secondary attack branch, I plan to allow arbitrary names for Ranged and Melee, so those could be changed in bow javelin etc. In that system defining this here is useless. Probably meh it for now

Nescio added a comment.Jun 1 2020, 5:49 PM

Yes, this one needs to be rebased. I was waiting for D2496 and D2575, though, otherwise it'll have to be rebased again.

binaries/data/mods/public/simulation/templates/template_unit_elephant.xml
36

Yes, previously elephant archers inherited from template_unit_cavalry_ranged_archer, hence the Wedge formation. I agree removing it does make sense, though wouldn't that be a “gameplay” change?

binaries/data/mods/public/simulation/templates/template_unit_elephant_ranged.xml
9–27 ↗(On Diff #11162)

In principle the *ranged* template step could be omitted and merged with the archer, i.e. template_unit_elephant_archer.xml, which results in less duplication. The *infantry* and *cavalry* equivalents do have such a step, though. I don't really care in this case.

Nescio planned changes to this revision.Jun 1 2020, 6:14 PM
Nescio updated this revision to Diff 12195.Jun 7 2020, 11:54 AM
Nescio edited the summary of this revision. (Show Details)
  • rebased
  • made it more similar to template_unit_champion_elephant.xml:
    • removed slaughter attack
    • removed wedge formation
    • gave it the same sound groups
    • increased vision range to 100
  • included footprint changes from D2496
  • omitted *_ranged_* template
Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Jun 7 2020, 11:54 AM

Build failure - The Moirai have given mortals hearts that can endure.

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