Generated maps Global variables and functions - aoemods/wiki GitHub Wiki

Variables:

Name Type Description
worldPlayerCount integer Returns number of players
randomPositions bool Returns true or false based on the selected option from the game setup menu option under, Map Setup → Locations → Team Starting Locations. There are two options, "Random Locations", which is true, and "Teams Together" which is false.
worldTerrainWidth integer Returns the current map width e.g. 416, 512, 640, 768, 896
worldTerrainHeight integer Returns the current map height e.g. 416, 512, 640, 768, 896

Functions:

Name Type Description
worldGetRandom() float Returns random float between zero and one. NOTE: If you are getting random numbers, you must use worldGetRandom(), as that ties the map script to the seed for determinism across all players. (you will sync error without it).
⚠️ **GitHub.com Fallback** ⚠️