Attack X times for every 20 TP and generate no TP

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
Hello together!

Currently I'm trying to make a skill that will work as follows:
  • The Skill costs 20 TP
  • But uses all of the users remaining TP
  • For every 20 TP used, the skill will activate 1 times (User had 26 TP -> User will have the skill activated once and will remain with 0 TP after the skill was executed. User had 99 TP -> activate 4 times, 0 TP remaining after attack.)
  • The skill itself shouldn't generate any TP, as that would make itself basicly a near endless TP source and way too strong.

I'm using Yanfly's Enhanced TP.


I tried several things so far, but the TP fluctuation and how I did it is just ugly.





The skill:

That is what's in the damage formula field:
Code:
$attack_repeat = Math.ceil((a.tp+1)/20)-1; a.atk/2 * damage_formula("", a, b, this)
I have another skill that is exactly the same, but without the setting up of the variable part ( $attack_repeat = Math.ceil((a.tp+1)/20); ). It is used for the following up activations of the initial skill.

And the common event:


For instance, how do I make a skill not generate any TP at all? Are there any settings or Lunatic mode evals for this? I tried to compensate my lack of knowledge with the Change TP -100 command, but this TP fluctuations can be seen and are dirt ugly.

Do I really have to use a variable, a common event and a second version of the skill to make this work? I really do not like this approach as it looks very messy to me. :LZSskeptic:

Thank you in advance for any advices! :LZSsmile:
 
Last edited:

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
4,944
Reaction score
4,126
First Language
English
Primarily Uses
RMVXA
You could try Yanfly's Target Core, which allows you to designate the number of repeats using a notetag. I'm not sure whether the notetag accepts eval statements rather than integers, but if it it does, you could insert Math.ceil((a.tp+1)/20) into the notetag.

As far as making a skill not gain the user any TP, that's just a matter of setting the "TP Gain" to 0 in the Skills tab for that skill, unless you've done something with a plugin somewhere else to cause the user to always gain TP. Not sure what could be done to prevent the target from gaining TP, besides some custom code.
 

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
You could try Yanfly's Target Core, which allows you to designate the number of repeats using a notetag. I'm not sure whether the notetag accepts eval statements rather than integers, but if it it does, you could insert Math.ceil((a.tp+1)/20) into the notetag.
Thank you for your suggestions. Unfortunately <Repeat: Math.ceil((a.tp+1)/20)-1> doesn't work.

As far as making a skill not gain the user any TP, that's just a matter of setting the "TP Gain" to 0 in the Skills tab for that skill, unless you've done something with a plugin somewhere else to cause the user to always gain TP. Not sure what could be done to prevent the target from gaining TP, besides some custom code.
I'm using Yanfly's Enhanced TP.
As I'm using Enhanced TP the TP gain is based on the damage dealt. Even if the TP gain is set to 0 in the skills tab.

I will try to add a state with 0% tcr to my first, dirty attempt and see what that brings, until someone comes with a better solution. :LZSsmile:
 

Wavelength

Edge of Eternity
Global Mod
Joined
Jul 22, 2014
Messages
4,944
Reaction score
4,126
First Language
English
Primarily Uses
RMVXA
Sorry to hear code in the Repeat notetag didn't work.

I've never used Yanfly's Enhanced TP, but looking through the documentation, it looks like script calls can be used to switch the battler's TP mode. Perhaps if you have Yanfly's Skill Core, you could use those script calls inside <Before Eval> and <After Eval> notetags, to set the battler's TP mode to a mode where they can't generate any TP from damage they're dealing right before your skill goes off, then set it back to the actor's normal TP mode right after the skill goes off?
 

Nilom

Veteran
Veteran
Joined
Sep 9, 2013
Messages
178
Reaction score
39
First Language
German
Primarily Uses
RMMV
Perhaps if you have Yanfly's Skill Core, you could use those script calls inside <Before Eval> and <After Eval> notetags, to set the battler's TP mode to a mode where they can't generate any TP from damage they're dealing right before your skill goes off, then set it back to the actor's normal TP mode right after the skill goes off?
Sadly I was not able yet to change the TP mode mid-battle. The TP mode ID changes but the plug in doesn't update the actual TP mode in use until the next battle is started. I have another thread where I discovered this problem (Post #4).

But it is a good Idea that you have. I was trying something similar before. Setting the tcr to 0% before and setting it back after. I'm just not sure how the script command is for setting tcr. :LZSskeptic:
 
Last edited:

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

Latest Threads

Latest Posts

Latest Profile Posts

Check out SpokenWord- my text-to-speech plugin for RPG Maker MV!
just watched spacex launch. was awesome.
Jumping and gravitation 0.1 build - RPG Maker MV
Currently playing final fantasy 3 on DS. It's an old one but its a classic.

Forum statistics

Threads
97,958
Messages
948,126
Members
129,204
Latest member
Nimhe
Top