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

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #25 on: 2015-12-26 14:39:14 »
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?

No. 0x0BBC is the total number of battles fought, the same figure that the sleeping man states. I messed up my wording (now edited).

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.


If this is true, then when it comes to doing my 2nd generation tests (later on today) there shouldn't be any variation on the outcome of the offspring based on which 'type' of parent is used, which will be nice  :) There has to be a flag somewhere though that states which type a yellow 'stabled' chocobo is, I'll try to find it.

Also, the reason I am under the impression that the 'coloured' offspring is assigned a type, is because of Terence's Chocobo breakdown http://forums.qhimm.com/index.php?topic=3241.0 but after having just re-read it, I realise now that it is slightly misleading
Code: [Select]
Otherwise, if both of the parents are Great or Good Chocobos:
        If the total number of races won by the parents is 4 or more, then
          the baby is automatically either a Blue (50%) or Green (50%)
          Chocobo
        If it's less:
                   69/256 chance: Blue Chocobo
                   69/256 chance: Green Chocobo
                  118/256 chance: Yellow Chocobo
        The Rating of the newborn Chocobo will be Great if both parents have
          the same Rating, and will have an equal chance of Great or Good if
          the parents were of different Ratings

it doesn't actually state that the rating only applies to the yellow chocobo born. I'm glad that's been clarified!
« Last Edit: 2015-12-26 18:59:52 by DynamixDJ »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #26 on: 2015-12-26 19:50:53 »
From my own testing, chocobo offspring have no "rating". They are colored and inherit type flags from their parents. If you mate two goods, you'll get a good. Two greats make a great. A good and a great might be a good or a great (I still think they share the same flag). A wonderful mated with anything else other than a wonderful will lose the wonderful flag.

I think of it like this (but it's probably not like this:

Code: [Select]
Chocobo type:
0x00 (Yellow, nothing special)
0x01 (Yellow Good/Great)
0x02 (Yellow Wonderful)
0x04 (Blue)
0x08 (Green)
0x0C (Black)
0x0E (Gold)

I have no confirmation of this so I can't point to anything that says this is correct.

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #27 on: 2015-12-27 17:28:19 »
From my own testing, chocobo offspring have no "rating". They are colored and inherit type flags from their parents. If you mate two goods, you'll get a good. Two greats make a great. A good and a great might be a good or a great (I still think they share the same flag). A wonderful mated with anything else other than a wonderful will lose the wonderful flag.

FOUND IT!!! It took me a while, but (at last) I can safely say after having ran a few tests that:

0x0E3E - Type of chocobo in stable 1 (1=Wonderful, 8=Terrible)
0x0E3F - Type of chocobo in stable 2
0x0E40 - Type of chocobo in stable 3
0x0E41 - Type of chocobo in stable 4
0x0E42 - Type of chocobo in stable 5
0x0E43 - Type of chocobo in stable 6

I am fairly certain that the Great and Good do *not* share the same flag, as if they did then there would not be any variation with my RNG testing when varying 2xgreats, 2xGoods and 1xGreat with 1xgood.

Also, Personality has no affect whatsoever on the sex, colour or stats that the newborn receives.

So Sithlord, there's two ways in which the chocobo section in BC can be improved (which btw I'd be very grateful if you could include 'type' of chocobo in the stables, along with battle count required, it'll help me on my RNG quest, although now I know where the values are myself....)

Is there anything else that I could look for? I'm on a roll.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #28 on: 2015-12-27 18:00:23 »
Sorry I've misdirected you at almost every step. I either know what I'm talking about or I am completely wrong. :D

So do offspring have a chance of being a better quality chocobo than either parent? What quality are the colored ones? More importantly, what does quality do other than cap stats and determine what color comes out?

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #29 on: 2015-12-27 18:22:48 »
It's all good, if it wasn't for you I wouldn't have a clue how to read MR  :D

By 'quality' I'm going to assume you mean 'type', according to everything I've read, type means very little after the 1st generation. If you are able to breed a Wonderful Gold Chocobo, then you 'qualify' for the Gold chocobo breeding circumstances when breeding the Wonderful Gold with a Black (if the Gold was a 'Great' Gold, then you could still get Gold, as when you fail to qualify for the 'special breeding circumstances', you will have 50% of father/mother's colour).

Breeding a Great Gold with a Great Yellow (with 4 races) would result in a Green/Blue. I'm not 100% on all this, this is just from what I've read, but now I know where on the hex editor I can monitor which type a chocobo is, so I'll be able to test in due course :)

In terms of my experiments, I beleive I may be in for a lot of testing. I'm mapping out every outcome of each RNG's position (all 256 of them), for every variation of chocobo. I'm currently on 1Good, 1Great 0 wins. Now that I know that the chocobo's type varies with Green & Blue, I could be in for a ridiculous amount of testing. I.e.

Great Green M with Great Blue F
Great Green F with Great Blue M
Great Green M with Good Blue F
Great Green F with Good Blue M
Good Green M with Great Blue F
Good Green F with Great Blue M
Good Green M with Good Blue F
Good Green F with Good Blue M

And then I have to throw Wonderful into that equation. Ugh! I'm thinking, is there a program available that would map out the result of each RNG position? It may be less time consuming that way, even if I do have to decipher the hex positions and values. -edit- I've just worked out that there are 18 2nd generation breeding variations, which is 4608 RNG outcomes!!!

i won't know until I get there, but I may get lucky and find that the RNG sequence for stat distribution (as an example) would be the same as the previous generation, and only the colour varies. It's possible..... (fingers crossed)
« Last Edit: 2015-12-27 19:03:28 by DynamixDJ »

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #30 on: 2015-12-28 18:03:58 »

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.

I stand corrected, you are right. I ran a few basic tests before, but I'd overlooked something. Going back to testing personality, it does affect the RNG by 'offsetting' the value by as much as two, however the 'sequence' remains the same (thankfully). However, the parent that I selected first made no impact whatsoever on the results.

-edit- I'm wrong again, 3 different RNG sequences are used depending on whether or not the chocobos are both personality 0, either of them are personality 0, or neither of them are. I can't be 100% sure at this stage though, but that's how it appears.

This is a huge spanner in the works
« Last Edit: 2015-12-28 19:49:04 by DynamixDJ »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #31 on: 2015-12-29 17:48:21 »
Hey, have you found initial stats yet? It just occurred to me that the stat assignment is probably in the world map scripts. There's no editor or viewer for those scripts. MOST of it has been reversed, but I don't know how to determine what chocobos are assigned.

I say this because I know the same battles always yield the same class chocobo (eg. you won't find greats in icicle land and wonderfuls only appear with one or two "Jumping" enemies). I'm pretty sure the whole chocobo battle is a world script. You can't get one without the chocobo lure materia; The chocobo battle actors all share the same AI scripts and they don't assign type or anything; The "send to ranch" menu has to be a script. I'll take a look and see if anything pops out.

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #32 on: 2015-12-30 18:42:01 »
Judging by what I've read in Terence's Chocobo breakdown, the fact that I can't find the values (although I haven't looked too deeply), and my RNG results, I'd say that a penned Chocobo has no stats assigned to it other than 'type', but I could be wrong.....

In fact, if the stats were determined at the point at which a chocobo is caught (yes I am aware that MDash and Stamina are initially determined (from 8 varying possibilities), then every stat (including MDash and Stamina) is then decided/adjusted accordingly), then there would be some inconsistencies with my RNG results. I've just ran a few tests, I put one Great chocobo in my pen via BC, then I caught a 3 Great chocobos, one alongside two Spirals, one alongside 1 Spiral, and one alongside 2 Valrons. The stats that are given was the same for all four, when moving @RNG-002.

I'm using a great program at the moment called Cheat Engine, I have been able to assign the address for each of the chocobos stats for each of the 6 stables, so I can see them live. I can also edit the RNG value live, I'm currenty assigning a load of desired values, such as 'Love points', hell I can even put a chocobo into the pen without even having to exit the game! It's brilliant!!!!

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #33 on: 2015-12-30 19:11:21 »
OK. If that's not the way it works I'll have to keep looking.

I only suggested the world scripts because I know that's how type gets defined before penning it. I happened across the code that assigns battle formations on the WM and noticed that there's a chunk for chocobo formations including type of chocobo. This comes from the enc_w.bin file, which is documented, but I only recently noticed it.

Cheat Engine is great. I use it along side lots of programs I try to modify. It's great at most stand-alone games (even newer gen ones like Dead Space and FTL). Not so hot on flash games though. Using a combination of that and a debugger called IDA I can reverse engineer/modify the game to do nearly anything. I made a No-CD patch with its help that only changes eight bytes in the exe.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #34 on: 2016-01-01 00:24:49 »
Finally, CE 6.5 is out!  Will fix a load of issues I reported :)

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #35 on: 2016-01-01 01:40:17 »
Wow! I knew there are tons more features to CE than I've been using, but I had no idea there were still so many features it could use! If I did anything other than increase money/HP/MP/Ammo/etc with games then I'd care more. ;)

Still, good to know it's getting even more powerful.

Edit:
They need to proof-read their release notes a bit more:
Quote
Rightlicking on "your system supports dbvm" will let you manually load DBVM for each cpu. This is usefull if for some reason your system crashes when it's done too quickly
« Last Edit: 2016-01-01 01:44:39 by NFITC1 »

Bain86

  • *
  • Posts: 1
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #36 on: 2016-09-08 04:28:05 »
About Chocobo Breeding.. as to, how to get a blue or green at your first try. I have found that the order of what gender you pick first to breed, "Male" then "Female" = blue.  "Female" then "Male" = Green. I would assume the gender must have to change by what spot the chocobo ends up in the stables but i dont know forsure. 

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #37 on: 2017-12-14 13:42:43 »
^^Replying to a post made over a yr ago lol. It's amazing how much I've learned since I started this topic (this is where it all began for me, right here).

It's safe to say, that with the help of NFITC1 I'm completely sure of the breeding mechanics, and there is no doubt in my mind of how it works now. The first Chocobo you select does matter, but only in certain circumstances. It is not as simple as saying that picking "male" then "female" will result in a blue; more likely that the first Chocobo you select will affect the RNG roll, and will give you a different colour accordingly, but that colour is not set in stone. The RNG marker position at the time of breeding ultimately dictates the outcome, of which there are 256.

Note that the order of the Chocobos that you pick will only affect the colour of the Choc, the stats of the newborn remain consistent regardless of which one you pick 1st (again, the RNG marker position dictates all)

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #38 on: 2017-12-14 18:39:47 »
Is there no way to just add a few calls to the RNG opcode in field using makou?  Could make it more random using certain tricks like feeding the timer into it?  Havent looked at how it works.

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo RNG help
« Reply #39 on: 2017-12-27 13:07:52 »
Yes, I'm sure there are too. I know that when a random number is generated, the RNG marker advances by one. I think that there are numerous random numbers pulled with certain character animations; I planned to look at the Chocobo Square or Wonder Square to fully work out the tricks they are using, then try to apply that to Esther.

Let me know if/when you want me to look into it for you.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo RNG help
« Reply #40 on: 2017-12-27 13:52:08 »
Is there no way to just add a few calls to the RNG opcode in field using makou?  Could make it more random using certain tricks like feeding the timer into it?  Havent looked at how it works.

Field RNG is in a LUT like the battle system's. The only way to "randomize" it is to have it cycle unpredictably. Like the 3D Battler in Gold Saucer is influenced by the NPCs in the room moving about. There's just nothing in the stable itself to influence the RNG. Outside the stable in the pen field there's lots of RNG cycling if you have at least one chocobo penned.