DoubleX RMMV Popularized ATB Core

Discussion in 'JS Plugin Releases (RMMV)' started by DoubleX, Nov 23, 2015.

  1. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    543
    First Language:
    Chinese
    Primarily Uses:
    N/A
    You can use plugin calls in the damage formulae of skills reducing ATB gauge:
    Code:
    * 4. patb_val.atb = val
    * - Set the battler's atb value as val 
    For instance:
    Code:
    if (Math.random() < 0.5) b.patb_val.atb = 0; originalDamageFormula
    This should have 50% chance to completely empty the ATB gauge of the targets if those skills do hit them :)
     
    #81
  2. wrap

    wrap Villager Member

    Messages:
    9
    Likes Received:
    6
    First Language:
    Japanese
    Primarily Uses:
    RMMV
    I could not understand this plugin at all.
    It's a great plug-in, but it's very difficult.
    Delay Action can be realized.
    Thank you, DoubleX!
     
    #82
    DoubleX likes this.
  3. NiFo

    NiFo ? Member

    Messages:
    3
    Likes Received:
    3
    First Language:
    Italian
    Primarily Uses:
    RMMV
    Hello,after adding this plugin the HP and MP bars got as short as the ATB bar which made the numbers go over the letters.
    Is there any way to fix this?Im sorry for asking such a simple question but im still learning how to use RMMV. Screenshot.png
     
    #83
    DoubleX likes this.
  4. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    543
    First Language:
    Chinese
    Primarily Uses:
    N/A
    It seems to me that you're using some other plugins as well. Would you mind sending me your project or at least list all the other plugins(with their ordering preserved) used?
     
    #84
    NiFo likes this.
  5. NiFo

    NiFo ? Member

    Messages:
    3
    Likes Received:
    3
    First Language:
    Italian
    Primarily Uses:
    RMMV
    Of course,here's the list of the plugins im using.
    ice_screenshot_20180622-153415.png
     
    #85
    DoubleX likes this.
  6. NiFo

    NiFo ? Member

    Messages:
    3
    Likes Received:
    3
    First Language:
    Italian
    Primarily Uses:
    RMMV
    Oh uh,i think i broke something because for some reason the game will softlock when a character dies before selecting an enemy to attack.
    Maybe some of the plugins im using are incompatible with each other?
     
    #86
    DoubleX likes this.
  7. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    543
    First Language:
    Chinese
    Primarily Uses:
    N/A
    Unfortunately, you will have to test this yourself or ask someone else to test it for you by giving him/her your project.
    If you want to test this yourself, you can try to disable more and more plugins until the problems disappear. Then try to enable the disabled ones again until the problems reappear. Then you should at least have some ideas of what plugins are the possible culprits :)
     
    #87
    NiFo likes this.
  8. Zemtax

    Zemtax Secret Open World Game Dev Veteran

    Messages:
    42
    Likes Received:
    21
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    How exactly does the "atb_rate_code" work? I can't seem to find the right balance.
    I want to make it so a character with x AGI always has the same time to get a turn even when facing an enemy with much higher AGI, without making the enemy with much higher AGI having ridiculously fast turns. So I may be asking if there's a way to cap the ATB rate time both slowest and fastest.

    Hopefully I'm not just missing something in your plugin, can't seem to wrap my head around the formulas.
     
    #88
    DoubleX likes this.
  9. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    543
    First Language:
    Chinese
    Primarily Uses:
    N/A
    In this case, I'd actually wonder why you'll have enemies with very high agi to begin with :D

    Anyway, you'll need the rate addon:
    Code:
    * # Actor/Class/Weapon/Armor/Enemy/State Notetags:
    * State notetags take the highest priority, followed by enemy, weapon,
    * armor, class and actor
    * 1. <operator patb rate: rate>
    * - Assigns rate to the battler's atb rate via operator
    * - operator can be either =, +, -, *, / or %, meaning set to, add
    * by, subtract by, multiply by, divide by or modulo by respectively
    * - All instances of this notetag will be used sequentially
    With this, you can then set atb_rate_code as abs_agi or agi, then in battle events of troops with enemies having much higher agi, you can add a hidden state(e.g.: a state without a icon) with that notetag(for instance, </ patb rate: 2> halves the atb rate) to each of them :)

    Alternatively, you can try the following snippet in the related battle event that are run once upon battle start to lower the agi of those being too high:
    Code:
    // Use either one
    var minActorAgi = $gameParty.members().sort(function(a, b) {
        return a - b;
    })[0]; // The minimum agi among all actors
    var avgActorAgi = $gameParty.agility(); // The average agi among all actors
    //
    // Replace x with the multiplier you want
    var maxEnemyAgi = x * minActorAgi; // or x * avgActorAgi
    //
    $gameTroop.members().forEach(function(mem) {
        if (mem.agi <= maxEnemyAgi) return;
        mem.addParam(6, maxEnemyAgi - mem.agi);
    });
    P.S.: I actually wanted to add the atb rate cap feature, but it'll likely have very serious compatibility issues with the rate addon on the feature level, because while it's obviously pointless to let the rate addon break the cap, the whole PATB system will be either very complicated(this system also serves as a tutorial for those wanting to write their own ATB systems so I won't make things complicated here) or have very severe performance problems if the cap feature caps the rate addon as well ;)
     
    #89
    Zemtax likes this.
  10. Zemtax

    Zemtax Secret Open World Game Dev Veteran

    Messages:
    42
    Likes Received:
    21
    Location:
    Germany
    First Language:
    German
    Primarily Uses:
    RMMV
    Thanks for taking your time to write an extensive reply! I'm sure writing performant battle systems is very difficult already, especially with tick-based systems :D
     
    #90
    DoubleX likes this.
  11. Kenode

    Kenode Veteran Veteran

    Messages:
    66
    Likes Received:
    24
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    I'm glad you're still active, DoubleX. I haven't gotten to do battle parts yet because I'm still making maps and assets, but with the little I tried, this is the only ATB plugin that's worth it. All other ATB plugins freeze the time when you're in the decision making part, which breaks the whole point. Yours seems to be the only one that keeps going. It's very FF7 alike, which is a good thing.
     
    #91
    DoubleX likes this.
  12. ave36

    ave36 Veteran Veteran

    Messages:
    90
    Likes Received:
    34
    First Language:
    Russian
    Primarily Uses:
    RMMV
    Hello DoubleX. I seem to have troubles with the ATB Charge sub-plugin. When an actor is hit by an action-preventing state such as Sleep while charging up an action and the state is then removed, I get a crash and error message. It is the following:

    Type Error
    Can't read property "item" of undefined

    The console log is the following:

    TypeError: Cannot read property 'item' of undefined at Game_Actor.Game_Battler.set_patb_charge_rate (DoubleX RMMV Popular…Charge v103a.js:491)
    at Game_Actor.Game_Battler.get_patb_charge_rate (DoubleX RMMV Popular…Charge v103a.js:478)
    at Game_Actor.Game_Battler.update_patb_charge (DoubleX RMMV Popular…Charge v103a.js:468)
    at Game_Actor.Game_Battler.update_patb_val (DoubleX RMMV Popular…Charge v103a.js:388)
    at Game_Actor.Game_Battler.update_patb (DoubleX RMMV Popular… Core v103a.js:1238)
    at Game_Actor.update_patb (DoubleX RMMV Popular… Core v103a.js:1583)
    at DoubleX RMMV Popular… Core v103a.js:1645 at Array.forEach (<anonymous>)
    at Game_Party.Game_Unit.update_patb (DoubleX RMMV Popular… Core v103a.js:1645)
    at Function.BattleManager.update_patb (DoubleX RMMV Popular…B Core v103a.js:815)
     
    #92
    DoubleX likes this.
  13. DoubleX

    DoubleX Just a nameless weakling Veteran

    Messages:
    1,462
    Likes Received:
    543
    First Language:
    Chinese
    Primarily Uses:
    N/A
    I'm afraid that you'll have to give me your project so I can know what's really going on :)
     
    #93
  14. ave36

    ave36 Veteran Veteran

    Messages:
    90
    Likes Received:
    34
    First Language:
    Russian
    Primarily Uses:
    RMMV
    I tried to replicate this behavior in a clean new project and found out that it is not occurring. Therefore, some other plugin is likely interferring. Sorry for inconveniencing you, I'll try to find the culprit myself.
     
    #94
    DoubleX likes this.

Share This Page