MV I need an atb charge system that allows for being stunned

So i originally thought Doublex's atb charge system would be all i would need except unless i'm not understanding how to do this, its not possible to check for a negative charge value and inflict a temporary state as a result.

So the atb charge system I need works as thus:

Player selects a skill,it charges at a designated value.
Players and enemies have skills that can delay or cancel the skill charge.
If a player or enemies charge gauge hits a negative value, they are "Broken" rendering them temporarily unable to act and adding a temporary damage inflicted +<insert value> while the broken state is applied.
The broken state lasts based on the value of the charge skill used.(Example: Skill requires 3 seconds to charge, if broken,broken state lasts 1.5 seconds)

This system must apply to both enemies and actors and will be used in the side-view combat system.

My goal with this system is to create a combat system that is more than just using skills and there is a larger risk the more powerful skill that is used while at the same time making the combat more engaging. This risk/reward combat system needs to be more than mere "turns" as the combat needs to be dynamic in how it paces to adjust for multiple break states being in effect at the same time or being able to be removed early while other actions are being performed.

For combatlity's sake, it needs to be compatible with doublex's atb system and/or Moghunter's atb system.
I"m not familiar with the plugins you're looking to use, so this might not be helpful - but Yanfly's ATB supports charging, decreasing the charge, and interrupting the charge.
I"m not familiar with the plugins you're looking to use, so this might not be helpful - but Yanfly's ATB supports charging, decreasing the charge, and interrupting the charge.
Problem: He charges for his plugins and i'm broke.
...the ATB battle system is in the free pack?
...the ATB battle system is in the free pack?
does it allow you to check for values and apply a status at a certain value?
I don't know what that means. Values of what? Check when?

The documentation is on Yanfly's Web site for you to read through (and watch the video). If you have questions beyond that, we're happy to help but you'll need to be more specific than that 😉
I don't know what that means. Values of what? Check when?

The documentation is on Yanfly's Web site for you to read through (and watch the video). If you have questions beyond that, we're happy to help but you'll need to be more specific than that 😉
As in, does it allow me to have it check for a negative value? Like for example: If the character's charge was interupted, does it allow me to apply a status for a set number of seconds?
Edit: Never mind, after watching the plugin video linked it's something else

[I actually use Mog ChronoEngine ATB and if I'm understanding you right, you want an on map skill where the player holds a button for x frames to charge an attack, and if the enemy hits you before you hit the required number of frames, your charge count is reset and you can't move for another y number of frames?
Player selects a skill,it charges at a designated value.
Players and enemies have skills that can delay or cancel the skill charge.
If a player or enemies charge gauge hits a negative value, they are "Broken" rendering them temporarily unable to act and adding a temporary damage inflicted +<insert value> while the broken state is applied.
The broken state lasts based on the value of the charge skill used.(Example: Skill requires 3 seconds to charge, if broken,broken state lasts 1.5 seconds)

This system must apply to both enemies and actors and will be used in the side-view combat system.

My goal with this system is to create a combat system that is more than just using skills and there is a larger risk the more powerful skill that is used while at the same time making the combat more engaging. This risk/reward combat system needs to be more than mere "turns" as the combat needs to be dynamic in how it paces to adjust for multiple break states being in effect at the same time or being able to be removed early while other actions are being performed.
As my popularized ATB isn't designed for this level of complexity, you might want to try my superlative counterpart instead(especially if you really need multiple break states on the same target) 🙂

But if you want to stick to my popularized version, there's quite a complicated and convoluted workaround(which only works on targets not having multiple break states):
Spoiler: Setups
1. You'll need the countdown addon as well
2. You'll need a fake and invisible(without icons) break state and x real and visible break states(where x is the maximum number of battlers possible in any battle)
3. Every real and visible break state, which should render its owner unmovable, will need the <patb countdown: sec> notetag from the countdown addon(it doesn't matter what the value of sec is) -
Code:
 *      1. <patb countdown: sec>
 *         - Sets the state to have its turn updated every sec seconds
 *         - Every second in sec only consists of frames with atb updates
4. Skills having chances to effectively add those real and visible break states to their targets at the end need to literally add the fake and invisible counterpart to them first
5. You'll need my state triggers plugin as well
6. The fake and invisible break state will first need the <add state trigger: STC_IS_ATB_CHARGE, STA_SKILL_NAME> notetag from the state triggers plugin(it should be placed above <add state trigger: STC1, STA_REMOVE_FAKE_BREAK_STATE>) -
Code:
 *      1. <timing state trigger: STCX, STAX>
 *         - Sets a state to trigger STAX when timing and STCX are met
 *         - timing can be add, turn, remove or custom timings set by you
 *         - add means the state's just added
 *         - turn means the state's remaining turn's just reduced by 1
 *         - remove means the state's just removed
 *         - (v1.02a+)while means the STAX effects are active as long as the
 *           state's active
 *         - timing must only consist of alphanumeric characters
 *         - STCX can be set in State Trigger Condition Functions
 *         - STAX can be set in State Trigger Action Functions
7. The STC_IS_ATB_CHARGE used in all those state triggers notetags will check if the target's charging skills -
JavaScript:
    // Adds new STCX here
    STC_IS_ATB_CHARGE: function(state) { return this.is_patb_charge(); },
8. The STA_SKILL_NAME used in each of the state triggers notetag, with SKILL_NAME replaced by the name of the skill using the corresponding notetag, will make most of the magic happen -
JavaScript:
    // Adds new STAX here
    STA_SKILL_NAME: function(state) { // SKILL_NAME is the name of the skill using this STAX
        // charge_reduction_value can be different for different skills using different STAX
        this.patb_val.charge -= charge_reduction_value;
        // charge_reduction_value is in terms of frames
        if (this.patb_val.charge >= 0) { return; }
        var real_break_state_id;
        if (this.isActor()) {
            // real_actor_break_state_base_id + this.actorId() = id of real break state for actor with this actor id
            real_break_state_id = real_actor_break_state_base_id + this.actorId();
            // real_actor_break_state_base_id is set by you
        } else if (this.isEnemy()) {
            // real_enemy_break_state_base_id + this.index() = id of real break state for enemy with this troop index
            real_break_state_id = real_enemy_break_state_base_id + this.index();
            // real_enemy_break_state_base_id is set by you
        }
        this.addState(real_break_state_id);
        // The real break state for this target will last for half of the negative charge time
        $dataStates[real_break_state_id].meta.patb_countdown = this.patb_val.charge / 120.0;
        // 60 frames per second * half of the charge time = 120.0
        this._result.clear();
        this._result.success = true;
        // break_state_damage_amount is the amount of damage from the real break state
        this.gainHp(-break_state_damage_amount);
        this.onDamage(break_state_damage_amount);
        // break_state_damage_amount is set by you
        this.startDamagePopup();
        if (this._hp <= 0) { this.performCollapse(); }
    },
9. The fake and invisible break state will then need the <add state trigger: STC1, STA_REMOVE_FAKE_BREAK_STATE> notetag from the state triggers plugin(it should be placed below <add state trigger: STC_IS_ATB_CHARGE, STA_SKILL_NAME>) -
JavaScript:
    // Sets the state trigger condition as always true
    STC1: function(state) { return true; },
JavaScript:
    STA_REMOVE_FAKE_BREAK_STATE: function(state) { this.removeState(state.id); },

If you decide to change to my superlative ATB to implement this mechanic(download the master branch only as the under development branch's still work in progress), I think I'll have to make another reply for that, and I'll need some time to think about its contents 😀
As my popularized ATB isn't designed for this level of complexity, you might want to try my superlative counterpart instead(especially if you really need multiple break states on the same target) 🙂

But if you want to stick to my popularized version, there's quite a complicated and convoluted workaround(which only works on targets not having multiple break states):
Spoiler: Setups
1. You'll need the countdown addon as well
2. You'll need a fake and invisible(without icons) break state and x real and visible break states(where x is the maximum number of battlers possible in any battle)
3. Every real and visible break state, which should render its owner unmovable, will need the <patb countdown: sec> notetag from the countdown addon(it doesn't matter what the value of sec is) -
Code:
 *      1. <patb countdown: sec>
 *         - Sets the state to have its turn updated every sec seconds
 *         - Every second in sec only consists of frames with atb updates
4. Skills having chances to effectively add those real and visible break states to their targets at the end need to literally add the fake and invisible counterpart to them first
5. You'll need my state triggers plugin as well
6. The fake and invisible break state will first need the <add state trigger: STC_IS_ATB_CHARGE, STA_SKILL_NAME> notetag from the state triggers plugin(it should be placed above <add state trigger: STC1, STA_REMOVE_FAKE_BREAK_STATE>) -
Code:
 *      1. <timing state trigger: STCX, STAX>
 *         - Sets a state to trigger STAX when timing and STCX are met
 *         - timing can be add, turn, remove or custom timings set by you
 *         - add means the state's just added
 *         - turn means the state's remaining turn's just reduced by 1
 *         - remove means the state's just removed
 *         - (v1.02a+)while means the STAX effects are active as long as the
 *           state's active
 *         - timing must only consist of alphanumeric characters
 *         - STCX can be set in State Trigger Condition Functions
 *         - STAX can be set in State Trigger Action Functions
7. The STC_IS_ATB_CHARGE used in all those state triggers notetags will check if the target's charging skills -
JavaScript:
    // Adds new STCX here
    STC_IS_ATB_CHARGE: function(state) { return this.is_patb_charge(); },
8. The STA_SKILL_NAME used in each of the state triggers notetag, with SKILL_NAME replaced by the name of the skill using the corresponding notetag, will make most of the magic happen -
JavaScript:
    // Adds new STAX here
    STA_SKILL_NAME: function(state) { // SKILL_NAME is the name of the skill using this STAX
        // charge_reduction_value can be different for different skills using different STAX
        this.patb_val.charge -= charge_reduction_value;
        // charge_reduction_value is in terms of frames
        if (this.patb_val.charge >= 0) { return; }
        var real_break_state_id;
        if (this.isActor()) {
            // real_actor_break_state_base_id + this.actorId() = id of real break state for actor with this actor id
            real_break_state_id = real_actor_break_state_base_id + this.actorId();
            // real_actor_break_state_base_id is set by you
        } else if (this.isEnemy()) {
            // real_enemy_break_state_base_id + this.index() = id of real break state for enemy with this troop index
            real_break_state_id = real_enemy_break_state_base_id + this.index();
            // real_enemy_break_state_base_id is set by you
        }
        this.addState(real_break_state_id);
        // The real break state for this target will last for half of the negative charge time
        $dataStates[real_break_state_id].meta.patb_countdown = this.patb_val.charge / 120.0;
        // 60 frames per second * half of the charge time = 120.0
        this._result.clear();
        this._result.success = true;
        // break_state_damage_amount is the amount of damage from the real break state
        this.gainHp(-break_state_damage_amount);
        this.onDamage(break_state_damage_amount);
        // break_state_damage_amount is set by you
        this.startDamagePopup();
        if (this._hp <= 0) { this.performCollapse(); }
    },
9. The fake and invisible break state will then need the <add state trigger: STC1, STA_REMOVE_FAKE_BREAK_STATE> notetag from the state triggers plugin(it should be placed below <add state trigger: STC_IS_ATB_CHARGE, STA_SKILL_NAME>) -
JavaScript:
    // Sets the state trigger condition as always true
    STC1: function(state) { return true; },
JavaScript:
    STA_REMOVE_FAKE_BREAK_STATE: function(state) { this.removeState(state.id); },

If you decide to change to my superlative ATB to implement this mechanic(download the master branch only as the under development branch's still work in progress), I think I'll have to make another reply for that, and I'll need some time to think about its contents 😀
Whew...that is frontloaded as hell lol. Is it alot simplier to implement on your superlative version?
Whew...that is frontloaded as hell lol. Is it alot simplier to implement on your superlative version?
It's more straightforward as far as only the break states are concerned(if break states are the only possible cause of cancelling charging skills), but the overall cost of switching from my popularized counterpart to the superlative version can be far from being little 🙂
Spoiler: Superlative ATB Setups
1. You'll need to set parameters isChargeEnabled, isCountdownEnabled and isEventEnabled as the following to enable the Charge, Countdown and Event modules respectively -
JavaScript:
return true;
2. You'll need to set the damage formulae of skills having chances to add break states to their targets as the following(chargeReductionVal is set by you in the damage formulae and originalDamageFormula is the original damage formula contents previously set by you):
JavaScript:
b.tempSATBChargeVal = b.chargeSATB() - chargeReductionVal; b.setChargeSATB(b.tempSATBChargeVal); if (b.tempSATBChargeVal < 0) b.runSATBNote("willCancelCharge"); originalDamageFormula
3. You'll need to set parameter willCancelCharge in the Event module -
JavaScript:
this._result.clear();
this._result.success = true;
// breakStateDamageAmount is the amount of damage from the real break state
this.gainHp(-breakStateDamageAmount);
this.onDamage(breakStateDamageAmount);
// breakStateDamageAmount is set by you
this.startDamagePopup();
if (this._hp <= 0) return this.performCollapse();
this.addState(breakStateId); // breakStateId is the id of the break state
4. The break state, which should make its owner unmovable, will need the following notetag in the Countdown module -
Code:
<satb countdown val val cfg: true, sec, CI_BREAK_STATE>
5. You'll need to add condiguration CI_BREAK_STATE in the Countdown module inside the Cfgs plugin -
JavaScript:
            // Adds new CIX here
            CI_BREAK_STATE: function(datum, datumType) {
                // The break state will last for half of the negative charge time
                return this.tempSATBChargeVal / 120.0;
                // Charge Value / 60 Frames Per Second / 2 = Seconds of break state duration
            }, // CI_BREAK_STATE
While it's still no easy feat and I've no time to test this myself yet(as I'm having a full-time job) so I'm not sure if it really works, I hope the amount of codes you need to write yourself will be smaller that way 😀

Original thread: https://forums.rpgmakerweb.com/threads/i-need-an-atb-charge-system-that-allows-for-being-stunned.158300/