Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Evaluating a function as part of Yanfly's Barrier script

Traejeek

Villager
Xy$
0.00
For a character in my game, I've got the following notetags and an idea of what I want them to do but I can't seem to get the syntax down. It appears that the function Yanfly set up doesn't allow me to use math.pow(x, y) so here's what I've got:

JavaScript:
<Custom Barrier Regen 1 Turns>
value += (user.lvl * user.lvl) - (0.958 * (user.lvl * user.lvl)) + 4;
</Custom Barrier Regen 1 Turns>
<Custom Barrier Points 1 Turns>
value += (user.lvl * user.lvl) - (0.958 * (user.lvl * user.lvl)) + 4;
</Custom Barrier Points 1 Turns>
The goal was a modified exponential curve with a base of 4 that scaled with actor level. However, I'm currently getting no barrier. (In a previous iteration I actually managed to accidentally get a static 6 per turn with some spaghetti that wasn't proper js).

Thanks in advance!
 
Top