Author Topic: Editing the in game menu  (Read 4111 times)

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Editing the in game menu
« on: 2016-02-20 16:41:22 »
Im not sure if there is a section for this already but how would i go about doing this? By in game menu i mean the one that pops up when you press triangle, just so theres no confusion. Id love to be able to move it around and customize it

DLPB

  • No life
  • *
  • Posts: 8237
  • Karma: 222
  • Shoot For Solar Value
    • View Profile
Re: Editing the in game menu
« Reply #1 on: 2016-02-20 17:03:51 »
All has to be done via hex editing. Manually.  You will need to know basic x86 assembly and have a debugger to hand.

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #2 on: 2016-02-20 17:05:33 »
ok, any chance i can get an in depth description or a step by step sorta thing to help out, once i know what to do i can go do it. Like the hex edit stuff im not sure on how it works, i have the exe's and stuff but messing around with it blindly probably isnt a good idea.

DLPB

  • No life
  • *
  • Posts: 8237
  • Karma: 222
  • Shoot For Solar Value
    • View Profile
Re: Editing the in game menu
« Reply #3 on: 2016-02-20 17:12:31 »
I don't have the time to start teaching basic assembly and what not - but we did document a lot of the addresses used. 

You can download those HERE

Reunion R04c corrects thousands of alignment issues with the original menu.  R03 has a graphical overhaul with a new font.


Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #4 on: 2016-02-20 17:15:52 »
Nah the coding and assembly stuff I'll get myself. I meant like a step by step just in what to do with the exe on to what hex edit and what folder are things in after that

DLPB

  • No life
  • *
  • Posts: 8237
  • Karma: 222
  • Shoot For Solar Value
    • View Profile
Re: Editing the in game menu
« Reply #5 on: 2016-02-20 17:18:35 »
All menu item x y positions are in the exe.  Graphics are in menu_us.lgp  (you can use aali's driver to bypass this with png files).  I forget the folders needed....  You may be better installing Reunion R03 (not version 4)  - and that will give you a structure.

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #6 on: 2016-02-20 17:22:14 »
OK well I got the Idea mainly from a YouTube video I found done with video editing alone and wondered if it was possible. Like you mentioned there all I need is to change the png from boxes to whatever I decide and alter the x.y.z coords for the buttons. That's perfect

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #7 on: 2016-02-20 17:25:30 »
Here's the idea video I found https://m.youtube.com/watch?v=bKVKLPB8llo

DLPB

  • No life
  • *
  • Posts: 8237
  • Karma: 222
  • Shoot For Solar Value
    • View Profile
Re: Editing the in game menu
« Reply #8 on: 2016-02-20 17:31:23 »
The answer is largely no. That would require huge changes to the engine and additional graphics and assembly.  If you have an enormous amount of time on your hands... and are adept in assembly... maybe.

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #9 on: 2016-02-20 17:34:27 »
I don't so much want to copy this. Like the battle I'm leaving. I have ff9 with coloured tabs and I'm happy. I just wanna know how to open up the game so that video could be possible.

paul

  • Crazy poster
  • *
  • Posts: 179
  • Karma: 33
    • View Profile
Re: Editing the in game menu
« Reply #10 on: 2016-02-21 10:52:03 »
I don't so much want to copy this. Like the battle I'm leaving. I have ff9 with coloured tabs and I'm happy. I just wanna know how to open up the game so that video could be possible.

You could do something like this, but you'll probably need to rewrite most of the menu system. Given the way the engine works this is possible but will take a lot of time and effort. Each module of the game is a struct with some pointers for like OnKey, OnUpdate, OnRender etc. So you'd have to reverse those, load a DLL that overwrites the menu module functions with your own. And then write your new menu system.

I'm doing something a bit like this for Metal Gear Solid 1: https://github.com/paulsapps/msgi this aims to fully reverse the game though, improvements to come later (apart from things that are required to actually make the game boot/use hardware rendering).

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #11 on: 2016-02-21 14:23:30 »
Its great that its do-able but im still clueless really, im going in to this blind willing to learn whats needed and take as much time as needed. I dont know how to get TO the folders with the details in let alone edit any of them, i was first hoping it was a simple png type thing haha

Kaldarasha

  • No life
  • *
  • Posts: 1993
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: Editing the in game menu
« Reply #12 on: 2016-02-21 15:57:48 »
 the best solution I can think of is to create an overlay to replace the menu. At the start I would place the new menu over the existing one and at the end I would try to disable the original UI  and adding additional features. The advantage of this would be an entirely outsourced and global UI of which we have full control of.

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #13 on: 2016-02-21 16:18:40 »
Yeah that sounds like a great idea. Hate to say the same things again but I still don't know where to start. I literally need a 'for idiot's sorta guide or instructions to start me off

paul

  • Crazy poster
  • *
  • Posts: 179
  • Karma: 33
    • View Profile
Re: Editing the in game menu
« Reply #14 on: 2016-02-22 20:28:25 »
the best solution I can think of is to create an overlay to replace the menu. At the start I would place the new menu over the existing one and at the end I would try to disable the original UI  and adding additional features. The advantage of this would be an entirely outsourced and global UI of which we have full control of.

If you replaced the menu module of the game this is exactly what you'd have. @Tsunamix you need to write a DLL that injects itself and takes over the menu module -i.e replaces the function pointers in the module struct with your own for rendering, input etc.

rcxrdx started doing some work on FF8 here, it would be something like this:

https://github.com/rcxrdx/FF8Modding/blob/master/src/Hooks.cpp

Apart from you are only interested in the menu module, access to the script vars (someone will already know all of the var addresses for these things), and the rendering API (again must be known since there is a custom opengl renderer dll).

Edit: Don't forget ergonomy_joe has fully reversed most of the game to source already: http://magnetiktank.blogspot.co.uk/

This is probably all the info you need.
« Last Edit: 2016-02-22 20:32:11 by paul »

Kaldarasha

  • No life
  • *
  • Posts: 1993
  • Karma: 118
  • Prince of Model Editing
    • View Profile
Re: Editing the in game menu
« Reply #15 on: 2016-02-22 20:41:53 »
If you replaced the menu module of the game this is exactly what you'd have.

Not exactly because the text input isn't handled by the menu. I probably would outsource it to the UI and would use strings to add a high mod compatibility support. However I'm not a programmer and can't do it (but I'm good in giving inspiration and ideas. ::))
« Last Edit: 2016-02-23 19:30:32 by Kaldarasha »

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #16 on: 2016-02-23 17:18:17 »
Thanks guys every bit of information I get helps me alot. Appreciate it, thanks

paul

  • Crazy poster
  • *
  • Posts: 179
  • Karma: 33
    • View Profile
Re: Editing the in game menu
« Reply #17 on: 2016-02-24 17:36:40 »
Not exactly because the text input isn't handled by the menu. I probably would outsource it to the UI and would use strings to add a high mod compatibility support. However I'm not a programmer and can't do it (but I'm good in giving inspiration and ideas. ::))

The text input IS handled by the menu module! Trust me, replacing the menu module with your own would allow you to create the one seen in the youtube video. You'd have your own input handling, for rendering just make your own GL context and give the game engine a textured quad as the output. You'd need a few other hooks into the game to read the script vars etc.

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #18 on: 2016-02-24 18:01:33 »
Sounds good. I've managed to get into the exe and find all the numbers and stuff. And I have a good list of what all the numbers and sections do. But do I change the actual exe or create a dll?  Plus I know now I think how yo move things but I don't know how to change the appearance of something. Like the general interface and what not

paul

  • Crazy poster
  • *
  • Posts: 179
  • Karma: 33
    • View Profile
Re: Editing the in game menu
« Reply #19 on: 2016-02-24 18:07:10 »
Sounds good. I've managed to get into the exe and find all the numbers and stuff. And I have a good list of what all the numbers and sections do. But do I change the actual exe or create a dll?  Plus I know now I think how yo move things but I don't know how to change the appearance of something. Like the general interface and what not

https://github.com/paulsapps/OpenFF7/blob/master/src/OpenFF7.cpp

You can use this as a base. It compiles to a dll called ddraw.dll - when placed in the same dir as ff7.exe it will load the fake ddraw.dll instead of the real one. This can be used as the entry point for hooking the menu module functions and  replacing them with your own.

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #20 on: 2016-02-24 18:14:34 »
https://github.com/paulsapps/OpenFF7/blob/master/src/OpenFF7.cpp

You can use this as a base. It compiles to a dll called ddraw.dll - when placed in the same dir as ff7.exe it will load the fake ddraw.dll instead of the real one. This can be used as the entry point for hooking the menu module functions and  replacing them with your own.

Awesome you really do come in handy, Ill check this asap

paul

  • Crazy poster
  • *
  • Posts: 179
  • Karma: 33
    • View Profile
Re: Editing the in game menu
« Reply #21 on: 2016-02-28 21:42:22 »
Any update on this?

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #22 on: 2016-02-28 22:54:12 »
Unfortunately no not yet, i have a friend that has a fair bit of knowledge on hex the hex editing and basic assembly work so im waiting on him to get some free time.

Tsunamix

  • Insane poster
  • *
  • Posts: 482
  • Karma: 8
  • Check out my work - https://goo.gl/m4NFlm
    • View Profile
    • The home of Tsunamods
Re: Editing the in game menu
« Reply #23 on: 2016-03-03 04:16:45 »
Hey guys, right umm ive been doing tons of research with this and im beginning to grasp tile mapping, which file does what and the basic assembly. What im struggling with or at least i think is .. the dll file you sent me Paul to replace the original, What exactly do i do with it, do i delete all the text and call references or do i need to keep some? From what i cam tell the graphics are in btl_win_h.tex but im unsure, also im looking in the menu overhaul mod to get an idea of how things work and i dont understand how we separate the textures into different bmp's and call them to a specific command in script. How can i just add a bmp/png whichever, name it something and have it called to different modules (menu, equip, limit ect) just a single pic like buster_00. Im fairly sure with a lot of google'ing ive managed to find the right number thingys in the exe for specific text/avatars but not the cursor or cursor shadow when selecting a specific text. Again with the config menu i dont know where or how the window colour operation is performed and it doesn't lead me to anything. I dont  know if any of this makes sense i don't really understand it myself nevermind explain it to anyone else.

paul

  • Crazy poster
  • *
  • Posts: 179
  • Karma: 33
    • View Profile
Re: Editing the in game menu
« Reply #24 on: 2016-03-05 18:21:29 »
Hey guys, right umm ive been doing tons of research with this and im beginning to grasp tile mapping, which file does what and the basic assembly. What im struggling with or at least i think is .. the dll file you sent me Paul to replace the original, What exactly do i do with it, do i delete all the text and call references or do i need to keep some? From what i cam tell the graphics are in btl_win_h.tex but im unsure, also im looking in the menu overhaul mod to get an idea of how things work and i dont understand how we separate the textures into different bmp's and call them to a specific command in script. How can i just add a bmp/png whichever, name it something and have it called to different modules (menu, equip, limit ect) just a single pic like buster_00. Im fairly sure with a lot of google'ing ive managed to find the right number thingys in the exe for specific text/avatars but not the cursor or cursor shadow when selecting a specific text. Again with the config menu i dont know where or how the window colour operation is performed and it doesn't lead me to anything. I dont  know if any of this makes sense i don't really understand it myself nevermind explain it to anyone else.

Sounds like you're better building a replacement menu outside of the game, then add it into the game later?