Page MenuHomeWildfire Games

separate elephant archer from cavalry templates
ClosedPublic

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

Details

Reviewers
Freagarach
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP24212: Separate elephant archer from cavalry templates.
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:

  • 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.

Silier added a subscriber: Silier.Feb 5 2020, 8:27 PM
Silier added inline comments.
binaries/data/mods/public/simulation/templates/template_unit_elephant.xml
70 ↗(On Diff #11162)

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
70 ↗(On Diff #11162)

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
Silier added inline comments.Feb 8 2020, 2:27 PM
binaries/data/mods/public/simulation/templates/units/maur_elephant_archer_b.xml
71

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
71

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.

Silier 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
35 ↗(On Diff #11162)

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

70 ↗(On Diff #11162)

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
35 ↗(On Diff #11162)

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

Sorry to ask for another rebase ^^

Nescio updated this revision to Diff 13902.Nov 14 2020, 11:09 AM
Nescio edited the summary of this revision. (Show Details)
  • rebased

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

builderr-debug-macos.txt
../../../source/simulation2/scripting/JSInterface_Simulation.cpp:152:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                        CFixedVector2D(-halfSize.X, -halfSize.Y),
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from ../../../source/graphics/tests/test_Camera.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/graphics/tests/test_Camera.h:168:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                        CVector3D(-101.0f, -101.0f, 101.0f),
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from ../../../source/simulation2/tests/test_SerializeTemplates.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/tests/test_SerializeTemplates.h:39:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                        3, 0, 1, 4, 1, 5
                        ^~~~~~~~~~~~~~~~
                        {               }
1 warning generated.
builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblobby.a(precompiled.o) has no symbols
../../../source/simulation2/scripting/JSInterface_Simulation.cpp:152:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                        CFixedVector2D(-halfSize.X, -halfSize.Y),
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libscriptinterface.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libatlas.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui.a(precompiled.o) has no symbols
In file included from ../../../source/graphics/tests/test_Camera.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/graphics/tests/test_Camera.h:168:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                        CVector3D(-101.0f, -101.0f, 101.0f),
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
In file included from ../../../source/simulation2/tests/test_SerializeTemplates.cpp:17:
/Users/wfg/Jenkins/workspace/macos-differential/source/simulation2/tests/test_SerializeTemplates.h:39:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                        3, 0, 1, 4, 1, 5
                        ^~~~~~~~~~~~~~~~
                        {               }
1 warning generated.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/1871/display/redirect

Freagarach accepted this revision.Nov 16 2020, 9:21 PM

Correct, split is nice.

This revision is now accepted and ready to land.Nov 16 2020, 9:21 PM

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

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

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

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

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

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

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

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

This revision was landed with ongoing or failed builds.Nov 19 2020, 7:42 AM
This revision was automatically updated to reflect the committed changes.