Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Battle Backgrounds, Plug N Play
Wellus
post May 19 2011, 06:25 PM
Post #1


Level 4
Group Icon

Group: Member
Posts: 54
Type: Event Designer
RM Skill: Intermediate




Rpg Maker Vx

Claimh (English Translation By: Elemental Crisis)
Version: 1.0.0
Number Of Scripts: 1


This script simply takes a picture of your hero's current location & puts it in the background

Under Materials you have to make a new file called Battle Backgrounds.
then past this script into it.
Simple instructions but you have to follow them exactly.
Enjoy!

Script
CODE
#------------------------------------------------------------------------------
# English Translation By: Elemental Crisis
#------------------------------------------------------------------------------
# Changes the battle background.
#==============================================================================

module BattleBack
# Select Battle Background Type
# 0:Current map with wave effect for battle background (Default VX Style).
# 1:Current map used as battle background.
# 2:Uses a picture for battle background.
BB_TYPE = 1

# Display Battle Floor
BT_FLOOR = false

# Picture (Only required if BB_TYPE = 2)
M_B_BACK = {
# All picture files must be in the Graphics/System folder.
# Map ID => "Picture File Name"
1 => "SnowCliff1"
}
end


#==============================================================================
# ■ Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# ● Creating Battle Back Sprite
#--------------------------------------------------------------------------
def create_battleback
case BattleBack::BB_TYPE
when 0
source = $game_temp.background_bitmap
bitmap = Bitmap.new(640, 480)
bitmap.stretch_blt(bitmap.rect, source, source.rect)
bitmap.radial_blur(90, 12)
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = bitmap
@battleback_sprite.ox = 320
@battleback_sprite.oy = 240
@battleback_sprite.x = 272
@battleback_sprite.y = 176
@battleback_sprite.wave_amp = 8
@battleback_sprite.wave_length = 240
@battleback_sprite.wave_speed = 120
when 1
source = $game_temp.background_bitmap
bitmap = Bitmap.new(640, 480)
bitmap.stretch_blt(bitmap.rect, source, source.rect)
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = bitmap
@battleback_sprite.ox = 320
@battleback_sprite.oy = 240
@battleback_sprite.x = 272
@battleback_sprite.y = 176
when 2
@battleback_sprite = BattleBackSprite.new(@viewport1)
end
end
#--------------------------------------------------------------------------
# ● Creating Battle Floor Sprite
#--------------------------------------------------------------------------
alias create_battlefloor_mbb create_battlefloor
def create_battlefloor
create_battlefloor_mbb if BattleBack::BT_FLOOR
end
#--------------------------------------------------------------------------
# ● Delete Battle Floor Sprite
#--------------------------------------------------------------------------
alias dispose_battlefloor_mbb dispose_battlefloor
def dispose_battlefloor
dispose_battlefloor_mbb if BattleBack::BT_FLOOR
end
#--------------------------------------------------------------------------
# ● Update Battle Floor Sprite
#--------------------------------------------------------------------------
alias update_battlefloor_mbb update_battlefloor
def update_battlefloor
update_battlefloor_mbb if BattleBack::BT_FLOOR
end
end


#==============================================================================
# ■ BattleBackSprite
#==============================================================================
class BattleBackSprite < Sprite
# Background Screen Size
WIDTH = 544.00
HEIGHT = 288.00
#--------------------------------------------------------------------------
# ● Object Initialization
# viewport : viewport
#--------------------------------------------------------------------------
def initialize(viewport = nil)
super(viewport)
self.bitmap = Cache.system(BattleBack::M_B_BACK)
# Zoom is carried out according to picture size.
@x_zoom = WIDTH / self.bitmap.width
@y_zoom = HEIGHT / self.bitmap.height
@zoom = @x_zoom > @y_zoom ? @x_zoom : @y_zoom
# Zoom is carried out.
self.zoom_x = @zoom
self.zoom_y = @zoom
# Made into central display.
self.ox = self.bitmap.width / 2
self.oy = self.bitmap.height / 2
self.x = (self.bitmap.width / 2) * @zoom

self.y = (self.bitmap.height / 2) * @zoom
end
end


__________________________


My userbar was made with Paint.
Go to the top of the page
 
+Quote Post
   
Barchetta3223
post May 20 2011, 01:37 AM
Post #2


Level 8
Group Icon

Group: Revolutionary
Posts: 124
Type: Writer
RM Skill: Skilled




Place this in the scripts section and not in the tutorials section. Thank you.


__________________________
Go to the top of the page
 
+Quote Post
   
kaz
post May 20 2011, 07:10 AM
Post #3


I ate the previous bunny - nom nom!
Group Icon

Group: Director
Posts: 5,739
Type: None
RM Skill: Beginner
Rev Points: 250




QUOTE (Barchetta3223 @ May 20 2011, 10:37 AM) *
Place this in the scripts section and not in the tutorials section. Thank you.


Report this not backseat mod thank you tongue.gif


__________________________

Stuff and Awards








Thanks X-M-O for the WTF award















and fearoftheunknown's tribute-bunny
Go to the top of the page
 
+Quote Post
   
amerk
post May 20 2011, 08:29 AM
Post #4


Level 56
Group Icon

Group: Global Mod
Posts: 1,795
Type: None
RM Skill: Undisclosed
Rev Points: 15




Out of curiosity, is this any different than just following Runefreak's method to tweak the Spriteset_Battle script?

http://forum.chaos-project.com/index.php?topic=8717.0

If so, it would seem that would be easiest as you are simply adjusting a couple lines of code verses adding a completely new script.


__________________________
Go to the top of the page
 
+Quote Post
   
Kread-EX
post May 20 2011, 11:05 AM
Post #5


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Added codebox and spoiler.

Amerk, it's almost the same, except you can use pictures too if you want (like in Synthesize's script).


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Wellus
post May 23 2011, 03:02 AM
Post #6


Level 4
Group Icon

Group: Member
Posts: 54
Type: Event Designer
RM Skill: Intermediate




QUOTE (amerk @ May 20 2011, 09:29 AM) *
Out of curiosity, is this any different than just following Runefreak's method to tweak the Spriteset_Battle script?

http://forum.chaos-project.com/index.php?topic=8717.0

If so, it would seem that would be easiest as you are simply adjusting a couple lines of code verses adding a completely new script.


Runefreak's method? honesty I dont have any clue what you are talking about my rpg skill is 1-`10 & I would have no clue on how to tweak the Spriteset_Battle script. this script is for rpg's with little to no knowledge on scripting smile.gif


__________________________


My userbar was made with Paint.
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 05:00 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker