Page MenuHomeWildfire Games

[gameplay] make foundations not ConquestCritical
Needs ReviewPublic

Authored by nephele on Mar 26 2020, 5:38 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This patch ensures structure foundations are no longer ConquestCritical, so players no longer have to hunt for them to defeat players left with only foundations and no ConquestCritical units (e.g. workers to finish the structures).

Idea and testing by @nephele, file changes by @Nescio.

Test Plan

Verify it works as intended, without any errors, warnings, problematic AI (Petra) behaviour, or unending games.

Event Timeline

nephele created this revision.Mar 26 2020, 5:38 PM
Nescio retitled this revision from Gameplay: make foundations not conquest critical to [gameplay]: make foundations not ConquestCritical.Mar 26 2020, 6:17 PM
Nescio added a subscriber: Nescio.

Great idea, thanks!

This patch will currently trigger a warning I will adress in my next diff.

It can only be committed if it works without errors, warnings, or problems for the AI (Petra).

Nescio commandeered this revision.Mar 26 2020, 7:29 PM
Nescio updated this revision to Diff 11567.
Nescio added a reviewer: nephele.

Try this instead, I think it should work, but haven't tested.
@nephele, please take back (commandeer) this patch.

Owners added subscribers: Restricted Owners Package, Restricted Owners Package.Mar 26 2020, 7:30 PM

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

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

nephele commandeered this revision.Mar 26 2020, 7:36 PM
nephele edited reviewers, added: Nescio; removed: nephele.

This looks to be unrelated changes aswell? Should i just test the ConquestCritical -> ConquestCritical+!Foundation part?

Try the patch as is (arc patch D2674).
The only unrelated change is I added full stops at the end of the comments in the xml file, but that doesn't make any difference.

The new patch looks to work fine, just tested it.

The new patch looks to work fine, just tested it.

No errors, warnings, or unexpected AI behaviour? Could you describe what you tested and how exactly? Also maybe update this patch's summary and test plan.
At the very least one should verify it works as intended on:

  • Conquest games
  • Conquest Units games
  • Conquest Structures games
  • non-Conquest games

As I wrote earlier, I expect this to work, but didn't test it myself.

I've never player Conquest only units or only structures, so no clue what is supposed to happen there.

I tested this on a map where the AI spawns with a couple of units each, they start building a civic center somewhere and usually kill each others units, the ones that were killed correctly lost the game.

I don't see what this should do on non-conquest games?

Without this patch:

  • Conquest games are won by destroying all enemy structures and units
  • Conquest Structures games are won by destroying all enemy structures; units are ignored
  • Conquest Units games are won by destroying all enemy units; structures are ignored

Expected behaviour with this patch:

  • Conquest and Conquest Structures games: foundations are ignored
  • Conquest Units and non-Conquest games: unchanged

That should be easy to verify by running some test games.

Nescio edited the summary of this revision. (Show Details)Mar 27 2020, 12:04 PM
Nescio edited the test plan for this revision. (Show Details)
goldie added a subscriber: goldie.Apr 16 2020, 12:18 PM

What are all foundations buildings please?

What are all foundations buildings please?

A foundation is a building before being fully built. For example, I'm losing in a 1v1 but decide to be annoying. What I can do is place a Civic Center in a random spot and I won't count as defeated despite losing all my units until the enemy finds the 1hp foundation and destroys it.

A good change. Just make sure that you don't get defeated like this in a teamgame until all allies don't have any units. As it would be very annoying to get defeated whilst an ally is building your Civic center.

Just make sure that you don't get defeated like this in a teamgame until all allies don't have any units. As it would be very annoying to get defeated whilst an ally is building your Civic center.

That seems to be unrelated to this, whether or not you are considered alive while your allies are, that is.
In any case, if an ally should be able to revive you by building you a new civic center, then they should just be able to place one down imo.

That seems to be unrelated to this, whether or not you are considered alive while your allies are, that is.

Actually it does: without this patch a player with only a centre foundation is considered alive, with this patch that is no longer the case, as foundations no longer count, and the player is defeated.
While it would be possible to make an exception for centres, that's probably not a good idea: if centres, then why not houses (can train female citizens to build a new centre) too?
If people agree that excluding foundations is a good idea, then they have to accept that some team games could get a slightly different dynamic.

badosu added a subscriber: badosu.EditedApr 16 2020, 10:19 PM

If the win condition is to kill all units and structures, this looks like a worthy improvement to avoid foundation placement abuse (e.g. a player with a lot of wood can place outpost foundations and delay his defeat considerably), with a safe worker (e.g. with hill abuse) can delay much by cancelling an outpost while having another and placing somewhere else and so on.

One noteworthy mention in my opinion is how Starcraft II handles this, a player loses when he has no structures even if still has a huge army, however foundations still count as a structures.

I like this win condition more as it removes a fairly burdensome deal (having to kill all units) and simplifying while also making more sense in the context of 0ad (an army without any city to build or return to should not have any morale or allegiance).

In this scenario, to avoid foundation abuse, the structure would count only if worker-generating.

bb added a subscriber: bb.Apr 28 2020, 9:37 PM

rP20471 purposely added foundations to the conquest queries, since with a single foundation (of a conquest critical building) an ally can build it and you can rebuild your army. Note that outpost are not conqurstcritical, so that example won't work. Houses and such probably do. Note that in conquest structures placing outpost foundations do work. What is so bad about finding the last foundation of a player? If one also needs to find the last unit, this doesn't seem to fix much. Maybe adding some sort of decay for foundations if they are in neutral or enemy territory and can't be placed there, is a better solution. Note that even this won't solve the outpost "problem" (as you describe it) since they shouldn't decay (they can be build in neutral territory).

binaries/data/mods/public/simulation/templates/special/filter/foundation.xml
20

If one wants to do such a thing in a mod, one better does -ConquestCritical here and nukes the rest of the patch.

Nescio resigned from this revision.Apr 28 2020, 9:46 PM
Nescio added inline comments.
binaries/data/mods/public/simulation/templates/special/filter/foundation.xml
20

Good point, that's much easier indeed!

rP20471 purposely added foundations to the conquest queries, since with a single foundation (of a conquest critical building) an ally can build it and you can rebuild your army.

I would still argue that this makes little since, if an ally is supposed to be able to rebuild your civ then hey should just be able to rebuild your civ.
Regardless I don't think marking foundations conquestcritical is a good solution for allowing allies to rebuild your (obviously destroyed) civ, the code should rather treat the entire teams dead or alive status as one and allow allies to build new buildings for you.

What is so bad about finding the last foundation of a player? If one also needs to find the last unit, this doesn't seem to fix much.

If they have a unit and a foundation they can rebuild, a unit capable of building a civic center and thus beeing conquestcritical can always rebuild, a civic center can't build itself.

Maybe adding some sort of decay for foundations if they are in neutral or enemy territory and can't be placed there, is a better solution. Note that even this won't solve the outpost "problem" (as you describe it) since they shouldn't decay (they can be build in neutral territory).

I don't like this solution either, if you are defeated you are defeated, having no one alive in your civ to tell the tale, and no buildings to get new workers seems like a defeat to me, this solution would likely just get more grief since a foundation might decay before workers arrive or something (and to solve that would require even more special casing).

Nescio removed a reviewer: Nescio.May 7 2020, 10:30 PM
Nescio commandeered this revision.Jun 5 2020, 11:16 AM
Nescio updated this revision to Diff 12141.
Nescio added a reviewer: nephele.
Nescio edited the summary of this revision. (Show Details)
  • Simpler implementation suggested by @bb.
  • Please commandeer back.

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

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

Actually that does not work, @bb, since not all structures are CC:

WARNING: [ParamNode] Could not remove token 'ConquestCritical' from node 'Classes' in 'simulation/templates/special/filter/foundation.xml'; not present in list nor inherited (possible typo?)
Nescio updated this revision to Diff 12142.Jun 5 2020, 11:39 AM
Nescio retitled this revision from [gameplay]: make foundations not ConquestCritical to [gameplay] make foundations not ConquestCritical.
Nescio edited the summary of this revision. (Show Details)
  • Revert to previous implementation.
  • Please commandeer back.

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

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

nephele commandeered this revision.Jun 5 2020, 12:01 PM
nephele edited reviewers, added: Nescio; removed: nephele.

(@Nescio just for your information, there is an option to update a patch without commandeering it.)

Nescio added a comment.Jun 5 2020, 8:43 PM

(@Nescio just for your information, there is an option to update a patch without commandeering it.)

Is there? How to do that?

Nescio removed a reviewer: Nescio.Jun 5 2020, 8:43 PM
Stan added a subscriber: Stan.Jun 5 2020, 8:47 PM

arc diff --update a diff you don't own :)