Yanfly Job Points Question

● ARCHIVED · READ-ONLY
Started by Wilir 5 posts View original ↗
  1. I am trying to change the formula on the Job Points mod by Yanfly...
    The question is, what variables can I input and how do you spell them

    One of the original formulas was "10 + Math.randomInt(10)", and I wanted the value to increase by level so I did this:

    ((10 + Math.randomInt(10))*this.level)/20

    The problem now is that it always gives me 0 JP...
    What's wrong with my Formula?
  2. Remove the '(10)' and see what happens.
  3. You divide a number by 20, and integers are always cut off.
    To get any points from that formula you would have to have a result above 20.
    And you have a random 0-9 multiplied with the level, which means that at level 2 you have a chance of less than 50% to get one point.

    What did you expect to get?
  4. At level 2 it should actually be always at least 1, since the formula was ((10+random)*level)/20, so 10 is added to the random number first before multiplying by the level

    so at level 2, the minimum will be ((10+0)*2)/20 which is 20/20 which should be 1
  5. I am getting JP for the levels up correctly, but what should I input if I want something similar per action? It still gives me only 0JP per action and per enemy...
    Also...

    Also, I did want it to start at pratically nothing in the first levels and go from there, I also test always at lvl 99 or 98 for the level up, so yeah, I expect to get some 0JP at level 1...