Is there a way to make battle animations play without pausing ATB? (Yanfly's ATB)

Hi all,

I'm using Yanfly's Battle Core and ATB, and I'm wondering if there's a way to make it so that the ATB gauge doesn't pause during battle animations (the whole way through from casting to finish). Basically making is so that the only time that ATB is paused is when the player is inputting commands and doing any menu selection (ie. when any one actor's ATB is full).

There might lead to actions and animations taking place concurrently with one another, but that's kind of the effect I'm trying to get, or at least see how it would work.

Any thoughts?

Thanks!
Hi all,


I'm using Yanfly's Battle Core and ATB, and I'm wondering if there's a way to make it so that the ATB gauge doesn't pause during battle animations (the whole way through from casting to finish). Basically making is so that the only time that ATB is paused is when the player is inputting commands and doing any menu selection (ie. when any one actor's ATB is full).


There might lead to actions and animations taking place concurrently with one another, but that's kind of the effect I'm trying to get, or at least see how it would work.


Any thoughts?


Thanks!

If you just want the ATB to continue to fill when animation's playing, it's certainly feasible, even though it seems to me that Yanfly has no plan to upgrade his/her ATB that way yet 🙂


In this case, you may want to check DoubleX RMMV Popularized ATB Core.


Although that plugin doesn't let the ATB to continue to fill when animation's playing while stopping it when players are inputting commands, I can effortlessly write an easy, simple and small snippet to address that in a straightforward manner 😛


If you want more than 1 actions to be executed concurrently with one another, however, it'll violate 2 of the most fundamental Scene_Battle based battle system foundations:


1. Only 1 actions can be executed at a time


2. Only 1 battler can execute actions at a time


If you really, really insist to want that, you can already expect an extremely expensive(my wild guess is 1000+ USD) commission needing at least several months(if not years) offered by a ready and willing prodigy ATB system plugin developer, if you've no plan to take this exceptionally tough challenge yourself 😀


P.S.: For those wanting to try to do this themselves, right now I can think of 2 directions:


1. Shoehorn the whole implementations of an ABS(Action Battle System), which is a Scene_Map based battle system, into an ATB system, which is a Scene_Battle based battle system. It'd mean using an event/interpreter to handle each action execution subject, executing action and action target, and use an event/interpreter manager to handle all these events/interpreters, including the linkages in each action execution subject-executing action-action targets triple and the timing coordination among all these triples.


Doing all these needs a thorough comprehension on both writing ABS and ATB system plugins.


Of course, in this case, I'd just suggest the OP to use a real ABS instead, unless the OP absolutely doesn't want to deal with space management in battle.


2. Use concurrent programming and perhaps multithreading, using each thread to handle an action execution subject-executing action-action targets triple. It'd risk needing more threads than what's currently available when there are many such triples at the same time, mean potential deadlocks/heisenbugs and need a thread manager to synchronize all these threads to keep their timing relationships crystal clear and determined in order to reduce perceived ambiguity and seemingly random execution orderings.


Doing all these needs a thorough comprehension on writing ATB system plugins and a complete mastery on concurrent programming and possibly multithreading in Javascript ES5.


For those going for this direction, I can only wish you good luck, as it seems to me that it'll be one of the hardest challenge in RMMV ever 😉


P.P.S: Any ATB system plugin letting more than 1 actions to be executed at the same time and/or more than 1 battlers to execute actions at the same time will need maximally performant codes in terms of both time and memory, otherwise only very powerful machines will ever be able to take such a heavy burden :|
@DoubleX


Would you say it is necessary to have an action battle system, just to have multiple battlers performing actions at the same time?
@DoubleX


Would you say it is necessary to have an action battle system, just to have multiple battlers performing actions at the same time?


Basically making is so that the only time that ATB is paused is when the player is inputting commands and doing any menu selection (ie. when any one actor's ATB is full).


There might lead to actions and animations taking place concurrently with one another, but that's kind of the effect I'm trying to get, or at least see how it would work.

I've tried to simulate some cases possible from what the OP wants, and I ended up with this:


1. When actor A finished inputting action A with target A, actor A will immediately start to execute action A with target A, so the ATB gauge resume to fill.


2. When action A's still executing with animation A still playing and target A still being targeted, an enemy B's ATB becomes full, so that enemy immediately finish inputting action B with target B instantly.


3. Now action B starts to execute with animation B to be played and target B to be targeted right now, while actor A's still executing action A with an animation A playing and target A being targeted.


4. So 2 action execution subject-action-target triples are here at the same time: Actor A - Action A - Target A and Enemy B - Action B - Target B.


Now there are something interesting to tinker with:


1. If Target A is Enemy B and Target B is Actor A, which triple takes place first in the same frame becomes vital for all such frames, as different such ordering can lead to different results, like one leading to Enemy B dying and another one leading to Actor A dying.


2. If 4 triples, instead of 2, take place at the same time, some dangerous cyclic relationships can come, like Enemy A targeting Actor A who targets Enemy B who targets Actor B who targets Enemy A, which leads to 24 possible triple orderings.


3. While it's possible to always deterministically settle the triple execution ordering without any possible ambiguity(like using a stack to store all currently executing triples) per frame, it's impossible for the plugin alone to determine which triple actually applies the skill/item damage/effects first, as different actions have different animations which have different length, meaning the delay coming from skill/item animation between the start of the action execution and the start of delivering effects becomes an extremely important factor in determining the effect application ordering.


4. If the OP wants to ensure no action execution subject-action-targets triple will ever intersect with any other ones(i.e.: no battlers are involved in more than 1 such triples), then the situations will become significantly easier, simpler and more straightforward. An execution stack storing all such currently executing triples as well as a wait stack storing all such triples intersecting with at least 1 of those in the execution stack can be implemented to manage this. Of course actions having random targets will suddenly become quite a mess to cleanup, as whether such triples having these actions will intersect with those in the execution stack will become totally random, and it's almost mission impossible to eliminate the perceived ambiguity from players.


P.S.: I've watched the entirety of the video you posted here, but I haven't seen more than 1 actions executing at the same time(exactly the same frame), nor more than 1 battler executing actions at the same time(exactly the same frame). What I've seen is a single action sequence needing more than 1 battlers to execute, and all those battlers execute their parts of the action sequence sequentially(i.e.: Battler B will immediately become the action execution subject right after and only right after Battler A has completely executed his/herp parts in the same action sequence).


P.P.S.: If what the video delivers is already what the OP wants, then I'm glad that this request can be solved rather quickly, at least by those having a thorough comprehension on action execution sequence involving more than 1 battlers.
Thanks for both of your responses and interest.


When I made this post, the system I originally had in mind was similar to what FFX-2 introduced and later FFXIII expanded on. Starting at the 5:00 mark in this video, you can see how sometimes the characters end up executing attacks at the same time:










Of course, this is probably very difficult to do, in which case, I think I would just be looking for a system where the animations still occur sequentially, but the ATB bar itself and the ability to input commands for a full-ATB character is possible even during mid-animation of a player/monster's attack. Similar to what we have in this video starting at around the 0:45 mark (you can see the player going through items during the casting/animation of Doomsday):










Ultimately, the goal is to make battle pacing a little faster and more streamlined. The biggest improvement with the implementation of this system is that, with the exception of perhaps the start of the battle, you would rarely have to wait for an ATB to fill up. Even with short animations (~1 seconds), the short pause that MV adds before and after a battle animation really adds up, and if we can utilize that time to fill ATB bars, we should be able to avoid the abrupt break in tempo when players have to wait for the next character's ATB to fill after they've executed a previous move.
If the 2nd video is what you want, you may want to check DoubleX RMMV Popularized ATB Core.


Although that plugin doesn't let the ATB to continue to fill when animation's playing while stopping it when players are inputting commands, I can effortlessly write an easy, simple and small snippet to address that in a straightforward manner 🙂


For those wanting to replicate what the 1st video can deliver:

Spoiler
Spoiler





You may be interested in my insights and views regarding the concurrency issue.


It seems to me that concurrent programming/multithreading's no longer needed, just replicating some parts of the ABS implementations will suffice.


I'd still use a 3 layer approach inspired from ABS:


1. Bottom layer - 1 action execution subject list, 1 executing action list and 1 action targets list


2. Mid layer - 1 action execution subject - executing action - action targets triples list


3. Top layer - action execution subject - executing action - action targets triples concurrency solver


Applying the aforementioned basic concurrency knowledge and using ABS as an anology:


In ABS, there are channeling actions, which are those needing the action execution subject to continually execute those actions in order to maintain them. Once the action execution subject stops channeling those actions, they'll be immediately stopped.


If battler A channels action A always continually damaging battler B, and battler B channels action B always continually damaging battler A, then there can be concurrency issues.


For instance, if at the same frame, channeling action A will kill battler B thus stopping action B while channeling action B will kill battler A thus stopping action A, the ordering will become vital. The relationship in this case is battler A -> battler B -> battler A, which is cyclic.


Similarly, if battler C channels action C always healing battler A, then ere can also be concurrency issues.


For instance, if at the same frame, channeling action B before channeling action C will kill battler A thus making action C useless to A while channeling action C before channeling action B won't kill battler A, the ordering will become vital too. The relationship in this case is battler B -> battler A <- battler C.


Implementing deterministic rules always making the same choice for the execution sequence for the same situation is relatively easy, simple and straightforward for acyclic cases, while implementing that for cyclic cases is much more complicated, convoluted and tough.


Going back to ATB, all actions having repeats greater than 1 and/or more than 1 targets are essentially the counterparts of the channeling actions in ABS.


The skill/item animation effectively serves as a windup delay of the executing action and the channeling starts right after finished playing that animation.


On a side note: The max outdegree in the OP's request's always 1, as each executing action will only be applied to 1 target in the same frame, meaning that it's impossible for any 2 cyclics to intersect with each other.


Nevertheless, sometimes the concurrency issue can still be as insane as this:


Battler C -> Battler A -> Battler B -> Battler A


                                           ^


                                           |


                                      Battler D


Using deterministic rules alone to always ensure making the same choice for the execution sequence for the same situation can be rather challenging. However, if the concurrency of the cyclic part can be solved, the above approach will become significantly more feasible.


Of course, in this case I'd just make a deep copy for each battler right before executing any action in the same frame in order to play safe 😀

Original thread: https://forums.rpgmakerweb.com/threads/is-there-a-way-to-make-battle-animations-play-without-pausing-atb-yanflys-atb.55134/