Page MenuHomeWildfire Games

[gameplay] standardize structure loot
ClosedPublic

Authored by Nescio on Mar 22 2020, 12:40 PM.

Details

Reviewers
ValihrAnt
Silier
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23559: [gameplay-a24] Standardize structure loot to 20%
Summary

D2605 identified some loot inconsistencies, but upon close inspection, it turns out there are many more, hence this, much larger, patch:

  • Structure loot is standardized to 20% of cost.
    • The only exception is the field, which cost wood, but grants food loot.
    • <xp> is unchanged; could be done in a separate patch; applies to structures that shoot arrows.
  • <Loot> nodes are moved to the same template files as where the <Cost> node is defined, to reduce potential confusion.
  • Unnecessary <Cost> and <Loot> lines (e.g. <food>0</food>) are removed.
  • <Cost> nodes are removed from templates if the majority of its children have different values.
  • Inserted a <Cost> node in a few unbuildable structures (necessary for repairing them).
Test Plan

Check for mistakes and typos, agree this is an improvement.

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.Mar 22 2020, 12:40 PM
Owners added a subscriber: Restricted Owners Package.Mar 22 2020, 12:40 PM
Nescio retitled this revision from [gameplay] standardize resource loot to [gameplay] standardize structure loot.Mar 22 2020, 12:41 PM
Nescio added inline comments.Mar 22 2020, 12:45 PM
binaries/data/mods/public/simulation/templates/structures/palisades_medium.xml
21 ↗(On Diff #11517)

Rounded up because palisades_long.xml has 3 wood and palisades_short.xml has 1 wood.

binaries/data/mods/public/simulation/templates/template_structure_military_barracks.xml
8–10 ↗(On Diff #11517)

Removed because only four barracks actually cost 300 wood.

binaries/data/mods/public/simulation/templates/template_structure_military_embassy.xml
16–22 ↗(On Diff #11517)

Removed because all its children have different costs.

binaries/data/mods/public/simulation/templates/template_structure_special.xml
16–24 ↗(On Diff #11517)

Removed because the majority of its children have different costs.

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

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

ValihrAnt accepted this revision as: ValihrAnt.Mar 22 2020, 2:35 PM

This is a huge improvement over the current inconsistent and quite random structure loot stats.

This revision is now accepted and ready to land.Mar 22 2020, 2:35 PM
Silier requested changes to this revision.Mar 26 2020, 9:26 PM
Silier added inline comments.
binaries/data/mods/public/simulation/templates/structures/maur_wall_gate.xml
5 ↗(On Diff #11517)

This wanted to be 60

18 ↗(On Diff #11517)

Cost is actually 30 + 60, not only 60.

binaries/data/mods/public/simulation/templates/structures/palisades_gate.xml
26 ↗(On Diff #11517)

Real cost is 30 + 20 (upgrade from palisade long to gate)

binaries/data/mods/public/simulation/templates/structures/ptol_storehouse.xml
21 ↗(On Diff #11517)

Ptolemies pay no resources to the structure. Well ok, I think it is logical that there is no loot, but does not it make unfair for attackers that they do get nothing?

binaries/data/mods/public/simulation/templates/structures/rome_siege_wall_gate.xml
37 ↗(On Diff #11517)

Real cost is 60 + 80

binaries/data/mods/public/simulation/templates/template_structure_resource_corral.xml
24 ↗(On Diff #11517)

This probably wanted to represent loot from food production like fields have.

This revision now requires changes to proceed.Mar 26 2020, 9:26 PM

Remaining
pers_stable

Thanks for reviewing this, I appreciate it!
As for gates, the <Cost> component determines how expensive it is to repair the structure, and loot is 20% of the cost. The cost is indeed lower than building a long segment and upgrading it to a gate, but I think that's justifiable and the lesser evil.
Likewise, building a village tower and upgrading it to a town tower is more expensive than waiting and building a town tower directly.

Remaining pers_stable

Oops, missed that one, will correct, thanks for pointing that out!

binaries/data/mods/public/simulation/templates/structures/ptol_storehouse.xml
21 ↗(On Diff #11517)

Also applies to ptol_corral.xml, ptol_farmstead.xml, and ptol_house.xml (which already has 0 wood loot).
I don't have strong feelings either way.

binaries/data/mods/public/simulation/templates/template_structure_resource_corral.xml
24 ↗(On Diff #11517)

Probably, but currently animals can't be garrisoned for food trickle. Moreover, Farmstead loot was changed from 100 food to 20 wood as well.

Nescio updated this revision to Diff 11572.Mar 26 2020, 10:05 PM

maur_wall_gate.xml, pers_stable.xml

Silier accepted this revision.Mar 26 2020, 10:10 PM

Complete

This revision is now accepted and ready to land.Mar 26 2020, 10:10 PM

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

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

This revision was automatically updated to reflect the committed changes.