1
General Discussion / Level-up stat increases
« on: 2019-05-29 13:08:03 »
Hi, I'm hoping someone can shed some light on how I'm misunderstanding the formulae described in Section 1.4 of the following guide:
https://gamefaqs.gamespot.com/pc/130791-final-fantasy-vii/faqs/36775
I think I have the primary and luck stat growth working just fine, however I am very confused about how HP/MP is calculated.
I am not getting very predictable results, which is a problem because according to the following wiki article:
https://finalfantasy.fandom.com/wiki/Final_Fantasy_VII_stats
The stats should be completely predictable (give or take).
Here is my specific C# code as I try to replicate it, my problem is I have no idea how to check where my steps are wrong because in the above guide, it doesn't really say what numbers to expect from different parts of the function...
https://gamefaqs.gamespot.com/pc/130791-final-fantasy-vii/faqs/36775
I think I have the primary and luck stat growth working just fine, however I am very confused about how HP/MP is calculated.
I am not getting very predictable results, which is a problem because according to the following wiki article:
https://finalfantasy.fandom.com/wiki/Final_Fantasy_VII_stats
The stats should be completely predictable (give or take).
Here is my specific C# code as I try to replicate it, my problem is I have no idea how to check where my steps are wrong because in the above guide, it doesn't really say what numbers to expect from different parts of the function...
Code: [Select]
int lv = 7; // The level we JUST achieved.
int hp = 314; // Our unchanged HP from level 6.
int b = 200; // Base from the current rank curve.
int g = 19; // Gradient from the current rank curve.
void IncrementPointsBase() {
// This seems to get my FROMLevel's HP just fine...
int baseline = b + ((lv - 1) * g);
// I don't know what sort of number I'm hoping to get from this...
int difference = Random.Range(1, 8) + (100 * baseline / hp) - 100;
// The guide says to cap the difference between 0% & 11%... of what? The difference? The current HP?
// I really don't understand this particular step.
int cappedDifference = (int)Mathf.Clamp(difference, 0, hp * 0.11f);