Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - DynamixDJ

Pages: [1]
1
Hi Y'all! I'm currently working on the Enemy Module of my walkthrough, and I've decided that I want to break the AI script down for myself, instead of just blindly following the work the TFergusson has done in his Enemy Mechanics FAQ (the Eligor caused me quite a few problems).

Anyway, this is a fun project, and this webpage from the qhuimm wiki is the thing that I needed to fill in the blanks. I have had a few queries along the way though, so I've decided to ask them here.

1st Question:

Code: [Select]
If ( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
Is this a check to see if ALL Players are in the front row, or if ANY of the Players are in the front row?

I had assumed it was ALL Players when I was looking at the script for MP/Guard Hound/Mono Drive/Grunt. All of these enemies uses AI script that's supposed to look at which row the player is in to choose their Attacks accordingly, but the script is illogical.

I've tried to work out what their patterns were supposed to be. Take the MP as an example, here is the opening setup for the AI Script:

Code: [Select]
0x000LovalVar:PlayerRow <- 0
0x006LovalVar:EnemyRow <- 0
0x00CLovalVar:SelfRow <- 0
0x012 If ( (BattleAddr(&AllEnemies).BattleAddr(&Row) == 0) )
0x012 {
0x01F LovalVar:EnemyRow <- LovalVar:EnemyRow AND 1
0x029 If ( (BattleAddr(&AllEnemies).BattleAddr(&Row) == 1) )
0x029 {
0x036 LovalVar:EnemyRow <- LovalVar:EnemyRow AND 2
0x040 If ( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x040 {
0x04D LovalVar:PlayerRow <- LovalVar:PlayerRow AND 1
0x057 If ( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x057 {
0x064 LovalVar:PlayerRow <- LovalVar:PlayerRow AND 2
0x06E If ( (BattleAddr(&Self).BattleAddr(&Row) == 0) )
0x06E {
0x07B LovalVar:SelfRow <- 0
0x081 }
0x081 Else
0x081 {
0x084 LovalVar:SelfRow <- 1

So, seeing as TF has reported that flaws in the script prevent it from targetting th Players wors correctly, I wanted to see if I could fix the error, which is the AND function returning 0 for every check. If you swap the AND X functions with  <- X, then it would make sense to me. If All Players are in the front row; LovalVar:PlayerRow <- 1, and if All Players are in the Back Row, then LovalVar:PlayerRow <- 2, and if the Player Row values are mixed, then it stays as 0. That works.

The thing is, I've just started looking at the Grashtrike, and the first line reads:

Code: [Select]
If ( ( (BattleAddr(&AllPlayers).BattleAddr(&SlowStatus) == 0)
I had assumed that this meant that it was performing Silk ONLY if all players do not have Slow, however, after testing I can see that this actually means that it will perform Silk if ANY Player does not have Slow.

So, how does that translate to the MP? If at least one player is in the front, the var gets set to 1, and if any player is in the back, the var gets set to 2... that would mean that it can never be 0, and would bypass some of the script....

Here is the MP's full AI script for reference:

Code: [Select]
MAIN:

0x000LovalVar:PlayerRow <- 0
0x006LovalVar:EnemyRow <- 0
0x00CLovalVar:SelfRow <- 0
0x012 If ( (BattleAddr(&AllEnemies).BattleAddr(&Row) == 0) )
0x012 {
0x01F LovalVar:EnemyRow <- LovalVar:EnemyRow AND 1
0x029 If ( (BattleAddr(&AllEnemies).BattleAddr(&Row) == 1) )
0x029 {
0x036 LovalVar:EnemyRow <- LovalVar:EnemyRow AND 2
0x040 If ( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x040 {
0x04D LovalVar:PlayerRow <- LovalVar:PlayerRow AND 1
0x057 If ( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x057 {
0x064 LovalVar:PlayerRow <- LovalVar:PlayerRow AND 2
0x06E If ( (BattleAddr(&Self).BattleAddr(&Row) == 0) )
0x06E {
0x07B LovalVar:SelfRow <- 0
0x081 }
0x081 Else
0x081 {
0x084 LovalVar:SelfRow <- 1
0x08A If (Not  (LovalVar:SelfRow) )
0x08A {
0x091 If (LovalVar:PlayerRow == 1)
0x091 {
0x099 LocalVar:Random <- 4
0x09F If (Not  (Random MOD LocalVar:Random) )
0x09F {
0x0A8 If ( (LovalVar:PlayerRow AND 2 == 2) )
0x0A8 {
0x0B4 BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x0C3 }
0x0C3 Else
0x0C3 {
0x0C6 BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x0CE LocalVar:EnemyAttack <- 272 (Machine Gun)
0x0D5 }
0x0D5 Else
0x0D5 {
0x0D8 If ( (LovalVar:PlayerRow AND 1 == 1) )
0x0D8 {
0x0E4 BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x0F3 }
0x0F3 Else
0x0F3 {
0x0F6 BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x0FE LocalVar:EnemyAttack <- 273 (Tonfa)
0x105 }
0x105 Else
0x105 {
0x108 }
0x108 Else
0x108 {
0x10B If (LovalVar:PlayerRow == 2)
0x10B {
0x110 LocalVar:Random <- 8
0x116 If (Not  (Random MOD LocalVar:Random) )
0x116 {
0x11F If ( (LovalVar:PlayerRow AND 1 == 1) )
0x11F {
0x12B BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x13A }
0x13A Else
0x13A {
0x13D BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x145 LocalVar:EnemyAttack <- 273 (Tonfa)
0x14C }
0x14C Else
0x14C {
0x14F If ( (LovalVar:PlayerRow AND 2 == 2) )
0x14F {
0x15B BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x16A }
0x16A Else
0x16A {
0x16D BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x175 LocalVar:EnemyAttack <- 272 (Machine Gun)
0x17C }
0x17C Else
0x17C {
0x17F }
0x17F Else
0x17F {
0x182 LocalVar:Random <- 2
0x188 If (Not  (Random MOD LocalVar:Random) )
0x188 {
0x191 If ( (LovalVar:PlayerRow AND 2 == 2) )
0x191 {
0x19D BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x1AC }
0x1AC Else
0x1AC {
0x1AF BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x1B7 LocalVar:EnemyAttack <- 272 (Machine Gun)
0x1BE }
0x1BE Else
0x1BE {
0x1C1 If ( (LovalVar:PlayerRow AND 1 == 1) )
0x1C1 {
0x1CD BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x1DC }
0x1DC Else
0x1DC {
0x1DF BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x1E7 LocalVar:EnemyAttack <- 273 (Tonfa)
0x1EE }
0x1EE Else
0x1EE {
0x1F1 POP(LovalVar:PlayerRow)
0x1F2 }
0x1F2 Else
0x1F2 {
0x1F5 If (LovalVar:PlayerRow == 1)
0x1F5 {
0x1FD LocalVar:Random <- 4
0x203 If (Not  (Random MOD LocalVar:Random) )
0x203 {
0x20C If ( (LovalVar:PlayerRow AND 1 == 1) )
0x20C {
0x218 BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x227 }
0x227 Else
0x227 {
0x22A BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x232 LocalVar:EnemyAttack <- 273 (Tonfa)
0x239 }
0x239 Else
0x239 {
0x23C If ( (LovalVar:PlayerRow AND 2 == 2) )
0x23C {
0x248 BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x257 }
0x257 Else
0x257 {
0x25A BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x262 LocalVar:EnemyAttack <- 272 (Machine Gun)
0x269 }
0x269 Else
0x269 {
0x26C }
0x26C Else
0x26C {
0x26F If (LovalVar:PlayerRow == 2)
0x26F {
0x274 LocalVar:Random <- 8
0x27A If (Not  (Random MOD LocalVar:Random) )
0x27A {
0x283 If ( (LovalVar:PlayerRow AND 1 == 1) )
0x283 {
0x28F BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x29E }
0x29E Else
0x29E {
0x2A1 BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x2A9 LocalVar:EnemyAttack <- 273 (Tonfa)
0x2B0 }
0x2B0 Else
0x2B0 {
0x2B3 If ( (LovalVar:PlayerRow AND 2 == 2) )
0x2B3 {
0x2BF BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x2CE }
0x2CE Else
0x2CE {
0x2D1 BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x2D9 LocalVar:EnemyAttack <- 272 (Machine Gun)
0x2E0 }
0x2E0 Else
0x2E0 {
0x2E3 }
0x2E3 Else
0x2E3 {
0x2E6 LocalVar:Random <- 6
0x2EC If (Not  (Random MOD LocalVar:Random) )
0x2EC {
0x2F5 If ( (LovalVar:PlayerRow AND 1 == 1) )
0x2F5 {
0x301 BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 0) )
0x310 }
0x310 Else
0x310 {
0x313 BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x31B LocalVar:EnemyAttack <- 273 (Tonfa)
0x322 }
0x322 Else
0x322 {
0x325 If ( (LovalVar:PlayerRow AND 2 == 2) )
0x325 {
0x331 BattleAddr(&TargetSelected) <- RandomBit( (BattleAddr(&AllPlayers).BattleAddr(&Row) == 1) )
0x340 }
0x340 Else
0x340 {
0x343 BattleAddr(&TargetSelected) <- RandomBit(BattleAddr(&AllPlayers))
0x34B LocalVar:EnemyAttack <- 272 (Machine Gun)
0x352 }
0x352 Else
0x352 {
0x355 POP(LovalVar:PlayerRow)
0x356Perform(LocalVar:EnemyAttack, EnemyAttack)
0x35CSCRIPT END

Here's how I have deciphered that, assuming that the AND functions are actually PUSH functions, and that the check in question is looking for ALL players in Front/Back Row (as opposed to any player):


Code: [Select]
/----------------------------------------------------------------------------\
|   BATTLE PLAN: (Unused)                                                    |
|                                                                            |
|  If All Players are in Back Row: 1/4 Chance use Machine Gun on Rnd Target  |
|                                  3/4 Chance use <Tonfa> on Rnd Target      |
|                                                                            |
|  If All Players are in Front Row: 1/8 Chance use <Tonfa> on Rnd Target     |
|                                   7/8 Chance use Machine Gun on Rnd Target |
|                                                                            |
|  If the Players Rows are mixed:                                            |
|   If MP is in the Front Row: 1/2 Chance use Machine Gun on Rnd Target      |
|                              1/2 Chance use <Tonfa> on Rnd Target          |
|                                                                            |
|   If MP is in the Back Row:  1/6 Chance use <Tonfa> on Rnd Target          |
|                              5/6 Chance use Machine Gun on Rnd Target      |
\----------------------------------------------------------------------------/


I'm not 100% sure this is correct now. If anyone could clarify for me how the MP's correct AI script is supposed to work, that would be great!

2
FF7 Tools / FFVII Enemy Database & Calculator V1.1.0
« on: 2019-02-17 21:17:25 »
FFVII Enemy Database & Calculator V 1.1.0

This database has been built using Microsoft Excel and acts as a multi-purpose search engine containing Enemy, Attack, Formation, Item, Materia and Field Map data all taken from the scene.bin, kernel.bin and flevel.lgp respectively. You will also find a fully working Damage Output Calculator, a Damage Overflow Calculator, and an 'Average Spoils Per Screen' Calculator.

Created for:
  • Casual players
  • Speedrunners
  • Modders (Database can be used as a canvas/template for designing a new mod)
  • Walkthrough/FAQ writers

Download here:

Normal Version: https://docs.google.com/spreadsheets/d/0B8OpCQuDA-lKZkN5cVdYbXA1OFk/edit?usp=sharing&ouid=117350168362484890742&resourcekey=0--31Lm3KaCArAu8yIKCFjig&rtpof=true&sd=true (12.8 MB)
Pictures Version: https://drive.google.com/open?id=1dZKZvFfiosQPiSpAVRNJstbAUpglTdgZ (236 MB)

Both files are too large for Google Sheets to open, so you will need to download them to use them. The files are macro-free. Only download the Pictures version if you know your computer can handle the file. Additionally, you may experience compatibility issues if not using Microsoft Excel.

The Normal version and Pictures version both work the same; the only difference between the two is that the Pictures version contains embedded pictures of all Enemies, Items, Field Maps and Battle Backgrounds within the "Database" section, whereas the normal release includes hyperlinks to uploaded versions of the pictures.

DATABASE FEATURES:

Enemy:
Spoiler: show

Search via Enemy Name or ID to display all basic stats for the searched Enemy, along with Steals, Drops and Morphs; Elemental and Status attributes; and "Lookalikes". Also shows the Formation ID which the searched enemy appears in, and the Field Screens/World Map areas where you can encounter that enemy.

Lists detailed attack information for all 16 Attack slots for the searched enemy, as well as the three assigned Manipulate Attacks.

"Advanced Search" feature available, which allows for search criteria such as:
 - All Enemies that are Lv 24
 - All Enemies that have a Defence value of 60
 - All Enemies that take Double Damage from Fire








Attack:
Spoiler: show

Search via Attack Name or ID to display the basic stats for searched attack (MP Cost, Attack power etc.); Elemental and Status attributes; Target Attributes; Attack Formula used; and other info such as additional effects used, random variation on/off etc.

Lists all enemies in which the searched Attack can be found upon, as well as a base damage calculator in which one can use the Enemy ID to calculate the base damage value quickly.

"Advanced Search" feature available, which allows for search criteria such as:
 - All Attacks that have an MP cost of 30
 - All Attacks that use the Lightning element
 - All Attacks that use Attack Formula 26

A list of "Additional Effects" and their descriptions can be found by navigating past the Advanced Search feature.








Formation:
Spoiler: show

Search via Formation ID (decimal value) to display all stats for searched formation: Escape Counter; Battle Background used; Battle Type and Setup Flag used; and whether or not the Formation is used within the battle square.

Shows each enemy found within the Formation (3 max), along with the Qty of each enemy (6 total for the Formation), EXP, AP and gil earned, and all basic stats for those enemies. Also indicates the row positioning of the enemies within the Formation, the cover flag used, and the enemy flag used. Lists all Field Screens/World Map areas in which the searched Formation appears in.

Navigate past the Advanced Search feature for a description on "Setup Flags", "Battle Types", "Enemy Flags", how the Cover Flag works, and also a list of the Battle Backgrounds used (along with embedded pictures for the Battle Backgrounds).

"Advanced Search" feature available, which allows for search criteria such as:
 - All Formations that have an Escape Counter of 3
 - All Formations that are used in the Battle Arena
 - All Formations that use Battle Type 4 (Pincer Attack - Enemy attacks from both sides)






Item:
Spoiler: show

Look up all Items/Weapons/Armour/Accessories. Note that the search priority runs from left-to-right, meaning, if you search via item Name then you cannot search via Weapon Name until you have cleared the Item Name search criteria.

Shows all relevant stats pertaining to the type of Item you are searching for (weapon/armour etc.) - the result boxes will appear/disappear accordingly.

Lists all enemies that the searched Item can be stolen/dropped/morphed from, along with all Field Maps and Shops that you can find the Items in.

Shop look-up available, along with Key Items.

Five "Advanced Search" features are available, which allows for search criteria such as:
 - All Items that are not sell-able in shops
 - All Weapons that are not throw-able
 - All Armour that boosts the Magic stat
 - All Accessories that Defend against Petrify
 - All Shops that are Shop Type 6 (Accessory Shop)















Materia:
Spoiler: show

Search via Materia Name or ID to display all relevant information for that Materia. The effects of the "Modifier Types" vary from Materia to Materia; see the "Materia Modifier Notes" to clarify what those effects are.

Lists all Field Maps and Shops that hold searched Materia. Also shows info on the five abilities used by the Materia.

Enemy Skill look-up available, along with Command look-up.

Three "Advanced Search" features are available, which allows for search criteria such as:
 - All Materia that deplete Strength by -2
 - All Materia Attacks that are reflect-able
 - All Commands that cannot toggle multiple












Maps:
Spoiler: show

Search via Map ID, Name or Description to bring up a range of info for that map, including: Enemies and Enemy Skills learned on map; Formations used on map along with basic stats for each enemy; Enemy Drops, Steals and Morphs on map; Items, Materia and Key Items collected on map; and, Shops found on map.

Also lists Elemental strengths/weaknesses, Elements used by enemies, Status vulnerabilities, and, Statuses used by enemies.

















Map Average Calculator:
Spoiler: show

Search via Map ID, Name or Description to list all Formations that appear on that map, along with all basic stats for the enemies found within those Formations. An average is then calculated to display the average EXP, AP, gil, and all other stats for that map.

Note that the average taken can be considered a true average, seeing as the calculator takes into account the individual encounter rates for each formation, and also the way in which the game first considers the "Special Battle" chances, followed by the "Normal Battle" chances (big thanks to NFITC1 for help with the maths behind this).

The averages calculator can be modified using the appropriate Materia modifiers, such as Weapon Growth, Exp Plus Level, Gil Plus Level, Enemy Lure/Away Level, and, Pre-Emptive Level.









Damage Overflow Calculator:
Spoiler: show

First enter the player's Lv and Att, followed by the enemy's Def value (or use the enemy search field to find Def value) to make the calculator work. You can optionally enter the Hero Drink qty and Power value to calculate damage output to see if damage overflow has occurred at the Base Damage stage.

Regardless of the Hero Drink and power values entered, the calculator will take the player's Att, Lv and the Enemy's Def values to calculate the Power value required to cause overflow at the base damage stage (before any damage modifiers such as Critical come into play) for each qty of Hero Drinks. Only Barret and Vincent can overflow at the Base Damage stage, and their respective "kills needed" and "AP required" values are shown accordingly.

Continuing with the same Att, Lv & Def values, the calculator will also work out the Power value required to cause overflow at the Random Variation stage (after things like Back Damage and Critical have been considered) for each amount of Hero Drinks. All characters barring Aeris can overflow at the Random Variation stage.

Scroll to the "Useful Info" section to find the max Power value attainable for each character.

Lastly, a "reverse calculator" has been included which will calculate the maximum Def value you can overflow with based on the Power value and Hero Drinks used (and of course Lv & Att).













Damage Output Calculator:
Spoiler: show

The cells highlighted in bright red can be edited here, unlike the other sheets in this database.

If you are unfamiliar with the various formulas used, then you would benefit from scrolling down to "Formula Info" to familiarise yourself with the various battle formulas in-play. The most common physical attack formula is 11, and the most common magical attack is 22. Usually, the Power value is 16, which indicates 1x normal Power. If the Attack had a power value of 32, then it could be considered 2x normal power.

If you know the Power value and formula for the attack used then enter those values into the first search field; alternatively, you can search via Attack name or ID to find the Power and Formula used. Note that the unused search fields will grey out accordingly when you fill the search fields; to use the greyed out fields again clear the current search fields. Turning Morph on will divide the Power value by 8.

Secondly, you must either look up the actor's Lv and Att if the attack is Physical, or Magic Att if the Attack is Magical. Alternatively, search via Enemy Name or ID to find the Lv and Att/MAtt used. Hero Drinks will increase Att and MAtt by 30% and will stack up to a maximum of +100%.

Lastly, enter the target's Def if the attack is Physical, or MDef if Magical, or, you can search via Enemy Name or ID to find the Def/MDef values used. Hero Drinks increase Def and MDef by 30%, and Dragon Forces by 50%. Both will stack together, but will not exceed a total maximum of +100%.

Toggle the Elemental Attributes and Status modifiers to vary the damage output in a number of ways. If you want to activate the Weapon Modifiers, then make sure to be using a damage formula beginning with A (also known as AX; see the "Formula Info" section).

The last part of the calculator will work out the various hit chances. If you have selected an Attack/Actor/Target in the search fields above, then their relevant stats will be displayed here which can be then used to fill out the fields in green. Make sure that the "Attack Type" (Physical/Magical) and "Target" (Player/Enemy) are set correctly to see the relevant stats.







Database Section:
Spoiler: show

If you explore the "Enemy", "Item" or "Map" database sheets you will find hyperlinks to pictures of every Enemy, Item and Field Map. If you have downloaded the "Pictures" version, then the pics will be embedded within the notes for each cell; hover your mouse over the cells to bring up the pictures.

Generally speaking, you shouldn't need to mess around with the database section, unless you have the notion of using this database as a canvas for designing a new mod. In which case, only edit the cells highlighted in Green or Red (some cells will change colour from one to the other). If you do intend on modifying the Database, then it's worth hitting me up on my email, seeing as certain aspects have been designed in a way that isn't very self-explanatory.

The "Calculations" sheet is where all the background calculators and search engines do their thing. In honesty, It is a maze of formulas that is probably best to avoid, unless you're me :).


Credit to NFITC1 for the maths behind the Map Average Calculator.
Credit to Gurthawoe for help with the spreadsheet formulas.

Contact email - [email protected]

3
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).

4
For the past week or so myself and songsengnims have been looking into the possibilities and paramaters of Yuffie Warping to duplicate items that have been previously dubbed as "un-dupe-able". My first comment was that the Warping glitch can only be done on the PC versions, and in my opinion it is far too easy to save-game edit for my liking to class any PC/Steam Perfect save file as "legit" (PS4 perhaps??). I could create any means of "perfect game" in 10 minutes flat (using an end-game save as a template).

Regardless, it's been quite fun digging around to see what we can do, and we have been able to warp from just before Diamond to Cave of Gi to dupe Seraph Combs (Gi Nattak won't wortk, must be a random encounter), and Lost number for Cosmo Memorys. the trick is warping back to the Diamond fight; immediately after GameMoment is set back to its rightful position and the savefile is restored with no harm done. The fun is thinking of a number of ways to manipulate GameMoment for exploitation, as such I thought it was fitting for this site. Anyone wanna help?

One exciting possibility for me was the prospect of gaining a Red Sub AND having all 4 Huge Materia (without hacks). That would definitely be worth making a youtube vid for. Unfortunately, as far as I can tell it cannot be done. Another cool thing we've discovered is the fact that we can do the North Crater events without having recruited Yuffie, then warp back to the Diamond fight to set GameMoment to just before parachuting. Read up on the main thread to get the full low-down on what we've discovered can and can't be done, however there's quite a lot to go through. At the very least, it makes for some entertaining reading!

Now, the thing I'm trying to work out is whether or not it's possible to learn Omnislash via the end-battle, then still be able to warp back to any point in the game, thereby retaining the Omnislash Manual (as XeroKynos suggests in one of his vids)?? Is the Lv4 Limit learnt via field scripts prior to the end-battle, or is it learnt via in-battle script? Any suggestions?

5
FAQs and Tutorials / Helpful Charts by DynamixDJ
« on: 2016-04-11 18:55:28 »
Helpful Charts by DynamixDJ

Welcome to the first in a series of charts that I intend to create for the benefit of the FFVII community. You can also find a list of available charts via my Pastebin Homepage, just remember to view the "raw" version!

Charts 001 - Enemy Formations: V1.1.1
View HERE
Download HERE (894 KB)

Example:
Code: [Select]
Enemy Formation Section:

\============================================================================/
 \                                                                          /
  \                 [011E] Cromwell                                        /
   |  Scene 205:    [011F] Manhole                                        | 
  /                 [0120] Manhole(Lid)                                    \
 /                                                                 (S CD)   \
/============================================================================\
|   USED | 1 Cromwell x2      | AT 00  | Sector 4/ | md8_b1   14 | EXP:  1600|
|R1 #820 |                    | Normal | 8 Gantries|             |  AP:   160|
|ED 0334 |                    | Attack | B 1A PGDA |             | GIL:  3000|
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Cromwell         | AT 00  | Sector 4/ | md8_b2   14 | EXP:  2400|
|R1 #821 | 2 Cromwell x2      | Normal | 8 Gantries|             |  AP:   240|
|ED 0335 |                    | Attack | B 1A PGDA |             | GIL:  4500|
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Manhole          | AT 00  | Sector 4/ | md8_b1   12 | EXP:   900|
|R1 #822 |   Manhole(Lid)     | Normal | 8 Gantries| md8_b2   12 |  AP:    80|
|ED 0336 | 2 Manhole x2       | Attack | B 1A PGDA |             | GIL:  3000|
|        |   Manhole(Lid) x2  |        |           |             |           |
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|         • Battle Flag FFF6 set for Manhole(Lid); Invisible & non-          |
|           targetable                                                       |
|         • Battle Flag FFF7 set for Manhole(Lid) x2; non-targetable         |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Manhole          | AT 00  | Sector 4/ | md8_b1   11 | EXP:   900|
|R1 #823 |   Manhole(Lid) x2  | Normal | 8 Gantries| md8_b2   11 |  AP:    80|
|ED 0337 | 2 Manhole          | Attack | B 1A PGDA |             | GIL:  3000|
|        |   Manhole(Lid) x2  |        |           |             |           |
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|         • Battle Flag FFF6 set for Manhole(Lid); Invisible & non-          |
|           targetable                                                       |
|         • Battle Flag FFF7 set for Manhole(Lid) x2; non-targetable         |
\============================================================================/
 \                                                                          /
  \                 [011D] Behemoth                                       /
   |  Scene 206:    [011E] Cromwell                                       | 
  /                 [0121] Crazy Saw                                       \
 /                                                                 (S CE)   \
/============================================================================\
|   USED | 1 Behemoth         | AT 00  | Sector 4/ | md8_b1   10 | EXP:  1500|
|R1 #824 |                    | Normal | 8 Gantries| md8_b2   10 |  AP:   100|
|ED 0338 |                    | Attack | B 1A PGDA |             | GIL:  2200|
|-  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -|
| Special • Setup Flag ED set - Preemptive Strikes OFF                       |
|————————o————————————————————o————————o———————————o—————————————o———————————|
|** USED | 1 Crazy Saw        | AT 00  | Sector 4/ | md8_b1    9 | EXP:  1600|
|R1 #825 | 2 Crazy Saw        | Normal | 8 Gantries| md8_b2    9 |  AP:   160|
|FD 0339 |                    | Attack | B 1A PGDA |             | GIL:  2600|
|————————o————————————————————o————————o———————————o—————————————o———————————|
|** USED | 1 Crazy Saw        | AT 00  | Sector 4/ | md8_b1    8 | EXP:  1600|
|R1 #826 |   Cromwell         | Normal | 8 Gantries| md8_b2    8 |  AP:   160|
|FD 033A |                    | Attack | B 1A PGDA |             | GIL:  2800|
|————————o————————————————————o————————o———————————o—————————————o———————————|
|   USED | 1 Cromwell         | AT 02  | Sector 4/ | md8_b1    2 | EXP:   800|
|R2 #827 |                    | Back   | 8 Gantries| md8_b2    2 |  AP:    80|
|FD 033B |                    | Attack | B 1A PGDA |             | GIL:  1500|
\============================================================================/

Enemy Encounters Section:

•————————————————————————————————————————————————————————————————————————————•
| ~ 733  "md8_b1"   - Sector 8 Upper Catwalk Area                  : Enc 48  |
|------------------------------------------------------------------+---------|
|  #820 : 2x Cromwell                               : NA : R1 : ED : Enc 14  |
|  #822 : 3x Manhole                                : NA : R1 : ED : Enc 12  |
|  #823 : 3x Manhole                                : NA : R1 : ED : Enc 11  |
|  #824 : 1x Behemoth                               : NA : R1 : ED : Enc 10  |
|  #825 : 2x Crazy Saw                              : NA : R1 : FD : Enc 9   |
|  #826 : 1x Crazy Saw, 1x Cromwell                 : NA : R1 : FD : Enc 8   |
|S #827 : 1x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #828 : 2x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #829 : 2x Cromwell                               : PA : R1 : FD : Enc 4   |
| - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -|
| Background 1A - Sector 4 / Sector 8 Gantries      : Training Rating:    ** |
•————————————————————————————————————————————————————————————————————————————•

•————————————————————————————————————————————————————————————————————————————•
| ~ 734  "md8_b2"   - Sector 8 Lower Catwalk Area                  : Enc 48  |
|------------------------------------------------------------------+---------|
|  #821 : 3x Cromwell                               : NA : R1 : ED : Enc 14  |
|  #822 : 3x Manhole                                : NA : R1 : ED : Enc 12  |
|  #823 : 3x Manhole                                : NA : R1 : ED : Enc 11  |
|  #824 : 1x Behemoth                               : NA : R1 : ED : Enc 10  |
|  #825 : 2x Crazy Saw                              : NA : R1 : FD : Enc 9   |
|  #826 : 1x Crazy Saw, 1x Cromwell                 : NA : R1 : FD : Enc 8   |
|S #827 : 1x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #828 : 2x Cromwell                               : BA : R2 : FD : Enc 2   |
|S #829 : 2x Cromwell                               : PA : R1 : FD : Enc 4   |
| - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - -|
| Background 1A - Sector 4 / Sector 8 Gantries      : Training Rating:    ** |
•————————————————————————————————————————————————————————————————————————————•

Stay tuned for more charts to come! It is worth mentioning however that my walkthrough is my main focus and drive for the time being, and until it is complete I'm not going to be working too heavily on my charts. I have over a dozen in mind to make, and you'll all have to be patient, as they won't be dropping any time soon!  ;)

6
Scripting and Reverse Engineering / FF7 Battle Flags
« on: 2016-03-10 02:22:12 »
Ok, I'm trying to work out what the battle flags correspond to within offset 0x10 of the battle setup. The documented description within the qhimm wiki battle scenes reads "Escapable Flag (Along with other flags)". This topic tells me a small amount, as does this topic, however this video explains a little more.

Long story short, I'm writing an in-depth FAQ about damage overflow, and I need to cite every single enemy in which back damage is possible. I can find the side attack formations easily enough, however the preemptive chance uses a different flag.

Here are the 16-bit values that are being used (that I've seen, anyway):

(much later) EDIT - now that i know definitely what the flags do, I've changed the info in the coding tag below to display the correct info. I'm still unsure of the 0x02 flag, although this is primarily used against enemies with multiple limbs:
Code: [Select]
FD = Normal fight
ED = Preemptive OFF
F9 = Can't Escape
F7 = No Victory pose
FF = 0x02 ON
F1 = Can't Escape & No Victory pose
E9 = Can't Escape & Preemptive OFF
FB = Can't Escape & 0x02 ON
EF = Preemptive OFF, and 0x02 ON
F3 = Can't Escape, No Victory Pose and 0x02 ON
EB = Can't Escape, Preemptive OFF and 0x02 ON
E3 = Can't Escape, Preemptive OFF, No Victory Pose and 0x02 ON

Now, I haven't done much raw testing yet, I was hoping maybe someone would be able to tell me not to bother, it's already been figured out, but anyway, here are my current predictions of the 4 bits that are in use:

(much later) EDIT - These are now correct:

Bit 1  ON = ???? used on enemies with multiple limbs
Bit 2 OFF = Can't Run             
Bit 3 OFF = Fanfare/Victory pose won't play
Bit 4 OFF = Preemptive off

Also, does anyone know of a list that cites the formations that the game actually uses? If not, I'll be able to go through each field map with Makou Reactor to determine know which Side Attack formations are actually being used, and if someone can confirm/deny my battle flag hypothesis, then I'll be able to accurately cite each enemy that can take back damage for the field maps....

What about the World Map encounters? Do we know precisely which formations are used and which are unused? picklejar uploaded the world map scripts, and while I've been able to find scripts that engage forced battle encounters 01D5 (Midgar Zolom), 03D6 (Ruby Weapon), and all of the Ultimate encounters, I haven't been able to find any of the random encounter scenes.

7
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!

Pages: [1]