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

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top