Skill that reduces target's TPs

Discussion in 'Javascript/Plugin Support' started by Anarcho-paladin, Oct 11, 2019.

  1. Anarcho-paladin

    Anarcho-paladin Veteran Veteran

    Messages:
    115
    Likes Received:
    13
    First Language:
    French
    #1
  2. Soulrender

    Soulrender Veteran Veteran

    Messages:
    195
    Likes Received:
    96
    First Language:
    Poland
    Primarily Uses:
    RMMV
    #2
  3. TWings

    TWings The Dragon Whisperer Veteran

    Messages:
    345
    Likes Received:
    608
    Location:
    Kyoto
    First Language:
    French
    Primarily Uses:
    RMMV
    You don't need any plugin or javascript skill. You just need to edit the Damage Formula (like in the link you posted).
    Code:
    b.gainTp(-amount of tp you want to remove); attack damage
    For instance if you want the default basic attack to remove 10 TP on the target :
    Code:
    b.gainTp(-10); a.atk * 4 - b.def * 2
     
    #3
    Engr. Adiktuzmiko likes this.
  4. Anarcho-paladin

    Anarcho-paladin Veteran Veteran

    Messages:
    115
    Likes Received:
    13
    First Language:
    French
    Well, I was already using said Yanfly's plugins, but the second option is far simpler, and works perfectly well. I had tried it following the link I provided, but it didn't work because I had taken out the second part of the formula; it indeed doesn't work without this last part, making the game crash with an error message saying the formula doesn't give a finite result.

    Anyway, it works now, and I learned a lot. Thanks to both of you!
    :)

    Edit: The skill works but when used, a 0 HT damage appear on the target; is there anyway to have the TP damages appear instead?
     
    Last edited: Oct 11, 2019
    #4
  5. TWings

    TWings The Dragon Whisperer Veteran

    Messages:
    345
    Likes Received:
    608
    Location:
    Kyoto
    First Language:
    French
    Primarily Uses:
    RMMV
    I don't think you can easily display the TP damage. One simple trick would be to inflict as much HP damage as TP removed.
    If I stay on my previous example of removing 10 TP :
    Code:
    var dmg=10; if(b.tp<dmg) { dmg=b.tp }; b.gainTp(-dmg); dmg
    Note that I completely replaced the attack damage part so it will only inflict between 0 and 10 HP damage (depending on target's TP). Also don't forget to set your skill Variance at 0% and Critical Hits to No, or the final damage may be slightly different.
     
    Last edited: Oct 12, 2019
    #5
  6. Anarcho-paladin

    Anarcho-paladin Veteran Veteran

    Messages:
    115
    Likes Received:
    13
    First Language:
    French
    Cool thanks @TWings . I'll also try to use yanfly's action sequence plugin as recommended by @Soulrender to see if it changes anything and will report back if it works.
     
    #6

Share This Page