Page MenuHomeWildfire Games

sort teams on start game
Needs RevisionPublic

Authored by ffffffff on Mar 20 2018, 6:48 AM.

Details

Reviewers
elexis
Summary
Test Plan

.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

ffffffff created this revision.Mar 20 2018, 6:48 AM
elexis requested changes to this revision.Mar 20 2018, 12:07 PM

So far, so good. This is much better than trying to fix the order afterwards, which just yields inconsistencies.

Notice that in theory there might be a random map where it places the player according to the order given in the gamesetup and players might want to be placed in a certain way other than being sorted.
That's not the case for current random maps (I think corsica or pyrenean did it, but not anymore).

BUT there are skirmish and scenario maps which need a specific order.
Consider the Dueling Cliffs map which wants players to use 121212 (the player in the middle starts with towers surrounded by two enemies).
With that patch, I suspect it becomes impossible to play the map as it was designed.
But this specific map seems to be broken with regards to player placement: #4329.

An actual example would be Team Oasis (2v2) where players must be grouped.
I'm not sure if there is something we can do about this.

This revision now requires changes to proceed.Mar 20 2018, 12:07 PM

only sort players for random maps?
(or maybe include skirmish)

In D1408#57682, @Imarok wrote:

only sort players for random maps?
(or maybe include skirmish)

The mentioned maps are skirmish maps.
(For scenario maps its basically broken for every map as teams are always prescribed by the map)

Doing it only for random maps would be the only thing that remains.
In order to answer that question, we would need to take a design decision on wheather or not random maps may overwrite any gamesettings at all and I never got an answer to that (IMO no, which would allow this patch for random maps).
If it were allowed, then we would consider a map like Dueling Cliffs as a random map legitimate.

The summary screen does sort players by team, if teams are locked.
So maybe we should do that in the diplomacy screen and observer dropdown if this feature is needed.
I recall fpre had a patch for that and I didn't like it because it gives a different order depending on the GUI object that visualizes the playerData.
But it seems it's the only thing we could add if this ordering is wished for.

Not sure, but wondering if it would be possible to detect such maps by testing if the mapData has playerData with Teams.