Author Topic: [FFVII] Chocobo field scripts (frcyo)  (Read 3149 times)

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
[FFVII] Chocobo field scripts (frcyo)
« on: 2017-09-01 18:05:45 »
I've finished with my Chocobo breeding projects (for now), and I decided that my work would probably be better posted here than just sat on my comp. Eventually, I'll come back to finish mapping everything out.

For now, here is a where I am at with mapping out the field scripts. These lists (currently) focus on breeding using a Carob Nut. All this work was in aid of creating a method to breeding a stable full of maxed out Chocobos using as few breeds as possible, which I've now completed (at long last), although I'd like to make a Youtube vid of it before I can finally put the project to bed (started in Dec 2015 lol).

I'll start with listing the TempVars (mem bank 5/6) that I've mapped out. Note that I haven't finished looking at all of the frcyo scripts, and some vars will be reused for other purposes (like feeding), and as such will be labelled incorrectly

Code: [Select]
#345 frcyo TEMPORARY VARS (Mem Bank 5/6)

[5] [1] = Repeatedly reset and used to record dialogue selections
[6] [7] = Stores Gil value for buying Chocobo Lure
[6] [9] = Stores Gil value for buying Chocobo Lure
[5][11] = Menu Selections
[5][12] = 0 = No Chocobos in pen; 1 or more = Chocobos in pen
[5][14] = Viewing penned Chocobos:
          55 = View Choc 1; 56 = View Choc 2; 57 = view Choc 3; 58 = View Choc 4
ALSO      Stable fill position after mating
[5][15] = At least 1 Chocobo occupied in Pen (?)
[5][16] = Chocobo Type temp var (while penned)
[5][17] = Circle Pressed
[5][18] = Talk variable
[5][21] = $TempVar Pepio Nut
[5][22] = $TempVar luchile Nut
[5][23] = $TempVar Saraha Nut
[5][24] = $TempVar Lasan Nut
[5][25] = $TempVar Pram Nut
[5][26] = $TempVar Porov Nut
[5][27] = $TempVar Carob Nut
[5][28] = $TempVar Zeio Nut
[5][29] = Used to make sure you have a nut during breeding
[5][30] = Choice of nut selected during dialogue
[5][56] = Quantity of Chocobos selected when mating
[5][59] = If selected "Never Mind" when choosing which Chocobo to mate
[5][58] = Dialogue choice when selecting Chocobo to mate
[5][60] = $TempVar 1 Stable #
[5][61] = $TempVar 2 Stable #
[5][63] = Chocobo Colour Temporary Variable
[5][64] = TempVar 0 Type
[5][65] = Used for storing rnd number 1
[5][66] = Used for storing rnd number 2
[6][67] = Temp Var for stats
[6][69] = Results from the RNG calculations (also used as a Stat TempVar)
[5][71] = Used for looping scripts
[6][72] = $TempVar 0 Stamina
[6][75] = $TempVar 0 MDash
[6][77] = $TempVar 1 Dash
[6][79] = $TempVar 1 MDash
[6][81] = $TempVar 1 Run
[6][83] = $TempVar 1 MRun
[5][85] = $TempVar 1 Acc
[5][86] = $TempVar 1 Coop
[5][87] = $TempVar 1 Int
[5][88] = $TempVar 1 Pers
[5][89] = $TempVar 1 PCount
[5][90] = $TempVar 1 Races Won
[5][91] = $TempVar 1 Sex
[5][92] = $TempVar 1 Colour
[6][93] = $TempVar 1 Stamina
[5][95] = $TempVar 1 Type
[5][109] = Used for storing rnd number 3
[5][111] = $TempVar # Stables Filled
[5][112] = used to make sure that there are Chocobos that can mate ~ same sex/just mated/freshly born
[5][113] = Mating Mode Activated
[5][114] = $TempVar 0 Stable # (1) (assigned, but never used)
[5][115] = $TempVar 0 Stable # (2) (assigned, but never used)
[6][116] = $TempVar 2 Dash
[6][118] = $TempVar 2 MDash
[6][120] = $TempVar 2 Run
[6][122] = $TempVar 2 MRun
[5][124] = $TempVar 2 Acc
[5][125] = $TempVar 2 Coop
[5][126] = $TempVar 2 Int
[5][127] = $TempVar 2 Pers
[5][128] = $TempVar 2 PCount
[5][129] = $TempVar 2 Races Won
[5][130] = $TempVar 2 Sex
[5][131] = $TempVar 2 Colour
[6][132] = $TempVar 2 Stamina
[5][134] = $TempVar 2 Type
[5][135] = Mating dialogue choices
[6][136] = Dash difference between parents (Unused)
[6][138] = MDash difference between parents (Unused)
[6][140] = Run difference between parents (Unused)
[6][142] = MRun difference between parents (Unused)
[5][146] = Int difference between parents (Unused)
[6][152] = Stamina difference between parents (Unused)
[6][155] = Dash average of both parents
[6][157] = MDash average of both parents
[6][159] = Run average of both parents
[6][161] = MRun average of both parents
[5][163] = Acc average of both parents
[5][165] = Int average of both parents
[5][166] = Personality variable (0 if both parents are 0, rnd value between 1 & 2 otherwise).
[6][171] = Stamina average of both parents
[6][174] = Used for calculating the averages between parents stats (16bit)
[6][176] = Used for calculating the averages between parents stats (16bit)
[5][178] = Used for calculating the averages between parents stats (8bit)
[5][179] = Used for calculating the averages between parents stats (8bit)
[5][180] = Colour of best parent
[5][181] = Newborn Gold flag (0 = not Gold, 1 = Gold)
[5][183] = Total races won between parents
[6][184] = Battles required before mating can continue
[5][186] = Used for storing rnd number 4
[6][187] = Final modifier for MDash and MRun
[6][189] = Final modifier Temp Var
[5][193] = Used to see if the breeding music is still playing, as to not end prematurely.

If anyone wants to save themselves the hassle of mapping everything out themselves, then open up my copy of the vars.cfg file, then copy and paste everything into the vars.cfg file which can be found in the root directory of MR (open with notepad).

5 Gaki - S1 Talk

Code: [Select]
5 Gaki - S1 Talk

Label 1  ~ 17   = Disk 1 events (buying Chocobo Lure etc)
Label 18        = Disk 2 main menu
Label 19 ~ 25   = Answer to "Get Some Information"
Label 26 ~ 105  = Moving Chocobos

 Label 33 - 38   = Viewing the type of Chocobo you caught on the black screen
 Label 39 ~ 60   = Navigating the caught Chocobos
 Label 60 ~ 70   = Chocobo Billy's rating
 Label 70 ~ 78   = releasing Chocobo from the pen
 Label 79 ~ 84   = Moving a Chocobo from the pen
                    Executes 15 "keisan" Script 1 which is the moving RNG scripts
 Label 85 ~ 86   = Labels the Chocobo "Male" if a male, or "Female" if female
 Label 87 ~ 92   = Naming the Chocobo
 Label 93 ~ 104  = removing the Chocobo from the pen and making it visible in the farm

Label 105 ~ 231 = Releasing Chocobos from the stables

Label 232       = Feeding, Riding & Mating Chocobos (Executes 6 "sono2" Script 1)

15 keisan - Script 1: (Moving Chocobos)

Code: [Select]
15 keisan Script 1:

Label 1 ~ 3     = Finding out the type of Chocobo (Wonderful, Great etc)
Label 4 ~ 21    = If Chocobo is rank 8 (Terrible Chocobo)

 Label 4 ~ 13    = Sets MDash and Stamina

  Label 4         = Sets a random number between 0 & 7
                    If random number = 0, then: (Otherwise skip to label 5)
                      MDash   = 1300
                      Stamina = 1000
  Label 5         = If random number = 1, then: (Otherwise skip to label 6)
                      MDash   = 1400
                      Stamina = 900
  Label 6         = If random number = 2, then: (Otherwise skip to label 7)
                      MDash   = 1600
                      Stamina = 700
  Label 7         = If random number = 3, then: (Otherwise skip to label 8)
                      MDash   = 1700
                      Stamina = 600
  Label 8         = If random number = 4, then: (Otherwise skip to label 9)
                      MDash   = 1800
                      Stamina = 500
  Label 9         = If random number = 5, 6, 7 or 8, then:
                      MDash   = 1500
                      Stamina = 800

  Label 10        = Sets a random number between 0 and 127 to [6][69]
                    Sets a random number between 0 and 1 to [5][65]
                     If random number in [5][65] = 0 (Otherwise skip to label 11)
                      MDash is increased by random number in [6][69]
  Label 11        =   MDash is decreased by random number in [6][69]
  Label 12        = Sets a random number between 0 and 127 to [6][69]
                    Sets a random number between 0 and 1 to [5][65]
                     If random number in [5][65] = 0 (Otherwise skip to label 13)
                      Stamina is increased by random number in [6][69]
  Label 13        =   Stamina is decreased by random number in [6][69]

 Label 14 ~ 15   = Sets Dash (also first line of Label 16)

  Label 14        = Sets a random number between 3 and 8
                     MDash is set to a temp var [6][69] and divided by 10
  Label 15        = [6][67] $Temp Var Stat is set to 0, and is then increased by [6][69] (MDash / 10)
                     Label 15 repeats itself between 3 and 8 times (according to the random number)

So, the $Temp Var Stat (which will be used to set Dash) will be anywhere between 30% and 80% of MDash,
in multiples of 10.

 Label 16 ~ 21   = Sets MRun, Run, Acceleration, Coop, Personality and Sex

  Label 16        = Dash is set to [6][67] $Temp Var Stat
                     Sets a random number between 2 and 5
                     Random number is multiplied by 100
                     MDash is set to a Temp Var and is reduced by random number
  Label 17        = MRun is set according to (MDash Temp Var - random number)
                     Dash is set to a Temp Var and is reduced by random number
                     Run is set according to (Dash Temp var - random number)
                     Sets a random number between 2 and 5
                     Random number is multiplied by 10
                     Acceleration is set to the value of the random number
  Label 18        = Sets a random number between 0 and 2
  Label 19        = Random Number * 10
                     Intelligence is set to the value of the random number
                     Coop is set to 0
                     Sets a random number between 0 and 1
                      If random number = 0: (Otherwise skip to label 20)
                       Sets a random number between 1 and 2
                       Personality is to the value of the random number
  Label 20        = Personality is set to 0
  Label 21        = PCount is set to 0
                     Races won is set to 0
                     Sets a random value between 0 and 1
                     Sex is set to the value of the random number
                     Colour is set to 0

MRun will be 200 to 500 less than MDash, in multiples of 100.
Run  will be 200 to 500 less than Dash,  in multiples of 100.
Acceleration will be between 20 and 50, in multiples of 10.
Intelligence will be between 0 and 20, in multiples of 10.
Coop is set to 0.
Personality will be either 0 (50% chance), 1 (25% chance) or 2 (25% chance).
Sex will have a 50% chance of being 0 (Male) or 1 (female).

Label 22 ~ 38   = If Chocobo is rank 7 (Bad Chocobo)
Label 39 ~ 57   = If Chocobo is rank 6 (Poor Chocobo)
Label 58 ~ 77   = If Chocobo is rank 5 (Average Chocobo)
Label 78 ~ 96   = If Chocobo is rank 4 (So-So Chocobo)
Label 97 ~ 115  = If Chocobo is rank 3 (Good Chocobo)
Label 116 ~ 134 = If Chocobo is rank 2 (Great Chocobo)
Label 135 ~ 153 = If Chocobo is rank 1 (Wonderful Chocobo)
Label 154 ~ 160 = Allocating stats to next available stable.

6 sono2 - Script 1: (Feeding and Riding Chocobos)

Code: [Select]
6 sono2 - Script 1

Label 1 ~ 131   = Feeding Chocobos
Label 132 ~ 187 = Riding Chocobos

21 ray ~ Script 1: (Mating Chocobos)

Code: [Select]
21 ray Script 1

Label 0 ~ 2   = Making sure you have a stable free
Label 3 ~ 10  = Taking Nut Count and also checks that you don't have 0 total nuts.
Label 11      = Making sure you have more than 1 Chocobo
label 12 ~ 19 = Making sure that you have Chocobos of opposite sex
Label 20      = 20 "Shadow" Script 1 plays here, which checks for the "can't mate" flag. This is
                the final check to make sure Chocobos can mate.
Label 21      = Enables Chocobo Breeding mode (disables gateways).

                Now you need to select "choko1" ~ "choko6" to continue

Label 22 ~ 23 = If chosen "Never Mind" (turns Chocobo Breeding mode off)
Label 24      = Makes sure they aren't the same sex
Label 25      = Choose to go ahead, or changed mind after selecting 2 Chocs.
Label 26      = Brings up nut menu and options to quit
Label 27 ~ 41 = Selecting which Nut (quitting if you have none of selected Nut)
Label 42 ~ 43 = Final selections before mating

Label 44 Onwards = Breeding RNG mechanics !!!

Label 44 ~ 45 = Works out which parent has the highest MDASH, then works out the difference
Label 46      = Works out the average MDASH of both parents
Label 46 ~ 47 = Works out which parent has the highest DASH, then works out the difference
Label 48      = Works out the average DASH of both parents
Label 48 ~ 49 = Works out which parent has the highest MRUN, then works out the difference
Label 50      = Works out the average MRUN of both parents
Label 50 ~ 51 = Works out which parent has the highest RUN, then works out the difference
Label 52      = Works out the average RUN of both parents
Label 52 ~ 53 = Works out which parent has the highest STAMINA, then works out the difference
Label 54      = Works out the average STAMINA of both parents
                Works out the average ACCELERATION of both parents.
Label 54 ~ 55 = Works out which parent has the highest INTELLIGENCE, then works out the difference
Label 56      = Works out the average INTELLIGENCE of both parents
              = If neither Chocobos have Pers 0, then $Pers Var = 1 or 2 (50% chance)
Label 57 ~ 58 = If Choc 1 isn't Pers 0, but Choc 2 is, then 50% chance $Pers Var will stay 0, and
                50% chance it'll be 1 or 2 (25% chance each)
Label 59      = If Choc 1 is Pers 0, but Choc 1 isn't, then 50% chance $Pers Var will stay 0, and
                50% chance it'll be 1 or 2 (25% chance each)

Note about this variable: If both Chocs are 0, then the £Pers Var does not set itself to 0, which
it should. This means, that if you breed a Chocobo that has Pers 1 or 2, then you breed again
without leaving the screen using 2 different parents that have Pers 0, then the newborn will
incorrectly have the same pers as its sibling (instead of 0).

Label 60      = If Choc 1 colour is worse than Choc 2 colour, then the parents have the colours
                swapped (so that [5][180] Temp Var is always the highest Choc colour and [5][181]
                Temp Var is always the lowest).
Label 61 ~ 62 = If the best coloured Chocobo is black or Gold, set $Parent Colour (best) Var set
                to 3 or 4, respectively, otherwise remains 0
Label 63 ~ 64 = If the worst coloured Chocobo is black or Gold, set $Parent Colour (worst) Var set
                to 3 or 4, respectively, otherwise remains 0

The $Parent Colour (best) Var and $Parent Colour (worst) Var aren't used again, so I'm not sure
what Label 61 ~ 64 were originally intending. $Parent Colour (worst) Var is later reset to 0 and
reused as a flag to indicate if the newborn is a Gold or not when using a Zeio Nut (Label 315
onwards).

Now the screen will fade to black.

Label 65 ~ 102  = Pepio Nut
Label 103 ~ 128 = Ruchin Nut (Luchile Nut)
Label 129 ~ 158 = Saraha Nut
Label 159 ~ 188 = Lasan Nut
Label 189 ~ 215 = Param Nut
Label 216 ~ 239 = Porofu Nut (Porov Nut)
Label 240 ~ 311 = Carob Nut
Label 312 ~ 353 = Zeio Nut

Final operations:

Label 354       = Sets a random number between 3 and 10
Label 354 ~ 359 = Works out which stable parent 1 was in, sets the can't mate flag and sets the
                  "battle count required" value by adding the random number to the current battle count.
Label 360 ~ 365 = Works out which stable parent 2 was in, and sets the can't mate flag and sets the
                  battle count required value by adding the random number to the current battle count.
Label 366 ~ 368 = 17/256 chance that the following final boost occurs, otherwise skip to label 369

 Label 366       = Random number between 300 and 1000.
                   If the newborns Run is less than the random number, skip to label 369, otherwise:
                    If (MDash + Rnd Number) is greater than 6000, skip to label 369, otherwise:
                    MRun - Rnd Number
                    Run - Rnd Number                 
                    If Run is less than 100, Run = 100, otherwise:
  Label 367       = If MRun is less than 100, MRun = 100, otherwise:
  Label 368       = MDash + Rnd Number
                    Dash + Rnd Number

Label 369       = Sets a Random Number between 3 and 18
Label 369 ~ 372 = Works out which stable is empty, and sets all stats, can't mate flag,
                  stable filled flag and battle count required.
Label 373 ~ 374 = Checks to see if music is still playing to prevent the screen from returning prematurely.
Label 375 ~ 378 = Enables Chocobo visibility in barn, and checks for appropriate colour for aesthetics.
Label 379 ~ 380 = Sets the "Male" and "Female" vars for the text box
Label 381 ~ 386 = Sets the Chocobos name as entered according to which stable it's in
Label 387 ~ 390 = Dummied out (Lets a penned Chocobo free, however, all checks will fail)
Label 391       = Final animations of screen fading, and returning the player to normal mode

21 ray ~ Script 1 ~ Label 240 - 311: (Carob Nut)

Code: [Select]
Label 240 ~ 311 = Carob Nut

Label 240 ~ 242 = Removes 1 x Carob Nut, and takes the Highest MDash, MRun and Stam of each parent
                  as the newborn's stats to begin with.

Label 243 ~ 282 = Selecting the colour of the newborn

 Label 243 ~ 247 = If the parents are Blue and Green

  Label 243       = Firstly works out total races won.
                    Secondly checks to see if highest parent colour is 2 (Blue), and lowest parent
                    colour is 1 (Green) (skip to Label 248 otherwise)
                    Thirdly checks the total races won = 9 or more, if so then new born will be 3 (Black)
  Label 244       = If mating with Blue and Green that have won less than 9 races, 10/256 chance of it being Black
  Label 245       = 128/256 chance it'll be Blue
  Label 246       = 118/256 remaining chance it'll be Green
  Label 247       = Sets Chocobo type to random number between 2 (great) & 3 (good) 50% chance each.

  Label 248 ~ 252 = If Label 243 check fails for colour, then a new check is performed here:
                    Checks to see if highest parent colour is 1 (Green) and lowest parent colour is
                    2 (Blue) (skip to Label 253 otherwise)
                    Checks the total races won = 9 or more, if so then new born will be 3 (Black)
  Label 249       = If mating with Blue and Green that have won less than 9 races, 10/256 chance of it being Black
  Label 250       = 128/256 chance it'll be Blue
  Label 251       = 118/256 remaining chance it'll be Green
  Label 252       = Sets Chocobo type to random number between 2 (great) & 3 (good) 50% chance each.

Note about label 248. Earlier on (label 60), the Colour Vars became juggled. Instead of Var1
representing Parent 1 Colour, and Var2 representing Parent 2 Colour, the scripts saw that Var1
was the highest value (0=Yellow, 4 = Gold) and Var 2 was the lowest value. This means that the
label 248 check will always fail, as Var1 could never be lower than Var2, and label 248 ~ 252 is redundant.

 Label 253 ~ 266 = If the first selected Chocobo is a Great (Type 2)

  Label 253       = If the 2nd selected Chocobo is Great, and more than 3 races total have been won,
                    then 50% equal chance of newborn being 1 Green or 2 Blue
  Label 254       = If 3 or less races have been won between 2 Greats, then 90/256 chance the newborn
                    will be 1 Green or 2 Blue (50% equal chance)
  Label 255       = Remaining 166/256 it'll be yellow
  Label 256       = Sets the type as Great

  Label 257       = If the 2nd selected Chocobo is Good, and more than 3 races total have been won,
                    then 50% equal chance of newborn being 1 Green or 2 Blue
  Label 258       = If 3 or less races have been won between the Great & Good, then 90/256 chance
                    the newborn will be 1 Green or 2 Blue (50% equal chance)
  Label 259       = Remaining 166/256 it'll be yellow
  Label 260       = 50% chance newborn will be Great, 50% chance Good.

  Label 261       = If the 2nd selected Chocobo is anything other than Great or Good, then 1/4 chance
                    the following occurs:
                    If 4 or more races have been won, 50% chance of 1 (Green) or 2 (Blue)
  Label 262       = If 3 or less races have been won, 90/256 chance the offspring will be Green or
                    Blue (equal 50% chance each)
  Label 263       = Remaining 166/256 it'll be yellow
  Label 264       = Sets the type as Great. This ends the 1/4 chance scripts.

  Label 265       = If the 1/4 chance failed on label 261, then the colour is set to yellow, and a
                    50% equal chance of the newborn getting either parent's rating

 Label 267 ~ 280 = If the first selected Chocobo is Good (Type 3)

  Label 267       = If the 2nd selected Chocobo is Good, and more than 3 races total have been won.
                    then 50% equal chance of newborn being 1 Green or 2 Blue
  Label 268       = If 3 or less races have been won between the 2 Goods, then 90/256 chance the
                    newborn will be 1 Green or 2 Blue (50% equal chance)
  Label 269       = Remaining 166/256 it'll be yellow
  Label 270       = Sets the type as Great (???)

Note - This is a glitch (perhaps?). You'd think that 2 x Good parents would produce a Good offspring,
however, Label 270 sets the var to 2, which is Great, which is a little weird.

  Label 271       = If the 2nd selected Chocobo is Great, and more than 3 races total have been won.
                    then 50% equal chance of newborn being 1 Green or 2 Blue
  Label 272       = If 3 or less races have been won, 90/256 chance the offspring will be Green or
                    Blue (equal 50% chance each)
  Label 273       = Remaining 166/256 it'll be yellow
  Label 274       = 50% chance newborn will be Great, 50% chance Good.

  Label 275       = If the 2nd selected Chocobo is anything other than Great or Good, then 1/4
                    chance the following occurs:
                    If 4 or more races have been won, 50% chance of 1 (Green) or 2 (Blue)
  Label 276       = If 3 or less races have been won, 90/256 chance the offspring will be Green or
                    Blue (equal 50% chance each)
  Label 277       = Remaining 166/256 it'll be yellow
  Label 278       = Sets the type as Good. This ends the 1/4 chance scripts.

  Label 279       = If the 1/4 chance failed on label 275, then the colour is set to yellow, and a
                    50% equal chance of the newborn getting either parent's rating

 Label 281       = If the first selected Chocobo is NEITHER Great or Good, then 50% chance it'll be
                   its Mother's and 50% chance its Father's.
 Label 282       = Sets colour to Yellow

Label 283 ~ 297 = Works out newborn's MDash

 Label 283 ~ 294 = Checks if newborn is a Black Chocobo and has less than 4000 MDash, and applies a
                   boost if so.

  Label 283       = Checks to see if newborn is Black (skips to label 295 otherwise)
  Label 284       = Checks to see if the Average MDash is less than 4000 (skips to label 295 otherwise)
                    7/16 Chance that MDash will be 4000
  Label 285       = 2/16 Chance that MDash will be 4200
  Label 286       = 2/16 Chance that MDash will be 4200
  Label 287       = 1/16 Chance that MDash will be 4300
  Label 288       = 1/16 Chance that MDash will be 4400
  Label 289       = 1/16 Chance that MDash will be 4500
  Label 290       = 1/16 Chance that MDash will be 4500
  Label 291       = 1/16 Chance that MDash will be 4800
  Label 292       = 50% chance this label will be skipped
                    MDash will be increased by Rnd Num between 0 ~ 51
  Label 293       = If the 50% chance failed, then:
                    MDash will be decreased by Rnd Num between 0 ~ 51

 Label 295 ~ 296 = If the newborn is anything other than Black, or is Black but has more than 4000 MDash,
                   then the following has a 60/256 chance of occurring (jump to label 297 otherwise)

  Label 295       = Works out 110% of MDash, and makes sure that the value does not exceed 6000
  Label 296       = applies the 10% boost to MDash

 Label 297       = If all boosts have failed, then MDash will be the Average of both parents.

Label 298 ~ 305 = Works out newborn's MRun

 Label 298       = 30/256 chance (otherwise skip to label 302)
                   Works out 110% of MRun, and makes sure that the value does not exceed 6000
 Label 299       = Applies the 10% boost to MRun
 Label 300       = If MRun is greater than or equal to MDash, then it will be reduced by 100
                   repeatedly until Dash is less than MDash.

 Label 302       = If the 30/256 chance failed, now have a 55/256 chance (otherwise skip to label 305)
                   Works out what 5% of MRun is
                   Makes sure that MRun is not 0, otherwise sets MRun to 1
 Label 303 ~ 304 = Applies to 5% reduction to MRun

NOTE - if MRun gains a boost, then a sanity check is performed to stop MRun being higher than MDash
(label 300). If, however, the baby receives a decline in MRun, the said check will not occur, making
it possible for a baby to have MRun higher than MDash if the newborn receives the average MDash
(using one maxed out parent, and one underwhelming Chocobo).

 Label 305       = Remaining 171/256 chance that MRun will be average of both parents.

Label 306 ~ 311 = Works out newborn's Stamina, Dash, Run, and all other stats

 Label 306       = 50/256 chance (otherwise skip to Label 308)
                   Works out 105% of Stamina, and makes sure that the value does not exceed 9999
  Label 307       = Applies the 5% boost to Stamina

 Label 308       = If the 50/256 chance failed, then the remaining 206/256 chance of Stam being the
                   average of its parents.
 Label 309       = Sets newborn's Dash and Run as the average of its parents.
 Label 310       = If Run is greater than or equal to MRun, then it will be reduced by 100 repeatedly
                   until Run is less than MRun.
 Label 311       = Sets Acceleration to average of parents
                   Sets Coop to 0
                   Sets Intelligence to average of parents
                   Sets PCount to 0
                   Sets races won to 0
                   Sets sex to M or F (50% equal chance)
                   Sets the Personality according to $Pers Var set in labels 56 ~ 59

7 choko1 - 12 choko6 ~ S1 Talk: (Selecting Chocobos When Mating)

Code: [Select]
choko S1 Talk (interacting with a Chocobo; "choko1" ~ "choko6")

Label 0     = If mating mode is OFF (executes script2 meskun which shows Chocobos stats)
Label 1     = Check for the Can't Mate flag
Label 2 ~ 4 = Sets the stats into allocated TempVars for first selected Chocobo

 Label 2     = Runs meskun2 script 2 which sets the class and name for the text box for chocobo 1
 Label 3     = Chosen "Never Mind"
 Label 4     = Sets stats into TempVar set 1

Label 5 ~ 7 = Sets the stats into allocated TempVars for second selected Chocobo
 
 Label 5     = Runs meskun3 script 1 which sets the class and name for the text box for chocobo 2
 Label 6     = Chosen "Never Mind"
 Label 7     = Sets stats in TempVar set 2

18 meskun2 ~ Script 2 & 19 meskun3 ~ Script 1: (Text Box Vars)

Code: [Select]
18 meskun2 Script 2 (Text box variables after choosing the first Chocobo)

Label 0 ~ 6   = Chocobo Stable 1
 Label 0 ~ 1   = Labels the Chocobo "Male" if a male, or "Female" if female
 Label 2 ~ 5   = Sets the Racing class variable
 Label 6       = Sets Chocobo's name for text box

Label 7 ~ 13  = Chocobo Stable 2
Label 14 ~ 20 = Chocobo Stable 3
Label 21 ~ 27 = Chocobo Stable 4
Label 28 ~ 34 = Chocobo Stable 5
Label 35 ~ 42 = Chocobo Stable 6

The exact same scripts are in meskun3 Script 1 (second selected Chocobo)

So as you can see there's still quite a bit left to map out which I'll get round to eventually (probably).
« Last Edit: 2018-05-23 04:02:15 by DynamixDJ »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FFVII] Chocobo field scripts (frcyo)
« Reply #1 on: 2017-09-05 07:16:14 »
Nice!

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [FFVII] Chocobo field scripts (frcyo)
« Reply #2 on: 2017-09-05 13:19:41 »
I'm using Makou Reactor 1.5.1. If I change a variable name in one field it changes it in all fields. Just to be aware, the same variables that keep track of greens counts keeps track of nut counts.

eg:
Code: [Select]
[5][28] = $TempVar Zeio Nut  = Sylkis Greens count

This is also true in fields that have nothing to do with chocobos. There's lots of variables used that overlap like this.

This is a wonderful list, btw!

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: [FFVII] Chocobo field scripts (frcyo)
« Reply #3 on: 2017-09-05 15:54:35 »
It's probably best not to label the temp vars.  They can be anything and there is no consistency across fields.  Or even in fields.  They are all reset to 0 on field entry.

DynamixDJ

  • *
  • Posts: 240
  • 1111 1111 0111
    • View Profile
Re: [FFVII] Chocobo field scripts (frcyo)
« Reply #4 on: 2017-09-06 17:22:28 »
Indeed, I keep 2 different vars.cfg files, one for general use (with nothing from mem bank 5/6 labelled), and another for solely for Chocobo Breeding, which is the one I posted above.

I also noticed some of the vars reused in the feeding section, as you pointed out NFI. When I go back to finish this, I'll have to rename it to something like $Temp Var Zeio/Sylkis etc. I think quite a few will need relabelling tbh.

Normally with the tempvars I can keep track easily enough just by making a few notes, but with Chocobo Breeding, I had no choice but to label them; it was the only way to keep track properly. The only other scripts that I've had to label the temovars for where the Fort Condor scripts, but I gave up on that, as it was far too convoluted.