Looking for my definition of an ATB Battle System

juggernaut

Veteran
Veteran
Joined
Dec 29, 2014
Messages
60
Reaction score
11
First Language
English
Primarily Uses
Hi everybody!

I've looked around google, forum searched and watched one or two 'Best Battle Systems 2014' type videos but I still haven't quite found a system that acts how I'd like!

All I'm looking for is a system to study and learn from that uses a Time Gauge for the player or their party but doesn't freeze action when you're selecting what you want to do. That is to say, the enemies can continue to act as they are able without any restriction!

Any recommendations of systems that either already do this or ones that could be made to do it simply enough?
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
This is from my memory, if I recall correctly.

Yami's classical ATB has various modes, one of those is the no wait mode in which enemies can continue to act even while ur selecting an action... It's quite old though and AFAIK has several incompatibilities. It still stops when an animation is playing though, because continuing things while animations are running can cause a bit of problems, mostly visual though.

I think most ATBs has that capability anyways, just that most people use a waiting mode because more casual players doesn't really want to play an RPG that doesn't wait while they're selecting commands, I guess. 
 
Last edited by a moderator:

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
Yami's classical ATB has various modes, one of those is the no wait mode in which enemies can continue to act even while ur selecting an action... It's quite old though and AFAIK has several incompatibilities. It still stops when an animation is playing though, because continuing things while animations are running can cause a bit of problems, mostly visual though.
FYI: With my wait addon, the atb can run even when the animations are running:

http://forums.rpgmakerweb.com/index.php?/topic/27695-doublex-rmvxa-wait-addon-to-ysa-battle-system-classical-atb/

All I'm looking for is a system to study and learn from that uses a Time Gauge for the player or their party but doesn't freeze action when you're selecting what you want to do. That is to say, the enemies can continue to act as they are able without any restriction!
Besides Yami's CATB, Victor's Active Time Battle also has a full atb mode(time don't stop even while executing an action):

http://victorscripts.wordpress.com/rpg-maker-vx-ace/battle-scripts/active-time-battle/

Moghunter's ATB also has this feature(It's full active atb mode but I don't know if it won't stop even while executing an action though):

http://www.atelier-rgss.com/RGSS/Battle/ACE_BAT02.html
 

juggernaut

Veteran
Veteran
Joined
Dec 29, 2014
Messages
60
Reaction score
11
First Language
English
Primarily Uses
I might have posted this in my other thread which was definitely more of a Script Request but here's this:


In the interest of my learning process, I've picked up a few systems and I'm currently looking through them wondering where they begin doing their calculations for the speed of the timer. Would anyone be able to shed some light on that? I've also looked at Archeia's CTB and really like how short, sweet and to the point it is. 

Where should I be looking or what method would you use to get a timer ticking? 
 

DoubleX

Just a nameless weakling
Veteran
Joined
Jan 2, 2014
Messages
1,787
Reaction score
939
First Language
Chinese
Primarily Uses
N/A
There are usually 3 timers: Global ATB Timer, Party ATB Timer and Battler ATB Timer.

My tick addon video should illustrate this point:

https://www.youtube.com/watch?v=aHn4zM_Siek&index=13&list=PLp-0SJbFnYdw-laxpgITmo88EvluvBg2x

The window at the upper right corner shows the global atb timer and the gray bar of each battler shows the battler's atb timer.

About the global atb timer -

Its speed is usually the same as the frame per second. It maybe a constant 60, Graphics.frame_rate, something that's defined by users, or just something else.

The atb update per frame is usually implemented in a method under module BattleManager or class Scene_Battle, and that method must be able to be called(and should be called) per frame so the atb can be updated per frame.

About the battler atb timer -

Its speed is usually based on a battler's stat(likely agi, although my atb addon lets users set that to whatever they want). The formula can be something like base atb gain value * battler's stat / average of that stat of all battlers

base atb gain value is usually the maximum atb value / base atb fill time, and both maximum atb value and base atb fill time can sometimes be set by users. This formula is likely implemented in a method under class Game_BattlerBase or Game_Battler.

(I'm not familiar with party atb timer so I'm not going to talk about that)

About both -

For example:

- YSA-CATB

class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # alias method: process_action #-------------------------------------------------------------------------- alias catb_process_action process_action def process_action if BattleManager.btype?:)catb) process_catb perform_catb_action(@subject, true) if BattleManager.action_forced? end catb_process_action unless BattleManager.btype?:)catb) end #-------------------------------------------------------------------------- # new method: catb_pause? #-------------------------------------------------------------------------- def catb_pause? return true if BattleManager.action_forced? return YSA::CATB::pAUSE_WHEN_ACTIVE_PARTY_COMMAND if @party_command_window.active return true if $imported["YEA-CombatLogDisplay"] && @combatlog_window && @combatlog_window.visible return false if $game_system.catb_wait_type == :full return true if $game_system.catb_wait_type == :wait && (@actor_command_window.active || @skill_window.active || @item_window.active || @actor_window.active || @enemy_window.active) return true if $game_system.catb_wait_type == :quarter && (@skill_window.active || @item_window.active || @actor_window.active || @enemy_window.active) return true if $game_system.catb_wait_type == :semi && (@actor_window.active || @enemy_window.active) end #-------------------------------------------------------------------------- # new method: process_catb #-------------------------------------------------------------------------- def process_catb if @status_window.index >= 0 && ($game_party.members[@status_window.index].dead? || !BattleManager.action_list:)actor).include?($game_party.members[@status_window.index])) $game_party.members[@status_window.index].clear_catb if @skill_window.visible || @item_window.visible @status_window.open @status_window.show @status_aid_window.hide end @actor_window.hide.deactivate @enemy_window.hide.deactivate @actor_command_window.deactivate @actor_command_window.close @skill_window.hide.deactivate @item_window.hide.deactivate @status_window.unselect end return unless SceneManager.scene_is?(Scene_Battle) return if scene_changing? return unless BattleManager.btype?:)catb) return if catb_pause? battler_hash = $game_party.members + $game_troop.members battler_hash.each { |a| a.make_catb_update a.make_catb_action a.make_ct_catb_update } #--- Update Tick Turn if $game_system.catb_turn_type == :tick @tick_clock = 0 if !@tick_clock @tick_clock += 1 if @tick_clock >= $game_system.catb_tick_count @tick_clock = 0 all_battle_members.each { |battler| battler.on_turn_end } @status_window.refresh $game_troop.increase_turn end end #--- Fix make action BattleManager.action_list:)actor).each { |battler| battler.make_actions if (battler.actor? && !battler.input) } #--- @status_window.refresh_catb #--- Setup Actor @f_actor_index = 0 if !@f_actor_index || @f_actor_index < 0 || @f_actor_index + 1 > BattleManager.action_list:)actor).size f_actor = BattleManager.action_list:)actor)[@f_actor_index] @f_actor_index += 1 if (@f_actor_index + 1) < BattleManager.action_list:)actor).size && f_actor && f_actor.input && f_actor.input.item && f_actor.input.confirm f_actor = BattleManager.action_list:)actor)[@f_actor_index] if f_actor && f_actor.input && !f_actor.input.confirm && (!BattleManager.actor || @status_window.index != BattleManager.actor.index) && !@actor_command_window.active && !@party_command_window.active BattleManager.set_actor(f_actor.index) @status_window.select(BattleManager.actor.index) @actor_command_window.setup(BattleManager.actor) @actor_command_window.show end BattleManager.action_list.each { |battler| battler.make_actions if battler.enemy? perform_catb_action(battler) if !@subject } end
process_action is a method that's supposed to be called per frame, catb_pause? checks if the atb should stop updating and process_catb is the method updating the atb per frame.

If the turn type is :tick, then the global atb timer will be updated via this part of process_catb:

if $game_system.catb_turn_type == :tick @tick_clock = 0 if !@tick_clock @tick_clock += 1 if @tick_clock >= $game_system.catb_tick_count @tick_clock = 0 all_battle_members.each { |battler| battler.on_turn_end } @status_window.refresh $game_troop.increase_turn end end
Where @tick_clock is the frames lasted for the current turn and $game_system.catb_tick_count is the maximum frame per turn.

All battler's atb timer is updated via this part of process_catb:

battler_hash.each { |a| a.make_catb_update a.make_catb_action a.make_ct_catb_update }
Where make_catb_update is a method under class Game_Battler:

def make_catb_update return if @catb_value >= MAX_CATB_VALUE return if not movable? value = $imported["YSA-LunaticCATBRate"] ? lunatic_catb_rate_formula : real_gain_catb @catb_value += [value, MAX_CATB_VALUE - @catb_value].min end
Where @catb_value is the atb value of a battler, MAX_CATB_VALUE is the maximum atb value, and both the lunatic_catb_rate_formula and real_gain_catb determines the speed of a battler's atb timer:

(lunatic_catb_rate_formula would be too complicated to be shown here)

def real_gain_catb value = (self.agi.to_f / BattleManager.average_agi) * base_gain_catb return value end
Where self.agi.to_f is the battler's agi, BattleManager.average_agi is the average agi of all battlers and base_gain_catb is the base atb gain value.

As I'm not familiar with the other atb systems, I won't be able to use their implementations as examples :)

P.S.:

1. CTB and ATB are 2 completely different battle systems with completely different implementations(even though full wait ATB functions just like a CTB).

2. Implementing a party atb timer can be quite different from implementing a battler atb timer though :D
 
Last edited by a moderator:

juggernaut

Veteran
Veteran
Joined
Dec 29, 2014
Messages
60
Reaction score
11
First Language
English
Primarily Uses
Hey, DoubleX, wow. Just wow. This is the kind of explanation I've been looking for and you've done me a world of good. I'll still need to connect plenty of dots but I'm seeing more of how things work every time I look deeper. Thanks very much!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,860
Messages
1,017,038
Members
137,568
Latest member
invidious
Top