lushen124 / Universal-FE-Randomizer

Properly universal this time.
MIT License
98 stars 28 forks source link

Fe4 Random Blood Growth Bonuses: old bonuses still being applied #159

Open koumal8 opened 5 years ago

koumal8 commented 5 years ago

When randomizing Holy Blood Growth Bonuses it seems old bonuses are still being applied. Julia got randomized into an Axe Knight with Major Neir and Minor Naga and none of these two bloods give Def growth bonuses, yet her Def growth is 60%. Same thing happened with Ares where he has a 60% Spd growth and Major Forseti, but random Forseti does not grant bonuses to Spd growth. Changelog is attached. This happened to every character with Major Blood.

https://www.dropbox.com/s/1ccsos0lq6m9bw2/FE4Random.html?dl=0

lushen124 commented 5 years ago

This is actually expected in the current logic, but that might just mean the current logic is undesirable. I'll look into changing it, but it's a fundamental difference in how the randomizer works. The idea was that each step was self contained so that any combination of settings was workable without me having to make specific logic to account for specific combinations.

To explain the issue, class randomization does everything by itself assuming no other settings are used. This means that growths are adjusted when blood is randomized by itself. That's why Major Neir will give you 60% DEF growth and Major Forseti will give you 60% SPD growth. Even if they change later, the original total growth for that character will have been overwritten when class randomization is done, and the character doesn't "remember" what its original blood was when it comes to blood randomization. The change would be to handle blood differently in that, all of the growth adjustments are performed at the very end after all the randomization steps have been done and the character would know only what its original blood was and what its final blood is, and the bloods "remember" what their old growth bonuses are to adjust properly.

To step through this, let's take Major Neir Julia. During the class randomization step, we randomize her Naga blood to being Neir, which means we have to add Naga bonuses into her personal growths and then subtract Neir bonuses from the result to arrive at her new personal growths. This writes her new personal DEF growth as 0% because she doesn't have enough growth normally to maintain what Neir would have given, so it becomes 0% + 60% DEF. Then when we randomize blood bonuses, it doesn't know that Julia used to have Naga blood, because we already overwrote that. We also already adjusted the growths once so it also doesn't know that Julia used to have 10% DEF growth. It only sees the current state of Julia, which is Major Neir with 0% + 60% DEF growth.