Generated Maps

Getting Started
The modding community embraces your desire to learn how to create generated maps for Age of Empires IV!

Before getting started with generated maps, these resources are highly recommended as the first steps:


 * Official Getting started with generated maps
 * Debug Generated Maps in your browser (source: https://github.com/Drumsin/aoe4-generated-map-debugger)
 * Join the Unofficial AoE4 Modding Discord for assistance

SetCoarseGrid
'''Meters per square is set to 40 with the exception of the Micro sized map. Using this function, the minimum size of a map is 13x13 which equates to 33 meters per square for Micro size map, and 40 for all other sized maps.''' If you use function, you can make a map with a lower grid size.

Arguments

 * null

Returns
mapSize (int)

Examples
From the library/map_template.lua

SetCustomCoarseGrid
Sets the map grid to be a custom dimension. NOTE: this will make all terrain features relatively smaller. Be careful using grids of too high a resolution.

Arguments

 * metersPerSquare (int)

Returns
mapSize (int)

Examples
From the library/map_template.lua

Global Distribution Balancing
Question & Answers with Relic developers on the prioritization on how the global distribution system works.

I've noticed instances with some global distributions where the balance of trees is heavier on one side of the map, and it looks as though the side with the least amount of trees is because of the stealth forest (from the global distribution) taking it's place.

"With global distributions, it isn't using any sort of player balancing, so it doesn't really have any concept of 'side of the map', it just will spawn things anywhere the score map says is available up to the spawn amount. If the stealth forest entry is above it in the list, the stealth woods will spawn first and take up the space, but they aren't ever trying to spawn on a certain side of the map."