Advertisement
DynamixDJ

Chocobo field scripts (frcyo)

Aug 29th, 2017
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.59 KB | None | 0 0
  1. Chocobo Field Scripts #345 frcyo
  2.  
  3. 5 Gaki - S1 Talk
  4.  
  5. Label 1 ~ 17 = Disk 1 events (buying Chocobo Lure etc)
  6. Label 18 = Disk 2 main menu
  7. Label 19 ~ 25 = Answer to "Get Some Information"
  8. Label 26 ~ 105 = Moving Chocobos
  9. Label 33 - 38 = Viewing the type of Chocobo you caught on the black screen
  10. Label 39 ~ 60 = Navigating the caught Chocobos
  11. Label 60 ~ 70 = Chocobo Billy's rating
  12. Label 70 ~ 78 = releasing Chocobo from the pen
  13. Label 79 ~ 84 = Moving a Chocobo from the pen
  14. Here we see 15 "keisan" Script 1 which is the moving RNG scripts
  15. Label 85 ~ 86 = Labels the Chocobo "-ALE" if a male, or "&EMALE" if female
  16. Label 87 ~ 92 = Naming the Chocobo
  17. Label 93 ~ 104 = removing the Chocobo from the pen and making it visible in the farm
  18. Label 105 ~ 231 = Releasing Chocobos
  19.  
  20. -------------------------------------------------------------------------------------------------
  21.  
  22. 6 sono2 - Script 1
  23.  
  24. Label 1 ~ 131 = Feeding Chocobos
  25. Label 132 ~ 187 = Riding Chocobos
  26.  
  27. -------------------------------------------------------------------------------------------------
  28.  
  29. 15 keisan Script 1: (moving Chocobos)
  30.  
  31. Label 1 ~ 3 = finding out the type of Chocobo (Wonderful, great etc)
  32. Label 4 ~ 21 = If Chocobo is rank 8 (Terrible Chocobo)
  33. Label 22 ~ 38 = If Chocobo is rank 7 (Bad Chocobo)
  34. Label 39 ~ 57 = If Chocobo is rank 6 (Poor Chocobo)
  35. Label 58 ~ 77 = If Chocobo is rank 5 (Average Chocobo)
  36. Label 78 ~ 96 = If Chocobo is rank 4 (So-So Chocobo)
  37. Label 97 ~ 115 = If Chocobo is rank 3 (Good Chocobo)
  38. Label 116 ~ 134 = If Chocobo is rank 2 (Great Chocobo)
  39. Label 135 ~ 153 = If Chocobo is rank 1 (Wonderful Chocobo)
  40. Label 154 ~ 160 = Allocating stats to next available stable.
  41.  
  42. -------------------------------------------------------------------------------------------------
  43.  
  44.  
  45. 21 ray Script 1 Mating Chocobos
  46.  
  47. Label 0 ~ 2 = Making sure you have a stable free
  48. Label 3 ~ 10 = Taking Nut Count and also checks that you don't have 0 total nuts.
  49. Label 11 = Making sure you have more than 1 Chocobo
  50. label 12 ~ 19 = Making sure that you have Chocobos of opposite sex
  51. 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.
  52. Label 21 = Enables Chocobo Breeding mode (disables gateways).
  53.  
  54. Now you need to select "choko1" ~ "choko6" to continue
  55.  
  56. Label 22 ~ 23 = If chosen "Never Mind" (turns Chocobo Breeding mode off)
  57. Label 24 = Makes sure they aren't the same sex
  58. Label 25 = Choose to go ahead, or changed mind after selecting 2 Chocs.
  59. Label 26 = Brings up nut menu and options to quit
  60. Label 27 ~ 41 = Selecting which Nut (quitting if you have none of selected Nut)
  61. Label 42 ~ 43 = Final selections before mating
  62.  
  63. Label 44 Onwards = Breeding RNG mechanics !!!
  64.  
  65. Label 44 ~ 45 = Works out which parent has the highest MDASH, then works out the difference
  66. Label 46 = Works out the average MDASH of both parents
  67. Label 46 ~ 47 = Works out which parent has the highest DASH, then works out the difference
  68. Label 48 = Works out the average DASH of both parents
  69. Label 48 ~ 49 = Works out which parent has the highest MRUN, then works out the difference
  70. Label 50 = Works out the average MRUN of both parents
  71. Label 50 ~ 51 = Works out which parent has the highest RUN, then works out the difference
  72. Label 52 = Works out the average RUN of both parents
  73. Label 52 ~ 53 = Works out which parent has the highest STAMINA, then works out the difference
  74. Label 54 = Works out the average STAMINA of both parents
  75. Works out the average ACCELARATION of both parents.
  76. Label 54 ~ 55 = Works out which parent has the highest INTELLIGENCE, then works out the difference
  77. Label 56 = Works out the average INTELLIGENCE of both parents
  78. = If neither Chocobos have Pers 0, then $Pers Var = 1 or 2 (50% chance)
  79. 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)
  80. 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)
  81.  
  82. 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.
  83.  
  84. 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)
  85. 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
  86. 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
  87.  
  88. 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).
  89.  
  90. Now the screen will fade to black.
  91.  
  92. Label 65 ~ 102 = Pepio Nut
  93. Label 103 ~ 128 = Ruchin Nut (Luchile Nut)
  94. Label 129 ~ 158 = Saraha Nut
  95. Label 159 ~ 188 = Lasan Nut
  96. Label 189 ~ 215 = Param Nut
  97. Label 216 ~ 239 = Porofu Nut (Porov Nut)
  98. Label 240 ~ 311 = Carob Nut
  99. Label 312 ~ 353 = Zeio Nut
  100.  
  101. Final operations:
  102.  
  103. Label 354 = Sets a random number between 3 and 10
  104. 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.
  105. 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.
  106. Label 366 ~ 368 = 17/256 chance that the following boost occurs, otherwise skip to label 369
  107. Label 366 = Random number between 300 and 1000.
  108. If the newborns run is less than the random number, skip to label 369, otherwise:
  109. If (MDash + Rnd Number) is greater than 6000, skip to label 369, otherwise:
  110. MRun - Rnd Number, and Run - Rnd Number
  111. If Run is less than 100, Run = 100, otherwise:
  112. Label 367 = If MRun is less than 100, MRun = 100, otherwise:
  113. Label 368 = MDash + Rnd Number, and Dash + Rnd Number
  114. Label 369 = Sets a Random Number between 3 and 18
  115. Label 369 ~ 372 = Works out which stable is empty, and sets all stats, can't mate flag, stable filled flag and battle count required.
  116. Label 373 ~ 374 = checks to see if music is still playing to prevent the screen from returning prematurely.
  117. Label 375 ~ 378 = enables Chocobo visibility in barn, and checks for appropriate colour for aesthetics.
  118. Label 379 ~ 380 = Sets the "Male" and "Female" vars for the text box
  119. Label 381 ~ 386 = Sets the Chocobos name as entered according to which stable it's in
  120. Label 387 ~ 390 = Dummied out (Let's a penned Chocobo free, however, all checks will fail)
  121. Label 391 = Final animations of screen fading, and returning the player to normal mode
  122.  
  123. -------------------------------------------------------------------------------------------------
  124.  
  125.  
  126. Label 240 ~ 311 = Carob Nut
  127.  
  128. 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.
  129. Label 243 ~ 282 = Selecting the colour of the newborn
  130.  
  131. Label 243 ~ 247 = If the parents are Blue and Green
  132. Label 243 = Firstly works out total races won.
  133. Secondly checks to see if highest parent colour is 2 (blue), and lowest parent colour is 1 (green)
  134. Thirdly checks the total races won = 9 or more, if so then new born will be 3 (black)
  135. Label 244 = If mating with blue and black that have won less than 9 races, 10/256 chance of it being black
  136. Label 245 = 128/256 chance it'll be Blue
  137. Label 246 = 118 chance it'll be Green
  138. Label 247 = Sets Chocobo type to random number between 2 (great) & 3 (good) 50% chance each.
  139. Label 248 ~ 252 = If Label 243 check fails for colour, then a new check is performed here:
  140. Checks to see if highest parent colour is 1 (green) and lowest parent colour is 2 (blue).
  141. The same script plays out as between label 244 ~ 247
  142.  
  143. 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.
  144.  
  145. Label 253 ~ 266 = If the first selected Chocobo is a Great (Type 2)
  146. 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
  147. 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)
  148. Label 255 = Remaining 166/256 it'll be yellow
  149. Label 256 = Sets the type as Great
  150.  
  151. 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
  152. 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)
  153. Label 259 = Remaining 166/256 it'll be yellow
  154. Label 260 = 50% chance newborn will be Great, 50% chance Good.
  155.  
  156. Label 261 = If the 2nd selected Chocobo is anything other than Great or Good, then 1/4 chance the following occurs:
  157. If 4 or more races have been won, 50% chance of 1 (green) or 2 (blue)
  158. Label 262 = If 3 or less races have been won, 90/256 chance the offspring will be Green or Blue (equal 50% chance each)
  159. Label 263 = Remaining 166/256 it'll be yellow
  160. Label 264 = Sets the type as Great. This ends the 1/4 chance scripts.
  161. 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
  162.  
  163. Label 267 ~ 280 = If the first selected Chocobo is Good (Type 3)
  164. 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
  165. 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)
  166. Label 269 = Remaining 166/256 it'll be yellow
  167. Label 270 = Sets the type as Great (???)
  168.  
  169. 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...)
  170.  
  171. 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
  172. Label 272 = If 3 or less races have been won, 90/256 chance the offspring will be Green or Blue (equal 50% chance each)
  173. Label 273 = Remaining 166/256 it'll be yellow
  174. Label 274 = 50% chance newborn will be Great, 50% chance Good.
  175.  
  176. Label 275 = If the 2nd selected Chocobo is anything other than Great or Good, then 1/4 chance the following occurs:
  177. If 4 or more races have been won, 50% chance of 1 (green) or 2 (blue)
  178. Label 276 = If 3 or less races have been won, 90/256 chance the offspring will be Green or Blue (equal 50% chance each)
  179. Label 277 = Remaining 166/256 it'll be yellow
  180. Label 278 = Sets the type as Good. This ends the 1/4 chance scripts.
  181. 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
  182.  
  183. 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.
  184. Label 282 = Sets colour to Yellow
  185.  
  186. Label 283 ~ 297 = Works out newborn's MDash
  187.  
  188. Label 283 ~ 294 = Checks if newborn is a Black Chocobo and has less than 4000 MDash, and applies boost if so.
  189. Label 283 = Checks to see if newborn is black (skips to label 295 otherwise)
  190. Label 284 = Checks to see if the Average MDash is less than 4000 (skips to label 295 otherwise)
  191. 7/16 Chance that MDash will be 4000
  192. Label 285 = 2/16 Chance that MDash will be 4200
  193. Label 286 = 2/16 Chance that MDash will be 4200
  194. Label 287 = 1/16 Chance that MDash will be 4300
  195. Label 288 = 1/16 Chance that MDash will be 4400
  196. Label 289 = 1/16 Chance that MDash will be 4500
  197. Label 290 = 1/16 Chance that MDash will be 4500
  198. Label 291 = 1/16 Chance that MDash will be 4800
  199. Label 292 = 50% chance this label will be skipped
  200. MDash will be increased by Rnd Num between 0 ~ 51
  201. Label 293 = If the 50% chance failed, then:
  202. MDash will be decreased by Rnd Num between 0 ~ 51
  203.  
  204. 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)
  205. Label 295 = Works out 110% of MDash, and makes sure that the value does not exceed 6000
  206. Label 296 = applies the 10% boost to MDash
  207. Label 297 = If all boosts have failed, then MDash will be the Average of both parents.
  208.  
  209. Label 298 ~ 306 = Works out newborn's MRun
  210.  
  211. Label 298 = 30/256 chance (otherwise skip to label 302)
  212. Works out 110% of MRun, and makes sure that the value does not exceed 6000
  213. Label 299 = Applies the 10% boost to MRun
  214. 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.
  215.  
  216. Label 302 = If the 30/256 chance failed, now have a 55/256 chance (otherwise skip to label 305)
  217. Works out what 5% of MRun is
  218. Makes sure that MRun is not 0, otherwise sets MRun to 1
  219. Label 303 ~ 304 = Applies to 5% reduction to MRun
  220.  
  221. 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.
  222.  
  223. Label 305 = Remaining 171/256 chance that MRun will be average of both parents.
  224.  
  225. Label 306 ~ 311 = Works out newborn's Stamina, Dash, Run, and all other stats
  226.  
  227. Label 306 = 50/256 chance (otherwise skip to Label 308)
  228. Works out 105% of Stamina, and makes sure that the value does not exceed 9999
  229. Label 307 = Applies the 5% boost to Stamina
  230. Label 308 = If the 50/256 chance failed, then the remaining 206/256 chance of Stam being the average of its parents.
  231. Label 309 = Sets newborn's Dash and Run as the average of its parents.
  232. 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.
  233. Label 311 = Sets Acceleration to average of parents
  234. Sets Coop to 0
  235. Sets Intelligence to average of parents
  236. Sets PCount to 0
  237. Sets races won to 0
  238. Sets sex to M or F (50% equal chance)
  239. Sets the Personality according to $Pers Var set in labels 56 ~ 59
  240.  
  241. -------------------------------------------------------------------------------------------------
  242.  
  243. Label 312 ~ 353 = Zeio Nut
  244.  
  245. 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.
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252. -------------------------------------------------------------------------------------------------
  253.  
  254.  
  255. chokoo S1 Talk (interacting with a Chocobo in your stables, "choko1" ~ "choko6")
  256.  
  257. Label 0 = if mating mode is OFF (executes script2 meskun which shows Chocobos stats)
  258. Label 1 = check for the Can't Mate flag
  259. Label 2 ~ 4 = TempVar stat allocation for first selected Chocobo
  260. 2 = Runs meskun2 script 2 which sets the class and name for the text box for chocobo 1
  261. 3 = Chosen "Never Mind"
  262. 4 = TempVar stat allocation
  263. Label 5 ~ 7 = TempVar stat allocation for second selected Chocobo
  264. 5 = Runs meskun3 script 1 which sets the class ans name for the text box for chocobo 2
  265. 6 = Chosen "Never Mind"
  266. 7 = TempVar stat allocation
  267.  
  268. -------------------------------------------------------------------------------------------------
  269.  
  270.  
  271. 18 meskun2 Script 2 (Text box variables after choosing the first Chocobo)
  272.  
  273. Label 0 ~ 7 = Chocobo Stable 1
  274. Label 0 ~ 1 = Labels the Chocobo "-ALE" if a male, or "&EMALE" if female
  275. Label 2 ~ 5 = Sets the Racing class variable
  276. Label 6 = Sets Chocobo's name for text box
  277. Label 7 ~ 13 = Chocobo Stable 2
  278. Label 14 ~ 20 = Chocobo Stable 3
  279. Label 21 ~ 27 = Chocobo Stable 4
  280. Label 28 ~ 34 = Chocobo Stable 5
  281. Label 35 ~ 42 = Chocobo Stable 6
  282.  
  283. ------------------------------------------------------------------------------------------------
  284.  
  285.  
  286. Breeding Mechanics
  287.  
  288. After selecting which Chocobos and which Nut, the following preliminary functions take place. This all happens before the screen fades to black.
  289.  
  290. 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.
  291.  
  292. Then the MDash of both parents are looked at, and they are added together then divided by two to work out the MDash Av.
  293.  
  294. 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.
  295.  
  296. 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).
  297.  
  298. 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).
  299.  
  300. 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.
  301.  
  302. The developers overlooked the fact that it is possible to mate twice without leaving the screen, by having two empty stables and four filled.
  303.  
  304. 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].
  305.  
  306. 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.
  307.  
  308. The same thing occurs for [5][181].
  309.  
  310. The preliminary stages are now complete, what takes place next is now specific to which Nut is used.
  311.  
  312. -------------------------------------------------------------------------------
  313. [SEE BELOW FOR NUT MECHANICS]
  314. -------------------------------------------------------------------------------
  315.  
  316. After the Nut mechanics haven taken affect, the following final operations are performed:
  317.  
  318. 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.
  319.  
  320. The same thing occurs for parent 2.
  321.  
  322. 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.
  323.  
  324. If the newborn's Run is less than the random number, then this boost will be skipped.
  325.  
  326. If the newborn's MDash plus Random Number is greater than 6000, then this boost will be skipped.
  327.  
  328. MRun and Run will now be reduced by Random Number, and if Run is less than 100 it will be set to 100.
  329.  
  330. MDash and Dash will now be increased by Random Number. This ends the 17/256 chance boost.
  331.  
  332. 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.
  333.  
  334. Once the music has stopped, the Chocobo's visibility, intractability and visible colour are set, and finally the naming of the newborn.
  335.  
  336. 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.
  337.  
  338. -------------------------------------------------------------------------------
  339. [CAROB NUT]
  340. -------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement