Page MenuHomeWildfire Games

[gameplay] remove structure <Loot/xp>
ClosedPublic

Authored by Nescio on Sep 4 2020, 8:44 PM.

Details

Summary

Currently wonders have 300 <Loot/xp>, centres 200, defensive structures 100, other structures 0. However, a short palisade segment (200 health) is much easier to destroy than an iber fortress (6000 health) or cart wall tower (12000 health), therefore it does not really make much sense they all give the same amount of experience.
This patch sets <Loot/xp> to 10% of <Health/Max> for structures that have <Attack> (i.e. are capable of shooting projectiles), and 0 for others (including Wonder).
[EDIT] This patch removes the <Loot/xp> from all structures.

Test Plan

Check for mistakes and omissions. Agree with the proposed values.

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

Nescio created this revision.Sep 4 2020, 8:44 PM
Owners added a subscriber: Restricted Owners Package.Sep 4 2020, 8:44 PM
Nescio updated this revision to Diff 13405.Sep 4 2020, 8:46 PM
Nescio requested review of this revision.Sep 4 2020, 8:53 PM
Nescio updated this revision to Diff 13428.Sep 6 2020, 11:07 AM
Nescio edited the summary of this revision. (Show Details)
  • include special_hellenistic_metropolis.json
  • include maur_tower_double.xml

@badosu, @borg-, @ValihrAnt, anyone else, opinions on this?
(Another approach would be to simply remove <Loot/xp> from all structures.)

Nescio updated this revision to Diff 14065.Nov 19 2020, 1:52 PM
  • rebased

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

builderr-debug-macos.txt
../../../source/simulation2/scripting/JSInterface_Simulation.cpp:153:4: warning: suggest braces around initialization of subobject [-Wmissing-braces]
                        CFixedVector2D(-halfSize.X, -halfSize.Y),
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
../../../source/third_party/fmt/format.cpp:145:7: warning: '_POSIX_C_SOURCE' is not defined, evaluates to 0 [-Wundef]
#if ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || (defined(__ANDROID__) && __ANDROID__)
      ^
../../../source/third_party/fmt/format.cpp:145:37: warning: '_XOPEN_SOURCE' is not defined, evaluates to 0 [-Wundef]
#if ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || (defined(__ANDROID__) && __ANDROID__)
                                    ^
2 warnings 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/libtinygettext.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libtinygettext.a(tinygettext.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
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libglooxwrapper.a(precompiled.o) has no symbols
../../../source/simulation2/scripting/JSInterface_Simulation.cpp:153: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
../../../source/third_party/fmt/format.cpp:145:7: warning: '_POSIX_C_SOURCE' is not defined, evaluates to 0 [-Wundef]
#if ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || (defined(__ANDROID__) && __ANDROID__)
      ^
../../../source/third_party/fmt/format.cpp:145:37: warning: '_XOPEN_SOURCE' is not defined, evaluates to 0 [-Wundef]
#if ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || (defined(__ANDROID__) && __ANDROID__)
                                    ^
2 warnings generated.
/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
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(dbghelp.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(file_stats.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/liblowlevel.a(vfs_path.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/2011/display/redirect

ValihrAnt accepted this revision as: ValihrAnt.Nov 19 2020, 9:14 PM

It's an improvement. While it's rare that any unit which benefits from experience will attack buildings it still happens occasionally. Could probably even increase the amount of xp by multiple times, because players will only try to destroy buildings with units when they have an overwhelming mass, so each unit getting an average of 5 experience for destroying a fortress seems very negligible.

This revision is now accepted and ready to land.Nov 19 2020, 9:14 PM
borg- accepted this revision.EditedNov 19 2020, 10:38 PM

Same of @ValihrAnt .

It's an improvement.

One could say this patch does two things:

  • remove experience from structures that are unable to shoot projectiles
  • make experience proportional to health for structures that can attack

The latter is a bit simplistic, since structures can have quite different resistance and attack values.

Could probably even increase the amount of xp by multiple times,

I opted for 10% to stay close to the current values, however, it could be changed to 20% or some other number, if you think that's better.
Or we could just remove experience from all structures altogether.

Stan added a subscriber: Stan.EditedNov 20 2020, 9:17 AM

Should changes be requested? Or should we go with this first?

Should changes be requested? Or should we go with this first?

I'm happy either way. Though, I think it would be better to remove xp from buildings entirely rather than increase it, due to how rarely it comes into play.

Nescio updated this revision to Diff 14100.Nov 20 2020, 10:24 AM
Nescio retitled this revision from [gameplay] tweak structure <Loot/xp> to [gameplay] remove structure <Loot/xp>.
Nescio edited the summary of this revision. (Show Details)

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

builderr-release-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libengine.a(precompiled.o) has no symbols

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

Stan added a comment.Nov 20 2020, 10:39 AM

Can you request review?

Nescio requested review of this revision.Nov 20 2020, 10:50 AM
ValihrAnt accepted this revision as: ValihrAnt.Nov 20 2020, 1:22 PM

Buildings giving loot is rarely a factor due to buildings generally being destroyed by siege weapons.

This revision is now accepted and ready to land.Nov 20 2020, 1:22 PM