We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch
Hello.
Nobody will create your map for you. But we will help you understand what you have to do. Assuming you want fixed alliances (no backstabbing) the system could go as follows:
The first player will get a civ for the initial choice:
P: Player Force
C: Always
A: Give all civ at chooser from P12 to player force
The choices could be realized by beacons with a location and a neutral unit whose names are the name of the mode. Save the result in death counter "Mode".
Player chooses 2v2, 3v3 or manual mode:If "Mode" is either 3, 4 or 5, Player force gets 1 chooser at the team select location. Same principle: A beacon per Team, with a location and a unit named after team number. Setting teams:
P: Player Force
C: Current Player brings 1 civ to "Team 1"
A: Set death counter "Teams" to 1 for Current Player
A: Remove civ
P: Player Force
C: Current Player brings 1 civ to "Team 2"
A: Set death counter "Teams" to 2 for Current Player
A: Remove civ
Add restrictions to your heart's content so not everyone can join the same team.
Player chooses random mode:Assuming there's a free CPU player in slot 8 and only 2 possible teams. Those assumptions make the triggers really simple but other solutions exist if they are wrong.
So what I do here is I set everyone to be in Team 1, and randomize a switch. Immediately after, I put them in Team 2 if their switch is set (they remain in Team 1 if the switch is cleared). Since the trigger is set up for the player force every player will run an independent copy of it.
P: Player Force
C: Player 8 has suffered exactly 1 death of "Mode"
A: Randomize Switch 1
A: Set "Teams" to 1 for Current Player
P: Player Force
C: CPU player has suffered exactly 1 death of "Mode"
C: Switch 1 is set
A: Add 1 to "Teams" for Current Player
Note that
all of the triggers shown so far must not be preserved to function as intended.
Player chooses ffa mode:As far as I understand the only mode with no enforced teams, so we don't need to do anything.
If you want to prevent manual alliances, just set everyone to be foes with player force and preserve. Condition would be Teams=0.
Now that the teams have been assigned it's just the matter of enforcing them. It'll look like this:
x = Every possible player number
P: Player Force
C: Current Player has suffered exactly 1 deaths of Teams
C: Player x has suffered exactly 2 deaths of Teams
A: Set Player x as enemy
A: Preserve
P: Player Force
C: Current Player has suffered exactly 2 deaths of Teams
C: Player x has suffered exactly 1 deaths of Teams
A: Set Player x as enemy
A: Preserve
P: Player Force
C: Current Player has suffered exactly 1 deaths of Teams
C: Player x has suffered exactly 1 deaths of Teams
A: Set Player x as ally
A: Preserve
P: Player Force
C: Current Player has suffered exactly 2 deaths of Teams
C: Player x has suffered exactly 2 deaths of Teams
A: Set Player x as ally
A: Preserve
Keep in mind that all of the above is just a quick mock-up and may contain bugs. Pay attention to trigger order, player/force numbers etc. as I did use some mapping tricks to keep trigger count low and logic obvious so it's recommended that you do use them as a starting point. But to make them work properly you'll most likely have to expand on them, so don't treat the triggers as a ready-to-go solution.