Forums  /  Harry Potter and the Philosopher's Stone (GBC)  /  RNG Manipulation and questions
  Skyword572Skyword572

Do we have any informations about RNG's manipulation? I mean, can we manipulate the Rng for crits or encounters (and other stuff)? It seems like every 12 frames the values for every encounters change (i mean, when the game "load" the values for one "fog", these values for THIS fog (not for others) change every 12 frames).

Does VBA emulate the game accurately?
I used the VBA-M's Memory Viewer.

From notes: 0x8000 - 0x82B0: forbidden forest, i didn't move and only monsters appears and disappears randomly
-> values changes: 0x8000 - 0x8030 / 0x8080 - 0x80B0 / 0x8100 - 0x8130 / 0x8180 - 0x81B0 / 0x8200 - 0x8230 and 0x8280 - 0x82B0 -> The six first values's combo change hardly when foes's fog and during the "loading" fogs -> two last change and change again when one gof disappear.

Exemple: 0x8000 - 0x8030 / 0x8080 - 0x80B0: first fog - 4 values patterns (change in same order) -> i was thinking about the sprite or tile but they both changed but the values were the same. (for the sprite, it seems that change every 3 frames (move or change or both every 3 frames - considering disappearance of the sprite too).

(I'm not that good enough to rly understand what every part of the memory viewer do, if someone can explain - ROM/RAM/VRAM/SRAM/etc. or send a link for)

I probably did something wrong or misunderstanding something, so i prefer to post here to be sure of what am i doing ^^'

FFA0 : 0x0000FFA4: 0020 (L) / 0010 (R) / 0080 (D) / 0040 (UP) / 0060 (U-L) / 0050 (U-R) / 0090 (D-R) / 00A0 (D-L). -> Values for every input (Left/Right/Down/Up - Up-Left, etc.)

And anyone knows what these values are for?
(from notes: FE90: (0x0000FE98) - (0x0000FE9A) = (?)
-> when the game softlock ("0000000000" softlock's dialogue with the girl for train skip and frog'exp glitch): these values turn on 9F90 and 00CF / or 9F8D 00CF / or 9F8E 00CF / or 9F8F 00CF -> during 5 frames and reset to 0000 0000 and restart this (without input)

I thought about used something like this when you have finished a fight quickly (by flee for expl.) you fall into another fights (in particular at the begining in Gringotts)

poultfloydpoultfloyd likes this. 
  SMPSMP

So, as the RNG is kind of similar to Chamber of Secrets (Though I don't remember exactly what memory address the RNG value is for this game anymore as I haven't done any digging into that kind of stuff since the TAS was made), I can say that the RNG is kind of hard to control since the game is a 3D movement type of game. So moving Up+Left can yield a different encounter spawn location as opposed to moving just Left, which can affect RNG greatly. This puts things into the pixel perfect spectrum, which makes incredibly difficult to deal with.

There is also the fact that the chance for Harry to do critical damage is frame dependent, meaning that getting the critical isn't determined at the beginning of the turn, like whether or not you do damage at all is, but at the frame that you press A to cast the spell.

As for emulator to test things I suggest the latest versions of Gambatte or BizHawk (which uses the Gambatte core), but I think that the later versions of VBA work fine as well for memory addresses.

Skyword572Skyword572 likes this.