A theory about menus I'd like some help with

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
N

nfitc1

Guest
How difficult would it be to add a menu item to the in-game menu? The text probably isn't hard, but what about linking it to a function.

For now I'm thinking about the PC version.
 
How difficult would it be to add a menu item to the in-game menu? The text probably isn't hard, but what about linking it to a function.

For now I'm thinking about the PC version.
Well I can tell you that in the English version of ff7.exe, you can find the string array of the menu item names at 0x5192C0 ~ 0x51939B. (You can consistently find it by searching for "30 28 33" -- PHS). Each String is allocated 20 bytes of memory, and there's exactly enough room for the 11 strings, but they're part of a larger array of general strings used in the menu, so it might not be hard to extend the array by 1 element and cram some text into 0x51948C...

As for actually adding it in, AFAIK, there isn't room for another item in the menu context, so one would either have to figure out how to shove the texts closer together or extend the blue menu window further down the screen. I'm not exactly sure, but I think Aali might have some control over things like that with his driver:
I control what gets rendered where
Adding a function would be quite difficult. I don't see it being a possibility within the confines of hex editing as increasing the filesize throws off all sorts of flow control. I think that perhaps somebody in the QGears project might have a better idea than me, but if you can find out where those strings I mentioned earlier are referenced in the exe, that might be a start...

Just out of curiosity, what would you want the new menu item to do?
 
How difficult would it be to add a menu item to the in-game menu? The text probably isn't hard, but what about linking it to a function.

For now I'm thinking about the PC version.
Well I can tell you that in the English version of ff7.exe, you can find the string array of the menu item names at 0x5192C0 ~ 0x51939B. (You can consistently find it by searching for "30 28 33" -- PHS). Each String is allocated 20 bytes of memory, and there's exactly enough room for the 11 strings, but they're part of a larger array of general strings used in the menu, so it might not be hard to extend the array by 1 element and cram some text into 0x51948C...
I anticipated that. 20 chars is more than any of them need. I was going to reduce the size of the array to, perhaps, 16 characters per entry. That'd leave me 44 characters at the "end". Again, this is all theory.

As for actually adding it in, AFAIK, there isn't room for another item in the menu context, so one would either have to figure out how to shove the texts closer together or extend the blue menu window further down the screen. I'm not exactly sure, but I think Aali might have some control over things like that with his driver:
I control what gets rendered where
Adding a function would be quite difficult. I don't see it being a possibility within the confines of hex editing as increasing the filesize throws off all sorts of flow control. I think that perhaps somebody in the QGears project might have a better idea than me, but if you can find out where those strings I mentioned earlier are referenced in the exe, that might be a start...

Just out of curiosity, what would you want the new menu item to do?
It's not even a new function. It would be easy to just have it point to the already existing function (which I also have to find). I'm just tired of something not being accessible when I think it should be. I'll leave it to your imagination for the moment. ;)
 
....Why don't you just create new points in towns and whatnot?

EDIT: Or make the crystal usable wherever
 
nfitc1, there are  visibility + lock mask bytes located in the save game file for the menu .  save map its in bank 1/2 offset 0xba4+ 28 (for visibility)  and 0xba4 +30 (for locking mask) , its on my list to allow editing of these , just not a priority right now.
 
Pretty sure there's an unused menu item in at least the PSX version that can be accessed by GS. Then again, I've never actually confirmed it.

If so, it would make your life far simpler.
 
There's the USO code....
Does the USO code exist on the PC ? i remember when i was making a hack to unlock all menu's (materia+phs+save) i found the text but i couldnt find the actual menu (this doesnt mean it doesnt exist it just means i couldnt find it), The only hidden menu i remember seeing was a blank screen where the "Order" menu should be (its just blank, no text since the order is done from the main menu)

EDIT- here is the Order Menu i mentioned above
 
Last edited:
USO is a forced PHS system.  You can switch ANYONE in and out of your party.  You can have just Young Cloud, or Sephiroth and Cait Sith.. or 3 Cid's... whatever combination you can think up
 
USO is a forced PHS system.  You can switch ANYONE in and out of your party.  You can have just Young Cloud, or Sephiroth and Cait Sith.. or 3 Cid's... whatever combination you can think up
Speaking of which, I've always wanted to be able to switch cloud out of the party, and to be able to choose how many characters to have in your party. It'd be fun to solo it up every now and again, or come up with combinations other than Cloud plus 2.
 
Speaking of which, I've always wanted to be able to switch cloud out of the party, and to be able to choose how many characters to have in your party. It'd be fun to solo it up every now and again, or come up with combinations other than Cloud plus 2.
you can use black chocobo to unlock cloud from the party (check him off in the "allowed in phs" box found under the others tab), but i don't think ne thing i do to the save file will allow for partys of <3 when ever you want.
 
USO is a forced PHS system.  You can switch ANYONE in and out of your party.  You can have just Young Cloud, or Sephiroth and Cait Sith.. or 3 Cid's... whatever combination you can think up
Speaking of which, I've always wanted to be able to switch cloud out of the party, and to be able to choose how many characters to have in your party. It'd be fun to solo it up every now and again, or come up with combinations other than Cloud plus 2.
Though about that too.
I also would like that the model on the worldmap would be the first person on the party. I want to go around as Vincent T_T
 
Does anyone know where the code for the menu items is? When I click on one, where does the executable decide what to do next?
 
i think i remember seeing that on the wiki or at least some info on it
 
im not sure exactly on what your looking for but i do know that the address
0x6C6AF1 mov eax,[00dc12ec]
is the menu instruction and the value there is the menu your on.
(also note that is the memory address, The address in the EXE is 0x2C5EF1)
 
Last edited:
im not sure exactly on what your looking for but i do know that the address
0x6C6AF1 mov eax,[00dc12ec]
is the menu instruction and the value there is the menu your on.
(also note that is the memory address, The address in the EXE is 0x2C5EF1)
Thanks for this. It helped a lot! I got very close to getting it right on my first try. :)
 
USO is a forced PHS system.  You can switch ANYONE in and out of your party.  You can have just Young Cloud, or Sephiroth and Cait Sith.. or 3 Cid's... whatever combination you can think up
Speaking of which, I've always wanted to be able to switch cloud out of the party, and to be able to choose how many characters to have in your party. It'd be fun to solo it up every now and again, or come up with combinations other than Cloud plus 2.
Though about that too.
I also would like that the model on the worldmap would be the first person on the party. I want to go around as Vincent T_T
I experimented with this for a while using a german save editor a while back. See here for more details. It also allows you to have just one character, but isn't really the best solution because some models don't have paths in certain places. I.e. "I want to control Vincent instead of Cloud" - he'll only show up on screens that his model was programmed to appear on. It still works in certain places though, every character is just treated like they're Cloud.
 
Thanks for this. It helped a lot! I got very close to getting it right on my first try. :)
I am glad it helped, I wasn't sure if that was what you was looking for or not.
Also i am not sure on this but the menu's may have 2 parts of code for each screen,
I was experimenting and found that there is a value for the menu then another value for the controls and name for that menu (for example even if you manage to change the code to the materia page to the magic page the controls for where the cursor would still be set for the materia page and and would make them not work).
But i could be completely wrong so dont take my word for it, I am not really a coder i am just somone with alot of time on his hands.

And on a side note i found 2 entries for the USO code but both seem to be dead ends on the PC version (or maybe i am doing somthing wrong), and they are not in the same place as they are on the PSX (proberly because the PSX doesnt have a quit menu like the PC so the USO code went there)
 
Status
Not open for further replies.
Back
Top