Formula for primary stats on level up?

Formula for primary stats on level up? - Person Holding Orange and White Iphone Case

I'm creating a stat level up calculator and was reading through this guide > https://www.gamefaqs.com/pc/130791-final-fantasy-vii/faqs/36775

For leveling up on primary stats, it says "This difference is then capped at 0 to 11 inclusive", however I see the number can be calculated above 11 when testing with my java code...

    // Dexterity
    int levelUp = 7; // cloud starting level(6)
    dex = 6; // cloud starting dexterity at level 6
    baseNumber = 6; // cloud rank curve is 6 (for dex), and is within 2-11 levelUp bracket, so 6 is the number on table
    gradient = 72; // cloud rank curve is 6 (for dex), and is within 2-11 levelUp bracket, so 72 is the number on table
    baselineStat = baseNumber + ((gradient * levelUp) / 100);
    randomStatDifferenceOne = 1 + baselineStat - dex;
    randomStatDifferenceTwo = 2 + baselineStat - dex;
    randomStatDifferenceThree = 3 + baselineStat - dex;
    randomStatDifferenceFour = 4 + baselineStat - dex;
    randomStatDifferenceFive = 5 + baselineStat - dex;
    randomStatDifferenceSix = 6 + baselineStat - dex;
    randomStatDifferenceSeven = 7 + baselineStat - dex;
    randomStatDifferenceEight = 8 + baselineStat - dex;
    System.out.println(randomStatDifferenceOne);
    System.out.println(randomStatDifferenceTwo);
    System.out.println(randomStatDifferenceThree);
    System.out.println(randomStatDifferenceFour);
    System.out.println(randomStatDifferenceFive);
    System.out.println(randomStatDifferenceSix);
    System.out.println(randomStatDifferenceSeven);
    System.out.println(randomStatDifferenceEight);

This gives me the following results with Rnd(1-8):

6
7
8
9
10
11
12
13

In the guide... he has the following level up stat calculated as follows for the difference number (that should only be 0-11):

     *     Difference | Stat Gain
     *         0-3    |     0
     *         4-6    |     1
     *         7-9    |     2
     *        10-11   |     3

So my question is how is it handled when the number is above 11, or below 0(assuming below 0 is possible)?






Pictures about "Formula for primary stats on level up?"

Formula for primary stats on level up? - Free stock photo of adult, analyzing, blood
Formula for primary stats on level up? - Free stock photo of analyzing, background, blood
Formula for primary stats on level up? - Free stock photo of analyzing, background, blood



How to level stats ff2?

Final Fantasy II Player characters' stats increase based on their performance in battle. Attacking an enemy with a specific weapon (or shield) increases the character's skill with that weapon. Casting a certain spell will eventually increase the level of that spell, making it more powerful and less likely to miss.

How do you max out stats in ff7?

To Max Stats, press Y to enter the menu, then scroll to the very bottom to the tab labeled "Max Stats." Once confirmed, this choice cannot be undone. Cloud and his allies will have all stats maxed and Limit Breaks charged.




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: cottonbro, Artem Podrez, Artem Podrez, Artem Podrez