Prevent basement labs generating needless overmaps #52693
Merged
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.
Summary
None
Purpose of change
As noticed by @jbytheway while profiling worldgen mandatory specials that fail to get placed force a new overmap to generate (and so on) until they get placed. Since the basement hidden lab has trouble spawning owing to its weird hybrid nature it triggered this mechanism frequently, leading to slowdown (and potentially some mission weirdness).
Describe the solution
Reduced the special's frequency to 99% (down from 100%), turning it technically non-mandatory.
Describe alternatives you've considered
Redirect the whole questline at non-hardcoded labs, bringing their wholesale removal nearer. That will have to happen one of these days, preferably when we have fleshed out mutable microlabs and a few more modular labs (not volunteering though).
Testing
None, profiling stuff is beyond my paygrade.
Additional context
While mission code can place specials on pregenerated overmaps the chances of successful placement are much lower than on newly generated ones (our maps are very busy, and large specials error out pretty frequently). This doesn't really fix that, but it should lead to less unexplored-but-generated overmaps and as such easier target placement for missions.