Slay the Spire

Slay the Spire

69 ratings
RNG Fix
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
18.118 KB
Jul 28, 2020 @ 7:04pm
Jul 28, 2020 @ 9:32pm
3 Change Notes ( view )

Subscribe to download
RNG Fix

Description
Random Number Generator Fix

This mod was made after reading this essay on the randomness in Slay The Spire:

https://forgottenarbiter.github.io/Correlated-Randomness/

In summary:

"When you start a game of Slay the Spire, you are assigned (or choose) a 64-bit seed. This seed is used to initialize several random number generators, each in charge of a different aspect of the game. But many of these random number generators are initialized to the same state."

What this means is that the player can know a lot of information they shouldn't if the game were truly random. One such example is the player can know if their next event will be a monster room or not based on the first enemy they encounter. Another example is that by analyzing monster order (or the potion order, or the event order, etc), the player can predetermine the rarity of the chest they receive and its contents by calculating the correct number of fights before entering the chest room.

THIS MOD IS ONLY FOR A VERY NICHE SUBSET OF PLAYERS

Most players will not bother to consider this information when playing, and that's fine. A small subset of players will be aware of these, and subconsciously or not, let that influence their play.

Fundamentally, the seeds of each of the major categories should not be the same. This mod alleviates that issue by using the map seed to generate a unique subset of seeds for each of the major RNG categories of the game. Each seed will still be the same for every player on that seed, but there is no longer any way to use the order of monster fights to predict any information about potion likelihood, or chest rarity.


Plea to the Devs

I believe that this change should be part of the main game, but until this is fixed, this mod will suffice. I will end by reiterating the final message of the blog post:

"If [the devs] happen to see this... I would like to please request a fix for this bug. Luckily, the opportunities for exploiting the interaction between the different random number generators seem to be fairly limited, based on what I currently believe. However, I believe players should never be incentivized to exploit the predictability of rng in order to play optimally. Maximizing the benefit from this predictability requires intimate knowledge of implementation details of the game, and in my opinion, is tedious and unnatural. Even just having the knowledge in this post feels to me like an exploit that is always accidentally active. While I and many others will continue to play, consciously ignoring the existence of the bug, it would at least grant significant peace of mind to know that independent events are truly independent. I know I have reported many bugs for the game, but this is the one that I would currently most like to see fixed."


Thanks
I hope you have a good time with this mod, and I welcome any and all feedback.

If you enjoyed this mod, consider checking out some of my other mods:
A Better Note
A Better Sensory Stone
A Better Match
A Better Knowing Skull
A Better Forgotten Altar
24 Comments
Phoenix_Rising Mar 25 @ 5:38pm 
This is a fabulous mod. I have no idea how to give it star ratings, but I would give it five stars.:Bless_Gloomhaven:
『Sora』 Dec 16, 2023 @ 10:58am 
After testing, I can confirm this mod does indeed conflict with that one. Note to anyone if they have this issue in future.
『Sora』 Dec 15, 2023 @ 8:44am 
I know this is probably quite old to be posting on, but I installed this mod alongside friendly seed fix for Spire With Friends, and while I can't be certain the cause (given I don't have other people available enough to test) Friendly Seed Fix seems to no longer be working, and given the rest of the mods are all just characters and relics, I'm curious if you'd know whether this would be the result of this mod conflicting with it?
TNoName Mar 4, 2023 @ 10:10am 
bad news:they still not fix.
I guess it is to prevent changes from causing incompatibility of old seeds...Or just lazy
Serp May 17, 2022 @ 5:41pm 
talking about rng and seeds:
Just had a complete run with mods to deactive ~25 red cards (so only 50 red cards where active) and with ability to choose between 5 cards each time. Still I never got the normal red cards "seeing red" or "inflame" (they are not deactivated). So without looking at the code, I'm quite sure that the initial seed determines how rare each card in this whole run will be and if it puts 0% or very small chance there, I will not see this card in the entire run.

So I wonder:
1) Is it possible to improve this RNG so I have the same chance for every card of same rarity everytime I can choose cards?
2) If not, is it at least possible to visualize the chances after generating the seed, so I don't need to start a run if the chance for a card I want to play is super low?!
m_a_h_a_r_a_k_u Oct 21, 2021 @ 2:08am 
Love this! Thanks <3 gave it a thumbs up
Nichilas  [author] Aug 11, 2021 @ 3:29pm 
Hi, thank you for your support! Just to answer your question, the star system on steam is just a popularity measurement. If there were more ratings, it'd have more stars, it's got 95% positive ratings, there just aren't enough. Some of my other mods were similar where they have 98% positive ratings, but only 3 or 4 stars because there are certain breakpoints where you just need a certain total number of ratings, regardless of positive or negative, to be given the stars.

I hope that explanation made sense.
裂开logy Aug 11, 2021 @ 7:28am 
Why no stars?! This is definitely needed. pseudo-random shxt, meaning each game is determined in the beginning (restart won't change encounters, start deck and even every draw in every battle!). One cannot even realize the full potential of the deck in a battle that can be won (but is slain because of bad draw).
As a result, some people just make a copy of the save and explore, and roll back to make another series of choices when things go wrong. Also, some may notice minimal real randomness in the game (cards, relics) and use it to produce different ends by trial-and-error... These above doesn't look right to me. Make the game random all the way through so that one don't need to roll back.
beeyee2010 Jun 20, 2021 @ 9:19pm 
I accepted the friend request, ping me whenever. Thanks!
Nichilas  [author] Jun 19, 2021 @ 10:40pm 
Hi, I would be willing to share the repository, but would rather not post it publicly. I have sent you a friend request, if you accept I can share you the link.