Can I make skills remove portions of the TPBS bar instead of all of it? If so, can characters select skills until the bar is empty?

I want to turn the wait TPBS in RMMZ into a system that works as follows. The bars fill up as usual. The first battler to have their bar fill up gets to go. They can then select a skill. Each skill removes a set amount from the TPBS bar rather than resetting the bar. The battler can choose as many skills as they want until their TPBS bar is empty. The skills aren't used until the battler submits their selection. Then the skills are used in the order they were selected. The battler can remove skills from the queue before they confirm their turn. After one battler finishes their turn, the bars continue to fill up normally. Battlers may end their turn without spending their entire bar. If that happens, the bar will be reduced to a specific amount if the amount spent hasn't surpassed that value.

Additionally, some skills will need to act at a later point determined by the TPBS bar filling up. Maybe a skill only works after the TPBS bar fills up an additional 30%. I think states, common events, and variables could make this work, but I am not sure.

My questions are:
  • Is this possible?
  • Is there a plugin that does this?
  • Is there anything I need to know before attempting this?
  • Will this break the game engine?
  • Am I better off using turn-based battling with variables based on agility instead of a TPBS bar?
  • Do you know of any documentation that will help me make this work?
  • Can the percent removed be based on the speed value in the skill creation menu?
  • What options are available to me to debug a plugin of this nature?
  • Is there a developer tool equivalent in RMMZ?

I made my first plugin yesterday after following a guide. I have been using javaScript for 4-5 years specifically to make games. I am confident I could do this in plain JS, however, I do not know how and have not tried to implement it in RMMZ yet. I thought it would be wise to ask the community first since RMMZ is new to me.

Thank you for taking the time to read my post.
Welcome!
Is this possible?
As I'm sure you've seen, if you're fluent in JavaScript, the entire code of the game is there in the js folder and can be modified by plugins. So anything you want is possible.
Is there a plugin that does this?
No, I have never heard of anything like it. You would have to code it entirely by yourself.

I might suggest that ignoring the built-in Time Progress system might actually be easier, your idea sounds basically like an Action Points system, where each round battlers will get so many AP to spend/save/whatever.

But if you love the notion of it being related to a progress bar, go for it.
Is there anything I need to know before attempting this?
In terms of what? You'll need to know how to code pretty well, but hopefully 5 years of JavaScript should take care of that.

I might suggest you spend some time doing smaller scale, less ambitious things first. Or reading through other plugins that manipulate the battle system...you're proposing a pretty drastic modification to the game.
Will this break the game engine?
Only if you do it wrong? 🤣 Again, the entire engine's code is there for you, so however you make it will be how it's made. I'm not sure what other parts of the engine it would interact with to potentially "break."
Am I better off using turn-based battling with variables based on agility instead of a TPBS bar?
I offered my suggestion above.
Do you know of any documentation that will help me make this work?
No, I don't know of any documentation as such for the code, you'll have to read it. Trihan has a Jump Into JavaScript that goes through some of the source files, explaining some of the functions, if you need that.
Can the percent removed be based on the speed value in the skill creation menu?
It would be whatever you code it to be. You're gonna have to do that graphical portion, too.
What options are available to me to debug a plugin of this nature?
The standard Chrome console tools you get from hitting F8 while playing the game.
Is there a developer tool equivalent in RMMZ?
Nope.
Welcome!

As I'm sure you've seen, if you're fluent in JavaScript, the entire code of the game is there in the js folder and can be modified by plugins. So anything you want is possible.

No, I have never heard of anything like it. You would have to code it entirely by yourself.

I might suggest that ignoring the built-in Time Progress system might actually be easier, your idea sounds basically like an Action Points system, where each round battlers will get so many AP to spend/save/whatever.

But if you love the notion of it being related to a progress bar, go for it.

In terms of what? You'll need to know how to code pretty well, but hopefully 5 years of JavaScript should take care of that.

I might suggest you spend some time doing smaller scale, less ambitious things first. Or reading through other plugins that manipulate the battle system...you're proposing a pretty drastic modification to the game.

Only if you do it wrong? 🤣 Again, the entire engine's code is there for you, so however you make it will be how it's made. I'm not sure what other parts of the engine it would interact with to potentially "break."

I offered my suggestion above.

No, I don't know of any documentation as such for the code, you'll have to read it. Trihan has a Jump Into JavaScript that goes through some of the source files, explaining some of the functions, if you need that.

It would be whatever you code it to be. You're gonna have to do that graphical portion, too.

The standard Chrome console tools you get from hitting F8 while playing the game.

Nope.
Thanks for your time, answer, and greeting!

Ignoring the TPBS makes sense. Graphics and AI are the only things I'm really worried about. The best idea I've got is to sort of pause the game after determining which battler is taking a turn and then let them choose what moves to make using an array to store that information. After they have decided, I can tell the game to do the actions in the order of the array through force action or however it needs to be and then determine the next user all while managing the AP/bar progress/whatever marks the energy spent on actions. I think the hardest part to code will be AI because I somehow have to work that in. I'll likely end up having to hand code every enemy's AI (or at least the boss's) and auto-battle will probably be broken. That's not the end of the world though.

At the very least it will make for a unique RPG Maker game! In the worst-case scenario, I learn a bunch of useful things and am no worse off than I currently am. Thanks again!

Original thread: https://forums.rpgmakerweb.com/threads/can-i-make-skills-remove-portions-of-the-tpbs-bar-instead-of-all-of-it-if-so-can-characters-select-skills-until-the-bar-is-empty.149443/