Allows the random map generator to optionally place civilian buildings
around the map for extra decoration. Buildings are placed last with
lowest priority to avoid competing for play area and resources.
Depends on #21738
Spawn generation generally tries to place spawns:
- In spacious areas
- Away from the center (true center or mirror lines)
- Away from a symmetry-projected spawn
- Away from previously placed spawns
This commit introduces the following adjustments:
- The spacing between sequentially placed spawns is relaxed.
- Fix spawn mines contributing too much to the space reservation.
- Factor rotations into anti-center biasing calculation.
- Preserve spacing information in center space fallback decisions.
- Use a linear (instead of binary) falloff for anti-center biasing.
- Enforce that spawns have a minimum buildable area around them.
- Enforce that symmetry-projected spawns have as much separation as
sequentially placed spawns would.
- Allow spawns on or near roads.
Removes all use of floating point from the RaMapGenerator map generator
and its dependencies.
Floating point behavior is potentially non-portable across client
hardware. Removing them should make the map generation logic
consistent even across clients with different floating point hardware
or compiler behavior. This may be useful for sync-safe multiplayer map
generation where clients independently generate the map from settings.
Most previously fractional public-facing settings are now represented
as numbers out of 1000, with some exceptions using 1000000. Most
internal logic which relies on fixed-point concepts now uses 1024ths,
though some floating point mechanisms have been replaced with
alternative discrete approximations (e.g. gaussian to binomial).
Add an experimental procedural map generator for the Red Alert mod,
along with supporting code that may assist in the development of map
generators for other mods.
Map generation may be accessed as a tool in the Map Editor. This change
does not presently introduce direct lobby options for generated maps.
Features:
- Terrain with land, water, beaches, cliffs, roads, debris, and trees.
- Placement of mpspawns, neutral buildings, and resources.
- Rotational and mirror symmetry options.
- Various configurable parameters with presets.
- Deterministic with configurable seed.
- Performant.
I noticed even on a naval only map, the naval AI doesn't necessarily beat a Normal AI. This makes it much more likely that it will.
- Drop number of ore refineries and ore trucks. As Naval AI is mostly suited for islands I haven't found a map that really needs as many as the other AIs.
- Reduce number of ground based base defenses - and delay Tesla coil a lot.
- Reduce number of migs as yaks more useful if they just get blown up.
- Add Flak trucks and v2s for base defense for Soviet
- Add Jeep and Arty for base defense for Allied
- Add delay for building ore truck so now chance of building one first from War Factory
- A service depot is not useful for this AI except for building an MCV so delay it a lot.
Tested with Ukraine and Germany and can consistently beat normal on island map.