RMMV How to have MP cost only be shown (Yanfly Action Sequences & Skill Core)

KrimsonKatt

The Endless
Veteran
Joined
Nov 12, 2016
Messages
188
Reaction score
76
First Language
English
Primarily Uses
RMMV
So in my game I have a type of skill that does massive damage based on your current MP compared to your max MP. I have the calculation all done and over with, but now I'm having a problem with MP cost. At first, I simply had the action command "MP -100%: user" but that didn't work perfectly because I wanted to show the MP cost, which was equal to the user's current MP. Apparently, Yanfly's skill core doesn't support the cost being current MP, but I got around that by making a custom MP cost like this:
<Custom MP Cost>
cost = a.mp;
</Custom MP Cost>
However, that leads to a problem. Early in the action sequence, the sequence forces a common event where the user's current MP and max MP are calculated to be used in the damage formula later on. However, with the custom MP cost, for some reason the skill uses the custom cost before anything else, including the action sequence, therefore the calculation common event is not able to properly run as a result. The attack always does 0 damage no matter what since all the MP is used up before the calculation to occur, and therefore the calculation is always 0 (current MP) / Max AP = 0, as zero divided by anything is zero. Can someone please tell me a way to make the custom MP cost only show up in the menu and not actually trigger, or even better, have the custom cost only go off after the calculation in the action sequence occurs? Thanks.
 

xDRAGOONx

Veteran
Veteran
Joined
Jan 22, 2019
Messages
223
Reaction score
174
First Language
English
Primarily Uses
RMMV
Try this:

<Cost Display Eval>
var variableId = 1; //This is the variable you are going to store the cost in
var value = a.mp; //this is the value that the variable will be set to
$gameVariables.setValue(variableId, value); //This is setting the variable to the value
</Cost Display Eval>

This notetag runs an eval before displaying the skill's cost. This is so
you can set up variables and whatnot for your skill cost display text.

<Custom Cost Display>
\v[1] MP //This will display the variable to display the cost
</Custom Cost Display>

That will show the cost as the users mp and should get around your problem. Just be sure to get rid of your custom Mp Cost notetag.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

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.
Can someone recommend some fun story-heavy RPGs to me? Coming up with good gameplay is a nightmare! I was thinking of making some gameplay platforming-based, but that doesn't work well in RPG form*. I also was thinking of removing battles, but that would be too much like OneShot. I don't even know how to make good puzzles!
one bad plugin combo later and one of my followers is moonwalking off the screen on his own... I didn't even more yet on the new map lol.
time for a new avatar :)

Forum statistics

Threads
106,017
Messages
1,018,356
Members
137,802
Latest member
rencarbali
Top