Help - Search - Members - Calendar
Full Version: (VX) Transparent Battleback
RPG RPG Revolution Forums > Game Engines > RPG Maker VX Discussion
hawkeye7704
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????
Night_Runner
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


hawkeye7704
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?
Night_Runner
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
hawkeye7704
works like a dream! thank you so much
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.