sc2: Adding a max supply reduction trap item; added an option to control filler ratios #374
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.
What is this fixing or adding?
filler_ratio
to allow controlling the ratio of filler itemsfiller_ratio
)/option
Plus other minor improvements:
enable_x_locations: resources
can now spawn shield regen items, and is subject to filler_ratioHow was this tested?
New unit tests. Did a test generation and checked the spoiler for filler ratios. Just setting amounts to 1~3, items marked with 3 appeared approximately 3 times as often as items marked 1, and items marked 2 appeared twice as much as marked 1. (1 -> ~50, 2 -> ~100, 3 -> ~150)
Started a game, used
/send
to give a max supply reduction item. Went into the mission, built a ton of supply depots, and changed thelowest_max_supply
andreduced_supply_per_item
options in the client, doing a/send phaneros additional starting minerals
to get the client to send another message to the game. Verified the max supply capped where it should -- lowest supply 100 supply reduction 100 went to 100; lowest 180 reduction 100 went to 180; lowest 180 reduction 5 went to 195.If this makes graphical changes, please attach screenshots.
Here's how the new options generate in the template: