335
edits
Changes
SOTN/RNG
,Document the Nice and Evil RNG
Symphony of the Night uses [https://en.wikipedia.org/wiki/Pseudorandom_number_generator| Pseudo-Random Number Generators ] when randomness is needed in the game. There are two PRNGs that are currently known about (dubbed Nice and Evil), and each is responsible for handling the randomness of different events in the game.
Both PRNGs operate in a similar fashionRNGs are set to an initial value of 0 on startup. For the most part, the Evil RNG is advanced once every frame, even if the character isn't doing anything (hence why it has been dubbed Evil). Different functions within the games code will also make specific calls to the Nice and Evil RNG, and so different events will trigger one or the other. A comprehensive list of what events call which RNG is not known, but a few events have different numbers used when determining the next seed valuebeen figured out. The Nice RNG is responsible for, among other things, determining the location of Dracula's teleports in the Prologue, determining [[SOTN/Flea_Man|Flea Man]] jumps, determining the rotations of the Books in the Library, etc. The Evil RNG is responsible for determining whether or not an item drop occurs after an enemy dies and whether or not an item drop will be rare, uncommon, or common..The Evil RNG is also responsible for determining which Food item will drop from a Meal Ticket.