Posts for Ben_Hall

Ben_Hall
He/Him
Joined: 10/9/2017
Posts: 1
Location: USA
First post on the forums here, so hi. I want to mention I've been looking into this game for a long time now, and I'm eventually hoping to get my own TAS in the works (I've had a few practice TASes done so far, but they weren't exceptional). To bring up an actual discussion point, I wanted to share something useful. I traced the game code back through a debugger to find the rng value, at address 0204219c (2 bytes). I'm not sure yet what method it uses to choose the initial seed, but I managed to decompile the 'randi' function and the method it uses to update the rng value, and to my surprise the rng is significantly easier to predict than I would have imagined. It caps out the rng value to only 12 bits, so there are a total of 0x1000 or 4096 different values it cycles through in this order: https://pastebin.com/atpYsE6x the randi function is the one it uses commonly in game code, it returns a value in the range [0, X) where X is the input value. All it does to calculate this is take (rng value * X) / 0x1000, using integer division. Thus it would be straightforward to produce a table of outputs for different values of X. Knowing which values of X it uses in different situations requires more debugging though