Yeah, I figured this out this evening. Basically, here is what you need to do :
1) Find the field file you want to edit (the list in my first post in this topic is great for that), and open it with Meteor.
2) Find the dialog in which you'd like to get the item. Once you found this particular dialog (example : Johnny's father, in sector 7, saying "Ha ha ! I wonder <bla> <bla> <bla>"
3) Take note of this dialog's ID. In this case, this is message #06 in the file 'min71'
4) Go into the Entities & Script tab, and look for the code that calls this message #06. Since apparently Johnny's father is called Oyaji, you'll find this code in this name's second script. It reads like this :
WSIZW (00,08,00,A0,00,0C,01,39,00)
MESSAGE (00,06)
SETBYTE (50,18,01)
TURNGEN (00,40,02,0A,02)
UC (00)
MENU2 (00)
What I did, was to replace message #06, in the dialog tab, with something like "My son wanted you to have this Earth materia. Please, take it", and then add two new lines in the script code. Those are :
WSIZW (00,08,00,A0,00,0C,01,39,00)
MESSAGE (00,06)
SMTRA (00,00,33,00,00,00)
SOUND (00,EA,01,40)SETBYTE (50,18,01)
TURNGEN (00,40,02,0A,02)
UC (00)
MENU2 (00)
the SMTRA command adds a materia to the party's inventory. The "33" you see is the Earth materia's index. You can figure the index out by opening Wall Market, click on the Materia tab, and select the Earth materia. Near the top of the window, it says
Materia ID: 51. You just need to convert this decimal value in hex (with your calc in scientific mode) to find out that 51 is 33h. As for the 00,00,00 after the materia's ID, they are for its AP (in case you want Johnny's Earth materia to already have some).
As for the SOUND command, it's here to play that neat little sound you hear when you pick up a materia
Now, if you want the guy to give you one (or more) item instead of the materia, you can use these values :
SOUND (00,68,01,40) --> this is the sound when you pick up an item
STITM (00,21,01,01) --> this is the code for adding an item to your inventory. "21" is the item's index, and the first "01" is the item type. There are two item types, as far as I know :
-
00, which is for items like Potions, sources, grenades, ... and
-
01, which is for equipment and accessories. So, the item ID will point to different items whether you put 01 or 00 in that third byte. In my example (00,21,01,01), since this third byte is 01, I'm telling the game to go look for a piece of equipement. And ID 21, in the equipment list, is a Protect Vest.
As for the last byte, it is the number of items. Put 03 instead of my 01, and you get 3 Protect Vests
...But there's one
little problem : adding new bytes mess with the jumps. In other words, if you do what I said, talking to Johnny's father a second time will freeze the game. I haven't tested this, but I think you'd have to update all the JMP scripts by adding the number of bytes you wrote to the value between parenthesis, just above. In other words, the
JMPF (18), just above the code I quoted, is now incorrect. I *think* (don't take my words on this, I'm no expert in this field) that you'd have to add 10 (I added 10 new bytes) in my materia example, so the program effectively "jumps" above this portion of code. So, you should type JMPF (28). But it's just my theory and I haven't tested it, yet. Bottom line is : don't kill me if I'm wrong
Also, final note and my wall of text ends, promised : why did I use this particular dialog ? ...Well, it's because Johnny's father says this text only once. If you talk to him again, he'll say something else. This is important, because if you add an item in a dialogue you can repeatedly access, then you'll get the item each time you talk to this particular NPC. No good.