Problem skill cost formula !

Hey everyone,

i've got a problem with the cost of one of my skill, and so you know, I'm using the Yanfly Skill Cost Manager (http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-cost-manager/)

So here's the problem: I want my skill to cost both mana and hp but I want those cost to be variable depending on the remaining mana that the character have, in fact it would cost all remaining mana.
The exact costs would be as follow:
- Mana Cost = a.mp                  (so the current mana the character gave)
- Hp cost       = a.mmp -a.mp     (the maximum mana the character can have minus the current mana he have)

Also, this is a skill that characters can acquired by equipping a certain accessory, so basicaly every character can have access to the skill.

 
I've moved this thread to Script support. Please be sure to post your threads in the correct forum next time. Thank you.
you can use the 

<custom cost requirement>
 string
 string
</custom cost requirement>

tag for that I think...
I'm not quite familiar with the
<custom cost requirement>
 string
 string
</custom cost requirement>

yet, I may have to look a tutorial or something.

But, for now, I've wirtten a Damage Formula that do the thing: 




Spoiler
 
a.hp-=a.mmp-a.mp;a.mp-=a.mp
It doesn't show the cost when the player want to use the skill, but it uses the good amount of mp and hp.

Original thread: https://forums.rpgmakerweb.com/threads/problem-skill-cost-formula.15078/