(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