Jump to content
Sign in to follow this  
Michael Ponder Jr

Terrain Tag based battlebacks!

Recommended Posts

YEA: Terrain BattleBack formally YEA: Region Battleback

Oringal creator Yanfly

Modified by Michael Ponder Jr

 

Introduction

Alright everyone.. first off let me say that i only take a small bit of credit in this.. very small.. most of the credit goes to Yanfly.. it's a modified version of a script of his.

 

Okay now that, that is out the way.. let's get on to some introductions.

 

This script will easily allow you to base battlebacks on terrain tags.

Originally the script was used for setting it up based on region IDs, and while that is pretty cool, more options is always better for people i feel, and it's making my projects easier.

 

So it's not very different from Yanfly's Region Battlebacks.. only it relies on Terrain Tags.

 

I made this mod because honestly, when i draw my regions... i'm lazy and don't stay within the lines *laughs*.

With this script you can have monsters attack you maybe in the general area of the forest as well as IN the forest, while having the background still changed when you're in the forest.. as an example.

 

It's also good for if you don't use auto tiles much if at all, i know i don't.. i feel RMVXA's Auto tile options are broken compared to RMXP's.. so i rather build my maps using tile's A5 as well as all the Bs.

 

Okay now for the script.

And this will sound silly but i would love to hear back from you all about this script... i got some other modifications i'm working on in other scripts.. if this script gets some use, i will share some other things i'm doing, i discovered all this stuff while working on my game lol.. and i like sharing ^_^

Okay okay.. script now

 

Features

- Allows setting battlebacks by terrain tags.

 

Screenshots

No screen shots would really help explain this.. maybe a video though..

 

How to Use

Well, put above main but below materials.

It's rather simple to use really, you go into the Database and then to Tilesets.. and look for Terrain Tag.. from there you set up which tags are used on which tiles, and as i am sure many of you know.. their are but 8 total you can use sadly... 0 to 7, but for me that's more than enough, and i would hope the same for some of you who use it.

 

Within the script their are more instructions, that tell how to actually tell what backgrounds to show up for what Terrain Tag, i won't go over it here.. cause if you used Yanfly's Region Battleback script, i'm sure you can get used to it easily.

 

Demo

This script is so easy to use, a demo is kinda pointless..

 

Script

 

#==============================================================================
#
# â–¼ Yanfly Engine Ace - Terrain Battlebacks v1.00
# -- Last Updated: 2011.12.30
# -- Level: Normal
# -- Requires: n/a
#
# Modified by MikePj on 2012.11.13
#
# Comments below.
#
# This is a heavly modified version of yanfly's Region Battlebacks made to use
# Terrain tags as appose to Region IDs.
# Why did i make this? Well as cool as it is to use regions to tell the game
# what battlebacks to use, i prefer to simply set it by way of terrain tags..
# and i could be wrong, but i THINK that is how it's done in 2K and 2K3..
# but i COULD be wrong. *laughs* i'm wrong a lot >_<
#
# Some instructions fallow
#
# Anyhow, it still works basically the same way as Region Battlebacks did
# only now you have to apply the terrain tags you want used in the
# database under tilesets, and then below you assign what battle backs for
# what tags.
# You can also change what battle backs are used while play, by the same
# methods as before, only it's terrain rather than region.
# Anyhow, i hope you all enjoy this and i hope it's useful.
# A very special thanks to Yanfly for doing most of the legwork i know i
# could NEVER EVER do. Also, a lot of credit. What i did to change this
# script was rather simple..so.. yeah lol
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-TerrainBattleBacks"] = true
#==============================================================================
# â–¼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2011.12.30 - Started Script and Finished.
#
#==============================================================================
# â–¼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# RPG Maker VX Ace lacks any kind of a good battleback management system. All
# battlebacks for the overworld are predetermined based on their autotile. This
# becomes a problem when users would like to use different autotiles or when
# users aren't using an overworld tileset. This script allows developers to
# bind certain battlebacks to terrains and have the battleback shown change and
# vary depending on the terrain tag used if no specified battleback is used for
# that map.
#
#==============================================================================
# â–¼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below â–¼ Materials/ç´ æ but above â–¼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Map Notetags - These notetags go in the map notebox in a map's properties.
# -----------------------------------------------------------------------------
# <terrain battlebacks>
#  x-y: string
#  x-y: string
# </terrain battlebacks>
# This will set the terrain x to change battleback y to the string for the image
# filename. Insert as many "x-y: string" as needed for custom battlebacks. The
# terrain battlebacks that aren't defined will refer to the hash in the terrain
# Battlebacks script module.
#
#==============================================================================
# â–¼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================
module YEA
 module BATTLEBACKS

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Default Terrain Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This will set the default backdrops for maps without custom terrain
# settings. These settings will always be used unless there is a forced
# battleback or the map specifies certain battlebacks. Note that if your
# party encounters battles while on a ship, the ship battleback will take
# priority over all of these. Adjust the ship battlebacks further below.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
DEFAULT ={
# TerrainID => [battleback1,	   Battleback2],
		 0 => ["FF6 Grass", "bottom b"],
		 1 => ["FF6 Grass", "bottom b"],
		 2 => ["FF6 Forest", "bottom b"],
} # Do not remove this.

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Other Default Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# These settings will be applied for battleback areas without marked terrain
# battlebacks. They'll appear when nothing in the above hash appears and
# there is no specified battleback.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
DEFAULT_BATTLEBACK_FOOT1 = "ff6 grass"   # Battleback1 for traveling on foot.
DEFAULT_BATTLEBACK_FOOT2 = "bottom b"   # Battleback2 for traveling on foot.
DEFAULT_BATTLEBACK_SHIP1 = "ff2_psp_ship_deck" # Battleback1 for traveling on ship.
DEFAULT_BATTLEBACK_SHIP2 = "" # Battleback2 for traveling on ship.

 end # BATTLEBACKS
end # YEA
#==============================================================================
# â–¼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
module YEA
 module REGEXP
 module MAP

TERRAIN_BATTLEBACKS_ON  = /<(?:TERRAIN_BATTLEBACKS|terrain battlebacks)>/i
TERRAIN_BATTLEBACKS_OFF = /<\/(?:TERRAIN_BATTLEBACKS|terrain battlebacks)>/i
TERRAIN_BATTLEBACK_TAG   = /(\d+)([-ï¼])(\d+):[ ](.*)/i

 end # MAP
 end # REGEXP
end # YEA
#==============================================================================
# â–  RPG::Map
#==============================================================================
class RPG::Map

 #--------------------------------------------------------------------------
 # public instance variables
 #--------------------------------------------------------------------------
 attr_accessor :terrain_battlebacks

 #--------------------------------------------------------------------------
 # common cache: load_notetags_rbb
 #--------------------------------------------------------------------------
 def load_notetags_rbb
@terrain_battlebacks = YEA::BATTLEBACKS::DEFAULT.clone
@terrain_battlebacks_on = false
#---
self.note.split(/[\r\n]+/).each { |line|
  case line
  #---
  when YEA::REGEXP::MAP::TERRAIN_BATTLEBACKS_ON
	@terrain_battlebacks_on = true
  when YEA::REGEXP::MAP::TERRAIN_BATTLEBACKS_OFF
	@terrain_battlebacks_on = false
  when YEA::REGEXP::MAP::TERRAIN_BATTLEBACK_TAG
	next unless @terrain_battlebacks_on
	rid = $1.to_i
	@terrain_battlebacks[rid] = ["", ""] if @terrain_battlebacks[rid].nil?
	case $3.to_i
	when 1
	  @terrain_battlebacks[rid][0] = $4.to_s
	when 2
	  @terrain_battlebacks[rid][1] = $4.to_s
	end
  #---
  end
} # self.note.split
#---
 end

end # RPG::Map

#==============================================================================
# â–  Spriteset_Battle
#==============================================================================
class Spriteset_Battle

 #--------------------------------------------------------------------------
 # overwrite method: battleback1_name
 #--------------------------------------------------------------------------
 def battleback1_name
if $BTEST
  $data_system.battleback1_name
elsif $game_map.battleback1_name
  $game_map.battleback1_name
else
  overworld_battleback1_name
end
 end

 #--------------------------------------------------------------------------
 # overwrite method: battleback2_name
 #--------------------------------------------------------------------------
 def battleback2_name
if $BTEST
  $data_system.battleback2_name
elsif $game_map.battleback2_name
  $game_map.battleback2_name
else
  overworld_battleback2_name
end
 end

 #--------------------------------------------------------------------------
 # alias method: normal_battleback1_name
 #--------------------------------------------------------------------------
 alias normal_battleback1_name_rbb normal_battleback1_name
 def normal_battleback1_name
$game_map.terrain_battleback1 || normal_battleback1_name_rbb
 end

 #--------------------------------------------------------------------------
 # alias method: normal_battleback2_name
 #--------------------------------------------------------------------------
 alias normal_battleback2_name_rbb normal_battleback2_name
 def normal_battleback2_name
$game_map.terrain_battleback2 || normal_battleback2_name_rbb
 end

 #--------------------------------------------------------------------------
 # overwrite method: default_battleback1_name
 #--------------------------------------------------------------------------
 def default_battleback1_name
return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_FOOT1
 end

 #--------------------------------------------------------------------------
 # overwrite method: default_battleback2_name
 #--------------------------------------------------------------------------
 def default_battleback2_name
return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_FOOT2
 end

 #--------------------------------------------------------------------------
 # overwrite method: ship_battleback1_name
 #--------------------------------------------------------------------------
 def ship_battleback1_name
return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_SHIP1
 end

 #--------------------------------------------------------------------------
 # overwrite method: ship_battleback2_name
 #--------------------------------------------------------------------------
 def ship_battleback2_name
return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_SHIP2
 end

end # Spriteset_Battle
#==============================================================================
# â–  Game_Map
#==============================================================================
class Game_Map

 #--------------------------------------------------------------------------
 # alias method: setup
 #--------------------------------------------------------------------------
 alias game_map_setup_rbb setup
 def setup(map_id)
game_map_setup_rbb(map_id)
@map.load_notetags_rbb
 end

 #--------------------------------------------------------------------------
 # new method: terrain_battlebacks
 #--------------------------------------------------------------------------
 def terrain_battlebacks
return @map.terrain_battlebacks
 end

 #--------------------------------------------------------------------------
 # new method: terrain_battleback1
 #--------------------------------------------------------------------------
 def terrain_battleback1
return terrain_battlebacks[$game_player.terrain_tag][0]
 end

 #--------------------------------------------------------------------------
 # new method: terrain_battleback2
 #--------------------------------------------------------------------------
 def terrain_battleback2
return terrain_battlebacks[$game_player.terrain_tag][1]
 end

end # Game_Map
#==============================================================================
#
# â–¼ End of File
#
#==============================================================================

 

 

FAQ

Q: Why no demo?

A: Cause it's pretty easy to instal and use, plus i have seen other scripts posted without demos before.

 

Credit and Thanks

Modified by Michael Ponder Jr

 

Author's Notes

So i would love some feed back.... also.. if anyone get's any errors.. let me know.. but it SHOULD work, it's been working fine for me... i can't promise i can fix it.. but.. just let me know.

Edited by Michael Ponder Jr

Share this post


Link to post
Share on other sites

I wish more people would do some region to terrain tag conversions. Although more limited, it's much easier and quicker to edit stuff without having to redraw regions across a 250x250 px world map, for example, so kudos to you!

Share this post


Link to post
Share on other sites

I did a small update to the introduction... i felt their needed to be a better explanation about why this script is useful.

I don't use auto tiles when building anything... Ace's Auto tile system is just broken in my opinion.. if i need animated tiles.. i use events and tileset changes to make things animate.... something i probably will cover in another post.

Ace already has a set up for battle backs based on auto tile ID... BUT.. like i said, i don't use auto tiles... and some other people out there probably don't use them either.

 

All in all, i just thought this was a good alternative to using regions.. for me regions are best used just to set up where you encounter things... but that's just me.

Share this post


Link to post
Share on other sites

You could also reset your chosen battlebacks to default battleback titles. I can already see replies like "It gives me an error message, bottom b not found!" popping up soon ;D

 

Other than that, just a quick note that came to my mind: If you already converted it like you did, would it be difficult to just mix both, allowing you to choose both regions and terrain tags with one script? Or I guess you can just use both scripts with minor mods if necessary and strip the default regions/terrains from one script.

Edited by Caveras

Share this post


Link to post
Share on other sites

Sadly i'm not THAT smart lol... it was rather easy to change it and tell it to use terrain tags... i would not know where to being in telling it to have options for both.. it was actually easy to change it... i replaced everything saying Region and Region_ID to.. Terrain and.. Terrain_Tag... and miraculously it worked!

As for error about the image bottom B not found.. i would hope they would look through the script and read the instructions and go

"i don't have these graphics.. let me change this" lol

 

I have hell with scripting... i'm just barely smart enough to mod things and make things work differently through trial and error...

Believe me, if i could make my own scripts , their are a few i have had in mind for a LONG time i would love to make that people told me were "useless".. maybe one day i will figure all this scripting stuff out better and just make what i want and need on my own.

 

I still find myself begging the community for stuff i need or want now and then >_<. Usually falls on def ears though, sadly.

Share this post


Link to post
Share on other sites

YEA: Terrain BattleBack formally YEA: Region Battleback

Oringal creator Yanfly

Modified by Michael Ponder Jr

 

Introduction

Alright everyone.. first off let me say that i only take a small bit of credit in this.. very small.. most of the credit goes to Yanfly.. it's a modified version of a script of his.

 

Okay now that, that is out the way.. let's get on to some introductions.

 

This script will easily allow you to base battlebacks on terrain tags.

Originally the script was used for setting it up based on region IDs, and while that is pretty cool, more options is always better for people i feel, and it's making my projects easier.

 

So it's not very different from Yanfly's Region Battlebacks.. only it relies on Terrain Tags.

 

I made this mod because honestly, when i draw my regions... i'm lazy and don't stay within the lines *laughs*.

With this script you can have monsters attack you maybe in the general area of the forest as well as IN the forest, while having the background still changed when you're in the forest.. as an example.

 

It's also good for if you don't use auto tiles much if at all, i know i don't.. i feel RMVXA's Auto tile options are broken compared to RMXP's.. so i rather build my maps using tile's A5 as well as all the Bs.

 

Okay now for the script.

And this will sound silly but i would love to hear back from you all about this script... i got some other modifications i'm working on in other scripts.. if this script gets some use, i will share some other things i'm doing, i discovered all this stuff while working on my game lol.. and i like sharing ^_^

Okay okay.. script now

 

Features

- Allows setting battlebacks by terrain tags.

 

Screenshots

No screen shots would really help explain this.. maybe a video though..

 

How to Use

Well, put above main but below materials.

It's rather simple to use really, you go into the Database and then to Tilesets.. and look for Terrain Tag.. from there you set up which tags are used on which tiles, and as i am sure many of you know.. their are but 8 total you can use sadly... 0 to 7, but for me that's more than enough, and i would hope the same for some of you who use it.

 

Within the script their are more instructions, that tell how to actually tell what backgrounds to show up for what Terrain Tag, i won't go over it here.. cause if you used Yanfly's Region Battleback script, i'm sure you can get used to it easily.

 

Demo

This script is so easy to use, a demo is kinda pointless..

 

Script

 

 

#==============================================================================
#
# â–¼ Yanfly Engine Ace - Terrain Battlebacks v1.00
# -- Last Updated: 2011.12.30
# -- Level: Normal
# -- Requires: n/a
#
# Modified by MikePj on 2012.11.13
#
# Comments below.
#
# This is a heavly modified version of yanfly's Region Battlebacks made to use
# Terrain tags as appose to Region IDs.
# Why did i make this? Well as cool as it is to use regions to tell the game
# what battlebacks to use, i prefer to simply set it by way of terrain tags..
# and i could be wrong, but i THINK that is how it's done in 2K and 2K3..
# but i COULD be wrong. *laughs* i'm wrong a lot >_<
#
# Some instructions fallow
#
# Anyhow, it still works basically the same way as Region Battlebacks did
# only now you have to apply the terrain tags you want used in the
# database under tilesets, and then below you assign what battle backs for
# what tags.
# You can also change what battle backs are used while play, by the same
# methods as before, only it's terrain rather than region.
# Anyhow, i hope you all enjoy this and i hope it's useful.
# A very special thanks to Yanfly for doing most of the legwork i know i
# could NEVER EVER do. Also, a lot of credit. What i did to change this
# script was rather simple..so.. yeah lol
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-TerrainBattleBacks"] = true
#==============================================================================
# â–¼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2011.12.30 - Started Script and Finished.
#
#==============================================================================
# â–¼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# RPG Maker VX Ace lacks any kind of a good battleback management system. All
# battlebacks for the overworld are predetermined based on their autotile. This
# becomes a problem when users would like to use different autotiles or when
# users aren't using an overworld tileset. This script allows developers to
# bind certain battlebacks to terrains and have the battleback shown change and
# vary depending on the terrain tag used if no specified battleback is used for
# that map.
#
#==============================================================================
# â–¼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below â–¼ Materials/ç´ æ but above â–¼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Map Notetags - These notetags go in the map notebox in a map's properties.
# -----------------------------------------------------------------------------
# <terrain battlebacks>
#  x-y: string
#  x-y: string
# </terrain battlebacks>
# This will set the terrain x to change battleback y to the string for the image
# filename. Insert as many "x-y: string" as needed for custom battlebacks. The
# terrain battlebacks that aren't defined will refer to the hash in the terrain
# Battlebacks script module.
#
#==============================================================================
# â–¼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================
module YEA
  module BATTLEBACKS

	#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	# - Default Terrain Settings -
	#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	# This will set the default backdrops for maps without custom terrain
	# settings. These settings will always be used unless there is a forced
	# battleback or the map specifies certain battlebacks. Note that if your
	# party encounters battles while on a ship, the ship battleback will take
	# priority over all of these. Adjust the ship battlebacks further below.
	#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	DEFAULT ={
	# TerrainID => [Battleback1,	   Battleback2],
			 0 => ["FF6 Grass", "bottom b"],
			 1 => ["FF6 Grass", "bottom b"],
			 2 => ["FF6 Forest", "bottom b"],
	} # Do not remove this.

	#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	# - Other Default Settings -
	#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	# These settings will be applied for battleback areas without marked terrain
	# battlebacks. They'll appear when nothing in the above hash appears and
	# there is no specified battleback.
	#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
	DEFAULT_BATTLEBACK_FOOT1 = "ff6 grass"   # Battleback1 for traveling on foot.
	DEFAULT_BATTLEBACK_FOOT2 = "bottom b"   # Battleback2 for traveling on foot.
	DEFAULT_BATTLEBACK_SHIP1 = "ff2_psp_ship_deck" # Battleback1 for traveling on ship.
	DEFAULT_BATTLEBACK_SHIP2 = "" # Battleback2 for traveling on ship.

  end # BATTLEBACKS
end # YEA
#==============================================================================
# â–¼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
module YEA
  module REGEXP
  module MAP

	TERRAIN_BATTLEBACKS_ON  = /<(?:TERRAIN_BATTLEBACKS|terrain battlebacks)>/i
	TERRAIN_BATTLEBACKS_OFF = /<\/(?:TERRAIN_BATTLEBACKS|terrain battlebacks)>/i
	TERRAIN_BATTLEBACK_TAG   = /(\d+)([-ï¼])(\d+):[ ](.*)/i

  end # MAP
  end # REGEXP
end # YEA
#==============================================================================
# â–  RPG::Map
#==============================================================================
class RPG::Map

  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :terrain_battlebacks

  #--------------------------------------------------------------------------
  # common cache: load_notetags_rbb
  #--------------------------------------------------------------------------
  def load_notetags_rbb
	@terrain_battlebacks = YEA::BATTLEBACKS::DEFAULT.clone
	@terrain_battlebacks_on = false
	#---
	self.note.split(/[\r\n]+/).each { |line|
	  case line
	  #---
	  when YEA::REGEXP::MAP::TERRAIN_BATTLEBACKS_ON
		@terrain_battlebacks_on = true
	  when YEA::REGEXP::MAP::TERRAIN_BATTLEBACKS_OFF
		@terrain_battlebacks_on = false
	  when YEA::REGEXP::MAP::TERRAIN_BATTLEBACK_TAG
		next unless @terrain_battlebacks_on
		rid = $1.to_i
		@terrain_battlebacks[rid] = ["", ""] if @terrain_battlebacks[rid].nil?
		case $3.to_i
		when 1
		  @terrain_battlebacks[rid][0] = $4.to_s
		when 2
		  @terrain_battlebacks[rid][1] = $4.to_s
		end
	  #---
	  end
	} # self.note.split
	#---
  end

end # RPG::Map

#==============================================================================
# â–  Spriteset_Battle
#==============================================================================
class Spriteset_Battle

  #--------------------------------------------------------------------------
  # overwrite method: battleback1_name
  #--------------------------------------------------------------------------
  def battleback1_name
	if $BTEST
	  $data_system.battleback1_name
	elsif $game_map.battleback1_name
	  $game_map.battleback1_name
	else
	  overworld_battleback1_name
	end
  end

  #--------------------------------------------------------------------------
  # overwrite method: battleback2_name
  #--------------------------------------------------------------------------
  def battleback2_name
	if $BTEST
	  $data_system.battleback2_name
	elsif $game_map.battleback2_name
	  $game_map.battleback2_name
	else
	  overworld_battleback2_name
	end
  end

  #--------------------------------------------------------------------------
  # alias method: normal_battleback1_name
  #--------------------------------------------------------------------------
  alias normal_battleback1_name_rbb normal_battleback1_name
  def normal_battleback1_name
	$game_map.terrain_battleback1 || normal_battleback1_name_rbb
  end

  #--------------------------------------------------------------------------
  # alias method: normal_battleback2_name
  #--------------------------------------------------------------------------
  alias normal_battleback2_name_rbb normal_battleback2_name
  def normal_battleback2_name
	$game_map.terrain_battleback2 || normal_battleback2_name_rbb
  end

  #--------------------------------------------------------------------------
  # overwrite method: default_battleback1_name
  #--------------------------------------------------------------------------
  def default_battleback1_name
	return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_FOOT1
  end

  #--------------------------------------------------------------------------
  # overwrite method: default_battleback2_name
  #--------------------------------------------------------------------------
  def default_battleback2_name
	return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_FOOT2
  end

  #--------------------------------------------------------------------------
  # overwrite method: ship_battleback1_name
  #--------------------------------------------------------------------------
  def ship_battleback1_name
	return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_SHIP1
  end

  #--------------------------------------------------------------------------
  # overwrite method: ship_battleback2_name
  #--------------------------------------------------------------------------
  def ship_battleback2_name
	return YEA::BATTLEBACKS::DEFAULT_BATTLEBACK_SHIP2
  end

end # Spriteset_Battle
#==============================================================================
# â–  Game_Map
#==============================================================================
class Game_Map

  #--------------------------------------------------------------------------
  # alias method: setup
  #--------------------------------------------------------------------------
  alias game_map_setup_rbb setup
  def setup(map_id)
	game_map_setup_rbb(map_id)
	@map.load_notetags_rbb
  end

  #--------------------------------------------------------------------------
  # new method: terrain_battlebacks
  #--------------------------------------------------------------------------
  def terrain_battlebacks
	return @map.terrain_battlebacks
  end

  #--------------------------------------------------------------------------
  # new method: terrain_battleback1
  #--------------------------------------------------------------------------
  def terrain_battleback1
	return terrain_battlebacks[$game_player.terrain_tag][0]
  end

  #--------------------------------------------------------------------------
  # new method: terrain_battleback2
  #--------------------------------------------------------------------------
  def terrain_battleback2
	return terrain_battlebacks[$game_player.terrain_tag][1]
  end

end # Game_Map
#==============================================================================
#
# â–¼ End of File
#
#==============================================================================

 

 

FAQ

Q: Why no demo?

A: Cause it's pretty easy to instal and use, plus i have seen other scripts posted without demos before.

 

Credit and Thanks

Modified by Michael Ponder Jr

 

Author's Notes

So i would love some feed back.... also.. if anyone get's any errors.. let me know.. but it SHOULD work, it's been working fine for me... i can't promise i can fix it.. but.. just let me know.

Thank you so much, this worked wonderfully.

 

Oops, that quote was unintentional.

But still, thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×