Some quite wide-ranging questions there. There's plenty to read about the internal workings on this forum, specifically the Tech-Related area may help, and possibly the
Wiki. You also don't state whether you're coming from a technical background or not, so I'll just pitch what I've got to say fairly generally.
Dialogs for characters changing is fairly simple, but it requires a brief discussion of the scripting language in FF7. This scripting language allows a field script programmer to code in all the actions you'll find on a field (by field, we mean each individual screen you can walk into and explore) - be it character interactions, windows, dialogs, animations, and so on - that you'll find in the game. This is a fairly broad subject in itself, but there are some basics in
Qhimm's doc and some important information on how the memory banks and addresses work in
halkun's doc (the actual codes, we know more about; check
the Opcode list). More importantly for your case it allows you to check parts of memory that might correspond to certain events (more later).
To display a dialog you'll first
create a window, then either
display it with a particular dialog from the field's list, just as a regular message, or you might want it to be a
list of several choices the user can select. For this, the result of the user's selection is stored in memory (see halkun's doc).
If you want to display a dialog depending on what's happened in the game, you'll need to check an area of memory using the
if statements which operate just like you'll find in many programming languages. This area of memory will be set by the game when the player makes the aforementioned choice. Let's say the player completes a certain side-quest; subsequently, the area of memory corresponding to that side-quest is
set (or perhaps a particular bit is
set to 1). We might want the NPCs to talk about the outcome of that side-quest, so we display the dialog relating to it if the user has completed it - that is, that quest's memory location is set to 1. Otherwise, the if-check fails, and the NPCs won't talk about it.
There's one more important thing to note here in relation to checking memory, and that's the Plot Progression Variable (PPV). To be specific (and as far as I know), this is stored in bank 2, address 0. This variable is adjusted throughout the game and is checked over the course of many fields to see how far the player has progressed through the game and again may cause different things to happen. In FF7's case, this is most obvious during the later part of the game when Meteor is hovering above the planet; characters talk about the end of the world coming, for example. This is accomplished, as explained above, by checking a variable, and in this case it's the specific address for the PPV (rather than some other location for a side-quest) and seeing if it's greater than a certain amount. Here's an example taken straight from Wutai when you talk to the man walking around on the left near the shop:
if(<2>[0] >= 3F0) // Check PPV to see if Meteor event has occured
{
CreateWindow(2,78,87,D0,39)
Dialog(2,E) // Talk about end of the world (dialog 0xE)
}
else
{
if(<3>[BD] & 40) // Check if we're on the Yuffie sidequest
{
CreateWindow(2,78,87,D2,39)
Dialog(2,B) // Talk about Yuffie (dialog 0xB)
}
else // It's neither Meteor time, nor are we on the sidequest, and so....
{
CreateWindow(2,78,87,D9,29)
Dialog(2,6) // ...just general chatter, this one is about Lord Godo in his house (dialog 6)
}
...
}
NPCs walking about is also handled by the scripting system. Each NPC is represented by an entity that contains a set of scripts relating to that NPC, and each script has a particular function; for example, the first one is an initialisation script, the second is run if a button is pushed while standing near the entity, and so on. Here we might set up the starting location of said character, its orientation, and so on (but again, thanks to the script, characters may start in different locations depending on the events the player has triggered in the past). We also might set up animation for that entity, such as
move them to a particular point,
wait there, then move again. Chaining these moves obviously allows the appearance of following a predefined path and you can loop a walk path indefinitely by
jumping back to the beginning of the script. Again, from the same Wutai man:
Wait(5A)
Move(0,53,F6,2,5)
Move(0,47,F7,C2,5)
Move(0,A9,F8,8F,5)
Wait(78)
Move(0,11,F7,8F,5)
Move(0,E,F7,7C,4)
Move(0,7F,F5,EE,4)
Wait(46)
Move(0,45,F4,5C,6)
Move(0,82,F5,F8,5)
There are, perhaps not surprisingly, a large number of commands for animation and moving, with many different variants involving animations/no animations while moving, animations stopping or looping, animation speeds, movement speeds, and so on.
Hope that helps a little. For further reading in this area if you're interested, check the Wiki, search the forums, and if you have FF7 for the PC grab my
app here, which I used to pull out the scripts above (not a shameless plug, honest, just think it might help).
Whilst I can't help much with the battle system, since I've barely looked into it, you may want to check out this (very large) guide to the Battle Mechanics by Terrence Fergusson. You can find it here:
http://db.gamefaqs.com/console/psx/file/final_fantasy_vii_enemy_mech.txt - but you will need to visit once then copy and paste the link into the address bar again as it doesn't like hotlinking. A more knowledgeable soul from the board may also want to help you out with that area.