Post subject: RNG Manipulation Questions
Joined: 10/12/2019
Posts: 2
I'll give a little context before I ask the questions, though I will put a TLDR at the bottom. Recently I have been playing Panel de Pon on the Nintendo Puzzle Collection for the Gamecube. The gameplay itself is Tetris Attack/Pokemon Puzzle League, which are both reskins and updates of the original SNES version of the game. With that out of the way, I'll explain my questions are on a TAS site and not some site related to the game itself. I decided to play the game in slow motion (where the tool assisted aspects start to come in) to help practice for lack of a better term, but quickly found myself recording inputs, using savestates, among other things to have some fun. Everything seemed to work as intended only there was one issue, whenever I tried to playback multiplayer recordings, the blocks used for it were different each time (thus the recorded inputs would not be working correctly). This did not happen with single-player recordings. I am going to assume the block patterns are generated through the RNG, and I am also going to assume the RNG is either different, or uses different functions, for multiplayer, and somehow player inputs are not effecting the RNG in the latter (otherwise it would of been the same). I understand this is a specific game and this wouldn't be the place to ask about game specifics, but my questions are more general. Is this a common thing? That being games that have RNGs that are not effected by any sort of input the player does, nor any sort of clock tied to it (I understand for some, game time effects it instead). Also is there any sort of methods to help figure it out? Or is it merely trial and error and hoping for the best? TLDR: Are RNGs that don't appear to be effected by any player inputs common? And is there any sort of method to learning how they function faster? Or is it merely trial and error?
DrD2k9
He/Him
Editor, Judge, Expert player (2210)
Joined: 8/21/2016
Posts: 1086
Location: US
It is indeed possible for RNG to be completely unaffected by player inputs (at least directly). It's also possible for RNG to be directly manipulable by input. It just depends on how the game was coded. Regarding your recordings not playing back: recorded inputs will typically only yield the same result for RNG (and the resulting video) if the recording was performed starting from a deterministic memory state (i.e. power-on), and then the playback is also started from the same deterministic point. Simply being on the title screen when starting input playback often isn't enough as a difference as small as 1 frame in where the input playback is started can affect RNG changes. Others here can probably provide further information/details on a more technical level.
Post subject: Re: RNG Manipulation Questions
Dimon12321
He/Him
Editor, Reviewer, Experienced player (582)
Joined: 4/5/2014
Posts: 1217
Location: Romania
Zoldam wrote:
Are RNGs that don't appear to be effected by any player inputs common? And is there any sort of method to learning how they function faster? Or is it merely trial and error?
Not always, but they are common. Some RNGs work by taking the system date and time as a seed. Most old games use either a basic timer (that starts when you turn on your console, like 0,1,2,...,254,255,0,1,2,...) or a prescribed RNG tables (defined seed sequences that repeat after a full circle). If a game doesn't use some specific in-game situations which may change RNG seed on the frame X and give a different action on the frame X+1 and so on, then we can consider that it doesn't depend on any player inputs. How to influence on it? Skip one frame and press your button and see what will happen (and so on until you get a proper result). It's like playing a virtual slot machine: you try, then load a savestate if you fail, skip 1 frame and try the same again... Firstly, you have to find out if there are some information about it already. It's not difficult to find the RNG seed in RAM Search. It's might be difficult to figure out how it concerns the situation you want to influence on. Imagine you play an RPG game, like Final Fantasy. Most games have all the math done already and it's hidden somewhere in RAM and you usually don't have to discover the pattern of how RNG seed affects you damage (or sth else) or it's easy to discover it. So all you have to do is to find the math in RAM. For example, you attack an enemy and you deal 146 damage to him. You look for addresses which value is 146. Then you load a savestate, skip a frame and attack an enemy again - you deal 101 damage this time. Watch your found RAM addresses. If the one of them has the value of 101, than congratulations - now you know the address which shows how much damage you're going to deal in battles. Than you can use it to beat the game much easier. If you can't find this kind of addresses (or whatever you want), then trial and error is the only option.
TASing is like making a film: only the best takes are shown in the final movie.
Joined: 10/12/2019
Posts: 2
They were recorded from power on, so I don't think it's first issue. Though it makes me curious why the single-player block generation is different (consistent using the same inputs) from the multiplayer one (inconsistent using the same inputs), seems odd that one mode would use one method, and another mode another method. So best advice is just to look through the RAM to find something? I'll need to find the values of the patterns first I suppose, but after that it shouldn't be very hard.
JosJuice
She/They
Editor, Emulator Coder
Joined: 7/3/2010
Posts: 193
Location: Sweden
Which version of Dolphin are you using? Some of them have known problems that cause desyncs like these.
Lil_Gecko
He/Him
Player (97)
Joined: 4/7/2011
Posts: 520
Hmmm, I'm not familiar with Dolphin but if you always replay the same movie from Power-On, you should have the same result everytime I think. So your issue is most likely a desync problem.