There are separate random number generators for most things in Slay the Spire.
Specifically, this piece of code is executed at the start of a run:
public static void generateSeeds() {
logger.info(“Generating seeds: ” + Settings.seed);
monsterRng = new Random(Settings.seed);
eventRng = new Random(Settings.seed);
merchantRng = new Random(Settings.seed);
cardRng = new Random(Settings.seed);
treasureRng = new Random(Settings.seed);
relicRng = new Random(Settings.seed);
potionRng = new Random(Settings.seed);
// The following rngs are actually re-initialized each floor:
monsterHpRng = new Random(Settings.seed);
aiRng = new Random(Settings.seed);
shuffleRng = new Random(Settings.seed);
cardRandomRng = new Random(Settings.seed);
miscRng = new Random(Settings.seed);
}
Wow. I’m kind of shocked that the programmer understands PRNGs well enough to come up with this strategy for controlling different parts of the game separately and yet thinks that initializing a bunch of PRNGs to exactly the same seed is a good idea.
Nice find, though. Thanks for the info!
(I note the page you linked is dated ~4 years ago; it seems possible this has changed since then.)
There are separate random number generators for most things in Slay the Spire.
From https://forgottenarbiter.github.io/Correlated-Randomness/ (which does point out there is some unfortunate correlated randomness, though I think there are mods that fix that)
Wow. I’m kind of shocked that the programmer understands PRNGs well enough to come up with this strategy for controlling different parts of the game separately and yet thinks that initializing a bunch of PRNGs to exactly the same seed is a good idea.
Nice find, though. Thanks for the info!
(I note the page you linked is dated ~4 years ago; it seems possible this has changed since then.)