Fix: for arctic and tropic, make sure we have at least a few hills #8513
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #6337
Motivation / Problem
With the default configuration, creating arctic and tropic maps are not working as intended: on flat there are no hills to generate any of the hill-only industries. In the case of arctic this generate an error; one a new user would have no idea how to solve.
In general, on these two landscapes hills are .. not really hilly with the default height-level and snow-line level. If you drop them by 50% (15 / 7), it becomes more like what we were used to before 2014 (before the higher max-height-level was introduced).
Description
Solving this is far from easy, as the TGP became a patch on a patch on a patch on a patch, often by people who did not understand the full scope. For example, the
max_height
table is now just terrible, as it is not a fluent increase of values (sometimes+ 7
, next step+ 2
); this makes no sense.While solving this problem I got told multiple times that a rewrite of the map generator is the only true solution, but that is not helpful to anyone, especially new players. So I have been looking for a stopgap solution, that is not perfect, but gets the job done. This is the result.
In essence, it boils down that TGP uses a max-height based on map-size and "hilliness", which is clamped to "max-height-level" of the settings. By default, a 256x256 map can never generate any hill above 25 (this is independent of the "max-height-level"!). For "Very flat", "Flat", and "Hilly" it doesn't even come above the default snow-level, in arctic. This is pretty bad, and is the reason industries cannot be placed.
For tropic, the solution is picked is this:
max-height-level / 4
. To compensate for the additional increase in height-level, we reduce it with the hilliness of the setting lower, just to dampen the effect of increasing the height-level.For arctic, I went for a 2-part solution:
Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.