TP bar that increase gradually

Is there a way to make TP bars increase gradually, similar to the way full ATB bars gradually increase? The full ATB bars, by the way, fill continuously, regardless of turn.

Thanks 🙂
You could use my http://forums.rpgmakerweb.com/index.php?/topic/33037-turn-extension-v100/

then set it as a global turn start or turn end action...

Code:
module ADIK  module TURN_EXTENSION# ==============================================================================# Edit these two for global turn start and turn end methods# ==============================================================================        def self.global_turn_start      $game_party.battle_members.each {|bat| bat.tp += value}      $game_troop.members.each {|bat| bat.tp += value}    end        def self.global_turn_end    end
Or you could just assign a TP Regeneration rate to your characters in the Actor or Class tab in features, in the database. 10% tp regen is 10 tp a turn and so fourth.
Alright 😀 . I'll just give these options a try.
I've moved this thread to vx ace support. Please be sure to post your threads in the correct forum next time. Thank you.
Allow me to elaborate. What I wanted was atp bar that fill gradually in a similar fashion to Yami Classical ATB's full mode. In this mode, the bars fill up even while actions are taking place on either side.
Allow me to elaborate. What I wanted was atp bar that fill gradually in a similar fashion to Yami Classical ATB's full mode. In this mode, the bars fill up even while actions are taking place on either side.
Then you'll have to specify when that atp bar should fill(i.e., when that atp should increase). The atb bars fill per frame(the atb values increase per frame) whenever they're allowed to fill and aren't already full, but that only makes sense to your atp bars if they're time-based(or frame-based technically) too 🙂
Allow me to elaborate. What I wanted was atp bar that fill gradually in a similar fashion to Yami Classical ATB's full mode. In this mode, the bars fill up even while actions are taking place on either side.
As I still have no idea of what you want to do, I'll instead drop down how CATB full mode fills the atb bar.

Actually, the default full mode won't fill the atb bar when an action's executing, although a new :full_ani mode added by the wait addon, which is implemented this way(along with the context of the original CAT😎:

Spoiler
  #--------------------------------------------------------------------------  # 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:😛AUSE_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
Code:
  #----------------------------------------------------------------------------|  #  Alias method: catb_pause?                                                 |  #----------------------------------------------------------------------------|  alias catb_wait_addon_pause? catb_pause?  def catb_pause?    # Added to force the atb to run if FORCE_RUN_WAIT is true and WAIT_KEY is pressed    $game_system.catb_wait_type != :full_ani && (!DoubleX_RMVXA::YSA_CATB_Wait_Addon::FORCE_RUN_WAIT || !@force_run_catb) && catb_wait_addon_pause?    #  end # catb_pause?  #----------------------------------------------------------------------------|  #  Alias method: update_basic                                                |  #----------------------------------------------------------------------------|  alias catb_wait_addon_update_basic update_basic  def update_basic    catb_wait_addon_update_basic    # Added to check if WAIT_KEY is pressed    set_force_run_catb if BattleManager.btype?(:catb)    #  end # update_basic  #----------------------------------------------------------------------------|  #  Alias method: update_for_wait                                             |  #----------------------------------------------------------------------------|  alias update_for_wait_catb update_for_wait  def update_for_wait    update_for_wait_catb    # Added to force the atb to run if FORCE_RUN_ANI is true and WAIT_KEY is pressed    process_catb if BattleManager.phase != :init && !$game_message.visible && BattleManager.btype?(:catb) && ($game_system.catb_wait_type == :full_ani  || DoubleX_RMVXA::YSA_CATB_Wait_Addon::FORCE_RUN_ANI && @force_run_catb)    #  end # update_for_wait  #----------------------------------------------------------------------------|  #  New method: set_force_run_catb                                            |  #----------------------------------------------------------------------------|  def set_force_run_catb    last_force_run_catb = @force_run_catb    @force_run_catb ||= Input.trigger?(DoubleX_RMVXA::YSA_CATB_Wait_Addon::FORCE_RUN_ATB_KEY)    @force_run_catb &&= !Input.trigger?(DoubleX_RMVXA::YSA_CATB_Wait_Addon::STOP_FORCE_RUN_ATB_KEY)    @catb_wait_window.draw_text(@force_run_catb) if @catb_wait_window && last_force_run_catb != @force_run_catb  end # set_force_run_catb
(Again, I quoted those code as I don't know what you want to achieve yet)

If you want to strictly replicate that behavior for your atp bars, you'll want to do something like this(assuming you aren't using any other custom script):

Spoiler
Code:
module BattleManager # Edit  attr_reader :phase # Read by atp_update? under Scene_Battleend # BattleManagerclass Game_Battler < Game_BattlerBase # Edit  def atp_update # New    return if @tp >= max_tp    @tp += increment # increment is code written by you    @tp = max_tp if @tp > max_tp  end # atp_updateend # Game_Battlerclass Scene_Battle < Scene_Base # Edit  alias update_atp update  def update    update_atp    atp_update if [email protected]? && atp_update? # Added  end # update  alias update_for_wait_atp update_for_wait  def update_for_wait    update_for_wait_atp    atp_update if @spriteset.animation? && atp_update? # Added  end # update_for_wait  def atp_update # New    $game_party.alive_members.each { |mem| mem.atp_update }    $game_troop.alive_members.each { |mem| mem.atp_update }  end # atp_update  def atp_update? # New    return false if scene_changing? || $game_message.visible    return false if $game_party.all_dead? || $game_troop.all_dead?    BattleManager.phase && BattleManager.phase != :init  end # atp_update?end # Scene_Battle
Thanks for the help, but I'm breaking away from RPG maker at the moment. This thread could be closed.

Original thread: https://forums.rpgmakerweb.com/threads/tp-bar-that-increase-gradually.43924/