Seeded Mode for Randomized Enemy Sizes#6617
Conversation
|
Sorry, @Pepe20129, I didn't realize this already had an assignee. I was playing around and thought it might be interesting, so I implemented it. Happy to close my PR if you'd prefer to handle it, or feel free to use any of the implementation. |
|
If the sizes are seeded, could this result in a softlock or even an unbeatable seed? I think a common reason for reroll in a room is to get a size that can be defeated |
Randomized enemies and randomized sizes are runtime CVars, so switching modes or disabling takes effect on the next room load -- you're never truly locked into an unbeatable room. The existing exclusion lists also handle impossible cases. The bigger concern about extreme sizes being unbeatable is a result of the preexisting collider scaling gap, which is definitely something worth addressing separately at some point. |
No problem at all, it's something I didn't around to yet as I'm in the middle of exam season. |
Pepe20129
left a comment
There was a problem hiding this comment.
Looks good but ShipUtils::Random should be used instead of rand even when not seeded, it doesn't matter that we'd use the same randomState as it'd get reset when the seeded option was turned on.
Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com>
Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com>
Co-authored-by: Pepe20129 <72659707+Pepe20129@users.noreply.github.com>
Good to know. Thank you! |
This closes #3872.
Randomized Enemy Sizes currently uses
rand(), so sizes re-roll every time a room loads. This converts the checkbox to a dropdown, matching the Enemy Randomizer pattern: Disabled, Random, and Random (Seeded).In seeded mode, each enemy's size is derived from the same Enemy Randomizer formula alongside the randomizer seed or file creation timestamp. The same enemy at the same location always gets the same size within a given playthrough.