• Welcome to Final Fantasy Hacktics. Please login or sign up.
 
April 23, 2024, 10:23:19 pm

News:

Don't be hasty to start your own mod; all our FFT modding projects are greatly understaffed! Find out how you can help in the Recruitment section or our Discord!


Any way to alter a new recruit's base stats in FFTA?(GBA)

Started by Retro2DGamer, November 07, 2022, 04:36:52 pm

Retro2DGamer

Specifically, I'm looking for a way to maximize Speed within the confines of the vanilla game's allowable stats, and it seems like it could be done by only modifying a few values in code.

Recruiting a level 2 Assassin with 146 speed that I can nurture up to level 50 with 290 speed? Or recruiting a level 2 Ninja with 141 speed that could be leveled to 285? That's my goal!

I should also say that I've never done any game hacking before, so apologies in advance. But I have looked at enough in-depth guides that I understand how a new recruit's stats are generated.

Generally speaking, stats have a base (level 1) value which can vary from 95% to 115%. For example, a Ninja has a base speed of 120, but that can vary from 114 to 138. The actual process of getting base stats is as follows...

x = [Base Stat / 20]
r is a Random Number from 0 to 2X
y = (r 1+ r 2- r3 - r4) / 2

Final Base Stat = Base Stat + X + Y

So for an assassin with 125 Base Speed.

x = 125 / 20 = 6.25 which is rounded to 6 since it only uses the integer.

r is 0 to 2x or 0 to 12, each with an equal chance of being generated.

Best case for y is (12 + 12 - 0 - 0) / 2 or 12.
So the best level 1 starting speed for an assassin is 143. But the chances of actually getting that are extremely low, 1 in 28561 to be exact since the four random numbers have been perfect.

TL;DR
Is there a way to modify the four random numbers that go into generating a new recruit's starting stats? The perfect sequence would be 12, 12, 0, 0.
  • Modding version: Other/Unknown

Leonarth

In a USA copy, go to offset 0x2838 of the ROM (or offset 0x8002838, if you are looking at the entire memory), then change 0x70 0xB5 to 0x70 0x47.
  • Modding version: Other/Unknown

FlamingZelda

What does this edit do? I tried it and the recruited unit still had stat variance. (jobs growths were set to whole numbers so no variance there)
  • Modding version: Other/Unknown

Leonarth

The change just makes the game return straight away from the routine that gets the 4 random numbers.

Either way, what I didn't realize is that the result is actually substracted from the stat, so to get the best result you would need to write 0x40 0x42 0x70 0x47 (at 0x8002838) to make the starting value (op's 2x) negative, so that it is effectively added to the stat instead of substracted, then the routine returns.

So, yeah, the change was effectively making the stat variance the worst value possible. Either way I'm not sure why you said that "the recruited unit still had stat variance", though, the intention was never to remove the stat variance, it was to maximize it.
  • Modding version: Other/Unknown

FlamingZelda

Because I saw values which were not the highest values possible, I assumed that the unit had undergone normal variance. That was a mistake on my part.
  • Modding version: Other/Unknown