Notice: fwrite(): Write of 44 bytes failed with errno=28 No space left on device in /home/rmrk/domains/rmrk.net/public_html/Sources/Cache/APIs/FileBased.php on line 96
Print Page - Adjust Battle Wait

The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: SoulPour777 on March 02, 2015, 02:07:51 PM

Title: Adjust Battle Wait
Post by: SoulPour777 on March 02, 2015, 02:07:51 PM
Adjust Battle Wait
Version: 1
Author: Soulpour777
Date: March 2, 2015 (as this was posted)


Description



Changes the waiting time before attacking. Call it the effect of a reverse ATB if you may.

Features


Instructions

Instructions:

WAIT = 50

this is the initial wait method. As you can see, the waiting isn't that fast.
If you want to change the waiting time, do this in a script call in an event command:

set_battle_wait(time)

Script




# ============================================================================ #
#                         ◆ Adjust Battle Wait ◆
#                             Author: Soulpour777
# ---------------------------------------------------------------------------- #
# Description: This script changes the waiting time in battle. That's it.
# ---------------------------------------------------------------------------- #
# Instructions:
# WAIT = 50
# this is the initial wait method. As you can see, the waiting isn't that
# fast.
# If you want to change the waiting time, do this in a script call in an event
# command:
# set_battle_wait(time)
# where time is the battle waiting time you wish.
# ---------------------------------------------------------------------------- #
# Terms of Use:
# You are free to SHARE and REMIX the script and its all free.
# ---------------------------------------------------------------------------- #
# Author's Notes:
# To those who wishes to create an ATB, this is actually a sample guide. This
# is the basis of my ATB in a game I am making.
# ============================================================================ #

($imported ||= {})[:soulpour_abw_atb] = {
  :name => 'Adjust Battle Wait',
  :version => '1.0.0',
  :author => ['Soulpour777'],
  :date => '2015-02-27',
  :id => :soulpour_abw_atb,
  :enabled => true
}

($imported[:SCRIPT_LIST] ||= []) << $imported[:soulpour_abw_atb]

module Soulpour777
  module AdjustBattleWait
    WAIT = 50 # This is the initial wait method.
    def set_battle_wait(time)
      $game_system.battle_wait = [time, 0].max
    end   
  end
end

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Include
  #-------------------------------------------------------------------------- 
  include Soulpour777::AdjustBattleWait
end

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #-------------------------------------------------------------------------- 
  attr_writer   :battle_wait         
  def battle_wait
    if @battle_wait != nil
      return @battle_wait
    else
      return Soulpour777::AdjustBattleWait::WAIT
    end
  end
end

class Sprite_Battler < Sprite_Base
  alias :soul_adjust_bat_wait_setup_new_effect :setup_new_effect
  #--------------------------------------------------------------------------
  # * Set New Effect
  #--------------------------------------------------------------------------
  def setup_new_effect
    self.visible = true
    soul_adjust_bat_wait_setup_new_effect
  end
end

class Scene_Battle < Scene_Base
  alias :soul_adjust_bat_scene_battle_wait_wait :wait
  #--------------------------------------------------------------------------
  # * Wait
  #--------------------------------------------------------------------------
  def wait(duration)
    duration = [duration * $game_system.battle_wait / 100, 1].max
    soul_adjust_bat_scene_battle_wait_wait(duration)
  end
end


Credit




Support



For any support, please message or comment down.

Known Compatibility Issues

N / A

Author's Notes



To those who wishes to create an ATB, this is actually a sample guide. This is the basis of my ATB in a game I am making.

Terms of Use



You are free to SHARE and REMIX the script and its all free.
Title: Re: Adjust Battle Wait
Post by: VianoceGames on March 02, 2015, 06:00:51 PM
Does this control the wait time for all attacks or is it specific to the next attack being used. So for instance someone that uses a spell that has a longer chant than more common spells, is the purpose of this script to give this effect?
Title: Re: Adjust Battle Wait
Post by: yuyu! on March 02, 2015, 07:12:36 PM
^ I'm curious about that, too. This is pretty cool! :-)
Title: Re: Adjust Battle Wait
Post by: SoulPour777 on March 03, 2015, 11:51:34 AM
Quote from: VianoceGames on March 02, 2015, 06:00:51 PM
Does this control the wait time for all attacks or is it specific to the next attack being used. So for instance someone that uses a spell that has a longer chant than more common spells, is the purpose of this script to give this effect?

It is intended for all attacks. These can be attacks that somehow uses some kind of time before they attack, etc. They can be skills or normal attacks.
Title: Re: Adjust Battle Wait
Post by: VianoceGames on March 03, 2015, 08:43:59 PM
Sorry I just want to make sure I understand you correctly. So I just use the script call for the desired skill/attack and this would change the wait time for all skills/attacks, so I would have to change the wait time back to normal? If so this wouldn't effect the skill/attack's wait time that I actually wanted changed?
Title: Re: Adjust Battle Wait
Post by: SoulPour777 on March 04, 2015, 03:43:10 AM
It would, since it goes for every skill. Item and Skills are of the same type, so when you use a skill and you have this script, you can change the waiting time of everyone of them, then change them back to the default waiting time after.
Title: Re: Adjust Battle Wait
Post by: VianoceGames on March 04, 2015, 03:48:55 AM
Sweet, this will add some dimension to my games. Casting times for spells, and item perpetration time before using is really cool. Also it would be cool for skills that take time to prepare, like for classes that use guns, bows and other types of equipment like that.