RE: GW Animated Battle backs Patch for Atoa ACBS - kyonides - 10-17-2024
EDIT: Replace it with this full version that no longer includes any weird hidden character AFAIK.
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
#--------------------------------------------------------------------------
alias :animated_gm_sys_init :initialize
#--------------------------------------------------------------------------
def initialize
animated_gm_sys_init
@animated_bb = false
@bb_speed = 0
@bb_frames = 0
@bb_opac = 0
@upperbb = 0
@upperbb_speed = 0
@upperbb_frames = 0
@upperbb_opac = 0
end
attr_accessor :animated_bb, :bb_speed, :bb_frames, :bb_opac
attr_accessor :upperbb, :upperbb_speed, :upperbb_frames, :upperbb_opac
end
#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
alias :animated_sprtst_btl_init :initialize
def initialize
create_animbb if $game_system.animated_bb
create_upperbb if $game_system.upperbb
animated_sprtst_btl_init
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
Now it would only fail if you lack any of the frames.
RE: GW Animated Battle backs Patch for Atoa ACBS - Solitaire - 10-17-2024
(10-17-2024, 12:04 AM)kyonides Wrote: EDIT: Replace it with this full version that no longer includes any weird hidden character AFAIK.
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
#--------------------------------------------------------------------------
alias :animated_gm_sys_init :initialize
#--------------------------------------------------------------------------
def initialize
animated_gm_sys_init
@animated_bb = false
@bb_speed = 0
@bb_frames = 0
@bb_opac = 0
@upperbb = 0
@upperbb_speed = 0
@upperbb_frames = 0
@upperbb_opac = 0
end
attr_accessor :animated_bb, :bb_speed, :bb_frames, :bb_opac
attr_accessor :upperbb, :upperbb_speed, :upperbb_frames, :upperbb_opac
end
#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
alias :animated_sprtst_btl_init :initialize
def initialize
create_animbb if $game_system.animated_bb
create_upperbb if $game_system.upperbb
animated_sprtst_btl_init
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
Now it would only fail if you lack any of the frames. I'm getting this one now:
RE: GW Animated Battle backs Patch for Atoa ACBS - kyonides - 10-17-2024
Another mysterious character was still there...
This edit might work normally now... as long as you don't set upperbb_speed and upperbb_frames to 0.
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
#--------------------------------------------------------------------------
alias :animated_gm_sys_init :initialize
#--------------------------------------------------------------------------
def initialize
animated_gm_sys_init
@animated_bb = false
@bb_speed = 0
@bb_frames = 0
@bb_opac = 0
@upperbb = 0
@upperbb_speed = 1
@upperbb_frames = 1
@upperbb_opac = 0
end
attr_accessor :animated_bb, :bb_speed, :bb_frames, :bb_opac
attr_accessor :upperbb, :upperbb_speed, :upperbb_frames, :upperbb_opac
end
#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
alias :animated_sprtst_btl_init :initialize
def initialize
create_animbb if $game_system.animated_bb
create_upperbb if $game_system.upperbb
animated_sprtst_btl_init
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, Padrao = 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
RE: GW Animated Battle backs Patch for Atoa ACBS - DerVVulfman - 10-17-2024
I have a whole slew of questions here.
Given that the script supplied contained the following texts:
#==============================================================================
# ■ 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
This being the Game_System class where I highlighted the @bb_frames instance variable, I would initially ask how you received this error:
(10-16-2024, 10:59 PM)Solitaire Wrote:
It was then, I realized something... The error says that it cannot find... "bb_frames=", not "bb_frames".
Something very strange had occurred here. For if you look at the script I supplied, I added spaces between any instance of the bb_frames variable and any ('=') equal sign.
And line 149?
#==============================================================================
# ■ 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
There is definitely a space after $game_system.bb_frames
Do you have a test demo of some sort you can upload so we can see what's happening?
RE: GW Animated Battle backs Patch for Atoa ACBS - kyonides - 10-17-2024
(10-17-2024, 02:44 AM)DerVVulfman Wrote: I have a whole slew of questions here.
Given that the script supplied contained the following texts:
Code: #==============================================================================
# ■ 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
# Several Lines of Code Here
This being the Game_System class where I highlighted the @bb_frames instance variable, I would initially ask how you received this error:
...
It was then, I realized something... The error says that it cannot find... "bb_frames=", not "bb_frames".
Something very strange had occurred here. For if you look at the script I supplied, I added spaces between any instance of the bb_frames variable and any ('=') equal sign.
And line 149?
...
$game_system.bb_frames = frames
...
There is definitely a space after $game_system.bb_frames
Do you have a test demo of some sort you can upload so we can see what's happening?
Or you just type that stuff yourself just like I did.
That's why I stopped getting those weird errors. Then the division by zero errors showed up...
Anyway, I set the required values to 1 and now it seems to be working normally.
RE: GW Animated Battle backs Patch for Atoa ACBS - Solitaire - 10-17-2024
Again, you guys reply too speedily for me
Also, wait wait... Am I supposed to always apply an upper layer?
Is that what's been hitching things up?!
RE: GW Animated Battle backs Patch for Atoa ACBS - DerVVulfman - 10-17-2024
Always use an upper layer? I certainly hope not. That would be unwise for a code developer to force the end-user to use extra features undesired. I mean, you could set up a transparent upper-level background, but that would be wasteful.
However, my concern is with why you received an error that shouldn't exist.
RE: GW Animated Battle backs Patch for Atoa ACBS - kyonides - 10-17-2024
(10-17-2024, 03:25 AM)Solitaire Wrote: Again, you guys reply too speedily for me
Also, wait wait... Am I supposed to always apply an upper layer?
Is that what's been hitching things up?!
Well, based on how GW crafted the script... Yes, you have to.
(10-17-2024, 03:31 AM)DerVVulfman Wrote: Always use an upper layer? I certainly hope not. That would be unwise for a code developer to force the end-user to use extra features undesired. I mean, you could set up a transparent upper-level background, but that would be wasteful.
However, my concern is with why you received an error that shouldn't exist.
Who said you had deleted all of those blank, invisible, non-printable characters?
They're like coding monsters! They always find a way to survive!
In my experience you can't do anything about it except for typing all the data yourself. And yes, it's tiresome.
RE: GW Animated Battle backs Patch for Atoa ACBS - Solitaire - 10-17-2024
(10-17-2024, 03:31 AM)DerVVulfman Wrote: Always use an upper layer? I certainly hope not. That would be unwise for a code developer to force the end-user to use extra features undesired. I mean, you could set up a transparent upper-level background, but that would be wasteful.
However, my concern is with why you received an error that shouldn't exist.
Alrighty, now I tried it out on a clean demo of the Atoa system instead (without my stuff in it, totally clean), I first was able to enter battle without it animating, but once I did the script call before battle, and specified the frames, speed, it gave me the same error again at line 75. I am very confused I'll attach that one here
SURELY I must be mistaking something here (my brain must not be running at full capacity!)
Also, I didn't know where to include this, but I'll just note it here. Before the line 75 error started again, it started looking for a file with "0000" instead of just "000" which I don't know if it's supposed to do that, but I just duped one of the other ones and put it in the folder:
Thanks again for your help and patience, guys!
RE: GW Animated Battle backs Patch for Atoa ACBS - Solitaire - 10-17-2024
(10-17-2024, 03:39 AM)kyonides Wrote: (10-17-2024, 03:25 AM)Solitaire Wrote: Again, you guys reply too speedily for me
Also, wait wait... Am I supposed to always apply an upper layer?
Is that what's been hitching things up?!
Well, based on how GW crafted the script... Yes, you have to.
Ah! Okay!! I thought that might have been the case lol! I'm glad I did put them into the folder just in case.
|