3 ms·
Stardew Valley has two random number seeds. One is the normal character seed. The other, your multiplayer ID, can be determined by analyzing the save file. Exc
by PennRobotics 15d ago
Stardew Valley has two random number seeds. One is the normal character seed. The other, your multiplayer ID, can be determined by analyzing the save file.
Except! On the Switch, you can't easily access the save file AND the random number generator is different than on PC. There is a seed cracker that looks at your traveling cart listing and calculates the character seed. Maybe because it's less important and harder to observe, I haven't found any tool to crack the other seed and don't have time to attempt writing it myself.
By inspecting cracked geode contents, you should be able to isolate your multiplayer ID and then predict random events on Nintendo just as PC players have done for the last decade with access to the save file.
The C# code for the game is online and the Switch RNG is known, so you never have to work in the dark. It's three steps: ensure your Switch RNG implementation works by testing against the normal seed, ensure your geode RNG implementation works by testing against the PC RNG, and then apply the Switch RNG to the geode function enough times that only one seed could create your observed sequence.
-----
Two semi-related open questions: Are you able to solve as quickly while starting at ANY geode as you'd be solving from the first geode? Does the RNG eventually repeat, so it actually doesn't matter what your multiplayer ID is as long as you observe a unique sequence, since there will only be one continuation of that sequence?
- bombcar 15d agoMy favorite is the Doom random number generator, which is just a list of “random” numbers that it cycles through and if you know how to use it, you can do things like concentrate BFG attacks.
- nomel 14d agoReminds me of a "Dice" electronics kit I assembled when I was a kid. It just used some standard sequential counter ICs run at very high rate. Pressing the "roll" button would just stop the counter!
- xoxxala 14d agoEverQuest also used pre-generated numbers. The randomness was derived from the large number of players using the same list.
- thaumasiotes 14d agoThat sounds like a pretty strong source of true randomness, frankly. (It's then filtered through the list, so the list needs to have good pseudorandomness properties anyway, but still.)
- eru 14d ago> (It's then filtered through the list, so the list needs to have good pseudorandomness properties anyway, but still.) Not sure? Suppose your list only had two number 0 and 1, and you build your random numbers one bit at a time. Or more realistically, you have 256 numbers on the list 0, 1, 2, ..., 255 in order. If the 'large numbers of players drawing from the same list' assumption holds, it doesn't matter much that the list is in order. What's just a bit weird is why anyone would want to turn an embarrassingly parallel problem into something with a sequential bottleneck?
- thaumasiotes 14d ago> Or more realistically, you have 256 numbers on the list 0, 1, 2, ..., 255 in order. If the 'large numbers of players drawing from the same list' assumption holds, it doesn't matter much that the list is in order. Why not? That should convert your random number generation into draws from a Poisson process. If you were looking to simulate a Poisson distribution, you're set. If not, you probably just ruined your RNG. (If the idea is that the interval between any two samples is so large that the list will inevitably be cycled several times before any one person can sample a second byte, there's something to that. It's going to make asking for random numbers more than 8 bits long challenging though.)
- eru 14d ago> It's going to make asking for random numbers more than 8 bits long challenging though. 'Yield' to other players' threads or processes after each byte you draw.
- deleted 14d ago[deleted]
- PennRobotics 14d ago:) the closely related not-at-all-random fizzlefade from Wolfenstein: https://fabiensanglard.net/fizzlefade/ https://fabiensanglard.net/fizzlefade/
- vladde 14d agodecino made a video about that, and at 13 minutes in the video they show what happens in-game if you set all values to 0 :) https://www.youtube.com/watch?v=pq3x1Jy8pYM https://www.youtube.com/watch?v=pq3x1Jy8pYM