Is it possible to have a skill do a 'TP Drain' by using a damage formula?

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
443
Reaction score
225
First Language
English
Primarily Uses
RMMZ
I've been struggling to find a way to make skills that Drain TP, but I'm not having any luck. I was wondering if a skill could be set up to drain TP by damage formula?
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Well simple enemies in RPG Maker MV do not have TP so draining something that dose not exist is kinda pointless, unless you scripted your enemies to have TP then you will have to do it via a script call, but my guess is that you haven't so just add TP when you use the skill... like when you use 'Guard' or plain old 'Attack'.
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
443
Reaction score
225
First Language
English
Primarily Uses
RMMZ
Well simple enemies in RPG Maker MV do not have TP so draining something that does* not exist is kinda pointless, unless you scripted your enemies to have TP then you will have to do it via a script call, but my guess is that you haven't so just add TP when you use the skill... like when you use 'Guard' or plain old 'Attack'.
Listen here noob! Enemies in MV actually have TP, it just isn't shown by default.
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Listen here noob! Enemies in MV actually have TP, it just isn't shown by default.
Well then you should download Yanfly's Lifesteall plugin and modify it so it can also drain TP, it should be like 4 lines of code but finding where to place them will be the real trick, other than that i do not think there is another way to do this, but like you said I am a noob so what do I know...
 

Icelord888

Veteran
Veteran
Joined
Apr 13, 2018
Messages
42
Reaction score
23
First Language
Romanian
Primarily Uses
RMMV
Or make your own script calls...
 

Magusalfador

Veteran
Veteran
Joined
Jun 15, 2014
Messages
240
Reaction score
41
First Language
English Spanish
Primarily Uses
@Animebryan , please stop the name calling. It isn´t just disrespectful, but also makes no sense calling someone a noob when you dont have the answer.

Now about the skill, no, I dont think it can be done through the damage formula. It can be done through Yanfly plug ins, like the skill I made for you earlier. Which by the way, you are welcome.
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
443
Reaction score
225
First Language
English
Primarily Uses
RMMZ
Well then you should download Yanfly's Lifesteal plugin and modify it so it can also drain TP, it should be like 4 lines of code but finding where to place them will be the real trick, other than that i do not think there is another way to do this, but like you said I am a noob so what do I know...
Sorry for calling you a noob. It just gets under my skin when someone who knows less about something than me states false info when I know better, plus I was kinda in a bad mood at the time. As for Yanfly's Lifesteal plugin, funny you should mention that: https://forums.rpgmakerweb.com/inde...-life-steal-plugin-to-include-tp-drain.109067

Or make your own script calls...
I've tried searching to see if there are any but I've had no luck. Also, you shouldn't Double Post. If you need to make another post after making one, just edit the first post. I'm sure one of the mods will see this & say something about it. I just hope I don't get accused of backseat modding for pointing this out.

@Animebryan , please stop the name calling. It isn't just disrespectful, but also makes no sense calling someone a noob when you don't have the answer.

Now about the skill, no, I don't think it can be done through the damage formula. It can be done through Yanfly plug ins, like the skill I made for you earlier. Which by the way, you are welcome.
I only called him that because he stated something that wasn't true when anyone familiar with RM knows better, which is something I'd never do. Anyway, I apologized for it. As for doing it through Yanfly's plugins, that pretty obvious, either like what @Icelord888 was saying about modding Yanfly's Lifesteal (which is the prefered method), or by some other plugin. But the problem is that I don't know the coding necessary to drain TP from a target. As I mentioned to @Icelord888's 2nd post, I've tried looking around for any kind of effect for draining TP but I can't find anything useful except for one post that was too vaguely answered:

You should be able to add a.gainTp(value) to any damage formula making the value negative for TP loss.
He never uses it in an example so I'm not sure how to use this, if it would even work. Also, thank you for your help with the Frozen Shatter-kill effect :)
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Code:
a.gainTp(value);b.gainTp(-value)
Putting that as your damage formula will do what you want, just change "value" to an actual value.

No need for plugins
 

Animebryan

Need more resources!
Veteran
Joined
Jul 31, 2012
Messages
443
Reaction score
225
First Language
English
Primarily Uses
RMMZ
Code:
a.gainTp(value);b.gainTp(-value)
Putting that as your damage formula will do what you want, just change "value" to an actual value.

No need for plugins
Finally got it to work but the problem with using a flat value is that it can gain more TP than what the target actually had. Is there a way to set it so that it can take up to a certain amount & only give the user whatever amount was left if less than the certain amount?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
Hmm something like

Code:
if (a.tp+value < 101) {a.gainTp(value)}else{a.gainTp(100-value)};
You use that instead of just a.gainTp

Though I dont know it works nicely with the single line DF
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Haired slime? Trying some different styles of art. Maybe I can make some resources with this new kind of painting.......
i love my game very much
Uh, I'm probably overthinking this, but I think that some of my music sounds kinda...bad?
The melodies are just sort of awkward, and don't flow.
I'm really not sure what to do. Why am I even worrying about this? I don't even have a battle system yet!
And the Lord said, let there be lighting effects! And there were lighting effects! And it was good...ish? Might tweak this some more.
Today was a day of good things! Thank you fate! I pray to the darkness that those that read this will enjoy a good day as well! Power to the gam mak.

Forum statistics

Threads
105,724
Messages
1,015,913
Members
137,402
Latest member
Lopilon
Top