Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Chocobo Field Scripts #345 frcyo
- 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
- Here we see 15 "keisan" Script 1 which is the moving RNG scripts
- Label 85 ~ 86 = Labels the Chocobo "-ALE" if a male, or "&EMALE" 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
- -------------------------------------------------------------------------------------------------
- 6 sono2 - Script 1
- Label 1 ~ 131 = Feeding Chocobos
- Label 132 ~ 187 = Riding Chocobos
- -------------------------------------------------------------------------------------------------
- 15 keisan Script 1: (moving Chocobos)
- Label 1 ~ 3 = finding out the type of Chocobo (Wonderful, great etc)
- Label 4 ~ 21 = If Chocobo is rank 8 (Terrible Chocobo)
- 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.
- -------------------------------------------------------------------------------------------------
- 21 ray Script 1 Mating Chocobos
- 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 ACCELARATION 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 RNG manipulation), then the newborn will have the same pers as its sibling, even if both parents were 0. When you leave the screen and reenter, the variable sets to 0 by default, so the devs didn't need to have it manually set to 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, 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 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 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, and 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, and 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 (Let's a penned Chocobo free, however, all checks will fail)
- Label 391 = Final animations of screen fading, and returning the player to normal mode
- -------------------------------------------------------------------------------------------------
- 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)
- 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 black 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 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).
- The same script plays out as between label 244 ~ 247
- 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 game made it so 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. label 270 should be setting the var to 3, which is Good, however, it is set to 2 which is Great (both parents are Good...)
- 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 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, 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 ~ 306 = 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 check is performed to stop MRun being higher than MDash. 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 conditions are right.
- 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
- -------------------------------------------------------------------------------------------------
- Label 312 ~ 353 = Zeio Nut
- Label 312 ~ 314 = Removes 1 x Zeio Nut, and takes the Highest MDash, MRun and Stam of each parent as the newborn's stats to begin with.
- -------------------------------------------------------------------------------------------------
- chokoo S1 Talk (interacting with a Chocobo in your stables, "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 = TempVar stat allocation for first selected Chocobo
- 2 = Runs meskun2 script 2 which sets the class and name for the text box for chocobo 1
- 3 = Chosen "Never Mind"
- 4 = TempVar stat allocation
- Label 5 ~ 7 = TempVar stat allocation for second selected Chocobo
- 5 = Runs meskun3 script 1 which sets the class ans name for the text box for chocobo 2
- 6 = Chosen "Never Mind"
- 7 = TempVar stat allocation
- -------------------------------------------------------------------------------------------------
- 18 meskun2 Script 2 (Text box variables after choosing the first Chocobo)
- Label 0 ~ 7 = Chocobo Stable 1
- Label 0 ~ 1 = Labels the Chocobo "-ALE" if a male, or "&EMALE" 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
- ------------------------------------------------------------------------------------------------
- Breeding Mechanics
- After selecting which Chocobos and which Nut, the following preliminary functions take place. This all happens before the screen fades to black.
- Firstly, the MDash of both parents are looked at, and the highest value is subtracted by the lowest value to work out the MDash Diff.
- Then the MDash of both parents are looked at, and they are added together then divided by two to work out the MDash Av.
- The same two processes are repeated for Dash, MRun, Run, Stamina, Acceleration and Intelligence. Note that Acceleration only records the average only, and not the difference.
- While the averages will be used for breeding purposes, the "differences" are never looked at again, they are only recorded and are not used during breeding (at least not with the Caron or Zeio Nut, I;m yet to look at the other scripts).
- Then the Chocobos personality is looked at. Firstly if neither Chocobo have Pers 0 then the $Pers Var will be set to either 1 or 2 (50% chance each). Secondly if one Chocobo is Pers 0 and the other isn't there will be a 50% chance the $Pers Var will be set to 0, and a 50% chance it'll be set to either 1 or 2 (25% cumulative chance each).
- Note about $Pers Var. There is no operation to set it to 0, which it will be by deduction if both parents are 0; the game expects the var to be 0 by default, as every time we run into the barn it resets (all temp vars in mem bank 5/6 reset to 0 every time we run into a new field screen). It is possible for a newborn to have this variable still set to what it was on the previous mating, and it will share its siblings Pers type, even if both parents of the newborn was 0.
- The developers overlooked the fact that it is possible to mate twice without leaving the screen, by having two empty stables and four filled.
- Next the colour of the Chocobo is assessed. The highest value (best colour) of the two parents is stored into [5][180], and the lowest value (worst colour) is stored into [5][181].
- If [5]180] is either 3 (Black) or 4 (Gold), then its value will be as such for breeding purposes, respectively, otherwise it's value will be set to 0 (yellow) (skipping out 1 green and 2 blue). The colour of the 2 parents is still stored elsewhere.
- The same thing occurs for [5][181].
- The preliminary stages are now complete, what takes place next is now specific to which Nut is used.
- -------------------------------------------------------------------------------
- [SEE BELOW FOR NUT MECHANICS]
- -------------------------------------------------------------------------------
- After the Nut mechanics haven taken affect, the following final operations are performed:
- A random number between 3 and 10 is added onto the battle count, and the result is assigned to "battle count required before bating can continue" for parent one.
- The same thing occurs for parent 2.
- There is a 17/256 that the newborn will have a chance at gaining a boost to Mdash, but a penalisation to MRun.If you succeed in passing the 17/256 chance, then a random number will be generated between 300 and 1000.
- If the newborn's Run is less than the random number, then this boost will be skipped.
- If the newborn's MDash plus Random Number is greater than 6000, then this boost will be skipped.
- MRun and Run will now be reduced by Random Number, and if Run is less than 100 it will be set to 100.
- MDash and Dash will now be increased by Random Number. This ends the 17/256 chance boost.
- Next a random number will be chosen between 3 & 18 , and used for the newborns can't mate flag. The next available stable will now have all final stats assigned to it.
- Once the music has stopped, the Chocobo's visibility, intractability and visible colour are set, and finally the naming of the newborn.
- Just before the player regains control, there are some redundant lines of script which releases one of the penned Chocobos back into the wild. I get the impression that originally, the dev's had intended that if you mated two Chocobos, you would also have to say goodbye to one of your penned Chocobos.
- -------------------------------------------------------------------------------
- [CAROB NUT]
- -------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement