Earthbound-Ish Battlebacks
Version: 1.0
Author: cozziekuns
Date: February 16, 2013
Version History
- <Version 1.0> 2013.02.16 - Original Release
Description
This script creates sinusodial-wave like background that resembles those from Earthbound.
Features
- Plug-and play, but comes with many customizable features!
- Can set different effects for different battlebacks.
Screenshots
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi45.tinypic.com%2F2n6rl8n.png&hash=adb0a3af8434fd2b1497d6355322d671981601c8)
Original Image:
(https://dl.dropbox.com/s/3cw1wkzq2ygbqgi/Fourside.png?token_hash=AAECanX3MS9VtcskWHnuNeavUrJ8uT8P_6wmxqu1RSne8g&dl=1)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fi49.tinypic.com%2F4n9rc.png&hash=dce2f40fcd8c77f57e4be6f84e0aee459b138649)
Original Image:
(https://dl.dropbox.com/s/xdqtbn9ewh3zue1/Eagleland.png?token_hash=AAEDi_ktYW5ZNi8cBmt0fmRuJPHLY8zGJKZ37VfvgQUueA&dl=1)
Both images are copyright by the creators of Earthbound (APE Inc. and HAL Laboratory).
Instructions
The instructions are inside the script.
Script
#==============================================================================
# Earthbound-ish Battle Backgrounds
#------------------------------------------------------------------------------
# Version: 1.0
# Author: cozziekuns
# Date: February 15, 2013
#==============================================================================
# Description:
#------------------------------------------------------------------------------
# This script creates sinusodial-wave like background that resembles those
# from Earthbound.
#==============================================================================
# Instructions:
#------------------------------------------------------------------------------
# Paste this script into its own slot in the Script Editor, above Main but
# below Materials.
#
# Edit only within the Battleback_Eff hash. The syntax is:
#
# :filename => {
# Insert methods here,
# }
#
# Where methods include:
#
# :blur => true/false
# Blurs the initial bitmap if true.
# :radial_blur => [angle, division]
# Applies a radial blur to the bitmap. angle is used to specify an angle
# from 0 to 360. The larger the number, the greater the roundness. Division
# is the division number (from 2 to 100). The larger the number, the
# smoother it will be. This process is very time consuming.
# :wave_amp => value
# Height of the wave.
# :wave_length => value
# Length of the wave.
# :wave_speed => value
# Speed of the wave.
# :zoom_x => value
# Horizontal stretch ratio of the sprite.
# :zoom_y => value
# Vertical stretch ratio of the sprite.
# :mirror => true/false
# Flips the sprite if true.
# :opacity => value
# Sets the opacity of the sprite. 255 = Opaque, 0 = Fully transparent.
# :blend_type => value
# (0: normal, 1: addition, 2: subtraction)
# :color => Color.new(red, blue, green)
# Sets the colour of the sprite.
# :tone => Tone.new(red, blue, green)
# Sets the tone of the sprite.
#
# If you do not make a settings hash for the filename, the battleback will have the default effect.
#==============================================================================
#==============================================================================
# ** Cozziekuns
#==============================================================================
module Cozziekuns
module Earthboundish
Battleback_Eff ={
:default => { # Do not remove this
:blur => true,
:wave_amp => 32,
:wave_length => 640,
:wave_speed => 480,
}, # Do not remove this
:Eagleland => {
:blur => true,
:radial_blur => [180, 2],
:wave_amp => 96,
:wave_length => 1280,
:wave_speed => 640,
:zoom_x => 1.5,
:zoom_y => 1.5,
},
:Fourside => {
:blur => true,
:radial_blur => [60, 10],
:wave_amp => 96,
:wave_length => 960,
:wave_speed => 640,
:zoom_x => 1.5,
:zoom_y => 1.5,
},
}
end
end
include Cozziekuns
#==============================================================================
# ** Spriteset_Battle
#==============================================================================
class Spriteset_Battle
[1, 2].each { |val|
alias_method("coz_ebishbs_sctbl_create_battleback#{val}".to_sym, "create_battleback#{val}".to_sym)
define_method("create_battleback#{val}") {
send("coz_ebishbs_sctbl_create_battleback#{val}".to_sym)
bb_name = self.send("battleback#{val}_name")
if bb_name
if Earthboundish::Battleback_Eff.keys.include?(bb_name.to_sym)
values = Earthboundish::Battleback_Eff[bb_name.to_sym]
else
values = Earthboundish::Battleback_Eff[:default]
end
str = "@back#{val}_sprite"
instance_variable_get(str).bitmap.blur if values[:blur]
instance_variable_get(str).bitmap.radial_blur(*values[:radial_blur]) if values[:radial_blur]
(values.keys - [:blur, :radial_blur]).each { |method|
instance_variable_get(str).send("#{method}=".to_sym, values[method])
}
end
}
}
end
Credit
Support
Please post below if you need any help.
Known Compatibility Issues
None so far. If you find any, please post below.
Hi, as I said before, Earthbound rocks. So my project need to have these kind of references from earthbound. Thank you for your scripts.
I tried this script and I got 02 errors. First (1) I changed the blur attribute from true to false and worked, but I got another error (2). Someone could know what it is?
The lines of the script (3)
(https://rmrk.net/proxy.php?request=http%3A%2F%2Fs9.postimg.org%2Fde5fdocxb%2Fbackground_errors.png&hash=6cc7b4cf7e8590027561dadec629f03bea67f9ca)
Thanks!
I can't for the life of me figure out this file naming syntax.
Can someone please help me understand this so i can test out the other sinusoidal effects?