GW Animated Battle backs Patch for Atoa ACBS
#9
(10-16-2024, 09:59 PM)DerVVulfman Wrote: Okay, this is the code, and I went and added some translated instructions from the post.  Sadly, not all of it was easy to translate and got omitted because... well, better missing instructions than BAD instructions.

Code:
#==============================================================================
# ** GW Animated Battlebacks + New Features
#------------------------------------------------------------------------------
#  by The Bard (Gabriel Winchester)
#  - Improvements by Atoa -
#  May 22, 2010
#
#  This screipt allows battlebacks to be animated (no, its not like Moghunter's
#  system which moves). They are actually animated, by individual frames.
#
#  USAGE
#  Before each battle, you establish the parameters you want for the battleback.
#
#  Use the call script command:  animated_bb_on(speed, frames, opacity_
#  * Opacity can be omitted as it is defaulted to a full 255 solid setting
#
#  To turn off the animated battleback layer, use: animated_bb_off
#
#  NEVER set a speed value to 0 or below.

#  UPPER LAYER
#  If you add a top layer to the battleback, the image will be above the heroes.
#
#  To set a top layer, use the code:  upper_bb_on(speed, frames, opacity)
#
#  If the image is not moving, just call: upper_bb_on
#
#  To turn off the upper battleback layer, use: upper_bb_off
#
#  Upper layers should have the suffixes "UP" and 'frame' followed by
#  each other. IF, for example, it is an image to be shown above the heroes
#  and has three frames of animations, they must be named as follows
#  "CastleUP1" "CastleUP2" "CastleUp3"
#
#==============================================================================

#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
  #--------------------------------------------------------------------------
  attr_accessor :animated_bb
  attr_accessor :upperbb
  attr_accessor :bb_speed
  attr_accessor :upperbb_speed
  attr_accessor :bb_frames
  attr_accessor :upperbb_frames
  attr_accessor :bb_opac
  attr_accessor :upperbb_opac
  #--------------------------------------------------------------------------
  alias gw_initialize initialize
  def initialize
    gw_initialize
    @animated_bb    = false
    @bb_speed       = 0
    @bb_frames      = 0
    @upperbb_speed  = 0
    @upperbb_frames = 0
  end
end
#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
  #--------------------------------------------------------------------------
  alias gw_initialize initialize
  def initialize
    create_animbb      if $game_system.animated_bb
    create_upperbb     if $game_system.upperbb
    gw_initialize
  end
  #--------------------------------------------------------------------------
  def create_animbb
    @animbb_time      = 0
    @animbb_frame     = 0
    @animbb           = Sprite.new(@viewport1)
    @animbb.bitmap    = RPG::Cache.battleback($game_temp.battleback_name +
                        @animbb_frame.to_s)
    @animbb.z         = 2
    @animbb.opacity   = $game_system.bb_opac
  end 
  #--------------------------------------------------------------------------
  def create_upperbb
    @upperbb_time     = 0
    @upperbb_frame    = 1
    @upperbb          = Sprite.new(@viewport3)
    @upperbb.bitmap   = RPG::Cache.battleback($game_temp.battleback_name +
                        "UP" + @animbb_frame.to_s)
    @upperbb.opacity  = $game_system.upperbb_opac
    @upperbb.z        = 20
    # ACBS = 140, Padrão = 20
  end
  #--------------------------------------------------------------------------
  alias gw_update update
  def update
    upperbb_update   if $game_system.upperbb
    animbb_update    if $game_system.animated_bb
    @animbb.dispose  if @animbb != nil and not $game_system.animated_bb
    @upperbb.dispose if @upperbb != nil and not $game_system.upperbb
    gw_update
  end
  #--------------------------------------------------------------------------
  alias gw_dispose dispose
  def dispose
    @animbb.dispose   if $game_system.animated_bb
    @upperbb.dispose  if $game_system.upperbb
    gw_dispose
  end
  #--------------------------------------------------------------------------
  def animbb_update
    create_animbb   if @animbb.nil?
    @animbb_time    += 1
    if @animbb_time % $game_system.bb_speed == 0
      @animbb_frame = (@animbb_frame % $game_system.bb_frames) + 1
      begin
        bb    = RPG::Cache.battleback(@battleback_name + @animbb_frame.to_s)
      rescue
        bb    = RPG::Cache.battleback($game_temp.battleback_name)
      end
      @animbb.bitmap  = bb
      @animbb.opacity = $game_system.bb_opac
    end
  end
  #--------------------------------------------------------------------------
  def upperbb_update
    create_upperbb  if @upperbb.nil?
    @upperbb_time   += 1
    if @upperbb_time % $game_system.upperbb_speed == 0
      @upperbb_frame = (@upperbb_frame % $game_system.upperbb_frames) + 1
      begin
        upperbb   = RPG::Cache.battleback(@battleback_name + "UP" +
                    @upperbb_frames.to_s)
      rescue
        upperbb   = RPG::Cache.battleback($game_temp.battleback_name)
      end
      @upperbb.bitmap   = upperbb
      @upperbb.opacity  = $game_system.upperbb_opac
    end
  end
end
#==============================================================================
# ■ Interpreter
#==============================================================================
class Interpreter
  #--------------------------------------------------------------------------
  def animated_bb_on(speed, frames, opacity=255)
    $game_system.animated_bb  = true
    $game_system.bb_speed     = speed
    $game_system.bb_frames    = frames
    $game_system.bb_opac      = opacity
  end
  #--------------------------------------------------------------------------
  def upper_bb_on(speed=1, frames=1, opacity=255)
    $game_system.upperbb        = true
    $game_system.upperbb_speed  = speed
    $game_system.upperbb_frames = frames
    $game_system.upperbb_opac   = opacity
  end
  #--------------------------------------------------------------------------
  def animated_bb_off
    $game_system.animated_bb  = false
    $game_system.bb_speed     = 0
    $game_system.bb_frames    = 0
  end
  #--------------------------------------------------------------------------
  def upper_bb_off
    $game_system.upperbb        = false
    $game_system.upperbb_speed  = 0
    $game_system.upperbb_frames = 0
    $game_system.upperbb_opac   = 0
  end
end

And there was so many illegal characters throughout, it practically required RETYPING every line separately to get rid of the error causing garbage.

Oh, and ... there's zilch in the thread saying not to post anywhere.  BUT it appears that site went down in 2012?  Might need archival (LATER!!!!)

The holy chickens from above DESCEND WITH MIGHTY HORNS, TOOTING THIER GRATITUDE!
Thank you very kindly for going above and beyond to help with your superstar code-y-hands! 

I will be glad to test this once again, since I'm back home now.

EDIT: The directions are great too! Extremely helpful! I would've had no idea how to properly use before LOL
Reply }


Messages In This Thread
RE: GW Animated Battle backs Patch for Atoa ACBS - by Solitaire - 10-16-2024, 10:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Atoa ACBS, Equipment Set Add-on Error Solitaire 10 818 10-13-2024, 11:41 PM
Last Post: Solitaire
   ACBS - Atoa Custom Battle System and TP System zlsl 2 4,566 10-20-2021, 05:09 AM
Last Post: zlsl
   [RMXP] Showing skill gained by leveling up on battle result FrQise 12 12,644 05-07-2021, 02:05 PM
Last Post: FrQise
   Adding face script on Cogwheel's RTAB Battle Status rekkatsu 15 15,757 08-25-2020, 03:09 AM
Last Post: DerVVulfman
   I want to add an Atoa Custom Battle System command cut-in. zlsl 11 13,882 11-11-2019, 08:55 PM
Last Post: DerVVulfman
   Question about ACBS (Atoa Custom Battle System) aeliath 10 12,756 08-08-2019, 02:50 PM
Last Post: aeliath
   YAMI Battle symphony + Holder add on (Loop casting anim) Starmage 0 4,252 03-01-2018, 09:03 AM
Last Post: Starmage
   (RMVXace) Battle error with Tankentai's battle system, help. x( Starmage 0 3,909 02-14-2018, 04:25 PM
Last Post: Starmage
   Atoa Individual Battle Commands Geminil 3 6,964 08-02-2017, 03:17 AM
Last Post: DerVVulfman
  Expiration States with Atoa acbs: error Noctis 5 9,260 02-18-2017, 01:10 AM
Last Post: DerVVulfman



Users browsing this thread: 1 Guest(s)