Skip to content

NumPlayers

The number of players a generated map is built for, and the start positions counted for a map without waypoints.

Players the map is built for

Specification — Players the map is built for
Applies to
random map generation
File
map seed file
Section
[RandomMap]
Value
integer
When omitted
2Two start points, and the first row of the size table that Width and Height pick a size within.

NumPlayers sets how many start points the generator places, one for each player. It also selects the row of the map size table that Width and Height pick a size within, so the same size settings give a larger map for more players. Map seed files has the table and covers the [RandomMap] section.

map seed file
[RandomMap]
NumPlayers=4
Width=2
Height=2

Before a map is built, a value below 2 becomes 2 and a value above 8 becomes 8.

The generator places the start points after the terrain is finished, spread as far apart as the terrain allows. Each start point needs 400 clear cells around it. If any start point falls short, the generator picks a new set of start points on the same terrain and tries again. The number of tries has no limit, so generation never finishes on terrain that cannot fit that many start points. Start points and the layout spread covers the placement.

The player count also scales the tiberium. The tiberium fields away from the start points share an amount set by Tiberium and NumPlayers, so a map built for more players gets more tiberium in those fields. The number of those fields comes from TiberiumLayout and does not depend on the player count.

Write NumPlayers in every seed file you distribute. The skirmish setup and the multiplayer lobby read it as the map’s player limit and treat a missing value as 0, so the map cannot be started. Start positions a lobby counts covers that read.

Start positions a lobby counts

Specification — Start positions a lobby counts
Applies to
random map generation
File
map seed file
Section
[RandomMap]
Value
integer
When omitted
0

The skirmish setup and the multiplayer lobby use NumPlayers as the number of start positions of a scenario that has no waypoints. The map generator reads the same key separately.

Before a game starts, the setup opens the chosen scenario file and counts the entries 0 through 7 in its [Waypoints] section. If it finds none, it takes the count from NumPlayers in the file’s [RandomMap] section. This is how a map seed, which has no waypoints until its map is generated, gets a player limit.

The setup then compares the count with the players asked for:

  • In a skirmish game, the human player plus the computer players.
  • In a multiplayer lobby, the human players in the lobby. Computer players are not counted, so a lobby game can start with more players than start positions. The extra players start on open ground picked at random.

If more players are asked for than the count allows, the game does not start, and the setup shows a message that the map is too small. A scenario with no waypoints and no NumPlayers therefore counts as having no start positions and cannot be started with any lineup.