Opened 8 years ago

Closed 6 years ago

Last modified 6 years ago

#4014 closed enhancement (fixed)

Combine victory conditions

Reported by: elexis Owned by: bb
Priority: Should Have Milestone: Alpha 23
Component: UI & Simulation Keywords:
Cc: Patch: Phab:D1240

Description (last modified by elexis)

Currently we can only chose one of N gametypes: { Conquest, Conquest Structures, Conquest Units, Wonder, Endless } but not combine them individually.

I propose to change the gamesetup once new victory conditions like #2160 are added:

Gamesetup:

  • remove the gametype dropdown
  • add one checkbox for every victory condition to the right of the other boolean options
  • remove Conquest from the list (equal to Conquest Structures + Conquest Units)
  • remove Endless from the list (equal to checking no victory condition)
  • add a last man standing checkbox (otherwise load an allied victory script)

Simulation:

  • The Conquest gametype can be removed (simulation/data/settings/)
  • The conquest script should be removed from the Wonder gamemode, so that it can be played as an "Wonder or endless" game as well (which shouldn't mean that players without units or conquest-critical structures shoudln't be defeated).
  • Move the allied victory functionality out of the EndGameManager and into a trigger script.

This ticket will likely run into the same bugs as described in #4013, so that one might be done beforehand.

Change History (11)

comment:1 by leper, 7 years ago

Description: modified (diff)
Priority: Nice to HaveMust Have

Not adding 'simple' as this might conflict with the gamesetup rewrite.

comment:2 by elexis, 7 years ago

Atlas changes forgotton again too, so actually not simple.

comment:3 by elexis, 7 years ago

Description: modified (diff)
Milestone: BacklogAlpha 23

In r20116 by bb:

Allow arbitrary order between dropdowns and checkboxes in gamesetup

Reviewed By: elexis
Differential Revision: ​https://code.wildfiregames.com/D862

comment:4 by bb, 7 years ago

In 20122:

Split VictoryDuration in RelicDuration and WonderDuration

As proposed by leper in rP19345
refs #4014

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D874

comment:5 by temple, 6 years ago

Sounds interesting but there might be issues with how you want to combine them. Some give winning conditions and others give losing conditions. Conquest = conquest structures + conquest units would mean something like you'd have to be defeated in both to actually be defeated. Wonder + relic would probably mean you only need to win one of them in order to win. But maybe some players would like to play a game where you have to destroy either the structures or the units, or a game where you have to hold a wonder plus the relics.

comment:6 by bb, 6 years ago

In the simplest way with just adding up triggerscripts, one would win when he performed one of the winning conditions and one looses when he performed one of the defeat conditions. (And ofc when a player/team has won all others loose and the last remaining wins). So conquest structures + conquest units is being defeated when either you have no units or structures.

The biggest problem of making all the different conditions combinable in any form is the gui (the sim code is actually rather simple, since we can use MatchesClassList on a list of any strings). So if we want to do it that way, how would the gui look like? Any idea's?

The requirement of a "general" system is: make any string as we do for classes (so f.e. "A+B C+A+E D E+F") so the victory conditions combined with "+" or " " and a victory condition can occur more than once.

(In principle we could have a "simple" overlay with just checkboxes and an "advanced" for the general case.)

EDIT: the not operator should also be implemented then, which also for the sim is rather easy, but gui ftw

Last edited 6 years ago by bb (previous) (diff)

comment:7 by elexis, 6 years ago

For scenarios or campaigns with rpg qualities, the player might have to fulfil multiple quests in order to win, where some of the quest scripts could also be reused on other maps (thus are required to be located in different files).

So using MatchesClassList sounds good.

The user might want to combine such victory conditions with a GUI whose expression is functionally complete. But we didn't have one actual example for such a use case. Implementing such a GUI would be quite some effort and would naturally get suggestions from people. So why not just one checkbox that triggers loading or not loading for each Victory Condition script until we actually come accross one example that is likely to be implemented?

comment:8 by bb, 6 years ago

(That is exactly what I patched, and will propose once we have enough gui space for it)

Last edited 6 years ago by bb (previous) (diff)

comment:9 by elexis, 6 years ago

Patch: Phab:D1240
Priority: Must HaveShould Have

comment:10 by bb, 6 years ago

Owner: set to bb
Resolution: fixed
Status: newclosed

In 21474:

Implement combine victory conditions

Excluding the changes to scenario and skirmisch maps
Transform gameType string to victoryCondition array in load/replaymenu
Adapt the gamesetup to use checkboxes for every victory condition and an array for storing them
Allow multiple queries in conquestCommon
Remove conquest from regicide, wonder and capture the relic
Move the endless gamedescription from settings to gamedescription
Fixing wrong tabulation from rP21421

This commit will break all scenario and skirmisch maps, their "Gametype" string needs to be transformed in a "VictoryCondition" array as is done in the tutorial map (counting endless as an empty array). This counts for mods too!
Old svn replays and savegame will throw warnings/errors as they are incompatible after this commit. So svn users will need to delete all those.

Comments on ai and autostart games By: mimo
Comments on Atlas By: Vladislav
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1240
fixes: #4014

comment:11 by bb, 6 years ago

In 21475:

Transfrom in all skirmisch and scenario maps the "GameType" string into a "VictoryConditions" array, so they are compatible with the combine victory commit

The same change should be done in all maps in mods

refs #4014
refs D1240

Note: See TracTickets for help on using tickets.