Author Topic: [FFVII] Chocobo RNG help  (Read 8073 times)

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
[FFVII] Chocobo RNG help
« on: 2015-12-20 13:29:42 »
I've recently discovered this forum, and while I know very little about reverse engineering, I don't believe it to be outside the realm of my capability of understanding. Knowing how to manipulate the RNG however is fairly simple, and I have undertaken the task of trying to map out each RNG's outcome for sex/breed, as well as receiving and increase to both MDash and MRun. So far I have been successful with mating 2xGreats, less than 4 wins, and also 2xGreats, 4 wins or more. If anyone would like to see those RNG locations then let me know and I'll post 'em. I'm yet to do my tests with 2xGoods.

3 queries:

This is the biggy. When moving my Chocobo in from the pen, I am mapping down the Sex, and also the stats it receives (by feeding it 11 Sylkis Greens then takling it to the Chocobo Square). My results are not consistent, and while I experience consistency for the 1st Chocobo I move, I am not not for the 2nd. I can only assume that a different RNG is used depending on which stable a chocobo is being moved into. Also, when moving my Good (into stable no2), I noticed that the gender RNG was the same as the one when moving my Great. Again, I imagine that this is due to the stable it is being moved into. I could work this out for myself, but it would require A LOT of testing, I'm hoping someone could confirm it for me.

When testing to see how many battles are required before breeding can continue, I'm getting different results when selecting a different gender, although a lot of the time the difference is minimal (i.e. one parent can breed 1 battle prior to the other parent), but other times the difference is significant (i.e. the newborn being ready 5 battles earlier). Is the RNG selected based on which gender of Chocobo I select first, or is there something I'm missing?

This last one isn't major, and I can work this one out for myself soon enough. After I have finished mapping out my 2xGood 0 wins, and 2xGood 4 wins results, I am going to sit down with 1xGood 1xGreat. Is the RNG that is selected dependant on which Chocobo I pick first, or which pair i pick. Meaning, if I select Great first, will I be able to refer to my mapping of my 2xgreats, or will a new RNG be used. And if so, will a different RNG be used if I select Good first before Great (as opposed to Great before good)? I'm hoping that I'll just be able to refer to my previous findings as that will greatly reduce the amount of tests I need to do.

If I find that my discoveries are solid enough then I plan to make a FAQ detailing the optimal RNG location for each circumstance, as so that one can achieve the 'best' possible chocobo with minimal effort, everytime. Any help offered will be very much appreciated, as I'm still learning in-depth how the RNG's work!

NFITC1

  • No life
  • *
  • Posts: 2824
  • Karma: 68
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #1 on: 2015-12-20 13:41:32 »
You've definitely come to the right place. I just saw your PM to me on GFAQs and was going to suggest to come here. I can rarely answer questions on weekends, but if no one gets to this by tomorrow I'll come help.

Basically the tool you're looking for is Makou Reactor. What I'd do (and probably anyone else) would be to open the flevel.lgp file in that program and scour through the Chocobo Breeding Scripts. I have mine annotated, but I can't get to the machine with those scripts until tonight at the earliest.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #2 on: 2015-12-20 14:16:25 »
Legend. I was just about to post on here - it's not the stable (in regards to the 'stat assignment' RNG when moving chocobos) that's giving me trouble, and I'm not sure what is. I came across my troubles at 2am last night, and I wasn't thinking clearly. As soon as i came on to my emulator just, I realised that I could release the chocobo that was being kept in stable 1 that's being used solely for advancing the marker (by feeding Karaka Greens).

All of the testing that I've conducted is under the circumstance of moving a chocobo into the second stable, with a 'feeding' chocobo being kept in stable 1. And, as I understand, releasing a chocobo advances the marker by 1.

So, with 2 Goods in the pen and one weak in stable 1, I fed the chocobo in stable 1 - 20 Greens to bring the RNG to 22 (resulting in a Female, 97KPH and 341 Stamina after 11 Sylkis Greens (give or take 1 to each value given the way in which the Sylkis Greens work)). then I released the chocobo in stable one, freeing up stable two, then I moved the remaining Good chocobo into stable 2. The result was inconclusive. I entertained the possibility that releasing a chocobo could advance the RNG by more than one, but the figures weren't even in the correct ballpark.

The most important thing is that there is consistency with the second 'move', so I will be able to determine a fixed set of results to achieve what I'm after (one chocobo of opposite sex, one with the highest Stamina possible (or over 50 RNG 'spins'), and the other with the highest MDash possible). Understanding what I am to do, and understanding how the thing I am doing works are two different thing though, and if I can understand how it works then I could save myself a lot of time in regards to having to find a 'second' set of results (which may inevitably be unavoidable anyway).

Cheers for the tip though NT, I'll definitely check out that tool, for now I'm keen to crack on with a few more tests

DLPB

  • No life
  • *
  • Posts: 9063
  • Karma: 273
  • For I realized that God's a young man, too.
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #3 on: 2015-12-20 14:48:33 »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #4 on: 2015-12-20 14:52:17 »
Completely scoured it. In fact, it's thanks to the RNG section in that guide that sent me on my RNG adventure!

Oh, and I can say that releasing a chocobo does not advance the marker by 1.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #5 on: 2015-12-20 18:26:39 »
Basically the tool you're looking for is Makou Reactor. What I'd do (and probably anyone else) would be to open the flevel.lgp file in that program and scour through the Chocobo Breeding Scripts. I have mine annotated, but I can't get to the machine with those scripts until tonight at the earliest.

I must say, this program is fascinating, and is really going to help me with my walkthrough in a number of ways. But, I struggled to find the file you mentioned, I booted up my NTSC Rom (.iso), is there another ffvii 'image' file I could try? Also, I struggled to find anything on the enemy AI. If I could view the actual source of Terence's mechanics FAQ then it'll really help when I get round to doing the enemy section. Even being able to see the random encounter probabilities is fascinating!!

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #6 on: 2015-12-20 20:24:23 »
OK never mind, I downloaded the PC version of FFVII found the flevel.lgp file that way. It basically does the same thing as loading up my .iso version. Still struggling to find any script on the enemies though

NFITC1

  • No life
  • *
  • Posts: 2824
  • Karma: 68
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #7 on: 2015-12-21 02:26:10 »
OK never mind, I downloaded the PC version of FFVII found the flevel.lgp file that way. It basically does the same thing as loading up my .iso version. Still struggling to find any script on the enemies though

Enemy Scripts can be found in the scene.bin file with the help of Proud Clod.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #8 on: 2015-12-21 12:39:35 »
Yes, I found Proud Clod a while before you posted. I also found Black Chocobo, and in regards to my walkthrough, all three programs are going to help massively, although I am still struggling to find any raw script pertaining to chocobo RNG. Not that I would be able to understand it properly; I'm thinking about learning hexadecimal, it seems to be something I could grasp. If anyone has any great links that would help I'd be grateful (although I'd probably be able to find a few by myself).

In regards to my RNG side project, Black Chcobo will help loads, as it enables me to view the exact figure of every stat, and my main endeavors is to breed the 'best' possible chocobo with minimal effort, by using the precise RNG locations. Also, using Black chocobo I can set up the exact parameters of the 'test' that I wish to conduct without having to catch/race the chocobos manually (i.e. I am currently testing for 1xGreat and 1xGood with less than 4 wins between them). All in all, a good find, but I'm still very keen to view the script that pertains to RNG, if you (or anyone else) can assist with where to look within Makou Reactor, I'd be grateful.

NFITC1

  • No life
  • *
  • Posts: 2824
  • Karma: 68
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #9 on: 2015-12-21 12:48:24 »
It might be more complicated than that. While I understand how the field's RNG works, on rare occasions it doesn't increment at all. Recall our discussion about the field's RNG? There's no randomness going on in the ranch to advance the RNG....UNLESS there's a pinned-but-not-stabled chocobo. That will move around randomly and can advance the RNG every time it turns and walks. I'll open it up in a bit and see what I can deduce from the whole matter. Choco breeding is a pain to try to max without just pumping them full of steroids.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #10 on: 2015-12-21 14:39:21 »
I'm on very limited time, so I'll have to be brief. I remember that discussion, and from what I can recall we established the fact the PC/Steam version use a different set of RNG mechanics than the console versions. All of my experminets are beinjg conducted on a PS1 emulator, then tested on the PS4 version. I think you would find my results interesting, I'll send you my 'raw dta' to browse through if you're interested.

I can say for certain that a fixed RNG is 'locatable' in terms of moving chocobos from the pen into the stable, it just matters which stable they are moved into. I achecive consistency by catching three chocobos, moving one into stable one as a 'feeding' choc (to advace the RNG), then I put one of my other choc's into stable 2 (after hard resetting) @RNG-xxx (I have the figure on my home computer), and the Speed and Stamina are consistent with my results (and now thanks to Black Chocob I can also determine the other 'random' stats). Then, I release the choc in stable one, thereby freeing up stable 2. Hard reset. @RNG-xxx (the same as before), I'll achieve identical results, everytime.

I'll go into more depth on some of my other findings when I get home, that's all I have time for at the min, but some of my discoveries are fascinating!

NFITC1

  • No life
  • *
  • Posts: 2824
  • Karma: 68
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #11 on: 2015-12-21 15:16:07 »
I can tell you that the Chocobo move code starts in field frcyo, group gaki, script 1 (talk) line 546. Then it executes a few other scripts from the same field. It looks like the actual stat assignment is in keisan scripts1-5.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #12 on: 2015-12-21 19:40:17 »
OK, so if what I'm looking at is correct, then lines 599 onwards basically confirms my notion that a different RNG is used for each stable when determining the stats for the Chocobo when moving. But this is the first time I've looked at script in this way, and without spending a lot of time with it I can't really be sure. But, I'd like to talk about some of my findings, I'm sure you'll find it interesting.

So, just to be clear on my method of manipulating the RNG on a PS1 Emulator (just so we're on the same page) is: From hard resetting (having saved outside the ranch), I'm heading into the stables as quick as poss. Then, I'm feeding a Krakka Green (or Karaka) to a random chocobo to advance the RNG by 1 (at least I believe it to be 1). So, to get to RNG-016, I'm feeding 14 Greens, then I'm mating/moving (heading into the barn area automatically advances the marker by 2, so I'm entering the stables @002).

Moving a Great into stable 2, then feeding it 11 Sylkis Greens:

@RNG-016 = Female 88KPH 486 Stam
@RNG-019 = Male 107KPH 363 Stam

These are the chocs that had the highest Dash and highest Stamina, over 50 RNG 'rolls'. You'll need a dummy (or 'feeding) chocobo in stable one to begin with, once you've moved your first great Chocobo, release the choc in stable 1 then save.

Bear in mind that I've just realised today that my maths is off in terms of how many Greens is needed to bring Dash to MDash. Seeing as Dash is set to either 50, 60, 70 or 80 percent of MDash, I'll always assume the worst case scenario (although now, thanks to Black Chocobo I can manage my choc's stats more closely). From what I can currently work out, 8 Greens are all that's needed to bring Dash to Mdash (and subsequently Run to MRun), but it is very very possibe (but unlikely) that 9 may be required. To achieve the above figures, you must feed 11 Sylkis Greens, and also bear in mind that the Stamina figure may be slightly out due to the way in which the Greens work (also bear in mind that (obviously) the figures are the ones shown in the race lobby, I didn't have Black Chocobo when I started these tests, I'll be sure to review them in much more detail. Also, the Stamina figure is (obviously) Stamina/10 - the in-race figure).

Now for the Breeding part:

Mating 2 Greats, less than 4 wins between them:

*@RNG-064 = Green F DASH RUN STAMINA 
   (M) Parents M-8  battles F-7  battles, Newborn 6  battles
   (F) Parents M-7  battles F-8  battles, Newborn 6  battles

*@RNG-115 = Blue  M DASH RUN         
  *(M) Parents M-9  battles F-6  battles, Newborn 6  battles
   (F) Parents M-10 battles F-10 battles, Newborn 10 battles

I've also found Green M & Blue F that receives a boost to Dash, but the above figures were the best results.

So, the gender of chocobo we select first has no affect whatsoever on the breed/sex/stat that is selected, however it does make a difference on how many battles are resired before some of the chocobos can mate again. It's a crying shame that Black Chocobo does not detail the amount of battles required before a chocobo can mate again, it would have saved me A LOT of testing time.

Mating 2 Greats, 4 or more wins between them:

*@RNG-067 = Green F DASH RUN STAMINA
   (M) Parents M-8  battles F-8  battles, Newborn 8  battles
  *(F) Parents M-7  battles F-8  battles, Newborn 7  battles

*@RNG-117 = Blue  M DASH RUN
   (M) Parents M-9  battles F-6  battles, Newborn 6  battles
   (F) Parents M-6  battles F-9  battles, Newborn 6  battles

I've still got a hell of a lot of test to conduct. A few interesting things:
 - Buying greens does *not* increase the RNG
 - Chloe tells you the MDash/MRun value, NOT Dash/Run; so you don't need to feed greens after you've bred to see whether or not they've received a boost in stats (I know from testing, but if you wish to check [kodomo] [talk] [line 93] for me, I'm not sure how to decipher what I'm reading).
 - It was always around the mid 60's and the mid 110's that I would find my 'magical RNG number', gaining a boost to all three stats (or just Dash and Run)!!
 - Class makes no difference to the breed/sex/stats, although I haven't tested for battle count.

Lastly, sorry to drag this post on too long, but for the hell of it I thought it might be interesting to see a snippet of the raw data i've collected, from the raw data I intend on finding out exactly what actions advances the RNG and by how much (i.e. releasing a chocobo).

Moving Good Chocobo, feeding 11 Sylkis Greens (stable 2):

 @RNG-002 = F 89 372
 @RNG-003 = F 89 405
 @RNG-004 = F 81 420
 @RNG-005 = F 95 349
 @RNG-006 = M 94 342
 @RNG-007 = M 94 352
 @RNG-008 = M 79 426
 @RNG-009 = M 93 367
 @RNG-110 = M 80 403
 @RNG-111 = M 80 422
 @RNG-012 = M 86 392
 @RNG-013 = M 87 347
 @RNG-014 = M 89 383
 @RNG-015 = F 94 308
 @RNG-016 = F 82 449
 @RNG-017 = F 94 332

2 Goods Less than 4 wins: (Values un-shown yielded a regular Chocobo)

 @RNG-004 = Blue F RUN
 @RNG-005 = Green M DASH
 @RNG-007 = Green F
 @RNG-014 = Green M DASH
 @RNG-016 = Green M
 @RNG-020 = Green F
 @RNG-026 = Blue F
 @RNG-033 = Blue M
 @RNG-045 = Green M DASH
 @RNG-047 = Blue F
 @RNG-053 = Green M
 @RNG-054 = Blue F,
 @RNG-062 = Blue M DASH
 @RNG-063 = Green F DASH STAMINA
 @RNG-064 = Green M RUN STAMINA
*@RNG-065 = Green F DASH RUN STAMINA

sithlord48

  • No life
  • *
  • Posts: 1454
  • Karma: 33
  • Dark Lord of the Savegame
    • View Profile
    • Blackchocobo
Re: [FFVII] Chocobo RNG help
« Reply #13 on: 2015-12-22 12:32:14 »
Quote
It's a crying shame that Black Chocobo does not detail the amount of battles required before a chocobo can mate again,
do you know where (if) this is stored in the save ?I Can add that if you do. For now there is the toggle "can't Mate" but you need to quit the game edit then reload. And when testing that can be what you spend most of you time doing.. check something , close game , small change , relaunch ... i hate to think how much time i have spend doing just that myself.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #14 on: 2015-12-22 12:51:26 »
do you know where (if) this is stored in the save ?I Can add that if you do. For now there is the toggle "can't Mate" but you need to quit the game edit then reload. And when testing that can be what you spend most of you time doing.. check something , close game , small change , relaunch ... i hate to think how much time i have spend doing just that myself.

The problem is that I am trying to ascertain the amount of battles required after mating on a particular RNG Value. The 'can't mate' toggle is nor good to me, because after I have mated I need to then get into a battle, tallying each time I do, save state, then attempting breed. If they can't mate, then I'll reload my state, battle, tally, save , then see if they are ready. Simply toggling the 'can't mate' flag will not help me (for these current tests anyway, they may help later on, but every test I am conducting is being followed by a '# of battles' test.

But for all concerning purpose, Black Chocobo is fantastic, it really is. Being able to view the chocobos core stats is imperative to my project.

DLPB

  • No life
  • *
  • Posts: 9063
  • Karma: 273
  • For I realized that God's a young man, too.
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #15 on: 2015-12-22 15:43:29 »
You can also see their change in real time with Ochu (along with a mem logger that you can use to see memory changes).

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #16 on: 2015-12-22 19:18:34 »
You can also see their change in real time with Ochu (along with a mem logger that you can use to see memory changes).
Firstly, when I read the name 'Daniel Burke' I was like "holy, strawberries, I know that name...", you made 'beacause', right? You even had a small mention on the introduction section of my walkthrough, but due to the fact that I had to shorten down a few bits I had to delete that paragraph.
Secondly, from what I can gather Ochu works on the PC version, right (and not on an emulator)?

I have two current queries that I could probably answer myself through the course of my tests, nevertheless someone may be able to offer me (even more) help in my endeavors (tools, etc):

1) Greens. Sylkis Green, for example, give a 10% boost to our Dash & Run (give or take a very small figure, for arguments sake let's just say 10%). So, does the formula take place for every single Green fed? Or is the formula applied just once, and subsequent Greens (on that feed) follow suite? So let's say Dash is 3000, will all Greens fed increase Dash by 300, or does it go 3000 + 300 =3300. 3300 + 330 = 3630. 3630 + 363 = 3993 and so on... If the latter occurs, then only 8 Sylkis Greens are required (unless breeding the weaker 4 of the 8 'types') .

I plan to do some RNG tests involving Mimmet Greens

2) (This one's a big one) When mating my second generation, does the chocobo type affect which RNG used? I could be in for a lot of testing if it does (and I have a feeling it does). So, will 2 x Greats Blue/Green M/F have a different RNG to 2 x Goods Blue/Green M/F? Seeing as the 'regular' chocobos have varying RNG's based on the type of chcobos being mated, I'm going to assume the same for the 2nd generation (which means there's a LOT of work to be done). I can work this one out for myself though.

Oh, and one last thing, can someone please confirm for me whether or not the Enemy Away Materia is available pre- Tiny Bronco or not, thanx
« Last Edit: 2015-12-22 20:21:21 by DynamixDJ »

DLPB

  • No life
  • *
  • Posts: 9063
  • Karma: 273
  • For I realized that God's a young man, too.
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #17 on: 2015-12-22 20:57:00 »
Yup. And yeah, Ochu is PC only :)

NFITC1

  • No life
  • *
  • Posts: 2824
  • Karma: 68
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #18 on: 2015-12-23 12:40:30 »
1) Greens. Sylkis Green, for example, give a 10% boost to our Dash & Run (give or take a very small figure, for arguments sake let's just say 10%). So, does the formula take place for every single Green fed? Or is the formula applied just once, and subsequent Greens (on that feed) follow suite? So let's say Dash is 3000, will all Greens fed increase Dash by 300, or does it go 3000 + 300 =3300. 3300 + 330 = 3630. 3630 + 363 = 3993 and so on... If the latter occurs, then only 8 Sylkis Greens are required (unless breeding the weaker 4 of the 8 'types') .
I would be shocked and appalled if it wasn't compound (300, then 330, then 363...etc). While I'm not certain it's a percentage increase, the general pattern in the field scripts is make a change, write to memory, re-read from memory. That would pull compound percentages. I'll double check this, but this seems 96% likely.

2) (This one's a big one) When mating my second generation, does the chocobo type affect which RNG used? I could be in for a lot of testing if it does (and I have a feeling it does). So, will 2 x Greats Blue/Green M/F have a different RNG to 2 x Goods Blue/Green M/F? Seeing as the 'regular' chocobos have varying RNG's based on the type of chocobos being mated, I'm going to assume the same for the 2nd generation (which means there's a LOT of work to be done). I can work this one out for myself though.
There's only one RNG for the field module and it's used for everything. From movement patterns of NPCs to random chance mini-games (3D battler, anyone?).

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #19 on: 2015-12-23 19:01:31 »
There's only one RNG for the field module and it's used for everything.
OK, what i mean is there is a differentiation in the outcome of the breed for the RNG value based on the which types of chocobos are being bred (but NOT the stable that they are in - 100% sure of this).

Take for example these patterns I noticed last night (note that these were the 'best' results, or in the case of the Blue F, the earliest):

Code: [Select]
2 Greats, 4 wins or more:
@RNG-053 = Blue  F DASH
@RNG-067 = Green F DASH RUN STAMINA
@RNG-079 = Green M DASH STAMINA
@RNG-117 = Blue  M DASH RUN

2 Goods, 4 wins or more:
@RNG-052 = Blue F DASH
@RNG-066 = Green F DASH RUN STAMINA
@RNG-078 = Green M DASH STAMINA
@RNG-116 = Blue M DASH RUN

So as you can see, there is a small difference in the RNG positions for the desired outcome, but the difference is not consistent. If I could understand why/how this works it could save me a chunk of time with my tests. Saying that, a very similar pattern emerges when comparing the '0 win range':

Code: [Select]
2 Greats, Less than four wins:
@RNG-064 = Green F DASH RUN STAMINA 
@RNG-087 = Green M DASH STAMINA     
@RNG-115 = Blue  M DASH RUN         
@RNG-128 = Blue  F DASH 

2 Goods, Less than four wins:
@RNG-065 = Green F DASH RUN STAMINA
@RNG-077 = Green M DASH STAMINA
@RNG-115 = Blue M DASH RUN
@RNG-128 = Blue F DASH

So there is as little as 1 and as much as 10 figures difference. Using this, I can isolate the 'desired' figures for future tests.

One last thing, I have to ask this, as an uber-noob to script reading/writing, am I on the right forum? In the sense that, would these findings be better suited on something such as a blog? I kind of feel like a fish out of water, then again, perhaps someone who is looking into the coding of the RNG could use these results to further their grasp their understanding of it?

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #20 on: 2015-12-24 21:48:58 »
do you know where (if) this is stored in the save ?I Can add that if you do.

It's taken me a few days of learning, wrapping my head around hexadecimal and binary number systems (for the first time in my life I actually understand how 8 bit and 16 bit actually work), and I believe I may have found where the battle count requirement is kept:

0x0D01 - 0x0D11.

These figures were all at 00 before breeding, then several of them increased according to how many chocobos I'd had stored

0x0D0D was at 07 after breeding, reducing this figure enabled breeding of the chocobo kept in stable 4, although from what I can gather the 'can't breed' flag was still enabled (0x0D00). I wasn't sure how to determine the 'battle count required' though. There were 2 other figures set to 7, these were for the other two chocobos that couldn't mate. There was also a decreasing value for the three chocobos, going from 181-179 (or B5 - B3) at 0x0D01, 0x0D08 and 0x0D0C. I couldn't make heads or tails of these, but they ran alongside the '07' figures.

Also, you may want to look into 0x0CAD, 0x0CAE, and 0x0CAF. As far as I can tell, this doesn't mirror 0x04F8 (etc), but instead displays the character that was last in that particular slot when you saved. Possibly.
« Last Edit: 2015-12-25 00:52:17 by DynamixDJ »

NFITC1

  • No life
  • *
  • Posts: 2824
  • Karma: 68
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #21 on: 2015-12-25 12:40:05 »
Since you're on an emulator, can you track that after each battle and see if it decreases?

As for your RNG quandary, there are likely more checks going on depending on a variety of factors. I'm mostly certain "personality" plays a part in it. The better they "get along" the higher the chick's stats will be (It appears to be a maximum of average PLUS difference [a*b/2 + |a-b|]). The order you pick them in apparently has an effect too. If the first parent you pick has a great personality, it won't matter what the other chocobo's personality is. However, if the first pick is low it will throw as many as two additional RNG rolls to see if they just do get along. If both have a low personality it will roll as many as three times. If you pick the one with the highest personality first it bypasses all of these rolls.
I could be completely wrong. I don't have it in front of me. I'll examine it in more detail later.

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #22 on: 2015-12-25 18:08:18 »
This is interesting. I am fairly certain that the stats received (along with sex and breed) have absolutely no difference whatsoever depending on which chocobo is selected (I've just checked, and the three 'variations' that I've tested on so far all had varying personalities). This does help however with the fact that i am having variations on the battle count required depending on which chocobo is selected.

Speaking of which, I tried to 'spot the difference' with two saves, and my head was spinning when I uncovered the 0x0D01 - 0x0D11 range, I'm gonna spend some more time with it today to try and uncover what's going on (the '07' figure appears to be a flag, but I'm not sure)

I did have a few weird things occur. Here's the difference between the two saves that i evaluated:

First I loaded my save. Then I switched Yuffie for Vincent, then I made a fresh save (the party I keep is my way of keeping track of which tests I perform). This is why 0x0CAE had a value of 5 (for Yuffie) instead of 7 (for Vincent) (or possibly vica versa). Then I ran into the stables, fed 62 Karakka Greens, mated chocobo 1 & 2 to fill stable 4 (3 was filled). Then I saved into a new slot.

The following 'peculiar' things happened:

The chocobo in slot one received a penalty in Intelligence (100-50), and a boost in Co-op (0-62)

0x0E41 changed from 00-02 (?)

(This is definitely noteworthy) The values between F06 and F0B changed accordingly:

0x0F06 - 2D - 26 (45 - 38)
0x0F07 - 41 - 45 (65 - 69)
0x0F08 - 4C -4D (76 - 77)
0x0F09 - 45 - 41 (69 - 65)
0x0F0A - 00 - 4C (0 - 76)
0x0F0B - 00 - 45 (0 - 69)

I've just double checked to make sure that these are the 'right way round'. I'd like to spend some more time with these. Perhaps I am looking at them wrong, maybe they are 3 groups of 2 bytes...

The last range of 'peculiar' value changes are:

0x0FE4 - 2D - 24 (45 - 36)
0x0FE5 - 2F - 21 (47 - 33)
0x0FE6 - 2D - 24 (45 - 36)

Also, do you think that the chocobos in stable 5 & 6 act differently in any way due to the fact that they are being stored in a different part of the memory bank?
« Last Edit: 2015-12-25 18:39:36 by DynamixDJ »

DynamixDJ

  • Crazy poster
  • *
  • Posts: 167
  • Karma: 21
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #23 on: 2015-12-25 22:16:28 »
Ok then Sithlord, I've found the values that affect the battle count, which are all 2 bytes. They do not decrease each time you battle, rather they 'dictate' how many battles are required.

Stable 1 - 0x0D01
Stable 2 - 0x0D08
Stable 3 - 0x0D0A
Stable 4 - 0x0D0C
Stable 5 - 0x0D0E
Stable 6 - 0x0D10


EDIT - sussed it! It's amazing what a good night's sleep can do! 0x0D01 is 16 bit, and is the figure your battle count needs to be before mating to continue. So, the value of 0x0D01 minus the value of 0x0BBC (current battle count) is the battle count required before mating can continue.

i hope this is enough to go on, as having the ability to see the count required will really help my my rng testing. Also, is there a way to view the chocobo 'type' once it's in the stable? I can help you find that aswell, this little venture has been fun! Lastly,

CONFIRMED - 0x0CAD - 0x0CAF is NOT a mirror of 0x04F8 - 0x04FA. It is indeed, the party member that was in that slot the last time you saved (or simply just the last person in that slot? more testing required).
« Last Edit: 2015-12-26 15:02:52 by DynamixDJ »

NFITC1

  • No life
  • *
  • Posts: 2824
  • Karma: 68
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #24 on: 2015-12-26 13:29:05 »
This is interesting. I am fairly certain that the stats received (along with sex and breed) have absolutely no difference whatsoever depending on which chocobo is selected (I've just checked, and the three 'variations' that I've tested on so far all had varying personalities). This does help however with the fact that i am having variations on the battle count required depending on which chocobo is selected.
Perhaps not directly, but the RNG should be moving differently depending on what the personality of the first parent is.

(This is definitely noteworthy) The values between F06 and F0B changed accordingly:
0x0F06 - 2D - 26 (45 - 38)
0x0F07 - 41 - 45 (65 - 69)
0x0F08 - 4C -4D (76 - 77)
0x0F09 - 45 - 41 (69 - 65)
0x0F0A - 00 - 4C (0 - 76)
0x0F0B - 00 - 45 (0 - 69)

These values are peppered all over the chocobo scripts, both in breeding and moving to pens. I don't know what these mean.

Also, do you think that the chocobos in stable 5 & 6 act differently in any way due to the fact that they are being stored in a different part of the memory bank?
I don't think they're treated any differently. I think they just got shoehorned in late in development because breeding certain chocobos with just four pens is a little tricky (maybe).

EDIT - sussed it! It's amazing what a good night's sleep can do! 0x0D01 is 16 bit, and is the figure your kill count needs to be before mating to continue. So, the value of 0x0D01 minus the value of 0x0BBC (current kill count) is the kill count required before mating can continue.
...
CONFIRMED - 0x0CAD - 0x0CAF is NOT a mirror of 0x04F8 - 0x04FA. It is indeed, the party member that was in that slot the last time you saved (or simply just the last person in that slot? more testing required).
Kill count? That's new. If this is the case, couldn't you just have a character with a low kill count make a chocobo mate, switch to a character with a high kill count and immediately mate again?

i hope this is enough to go on, as having the ability to see the count required will really help my my rng testing. Also, is there a way to view the chocobo 'type' once it's in the stable? I can help you find that aswell, this little venture has been fun! Lastly,
As far as I know, no. The only difference is each type of chocobo has a range of stats. Goods & Greats share a certain flag somewhere and Wonderful has a different flag. The others don't have any flag. It's only used to determine what color chocobo results from mating. Certain nuts even have different effects on stats, but that's not well documented.