MZ seperating turn from Timeprogress bar ( active)

hello,
okay i'm making a plug in that allows my players to keep taking actions and turns regardless of the tpb.
i discovered that i can allow my players to have access to the menu bar (attack /guard etc)
by

Game_Battler.prototype.isTpbCharged = function() {
return true;


which is great and all ! HOWEVER if i press attack or guard or try useing any skill i get


TypeError
Cannot read property 'setAttack' of undefined

, or setskill or setguard error etc...
I looked through so much code! i can't seem to see where it is that triggers the attack and guard menu to be populated and defined...i think my actors are not getting the command to be ready
any idea on how would i figure out how to get all the actors ready to use skillz independant from the TPB?
So I've been messing about and I now know that I need to.somehow set all my actors as active /ready to input

It seems that even thou I can press the skill commands like attack / guard
These commands don't have an active actor to populate the skills...

So... How do I activate these actors... Does anyone know what command actually makes the actors active?

Because once the TPBar is full , I can do all the commands.
I want the actors to always be active.
For their turn to start ...
okay I had a break through

Game_Battler.prototype.isTpbCharged = function() {
return true;
};

Game_Actor.prototype.updateTpbAutoBattle = function() {
if (this.isTpbCharged() && !this.isTpbTurnEnd()) ///// this kinda worked/////
this.startTpbTurn();
};
It's now working as planned!
However i came acrross the following issues ...
1.becasue Tpb only resets when an actor makes a command skills that are dependant on turn order will only take effect when the player takes an action.
2. if i press attack again while the actor is attacking then the game crashes again...
i'll create a command to grey out attack while the actor is still doing his command or some kind of timer? i dont know.... i'll find out how to do it eventually.

Original thread: https://forums.rpgmakerweb.com/threads/seperating-turn-from-timeprogress-bar-active.126225/