How to look into FFVII's scripting
OK then, there's a lot ground to cover, and I don't want to go into too much depth
on this post, just in case you are already familiar with certain things, but I am more than happy to clarify any uncertainties you may have later on.
The very first thing you need to know about is Hexadecimal and binary numbering systems. You don't need to be a mathematician to understand Base 16 and Base 2, you just need to have a
good head for
basic maths. I have only recently started looking into coding over Christmas just gone, and it was
this video that sent me down the rabbit hole.
This video helped also.
So, you need to know that one byte of data consists of 8 binary 'bits', and can hold a value range of 0 ~ 255 (if unsigned, -128 ~ +127 if signed). So, plucking a random string of binary,
0110 0100 is equal to 100 in decimal, and 64 in hexadecimal (i honestly did pluck that binary sequence at random; I didn't intend for it to be 100
).
Let's say that that byte was bitified. The binary sequence is registered slightly different; each 1 or 0 represents a flag - this could be for a collectible item, or a progression flag, such as a one-time only dialogue. In the above sequence, Bits 2, 5 & 6 are ON, the rest are OFF.
These 8 bits are called upon as Bit 0 ~ Bit 7; Bit 0 being the right-most, or least significant bit (
LSB), and Bit 7 being the left-most, or most significant bit (
MSB). This chart should help:
Code:
+---------------------------------+
| [COLOR="lime"]BIT:[/COLOR] | [COLOR="Magenta"]Hex:[/COLOR] | [COLOR="Yellow"]Dec:[/COLOR] | [COLOR="MediumTurquoise"]Binary: [/COLOR] |
|-------+------+------+-----------|
| [COLOR="lime"]Bit 0[/COLOR] | [COLOR="magenta"]0x01[/COLOR] | [COLOR="yellow"]01[/COLOR] | [COLOR="MediumTurquoise"]0000 0001[/COLOR] |
| [COLOR="lime"]Bit 1[/COLOR] |[COLOR="magenta"] 0x02[/COLOR] | [COLOR="yellow"] 02[/COLOR] |[COLOR="mediumturquoise"] 0000 0010[/COLOR] |
| [COLOR="lime"]Bit 2[/COLOR] | [COLOR="magenta"]0x04[/COLOR] | [COLOR="yellow"] 04 [/COLOR] | [COLOR="mediumturquoise"]0000 0100[/COLOR] |
| [COLOR="lime"]Bit 3[/COLOR] | [COLOR="magenta"]0x08[/COLOR] | [COLOR="yellow"]08[/COLOR] | [COLOR="mediumturquoise"]0000 1000[/COLOR] |
| [COLOR="lime"]Bit 4[/COLOR] | [COLOR="magenta"]0x10[/COLOR] | [COLOR="yellow"] 16[/COLOR] | [COLOR="mediumturquoise"]0001 0000[/COLOR] |
| [COLOR="lime"]Bit 5[/COLOR] | [COLOR="magenta"]0x20[/COLOR] | [COLOR="yellow"]32[/COLOR] | [COLOR="mediumturquoise"]0010 0000[/COLOR] |
| [COLOR="lime"]Bit 6[/COLOR] | [COLOR="magenta"]0x40[/COLOR] | [COLOR="yellow"]64[/COLOR] | [COLOR="mediumturquoise"]0100 0000[/COLOR] |
| [COLOR="lime"]Bit 7[/COLOR] | [COLOR="magenta"]0x80[/COLOR] | [COLOR="yellow"]128[/COLOR] | [COLOR="mediumturquoise"]1000 0000[/COLOR] |
+---------------------------------+
Play around with the Windows calculator set to "programmers"; it'll be your best friend. You can manually toggle the binary bits on and off by clicking on them, which automatically adjusts the hex or dec figure (if set to hex or dec, respectively).
That's enough about binary, now let's talk about
Makou Reactor. If you want to learn about hacking, start here. Again, I'll go into as much depth as you need me to if and when you have queries on how to understand it, but it really is the best tool for looking into the field scripts of Final Fantasy 7. For some bizzare reason, the creator of Makou Reactor decided to use decimal instead of hexadecimal, so you'll end up spending a lot of time with your best friend, Mr Calculator, converting numbers from one to the other. You'll alsdo need to load up the flevel.lgp file found within the data file (C:\Program Files (x86)\Square Soft, Inc\Final Fantasy VII\data\field),
but for God's sake make a backup first!.
The only way to make heads or tails of MR (Makou Reactor) is to spend time with the
Savemap.
This will be your bible, however it is not completely mapped out yet, and I am currently undergoing the lengthy process of mapping out
every single bit of every single byte within the variable manager within MR. This is no small task, and it's because of the fact that I have spent so much time with cross-referencing the Savemap with MR that I was able to have a good idea of the cause of the problems that you have encountered. Might I also add, MR is the most exciting thing to happen to my
walkthrough, as I can now be more accurate and sure than I have ever been regarding.... well whatever really! I am no longer the one who asks the questions; I am the one who answers them!! (slight Heisenburg reference there
)
Now then, onto the Tiny Bronco. Yes, I could have just unticked the box that shows the Tiny Bronco's visibility, but where would the fun be in that??? Look at the
Savemap, and search for 0x0C23. This is the byte of data that deals with "transport visibility" (only 5 bits are used... that we know of). The Tiny Bronco is bit 2, and the Highwind is bit 4. Now then, open up Black Chocobo, load up the exact same save file that you sent me (if you still have it, if not just copy and paste your pastebin data) and go into the hex editor. Search for line 0C20. The line should look like this:
Code:
0C20 00 01 00 14 00 00 00 00 00 00 01 00 00 00 00 00
What you're actually looking at is 16 address, ranging from 0x0C20 to 0x0C2F:
Code:
C20 C21 C22 C23 C24 C25 C26 C27 C28 C29 C2A C2B C2C C2D C2E C2F
0C20 00 01 00 14 00 00 00 00 00 00 01 00 00 00 00 00
See how the address of C23 is set to 14 (hexadecimal)? Type 14 into your calculator whilst in Hex mode, and notice the binary placement:
0001 0100 - bit 2 and bit 4 are ON (Tiny Bronco and the Highwind's visibility). On the calculator, turn bit 2 off by clicking on the right-most
1, and notice how the hex value changes from 14 to 10. Go back into the hex editor in Black Chocobo, and change 0C23 from 14 to 10 (remember to count the first value in the sequence as 0 and not 1 - there are 16 values ranging from 0~15, or 0h~Fh). Now go into the world map tab, and notice how the Tiny Bronco has been disabled
Now then, to finalise the mega-post by answering your question directly - the very next address along, 0C24 is the bitmask that deals with some of North Corel's progression flags. On your save file, this was set to 0. In Makou reactor, 0x0C24 is variable [1] [128], and bit 0 is the "Barret's speech at the base of the ropeway" flag. You can see this variable in action within scripts "ropest #457" "drctr #1" "S0 Main" "line 43". Line 49 is the script that turns this flag on. You don't need a calculator to work this one out, turning Bit 0 ON, the LSB, is quite simply a value shift from 0 to 1. I changed the value of address 0C24 from 00 to 01, which turned on Bit 0, which means that when you enter the ropeway, the game's scripts reach label 9, then jumps straight to label 10 as the Bit check would now fail, thereby registering that the event has already happened.
Come to think of it, Label 8 is a check to see if game moment is higher than 433. If it is higher tan 433 (which on your save file it is), then the other members of the group will not appear. This is where your problem occurred. When Cloud runs over an "event" line ("#4 evline2" "S2"), the game triggers the ropeway scenes to occur, as Bit 0 is off, but due to the fact that the game failed the Game Moment check, there are no other characters set. Possibly. I haven't explored this scene as thoroughly as I could have done, so I may be wrong about it, but it's not really necessary to fully understand why, as this problem isn't common one given your debug room explorations. It does stand a good chance however that that's why your game was freezing.
Hope all this helps!!!