Renames the "Experimental" map generator to "Classic" in internal
code, configuration, and user-facing text.
Additionally, replace the user-facing names for the Experimental and
D2K map generators (as seen in the map editor tools dropdown) with
"Map Generator".
Some common feedback about preview generated maps is that they are too
chokey. This change aims to add a new terrain type called "Plots" that
retains the variety of terrain features present in the Gardens
terrain, but opens up the play area a bit more. In essence, it strikes
a balance between the densely packed Gardens terrain type and the
loosely packed Plains and Parks terrain types.
This new terrain type notably uses a smaller noise feature size to
provide smaller but more regular map structure, and expands the
pathway cutouts and contour spacings for forests and cliffs.
The new Plots terrain type is made available for both RA and CNC and
becomes the new default.
This is an additive configuration-only change. Replay and multiplayer
map generation retains forward/backward compatibility.
This expands upon the limited FromTemplates MultiBrush collection
shorthand:
- Adds a corresponding FromActors shorthand.
- Allows FromTemplates and FromActors to mix in additional properties,
such as weights and backing tiles.
- Updates the MultiBrush collections used across the official mods to
make use of these shorthands.
Note that this reorders some MultiBrush definitions for
conciseness. This partially (cosmetically) re-randomizes map generator
output.
This commit adds watercliffs to generated maps in the RA mod, based on
the path partitioning logic added for the D2K map generator.
Watercliffs are not available in CnC and unofficial mods, so their use
in the ExperimentalMapGenerator configuration is optional.
The TEMPERAT and SNOW tilesets' MultiBrush segment definitions used
inconsistent conventions for vertical and horizontal beaches. This
meant that:
- Tiling was biased to produce horizontally wider bodies of water.
- Vertical beaches did not line up with watercliffs when connecting.
This change redefines the point sequences to fix these issues.
Inner types in MultiBrush segment definitions can usually be derived
automatically from the start and end types. This is especially
important for segments with different starts and ends, where the Inner
type could be either one (e.g. beach to watercliff changers). Inner
types are now only needed in two cases:
- The Inner type doesn't match either the start or end. For example,
road diagonals.
- The Inner type should only match one of the start or the end. For
example, cliffs which end into clear tiles.
This commit cleans up the unneeded or unwanted Inner type definitions
in the base mods.
This change lifts large portions of ExperimentalMapGenerator's logic
into a new "Terraformer" class with highly documented methods that can
theoretically be used by alternative map generator classes. Some
additional refactoring may occur in future, subject to the practical
needs of additional map generators. ClearMapGenerator is also
simplified.
This is not a pure refactor and contains some algorithmic and
behavioral changes, as well as few minor bug fixes. Notably:
- The logic for obstructing unreachable water has been somewhat
replaced.
- In CnC, where water is already unplayable, EMG no longer obstructs
water. (RA still does, as water is playable there.)
- Mountain (cliff) generation is now somewhat more effective. This
increases the number of cliffs seen on many presets. Settings should
no longer use "Mountains: 1000".
- PlayableSpace logic has been consolidated into Terraformer.
- PlayableSpace.Playability no longer exists as PartiallyPlayable
became redundant. Its uses have been replaced with a simple
boolean. Consequently, some defunct code and configuration has been
removed.
- Adjust MultiBrush replaceability contract painting behavior to be
more intuitive.
- Fix off-by-one error in map bounds computation.
- Fix some usages of mixed up MersenneTwisters.
AI likes to make a naval building in the top right tiny water area.
This PR adds 2 rocks to that area blocking any building so the AI
is not going to waste time on it.
TilingPath's algorithms are designed on the assumption that MultiBrush
segments use unit steps in their point sequences. Non-unit
sequences can result in incorrect or suboptimal tilings.
This change ensures point sequences are validated for unit steps, and
fixes a non-compliant cliff tile across all tilesets.
Adds MultiBrush definitions for River (RA and CnC) and WaterCliff (RA
only), allowing them to be tiled with the Path Tiling tool.
A small enhancement to the MultiBrush and TilingPathTool code is added
to allow the inner type to be derived from start and end types. This
allows segments that interface between types (such as WaterCliff to
Beach) to be usable when tiling either WaterCliffs or Beach. Whilst
this makes the inner types of many of the existing MultiBrushes
redundant, no simplification is performed as part of this change.
Exposes the TilingPath code used by the map generator as a map editor
tool to help automate the process of tiling sequences of templates
together.
No additional template stitching definitions are added as part of this
commit. As such, the tool currently only supports the same auto tiling
as the map generator does. This includes:
- RA and CnC support.
- Beaches, land cliffs, and roads.
Support for additional mods and templates can be added in follow-ups
by adding the necessary MultiBrush definitions.
Related changes included in this commit to support this work include:
- Add support for sparse EditorBlits.
- Add support for MultiBrush to EditorBlitSource conversion.
- Add support for EditorBlitSource previewing.
- Adjust the "Road" types used in segmented MultiBrush definitions.
The editor's resource value calculation logic was fixed in #21820 to
match actual gameplay. The map generator logic originally copied the
editor logic from EditorResourceLayer rather than ResourceLayer and
associated game logic. As such, it inherited incorrect calculations.
This change updates the map generator logic to match the now
consistent logic in both ResourceLayer classes. Map generator resource
settings are also adjusted -25% to continue roughly matching the
previous resource output.