apply Bobstah CustomStats to Yanfly Auto Passive State

Hello everyone. First I thank you for your kind reading this article.


1) I tried to apply Bobstah's Custom Stats Plugin to Yanfly's Auto Passive State in all-day


2) But Custom Stat Plugin only works on states by skill-using.


3) Although I don't have knowledge of javascripts, I opened plugin files and see parts of state application and found bellow parts relative to that one.


Bobstah.CustomStats.GameBattlerBase_addNewState = Game_BattlerBase.prototype.addNewState;
Game_BattlerBase.prototype.addNewState = function(stateId) {
    var res = Bobstah.CustomStats.GameBattlerBase_addNewState.call(this, stateId);
    if (stateId !== null) {
        var state = $dataStates[stateId];
        this.handleCustomStats(state);
    }
    return res;
};



Code:
Bobstah.CustomStats.GameBattler_removeState = Game_Battler.prototype.removeState;
Game_Battler.prototype.removeState = function(stateId) {
    var res = Bobstah.CustomStats.GameBattler_removeState.call(this, stateId);
    if (stateId !== null) {
        var state = $dataStates[stateId];
        this.handleCustomStats(state, true);
    }
    return res;
};


4) Maybe custom stat plugin have parts only two - Addtion new state by skill-using, and Removing state. 


5) How can I fix or add scripts for application custom stat plugin to auto passvie state plugin?


This is too hard problem to me.  I should be much obliged to you if you would help me about this problem...

Original thread: https://forums.rpgmakerweb.com/threads/apply-bobstah-customstats-to-yanfly-auto-passive-state.73320/