Add new debug menu item for checking map extra spawns #36244
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
SUMMARY: None
Purpose of change
While discussing #36229 it was useful to have a way to easily get the data regarding how many of a given map extra will spawn in the game.
Describe the solution
Add a new debug menu item which allows the user to pick from the lists of map extra collections defined in the region settings, and then runs the selection using their chance and weighted lists and records which extras are selected, and finally reports that.
Testing
Loaded the game, ran the debug menu item for all of the map extra lists.
Additional context
I had it run 32,400 times because that's one z-level for an overmap (180x180) and it's a big enough sample size to get the rare map extras on the list, even if it's only once. Having a much smaller sample size would be more representative of "what extras might I see within my field of view", but I think it's probably easier to have the larger set and manipulate it if you want something like the smaller sample size.