Hi there, I'm Golden. I'm looking into routing FF2 for the Famicom, and I'm stumbling over exactly how stat upgrades work. Specifically, I would like to know what causes your max HP and vitality to level up.
As it stands, there doesn't seem to be any pattern to when one of them levels up over the other; both of them appear to level up when you take a decent amount of damage from a fight. Sometimes they level up together, other times one levels up but not the other. When your maximum HP increases, it increases by a number of points equal to your vitality. Thus, for a speedrun, it would be extremely beneficial if it was possible to consistently level up both stats at the same time, as it would mean significantly fewer encounters required for the early game grind.
So far, I have the memory addresses for Firion's current HP (6108 and 6109), max HP (610A and 610B), and vitality (6112). While in battle, Firion's current HP is tracked at addresses 7D84 and 7D85. Aside from these addresses, I've tried looking at the assembly, but with the little knowledge I have I wasn't able to find anything conclusive. I was hoping to find values it might be comparing against your HP at the end of a battle. I do have a save state of the frame before your vitality increases, but beyond that I wasn't able to find any sort of comparison being made in the assembly.
Could someone maybe point me in the right direction as to what I might look for next? I don't expect anyone to just jump in and do the work, but I've gotten as far with it as I think I can.