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
> (VX) Transparent Battleback
hawkeye7704
post May 31 2012, 08:54 PM
Post #1


Level 2
Group Icon

Group: Member
Posts: 26
Type: Developer
RM Skill: Intermediate




I'm looking for a way to turn the unused space in my battleback transparent to show the players current location on the map a al Dragon Warrior 1. I've done some fiddling in the scripts with deleting some of the disposing of windows and view ports which worked, but that created some strange problems down the line. Does anyone know a script for this????
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Jun 2 2012, 03:16 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




Did you know that the default battle-back is the just the map? Enterbrain thought it would be cool to blur and rotate it a bit, but otherwise it's taken from a screenshot of the map before you enter battle.

CODE
#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  Edited to not blur or wave the background
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Create Battleback Sprite
  #--------------------------------------------------------------------------
  def create_battleback
    @battleback_sprite = Sprite.new(@viewport1)
    @battleback_sprite.bitmap = $game_temp.background_bitmap
  end
end




__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
hawkeye7704
post Jun 2 2012, 11:04 AM
Post #3


Level 2
Group Icon

Group: Member
Posts: 26
Type: Developer
RM Skill: Intermediate




awesome! thanks!

However when I use it, it gets rid of my battleback picture completely that I'm using from another script.

Here's the current script I'm using:

CODE
=begin
================================================================================
== Change Battle Background v1.0 ==
== GEXROX, 16th May 2010 ==
== Allows the battle background to not only be a picture, and not move, but ==
== to be changed at ANY time, not just by MapID, but by changing a variable. ==
================================================================================
== The script takes a picture from the 'BattleBack' folder in the 'Graphics' ==
== folder in the project folder beginning with 'BattleBack' and ending with ==
== a number (1,2,3, the list goes on) obtained from a variable. This allows ==
== the battle picture to be anything at all, and changable at will in the ==
== game. ==
================================================================================
== Compatibility: ==
== - Tested with RPG Tankentai SBS System 3.3d ==
== - Should work with any script that does not edit ==
== Spriteset_Battle. ==
================================================================================
== Comments: ==
== Yes, this is an extremely short script, but I like the idea of making a ==
== script, so I made it up really quickly when I couldn't find this kind ==
== of background changer. It's my first attempt at making a script (so when ==
== it worked for me, you can guess how much exited fanboy-style jumping ==
== around and giggling there was), so be gentle (teehee, innuendo). ==
================================================================================
=end

module Cache
def self.battleback(number)
load_bitmap("Graphics/BattleBacks/", "BattleBack" + number)
end

# Change BB_VARIABLE to the variable to link to the background images
BB_VARIABLE = 0 # Can be any number

end

class Spriteset_Battle
def create_battleback
source = $game_temp.background_bitmap
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = Cache.battleback($game_variables[Cache::BB_VARIABLE].to_s)
end
end


Is there any way to combine the two so my battleback is layed over that default screenshot?

This post has been edited by hawkeye7704: Jun 2 2012, 11:04 AM
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Jun 2 2012, 05:25 PM
Post #4


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




Ohhhh, I was wondering about that happy.gif

CODE
#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  Edited to not blur or wave the background
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Create Battleback Sprite
  #--------------------------------------------------------------------------
  alias nr_normalMap_create_battleback  create_battleback  unless $@
  #--------------------------------------------------------------------------
  # * Create Battleback Sprite
  #--------------------------------------------------------------------------
  def create_battleback(*args)
    # Run the original create_battleback
    nr_normalMap_create_battleback(*args)
    # Get a copy of the map
    map = $game_temp.background_bitmap.clone
    # Copy the default background to the map
    map.blt(0, 0, @battleback_sprite.bitmap, @battleback_sprite.bitmap.rect)
    # Set this as the bitmap
    @battleback_sprite.bitmap = map
  end
end


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
hawkeye7704
post Jun 2 2012, 07:26 PM
Post #5


Level 2
Group Icon

Group: Member
Posts: 26
Type: Developer
RM Skill: Intermediate




works like a dream! thank you so much
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: 21st May 2013 - 12:50 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker