Generated Maps:Manually Placing Player Starts

Manually Placing Player Starts
Apart from the default functions described in the official documentation and generated map template, you can also place players completely manually.

To take teams into account, setup the team mapping table to know which player belongs to which team. The following is an example of placing team members on the same row next to each other, with one row per team. Critically, note how playerIndex works differently from playerID!

For example, with the following setup in the game lobby:

The code above results in this start:

If you do not care about teams when placing players, a simpler way is to use worldPlayerCount directly. In the following example, we place all players on the first row next to each other.

When placing players manually without using the default helper functions, the game does not automatically add starting resources at player locations, so it is generally recommended to place one of the tt_player_start terrain types at the same coordinates: