Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent basement labs generating needless overmaps #52693

Merged
merged 1 commit into from
Nov 7, 2021

Conversation

Venera3
Copy link
Member

@Venera3 Venera3 commented Nov 7, 2021

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.

@jbytheway
Copy link
Contributor

FWIW, I also fixed this in an essentially equivalent way. I think it makes sense. When I profiled it, it didn't make much difference, but it did make the profiling results much easier to interpret by removing recursion, so that was nice.

I am a little too preoccupied to PR my version of the fox, so I'm happy to see someone else's.

@kevingranade kevingranade merged commit 3f24c44 into CleverRaven:master Nov 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants