Terrain Battle Background
Authors: game_guy
Version: 1.0
Type: Battle Background Changer
Key Term: Battle Add-on
IntroductionRemember back when RPG Maker 2003 and 2000 were used before XP was even out? Well there was a feature in there where the battle background changed depending on the terrain you were on. I have scripted this :)
Features
- Configure Battle Backgrounds
- Changes Background depending on terrain
Screenshots(http://i307.photobucket.com/albums/nn318/bahumat27/terrain3.png)
(http://i307.photobucket.com/albums/nn318/bahumat27/terrain4.png)
(http://i307.photobucket.com/albums/nn318/bahumat27/terrain.png)
(http://i307.photobucket.com/albums/nn318/bahumat27/terrain2.png)
Demohttp://www.filedropper.com/stuff_1
Script
module GameGuy
Terrain1 = "001-Grassland01"
Terrain2 = "002-Woods01"
Terrain3 = "003-Forest01"
Terrain4 = "004-Mountain01"
Terrain5 = "004-Mountain01"
Terrain6 = "004-Mountain01"
Terrain7 = "004-Mountain01"
end
class Scene_Map
alias re_update update
def update
re_update
if $game_map.terrain_tag($game_player.x, $game_player.y) == 1
$game_map.battleback_name = GameGuy::Terrain1
elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 2
$game_map.battleback_name = GameGuy::Terrain2
elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 3
$game_map.battleback_name = GameGuy::Terrain3
elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 4
$game_map.battleback_name = GameGuy::Terrain4
elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 5
$game_map.battleback_name = GameGuy::Terrain5
elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 6
$game_map.battleback_name = GameGuy::Terrain6
elsif $game_map.terrain_tag($game_player.x, $game_player.y) == 7
$game_map.battleback_name = GameGuy::Terrain7
end
end
end
InstructionsChange the name of the battle backs in the script between the quotes.
module GameGuy
Terrain1 = "001-Grassland01"
Terrain2 = "002-Woods01"
Terrain3 = "003-Forest01"
Terrain4 = "004-Mountain01"
Terrain5 = "004-Mountain01"
Terrain6 = "004-Mountain01"
Terrain7 = "004-Mountain01"
end
This is very limited. With only 7 battle backs. Now I could have used terrain 0 as one but I left that in case you wanted to use a battle background from the tileset.
CompatibilityThere shouldn't be any. Post any if you find some.
Credits and Thanks
- game_guy (dont care if my name is game_girl now it'll be changed back eventually)
Author's NotesGive proper credits :)
It's a cool script...but yes, it is limited with the number of battle backgrounds possible. Perhaps you can make it a list exclusive to each tileset only? Of course this may be some tougher work, or it may not be possible at all (Which I doubt...somewhat), but who knows...who knows...
of course why I left terrain 0 out of the script. So you can use the tilesets background still.
Perhaps you didn't get my point. What I was stating was that you can have multiple lists for each tilesets that configure to each battle background.
For example, Port-Town's inside list of battle backgrounds would be something like (I'm not checking the tileset, this is purely random):
Terrain1 = "001-Grassland01"
Terrain2 = "002-Woods01"
Terrain3 = "003-Forest01"
Terrain4 = "004-Mountain01"
Terrain5 = "004-Mountain01"
Terrain6 = "004-Mountain01"
Terrain7 = "004-Mountain01"
Then I have a list that does another module that goes for...Erm, good ol' Grassland:
Terrain1 = "a"
Terrain2 = "n"
Terrain3 = "c"
Terrain4 = "filename"
Terrain5 = "003"
Terrain6 = "n"
Terrain7 = "d"
Get my point?
Quote from: Starholekirby86 on April 08, 2009, 08:38:15 pm
Perhaps you didn't get my point. What I was stating was that you can have multiple lists for each tilesets that configure to each battle background.
For example, Port-Town's inside list of battle backgrounds would be something like (I'm not checking the tileset, this is purely random):
Terrain1 = "001-Grassland01"
Terrain2 = "002-Woods01"
Terrain3 = "003-Forest01"
Terrain4 = "004-Mountain01"
Terrain5 = "004-Mountain01"
Terrain6 = "004-Mountain01"
Terrain7 = "004-Mountain01"
Then I have a list that does another module that goes for...Erm, good ol' Grassland:
Terrain1 = "a"
Terrain2 = "n"
Terrain3 = "c"
Terrain4 = "filename"
Terrain5 = "003"
Terrain6 = "n"
Terrain7 = "d"
Get my point?
Its easy to apply that in script. But boy would that be alot of modules :O.o:
There'd be 50 modules just for the default ones. And than it'd be a hassle for people to set there own up.
That's true. But for one, you're not going to use all the terrains for the tileset (Unless you are, the more you do, the more work you have anyway). Second, you're not even going to program all 50 of them. I mean seriously, how many different backgrounds are you going to have for InnerBody...? It's just a suggestion anyway, using only one module is indeed more convenient depending on how you change battle backgrounds overall in the game. The way with the multiple modules would just make it easier if you're going for a lot of specific tiles with backgrounds...
I just sprouted an idea though! I think I can setup where you can confure which tilesets it doesnt affect. I'm going to try and see if I can get that.
I'll wait for that version to come up, and let's see what happens. Sounds great.
I cannot wait for this feature to be more optimal. Revival of such features from the old editor are a delight to hear. I'm surprised with the sheer convenience of the link though...Stuff_1. Stuff is pretty a common filename, and the fact it such a simple URL like that is interesting. It probably does work, yes...I got a download prompt...
dont 4 get u can always change it by calling your module Gameguy::terain1 = newname
No, you can't. Those are constants.
Instead, use $game_system:
class Game_System
attr_accessor :terrains
alias gg_terrains_init initialize
def initialize
gg_terrains_init
@terrains = {
1 => "<name1>",
2 => "<name2>",
3 => "<name3>",
4 => "<name4>",
5 => "<name5>",
6 => "<name6>",
7 => "<name7>"
}
end
end
Then you can call with $game_system.terrains[<number>] = "<name>"
hmm thought 4 sure u could guess i was wrong
It's a constant. You can't change a constant. They never change.
You could edit the value, though:
GameGuy::Terrain1.gsub!(GameGuy::Terrain1, "<newValue>")
Thank you guys. As soon as I get back to rapid city *currently in gillette spending easter break with grandma *sighs** I'll update this script
This script is now part of Tons of Add-ons.
http://forum.chaos-project.com/index.php?topic=105.0