Converting TP cost to MP cost?

So... I had an interesting idea for my game.


What I want to do is for one of the choices the player can make will result in one of the players entering a catatonic state. After that event, the character's mental powers become much stronger and they become the stereotypical "mind-over-matter" persona. However, many of that character's skills use TP for their cost, and limiting the character to their MP skills would be very limiting to the player. So, as for my question...


Is there any way I can use one of Yanfly's Lunatic Mode plug-ins to make it so that any TP skills the character will consume MP after the event in question? I'm imagining it would be some sort of passive state using Yanfly's Auto Passive State and State and Buff Core for the Lunatic Mode, but I really have no experience with JavaScript. Anyone have any idea on how to make this work?


I mean, I have an idea, but it seems like there has to be an easier way than copying her TP skills, changing the copies' costs to MP, and adding the <Hide if Skill Learned: x> notetag to all the originals.


Conversely, is there a way to make a skill consume another character's TP, instead? My idea for that would be the character psychically projecting the knowledge of that skill into an ally and the ally executing the skill for the character.
Just to make sure, you want the MP consumption to take place INSTEAD of the TP consumption? Or in addition to the TP consumption?
Converting TP cost to MP cost? Try these notetags:


<Custom TP Cost>
if (user.isStateAffected(x)) {


  cost = 0;


} else {


  cost = 10;


}
</Custom TP Cost>


<Custom MP Cost>
if (user.isStateAffected(x)) {


  cost = 10;


} else {


  cost = 0;


}
</Custom MP Cost>


Just change x to the id of your catatonic state, and the cost value when your battler is affected by the catatonic state. Also, make sure you have Yanfly's Skill Core installed!


- Riff
Thank you, Riff! That works wonderfully 😀



And yep- I wanted MP consumption instead of TP consumption. My game uses TP more as an Energy mechanic, but because of how many of the character's skills cost TP (She has both magic and physical skills, and I built the system around the idea that TP is used for non-spell skills and MP is used for spells. Most classes will never (or rarely) use one of the two, but I have some classes that are more hybrid specs, and all four of the characters will wind up with some of both anyway), I wanted to be able to have a way to make them use MP instead, as a sort of psychic projection "I'll stab you by moving my sword with my mind" kind of thing.

Original thread: https://forums.rpgmakerweb.com/threads/converting-tp-cost-to-mp-cost.60726/