Question - reducing TP (enemy skill)

asanogaijin

creating Valiant Souls
Member
Joined
Mar 4, 2018
Messages
11
Reaction score
13
First Language
EN, JP, GER
Primarily Uses
RMMV
Hi! Does anyone know how to make an enemy skill reduce the target (=player character targeted by the enemy) lose a certain amount of TP?

I am using Yanfly's TP Manager plugin so I have a way to reduce TP by being attacked in general, but I'd like to craft a skill for enemies that for example reduces "10% of TP" for the character hit by it, or even drain TP to the enemy? (the last part is not necessary if not possible)

I tried a lot of script commands through common events but I'm not really good at Java and it didn't really work... xD
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,789
Reaction score
7,876
First Language
German
Primarily Uses
RMMV
java will do nothing for you - MV uses javascript, not java. And as the saying goes - java is to javascript like ham is to hamster - they have nothing in common but the letters of the alphabet.

that said, the best choice is to code javascript into the damage formula:
b.tp-=0.1*b.tp;<insert regular damage formula after the colon>
This would reduce the targets tp by 10% in addition to whatever other damage will happen.
 

OnslaughtSupply

Ssshhh...
Veteran
Joined
May 14, 2017
Messages
731
Reaction score
765
First Language
English
Primarily Uses
RMMV
b.gainTp(-x); damage formula here

X is the amount of tp to lose. Must be a negative here as a positive will result in a gain. Have fun.
 

asanogaijin

creating Valiant Souls
Member
Joined
Mar 4, 2018
Messages
11
Reaction score
13
First Language
EN, JP, GER
Primarily Uses
RMMV
Awesome, thank you SO much for the friendly reply and helping out!
 

Latest Threads

Latest Posts

Latest Profile Posts

spending almost entire day to mod skyrim but it still couldn't run properly :(
My friend has become one with the glitter. @ImaginaryVillain, got any room in the Cult of the Sporkle?
I still cannot wrap my head around how to edit and use arrays in RPG Maker MV o_O
Gamemaking has been slower, but I do my best to make small progress every day. :)

Forum statistics

Threads
107,712
Messages
1,031,594
Members
139,848
Latest member
Ash9055
Top