Sorry, FF7
Yes. I know about the RNG-list and pseudo randomness, but it isn't simply picking the first number for the first battle and then moving on to the next number for the next battle.
More DataIn the memory the RNG list can be found at address 000E0638 to 000E0737 (PSX NTSC US version).
The value that is increased by 1, 2, or 3 (I've only observed those three increments) at each battle can be found at address 00071C20 (PSX NTSC US version).
If we stay at the rather small field (ID#461, 01CDh) that resides in between the 'Mt. Corel Reactor' field and the 'Roller Coaster Section' field and play 20(23) Battles it will all line out like this;
Battle Formation # (1st Encounter to the left):
#4,#2,#1,#4,#3,#2,#4,#3,#4,#2,#4,#2,#1,#3,#2,#4,#2,#4,#3,#2,(#4,#4,#4,...)
#1 = 1x Bomb, Chance 18/64
#2 = 2x Bomb, Chance 17/64
#3 = 1x Cocatolis, 2x Boatfloat, Chance 15/64
#4 = 2x Cocatolis, Chance 14/64
Counter That is Incremented at Encounter (and remembered between soft resets, is 0 at start):
2,4,6,8,11,13,15,17,20,22,24,26,28,30,33,36,38,40,43,46,(48,51,54,...)
Note: It will be 0 before your first encounter but turn to 2 the instance you get that first encounter. I.e. It is incremented AT encounter and not after.
Also Note: Fighting one or more battles at any other field
Could alter this pattern, but will not necessarily do so. Because of this I believe the encounter itself has something to do with this value's behavior.
First 20(23) values in the RNG list:
decimal: 177,202,238,108,90,113,46,85,214,0,204,153,144,107,125,235,79,160,7,172,(223,138,86,...)
hex: B1,CA,EE,6C,5A,71,2E,55,D6,00,CC,99,90,6B,7D,EB,4F,A0,07,AC,(DF,8A,56,...)
What I think I knowFor the first encounter the 3rd value in the RNG list will be used (the one in slot 02 if you count the first one as being in slot 00), namely 238.
And the game does the following:
x = 238
r = 'Battle Formation #1 Chance' * 64 //18
s = 'Battle Formation #2 Chance' * 64 //17
t = 'Battle Formation #3 Chance' * 64 //15
u = 'Battle Formation #4 Chance' * 64 //14
If x<r*4 {Give Battle #1}
Else If x<(r+s)*4 {Give Battle #2}
Else If x<(r+s+t)*4 {Give Battle #3}
Else {Give Battle #4} //(r+s+t+u)*4 will always be 256 in a set of 4 battles
For the 2nd encounter the 5th value in the RNG list will be used, the one in Slot 04, namely 90. A similar check to the one above is made BUT for some reason the 6th value in the List (Slot 05) has something to do with the outcome. If the 6th value is set to 00h the game will pick the battle # just like it did for the first encounter but if set to 80h it wont, i do not know why.
This is pretty much what I got so far, I will probably try some more in a very near future but for now this is it. Anyone up for the challenge is more than welcome to help out or solve this before I do
EDIT:Been looking at it some more and did managed to figure most of it out. Was still somewhat puzzled as to why it used RNG x+1 instead of x sometimes though, but fortunately Terance's "Enemy Mechanics" actually hand an explanation for that specific behavior and with that all the remaining blanks could be filled. So yeah, problem kinda solved.