RPG Maker Forums

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.

Code:
<Custom MP Cost>
var varPotency = this.getSelfVariableValue(20, 01, 30);
cost = 10 * (1 + varPotency);
</Custom MP Cost>

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,037
Messages
1,018,464
Members
137,821
Latest member
Capterson
Top