This is probably an obvious feature I just haven't learned how to do yet, but I want to be able to set basic attack/skills to grant a certain range of TP rather than the simple static you can set in the database. For example, when the player uses a basic attack in battle, I want it to grant anywhere between 10-13 TP, chosen randomly each time. Is this possible with our current plugins?
Making skills grant a varying range of TP
● ARCHIVED · READ-ONLY
-
-
you can do this as part of the damage formula.
a.gainTp(Math.randomInt(x)+y); z
y = the minimun TP gain
x is the number you want added to y to make your max TP, but make it 1 higher then the actual math looks
basically its x-1 +y = max
Math.randomInt(4)+10 is 10-13 TP
z is where you put the normal damage formula -
Perfect! Thanks so much!