So, in my game I'm making upgrade-able skills, where variables are used to change the cost, potency, number of hits, etc. I quickly realized that this approach under normal means would take up a most of the variables in my game (about 20-25 skills took around 100 variables between them), so I decided to try using Yanfly's Self Switches and Self Variables plugin to only take up 7 variables instead.
On a separate map, I have events for each of my skills (just template skills right now). When my game starts, I have a common event run to set all the skill self variables in each to 0. I then reference these self variables in the skills for use in formulas. At least, that's what I'm trying to do.
When I look at my skills in game however, no cost is listed. I'm not sure if there's an error in my code (not very proficient in Javascript) or if it's just that Self Variables can't be detected for formulas this way.
Below is a formula I'm using for MP cost with Yanfly's Skill Core. If someone could tell me what I might be doing wrong (or if using self variables for this just isn't possible), I'd really appreciate it.
On a separate map, I have events for each of my skills (just template skills right now). When my game starts, I have a common event run to set all the skill self variables in each to 0. I then reference these self variables in the skills for use in formulas. At least, that's what I'm trying to do.
When I look at my skills in game however, no cost is listed. I'm not sure if there's an error in my code (not very proficient in Javascript) or if it's just that Self Variables can't be detected for formulas this way.
Below is a formula I'm using for MP cost with Yanfly's Skill Core. If someone could tell me what I might be doing wrong (or if using self variables for this just isn't possible), I'd really appreciate it.
Code:
<Custom MP Cost>
var varPotency = this.getSelfVariableValue(20, 01, 30);
cost = 10 * (1 + varPotency);
</Custom MP Cost>