Attack X times for every 20 TP and generate no TP

Discussion in 'RPG Maker MV' started by Nilom, Jun 20, 2019.

  1. Nilom

    Nilom Veteran Veteran

    Messages:
    178
    Likes Received:
    38
    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.


    [​IMG]


    The skill:
    [​IMG]
    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:
    [​IMG]

    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: Jun 20, 2019
    #1
  2. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    3,910
    Likes Received:
    3,279
    Location:
    Florida, USA
    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.
     
    #2
    Nilom likes this.
  3. Nilom

    Nilom Veteran Veteran

    Messages:
    178
    Likes Received:
    38
    First Language:
    German
    Primarily Uses:
    RMMV
    Thank you for your suggestions. Unfortunately <Repeat: Math.ceil((a.tp+1)/20)-1> doesn't work.

    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:
     
    #3
    Wavelength likes this.
  4. Wavelength

    Wavelength Pre-Merge Boot Moderator

    Messages:
    3,910
    Likes Received:
    3,279
    Location:
    Florida, USA
    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?
     
    #4
    Nilom likes this.
  5. Nilom

    Nilom Veteran Veteran

    Messages:
    178
    Likes Received:
    38
    First Language:
    German
    Primarily Uses:
    RMMV
    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: Jun 20, 2019
    #5
    Wavelength likes this.

Share This Page