[Dev] Hime ATB

I decided to start writing a tutorial about battle system development, and have decided to use ATB as an example, since you can pretty much just use all of the default battle system's logic with a few minor tweaks. If you wanted to implement an action battle system for example, that would require more code just to get the basics set up.


The first tutorial starts you off with basically nothing except MV's default system.


You will be writing your own battle system from scratch.


You will proceed to add ATB to your battlers, change the battle manager so that battler actions are processed differently, and then update the window with a simple ATB bar to see that it works.


Anyways, this is what you'll get upon completing the first tutorial! A link to it can be found here










I did replace the TP bars, but I couldn't find a better way to display it so I figured might as well since it's just for testing purposes.


From here, we can start adding new features, like having enemies constantly punching you while you're still wondering what to do.
After the first tutorial is released, I will begin working on the second tutorial which will implement "turns" in this battle system so that events and states will work as you would expect.
I'd highly recommend those wishing to learn how ATB system works to read this tutorial series, as it's just so well-written that everyone should be able to follow effortlessly 🙂
The next part of the tutorial has been released. You can read it here.










This time, we are interested in customizing our battlers' fill rates so that we can change them during battle!


We define something called a "slow effect" which slows down our battlers speeds when a certain state is added. Additionally, we update the AT bar to tell the player that something has happened to the bar.


At the end of the tutorial you should have something similar to what I have in the video.
The third tutorial is now released.


I have chosen to talk about "turn count" in the context of the battle system.


Specifically, what I am interested in is the ability to use all of the existing turn-count-based functionality that RPG Maker provides, which includes but is not limited to


1. Troop Events


2. Enemy Actions


3. State Duration


In this tutorial, you will define what a "turn" is, and then see it in action immediately after writing a few lines of code implementing the logic.


Here is a video demo of what you should be able to achieve at the end of the tutorial.
The fourth and fifth tutorials have been released.


Tutorial #4: State Turns and Effect Timings


Tutorial #5: Bug Fixes 1


In the fourth tutorial, we implement "proper" state duration and state effects.


By proper, I mean that it's based on frames and not turns since measure of time is based on frames.


The default system assumes that everything is based on turns, which means state durations and effects are updated at the end of every battle turn.


For example, if a poison state lasts for 3 turns, is removed on turn end, and applies 5% poison damage at the end of every turn, then on the 3rd turn, after every battler has performed their actions, poison damage will occur, and then the state will be removed.


But what happens if your state is added at different points in time during a turn?


If I add a poison state to actor 1, and then wait 50 frames before adding a poison state to actor 2, should both actors receive poison damage at the same time?


No, what you expect is the first actor would receive poison damage, and then 50 frames later, the second actor would receive poison damage, because the poison wasn't applied at the same time.


Here is an example of what I mean:










The fifth tutorial is focused on testing and addressing bugs that are uncovered.


The first few tutorials were focused on getting the "basic" stuff working and making sure that it passes basic tests.


I didn't come up with a full set of test cases when I was developing the system, so there were several bugs that could've been caught early on, but I wasn't aware of those cases.


However, after resolving those issues, I think we have a pretty solid base ATB to start building on.


1. Action order is based on ATB


2. Fill rates can be customized during battle based on battler speeds


3. Turn count is available so that you can set up events, enemies, and states as you normally would


4. Each state properly tracks their own time and effect execution


I think this would be enough to call it a bare-bones RPG Maker ATB, since integration with RPG Maker functionality is a must-have in order to call it an RM battle system.


At this point, there are a lot of things that could be done to make the ATB more interesting.
Each component will be provided as separate plugins, which ideally you could mix and match to create your own unique battle system.


The system is designed so that visuals can be completely swapped in and out depending on how you want to design your game.


Additional visual components will be developed, which you can add to the system to make it visually different from someone else that might be using the same system.


Right now there's a bunch of hardcoded logic, like it assumes state 32 is the "slow" state for demonstration purposes. It also assumes a fixed "frames per turn" as well as the max ATB. These will need to be pulled out into configuration options in case the values I chose are unsuitable.
Here's a preview of the real-time ATB mode
Here's an extra add-on that allows you to use an action order gauge to let players know when a battler is ready for attack.


You could then stick with the default battle HUD with a custom windowskin or something rather than finding a new way to display ATB.
That bar reminds me of Grandia. This is so awesome.
Some more grandia functionality: a preliminary implementation of prep-time.

Original thread: https://forums.rpgmakerweb.com/threads/dev-hime-atb.55484/