Editting Yanfly's ATB Battle System

Discussion in 'Javascript/Plugin Support' started by nathanlink169, Aug 19, 2019.

  1. nathanlink169

    nathanlink169 Veteran Veteran

    Messages:
    49
    Likes Received:
    16
    Location:
    Ottawa
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi all!

    I know that Yanfly has abandoned support of his ATB Battle System, but I still want to play around with it because I'm stubborn.

    Essentially, what I'm trying to do is to add a feature to the battle system where the Speed value of a skill (the native RPG Maker speed that is found in the Invocation tab, not ATB speed) will change how quickly the skill will charge. This means that I can make it so that more powerful skills take longer to charge, and have more of a chance of getting interrupted.

    On line 1906 of YEP_X_BattleSysATB.js, I've found the updateATB function. The fourth if-statement in the function looks like this:
    Code:
    if (this.isATBCharging()) {
      var value = this.atbCharge() + this.atbSpeedTick();
      this.setATBCharge(value);
    }
    My first (and only, so far) attempt to modify it went like this:
    Code:
    if (this.isATBCharging()) {
      var abilityModifier = 5 * this.currentAction().speed();
    
      var value = this.atbCharge() + this.atbSpeedTick() + abilityModifier;
      this.setATBCharge(value);
    }
    In one of my abilities, I then set it the speed to be -5. The results were weird. It seemed to actually speed up all other skills rather than make this one slower, which isn't ideal. Does anyone have any idea why this happened, and what a good solution may be?
     
    #1

Share This Page