• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 27, 2024, 09:56:00 am

News:

Please use .png instead of .bmp when uploading unfinished sprites to the forum!


Help with Leonhart's Engine Hacks [SOLVED]

Started by evilGalo, September 10, 2023, 03:46:02 pm

evilGalo

September 10, 2023, 03:46:02 pm Last Edit: September 17, 2023, 01:01:32 pm by evilGalo Reason: Problem Solved
Hello, I am new to the forum and the truth is that I don't know anything about how hack rom programs work, I have been trying to modify my FFTA rom with Leonarth's Engine Hacks, but I don't know how to do it, so I would like to request your Help to do this, on Leonarth's GitHub page, there are the following instructions:

1. Download the project folder
2. Download Event Assembler, which includes the EA Formatting Suite, and extract it in the "Event Assembler" directory.
3. Download ColorzCore, rename it to "Core.exe" and use it to replace the "Core.exe" in the "Event Assembler" folder.
4. Optionally, get [ups] (https://github.com/rameshvarun/ups/releases) and extract the "ups" folder to the root directory.
5. Place your US FFTA clean ROM in the root directory, it must be named "FFTA_clean.gba".
6. Modify "ROM Buildfile.event" to customize, enable or disable features as you wish.
If you are not using a clean ROM you will likely want to change the FreeSpace definition.
If you want to customize the features further, look for their respective installer in "Engine Hacks"
7. Run MAKE_HACK.cmd, which will run EA to generate "FFTA_hack.gba" using "ROM Buildfile.event"

I have done everything up to step 5, in step 6 it says to modify "ROM Buildfile.event" to activate or deactivate the mods you want, but I don't know how to do that, is it with the "Event Assembler" program? If so How do I see the mod options? When I open the program a window appears to me to select a file and a rom, but I also get an error window that says "the core file cannot be loaded" if I press continue it lets me use the program, but I don't know what to do Next, I need to saver the modded Rom Buildfile.event file after? could someone guide me? Excuse my ignorance on hacking issues, thank you in advance.
  • Modding version: Other/Unknown

Leonarth

Use your favorite plain text editor to edit "ROM Buildfile.event".
It's just a text file.

To comment out a line, add "//" in front of it, and delete the "//" in front if you want to do the opposite.
  • Modding version: Other/Unknown

evilGalo

September 11, 2023, 05:22:34 pm #2 Last Edit: September 13, 2023, 06:17:38 am by evilGalo
Quote from: Leonarth on September 11, 2023, 05:28:13 amUse your favorite plain text editor to edit "ROM Buildfile.event".
It's just a text file.

To comment out a line, add "//" in front of it, and delete the "//" in front if you want to do the opposite.

ohh, I see, let me see if I understand, I opened the file in notepad++ and now I see the options, some have "//" next to the option name, but some come with "//" at the beginning and at the end of the option, for example the following lines come like this:

#define skipIntroCutscene //makes the game jump straight to the push start screen

//#define stealShoes //allow shows to be stolen by the steal accessory ability

If I want to use an option, should I remove "//" at the beginning of each option? And if I want to disable an option, should I add the "//" at the beginning of the option?

For example, if I want to disable the previously mentioned options, I must change them like this?:

//#define skipIntroCutscene //makes the game jump straight to the push start screen

//#define stealShoes //allow shows to be stolen by the steal accessory ability

And for activate them should I change like this?:

#define skipIntroCutscene //makes the game jump straight to the push start screen

#define stealShoes //allow shows to be stolen by the steal accessory ability

Or should I remove the "//" ones at the end of the option too?

After that, do I use MAKE_HACK.cmd to apply the changes to the rom? I don't need use Event Assambly at all? And another question, after Patching the rom with the mods I want, can I apply another ups/ips Patch on the rom with your hacks?, like the Mission Item fix 1.0a of rrs_kai?

Thanks for your response and help creator, I really don't know anything about hacking and modding, but I really love your hacks, especially the no variance stats ones, so I don't have to worry about stats anymore. Thanks in advance.
  • Modding version: Other/Unknown

Leonarth

QuoteIf I want to use an option, should I remove "//" at the beginning of each option? And if I want to disable an option, should I add the "//" at the beginning of the option?
Yeah, that's it. Any "//" after the first one are there for actual comments written for humans to read, as opposed to commented out instructions for Event Assembler.

QuoteAfter that, do I use MAKE_HACK.cmd to apply the changes to the rom? I don't need use Event Assambly at all?
You run MAKE_HACK.cmd and it runs Event Assembler for you, as well as anything else that needs to run.

QuoteAnd another question, after Patching the rom with the mods I want, can I apply another ups/ips Patch on the rom with your hacks?
No. You cannot blindly apply a patch like that to a modified ROM because the patch will try to write to specific places in the file, which may now have been changed. If you tried to do this your patching application would probably warn you that the file does not match what is expected by the patch file.
In order to combine patches like this you can either recreate them in event format or make sure there's no conflicts (either because there just weren't any to begin with, or because you modified the events in order to avoid them), neither of which is very straightforward to do.

You can turn an .ups patch into an event file with a tool called CUPS, but even then you'd have to check for conflicts by adding PROTECT statements and such. The source for CUPS is available, so one could modify it so that it generates PROTECT automatically, in which case you'd simply need to include it first in the buildfile for it to either work or throw an error if there's a conflict, so I guess that'd be the straightforward solution, if someone went and did it.
  • Modding version: Other/Unknown

evilGalo

Quote from: Leonarth on September 15, 2023, 06:06:49 amYeah, that's it. Any "//" after the first one are there for actual comments written for humans to read, as opposed to commented out instructions for Event Assembler.
You run MAKE_HACK.cmd and it runs Event Assembler for you, as well as anything else that needs to run.
No. You cannot blindly apply a patch like that to a modified ROM because the patch will try to write to specific places in the file, which may now have been changed. If you tried to do this your patching application would probably warn you that the file does not match what is expected by the patch file.
In order to combine patches like this you can either recreate them in event format or make sure there's no conflicts (either because there just weren't any to begin with, or because you modified the events in order to avoid them), neither of which is very straightforward to do.

You can turn an .ups patch into an event file with a tool called CUPS, but even then you'd have to check for conflicts by adding PROTECT statements and such. The source for CUPS is available, so one could modify it so that it generates PROTECT automatically, in which case you'd simply need to include it first in the buildfile for it to either work or throw an error if there's a conflict, so I guess that'd be the straightforward solution, if someone went and did it.

I see, thank you very much for answering! Using another patch on the already patched rom sounds very complex to me, because I don't know anything about hacking, but from what you say, I could try it and it should work if there is no conflict, otherwise I think I will only settle for your hacks and use other codes like gamesharks if I miss an important item or character.

Just one more question, could you explain a little about the new level up hack? In the file it mentions that when a unit spawns, it does so with predetermined stats but with the average stats, what does that mean (the average part)? Also, will those stats be the same regardless of the job? Or will they only be the same when they are the same job and will they vary from one job to another?, It also says that the maximum level goes to be 99, but that's also for enemies, right? And also about removing the stat variance, does that mean that when a unit levels up it does so with the highest possible stats?

Thanks in advance, Creator.
  • Modding version: Other/Unknown

Leonarth

Quote from: undefinedIn the file it mentions that when a unit spawns, it does so with predetermined stats but with the average stats [...] does that mean that when a unit levels up it does so with the highest possible stats?
The stats will be average for the job the unit spawned as, and they will remain the average when leveling up, not the lowest, not the highest. Let's use soldier as an example:
Soldier has an HP growth of 8.4, a soldier that spawns at level 1 would normally get an extra 8 hp, with a 40% chance to get another point (and so 60% to not get more than 8 points). A soldier spawning at level 2 would normally get 16 extra hp, with a 16% chance to get 2 more points and a 48% chance to get 1 extra point instead (so, 36% chance to not get anything over the guaranteed 16).
If your unit is unlucky they can keep missing these extra points, if they are lucky then they'll be extra buff instead, the difference in hp between two soldiers of the same level (that have never had a different job) can be as high as their level.

With the hack it no longer works that way. Instead, at level 1 the soldier would get 8 points, always, and the 0.4 is essentially saved for the future. At level 2, the soldier would get another 8 points (so, 16 total), we add the 0.4 to the reserve, so we are sitting on 0.8 extra points now. By level 3 the soldier gets yet another 8 points, and another 0.4 leftover points, which brings the leftovers up to 1.2, so the soldier gets an extra point and the reserves go down to 0.2. This way there will never be a difference in hp for two soldiers that have never had a different job.

As a different example, if you had a level 1 soldier you would get a 0.4 of hp saved for future level ups, if you now change jobs to paladin and level up, since paladin has a 7.6 hp growth, we would add 0.6 to the reserve, which comes up to 1 and so the reserve goes down to 0 and an extra point is granted.

Or at least that's how I remember designing it.


Quote from: undefinedAlso, will those stats be the same regardless of the job?
The stats a unit spawns with are 100% based on the job they spawn as, so... No?
The stats depend on the job.


Quote from: undefinedOr will they only be the same when they are the same job and will they vary from one job to another?
If they spawn as the same job, at the same level, they'll have the same stats, if they spawn as different jobs then they won't have the same stats, even if you change their jobs to match after having recruited them.

The game makes no difference between spawning and leveling up, when a unit spawns at level 50 it just spawns and goes up 50 levels one by one. If you change jobs then you change the level up bonuses a unit can get, but you do not change the points they already got.


Quote from: undefinedIt also says that the maximum level goes to be 99, but that's also for enemies, right?
Sure.
  • Modding version: Other/Unknown

evilGalo

Quote from: Leonarth on September 16, 2023, 12:39:31 pmThe stats will be average for the job the unit spawned as, and they will remain the average when leveling up, not the lowest, not the highest. Let's use soldier as an example:
Soldier has an HP growth of 8.4, a soldier that spawns at level 1 would normally get an extra 8 hp, with a 40% chance to get another point (and so 60% to not get more than 8 points). A soldier spawning at level 2 would normally get 16 extra hp, with a 16% chance to get 2 more points and a 48% chance to get 1 extra point instead (so, 36% chance to not get anything over the guaranteed 16).
If your unit is unlucky they can keep missing these extra points, if they are lucky then they'll be extra buff instead, the difference in hp between two soldiers of the same level (that have never had a different job) can be as high as their level.

With the hack it no longer works that way. Instead, at level 1 the soldier would get 8 points, always, and the 0.4 is essentially saved for the future. At level 2, the soldier would get another 8 points (so, 16 total), we add the 0.4 to the reserve, so we are sitting on 0.8 extra points now. By level 3 the soldier gets yet another 8 points, and another 0.4 leftover points, which brings the leftovers up to 1.2, so the soldier gets an extra point and the reserves go down to 0.2. This way there will never be a difference in hp for two soldiers that have never had a different job.

As a different example, if you had a level 1 soldier you would get a 0.4 of hp saved for future level ups, if you now change jobs to paladin and level up, since paladin has a 7.6 hp growth, we would add 0.6 to the reserve, which comes up to 1 and so the reserve goes down to 0 and an extra point is granted.

Or at least that's how I remember designing it.

The stats a unit spawns with are 100% based on the job they spawn as, so... No?
The stats depend on the job.

If they spawn as the same job, at the same level, they'll have the same stats, if they spawn as different jobs then they won't have the same stats, even if you change their jobs to match after having recruited them.

The game makes no difference between spawning and leveling up, when a unit spawns at level 50 it just spawns and goes up 50 levels one by one. If you change jobs then you change the level up bonuses a unit can get, but you do not change the points they already got.

Sure.

I see, I understand better, it is a perfect system for me, I have already been able to apply the hacks to the rom, maybe I will try to apply another patch on it later.

Thank you for the answers and for your help creator.
  • Modding version: Other/Unknown