DoubleX RMMV Popularized ATB Core

You may want to try b.clear_patb() instead of b.patb_val.atb = 0, because clear_patb() will clear all action slots of the battler involved 🙂

Hey, thanks for the fast reply. Before you replied, i tested the b.clear_patb() and it worked better, cancelling the action slot if the atb was fullfilled. But we have a set back, if i want to, for example, reduce just 20, 30, 45% the atb amount of the battler, how can i achieve that?

another question: i'm a very beginner with javascript and code at all, this plugin calls work in other enviroments like the notetags of YEP action sequence packs, for example? The Math.random() as far i know, just return 0 or 1, right? So, when i add the condition ' < 0.9 ' id does make a difference compared to your original code sugestion ' < 0.5 ' ?

last question: when in the charge or cooldown state, the actual battler atb is 0 ?
Hey, thanks for the fast reply. Before you replied, i tested the b.clear_patb() and it worked better, cancelling the action slot if the atb was fullfilled. But we have a set back, if i want to, for example, reduce just 20, 30, 45% the atb amount of the battler, how can i achieve that?
My reset addon does exactly that 🙂

another question: i'm a very beginner with javascript and code at all, this plugin calls work in other enviroments like the notetags of YEP action sequence packs, for example? The Math.random() as far i know, just return 0 or 1, right? So, when i add the condition ' < 0.9 ' id does make a difference compared to your original code sugestion ' < 0.5 ' ?
My compatibility patch addressed at least some issues with YEP action sequence packs so you may want to have a try 😛
As for Math.random(), it returns any real number inclusively between 0 and 0.999...9 but excluding 1, so Math.random() < 0.9 is expected to have around 90% chance returning true, while such expectation for Math.random() < 0.5 should be nearby 50%.

last question: when in the charge or cooldown state, the actual battler atb is 0 ?
When in charge state, the actual battler atb should be 100%, while that during cooldown should be 0% 😀
When in charge state, the actual battler atb should be 100%, while that during cooldown should be 0%

If i would use a formula in the skill to reset the charge atb to 0, it would only reset the charge bar or cancel the action skill at all? I'm thinking on creating a mechanic to cancel spellcasting on attacks, or something like that.
If i would use a formula in the skill to reset the charge atb to 0, it would only reset the charge bar or cancel the action skill at all? I'm thinking on creating a mechanic to cancel spellcasting on attacks, or something like that.
If you just want to delay or reset the charge progress, you may just use this in the charge addon before that action skill's fully charged:
Code:
 *      2. patb_val.charge = val
 *         - Set the battler's charge value as val
 *           (v1.04b+)Use fill_up_patb_charge() instead if val = max_patb_val
 *           in non-delay fill code and val = 0 in delay fill code, or the
 *           post charge event wouldn't trigger
Whereas if you want to cancel the action skill altogether, you may instead use reset_patb(), which cancels all inputted and charging action skills and set the actual battler atb to be very close to 100%, meaning that that battler will be able to input new action skills soon after 🙂
Whereas if you want to cancel the action skill altogether, you may instead use reset_patb(), which cancels all inputted and charging action skills and set the actual battler atb to be very close to 100%, meaning that that battler will be able to input new action skills soon after 🙂
So, clear_patb() and reset_patb() it's not the same thing? i guessed that this 2 functions have the same use, but by what you sayed it don't.
So, clear_patb() and reset_patb() it's not the same thing? i guessed that this 2 functions have the same use, but by what you sayed it don't.
Code:
* 9. clear_patb()
*    - Same as calling reset_patb_val() and reset_patb()
* 10. reset_patb_val()
*     - Resets the battler's atb value to the maximum atb value in delay
*       fill mode and 0 if otherwise
* 11. reset_patb()
*     - Clears all battler's actions

Original thread: https://forums.rpgmakerweb.com/threads/doublex-rmmv-popularized-atb-core.51219/