Group: Member
Posts: 39
Type: Scripter
RM Skill: Intermediate
Version: 1.0 Author: Me, Gammastar Release Date: July 6, 2008
Introduction: This script is for those who miss the features of the RM2k3 battlebacks, such as scrolling, and multiple "frames."
Features: Allows for either 1 battleback, with the option of scrolling, or two battlebacks, with the option of scrolling the back one. Also allows for the default battleback. Can be set to automatically reset the configuration settings for the battleback setup. (Is true by default)
#------------------------------------------------------------------------------- # RM2k3 Style Battleback Setup # by Gammastar #Version: 1.0 #Release Date: July 6, 2008 #------------------------------------------------------------------------------- #Description: This script enables the usage of either 1 picture for a battleback # (with the option of scrolling) or 2 pictures (with the option of # scrolling the back picture) #------------------------------------------------------------------------------- #Installation: Of course, put this in the Materials section above Main. #------------------------------------------------------------------------------- #How to use: In order to specify what to use as the battleback(s), you need to # put the Script command in an event somewhere on the map, whether it # be a special event that triggers a battle or an autorun event that # sets them automatically (for random encounters). # # When you're using battleback type 1 (only 1 background), use this: # # BbS.set1([name], [scroll type], [scroll speed]) # # Name: The name of the picture file including the extension. MUST be # in Pictures folder. # Scroll Type: 0 = no scroll, 1 = horizontal, 2 = vertical # Scroll Speed: Number of pixels background is moved every frame. # # When you're using battleback type 2 (2 backgrounds), use this: # # BbS.set2([name1], [name2], [scroll type], [scroll speed]) # # Name1: The name of the front picture. Same restrictions apply. # Name2: The name of the back picture. Same restrictions apply. # Scroll Type: Same as above. # Scroll Speed: Same as above. # # NOTE: Do not use the brackets. This is only an illustration. # NOTE: ONLY the back picture scrolls in battleback type 2. # #And please, give credit if used. Thanks, and, enjoy! #-------------------------------------------------------------------------------
module Gammastar_Bb_Setup #Set this to false if you don't want the settings to be defaulted when #Scene_Map loads. RESET_TO_DEFAULT = true end
#------------------------------------------------------------------------------- #Set up battleback information. #------------------------------------------------------------------------------- class BbS #Sets up the needed information for battleback type 1. def self.set1(battle_back_1, scroll_type, scroll_speed) $battle_back_type = 1 $battle_back_1 = battle_back_1 $battle_back_2 = nil $scroll_type = scroll_type $scroll_speed = scroll_speed end
#Sets up the needed information for battkeback type 2. def self.set2(battle_back_1, battle_back_2, scroll_type, scroll_speed) $battle_back_type = 2 $battle_back_1 = battle_back_1 $battle_back_2 = battle_back_2 $scroll_type = scroll_type $scroll_speed = scroll_speed end end
#------------------------------------------------------------------------------- #Set all settings to default, if RESET_TO_DEFAULT is true. #------------------------------------------------------------------------------- class Scene_Map < Scene_Base alias gammastar_initialize initialize def initialize if Gammastar_Bb_Setup::RESET_TO_DEFAULT == true gammastar_initialize $battle_back_type = 0 $battle_back_1 = nil $battle_back_2 = nil $scroll_type = 0 $scroll_speed = 0 end end end
#------------------------------------------------------------------------------- #Set up battlebacks. #------------------------------------------------------------------------------- class Spriteset_Battle def initialize create_viewports case $battle_back_type when 0 create_battleback when 1 create_new_battleback($battle_back_1, $scroll_type, $scroll_speed) when 2 create_new_battleback2($battle_back_1, $battle_back_2, $scroll_type, $scroll_speed) end create_battlefloor create_enemies create_actors create_pictures create_timer update end
#------------------------------------------------------------------------------- #Process scrolling, if any. #------------------------------------------------------------------------------- alias gammastar_update update def update gammastar_update if $battle_back_type == 1 case @scroll_type when 0 return when 1 @battleback_sprite.ox += @scroll_speed when 2 @battleback_sprite.oy += @scroll_speed end elsif $battle_back_type == 2 case @scroll_type when 0 return when 1 @battleback_sprite2.ox += @scroll_speed when 2 @battleback_sprite2.oy += @scroll_speed end end end
#------------------------------------------------------------------------------- #Prevent NoMethod error for Class:Plane. #------------------------------------------------------------------------------- def update_battleback @battleback_sprite.update if $battle_back_type == 0 end
#------------------------------------------------------------------------------- #Dispose of battleback sprites. #------------------------------------------------------------------------------- def dispose_battleback @battleback_sprite.dispose @battleback_sprite2.dispose if @battleback_sprite2 != nil end end
Customization: While the instructions are in the script, I'll put them here, too. You must use the script function in an event to change the settings.
For battleback type 1 (1 background): BbS.set1(Name, Scroll Type, Scroll Speed) Name: Name of picture plus extension. Must be imported to Pictures folder. Scroll Type: 0 = no scroll; 1 = horizontal; 2 = vertical Scroll Speed: Number of pixels per frame the picture moves by. (Use negative for scrolling in opposite direction)
For battleback type 2 (2 backgrounds): BbS.set2(Name1, Name2, Scroll Type, Scroll Speed) Name1: Name of front picture. Same restrictions apply. Name2: Name of back picture. Same restrictions apply. Scroll Type: Same as above Scroll Speed: Same as above.
Compatibility: There shouldn't be any compatibility problems. If there are, notify me, and I'll see what I can do.
Screenshots: Working on getting them.
Demo: I MIGHT make a demo. If I do, I'll put it up.
Installation: Put it above Main in the Materials section.
FAQ: I don't think there should be any questions, but if you have one, go for it.
Credits: Me, Gammastar. I still can't believe I scripted this whole thing. Ratty524 for the idea.
Terms and Conditions: Give me credit if used.
Yeah, I know, I could have made horizontal AND vertical scrolling as an option, but I'm too tired right now. I'll do it later.
This post has been edited by Gammastar: Jul 6 2008, 09:52 AM
Could you post it as an attachment... the format isn't working for me. I have a file where I keep all my other scripts and it keeps deleting them and appearing with no spaces.
__________________________
Quotes If we are going to teach Creationism Science as an alternative to Evolution, we should also teach the stork theory as an alternative to biological reproduction - Judith Hayes
And he went up from thence unto Bethel: and as he was going up by the way, there came forth little children out of the city, and mocked him, and said unto him, Go up, thou bald head; go up, thou bald head. And he turned back, and looked on them, and cursed them in the name of the LORD. And there came forth two she bears out of the wood, and tare forty and two children of them.
Group: Local Mod
Posts: 1,633
Type: Artist
RM Skill: Skilled
Rev Points: 5
Sorry for the late reply, I just wanted to inform you that the script works.
However, I think you should also mention something about specifying what images to use in this script. Names of picture files must not only have the file extension, but should also be put in quotes so that it works. Nice job overall.
__________________________
The userbar links to the right thread this time. :P
Click here for other crap
QUOTE (gamezerstudios @ Jan 18 2010, 03:29 AM)
i don't like blogs last time i got one my desktop blew up!
ROFL!!
Dragons and Eggs! Please click :3
Weird Dragon is weird.Pretty Dragon is pretty. Midjet Dragon is a midget.Cool Dragon is cool. Awesome Dragon is AWESOMEOkay Dragon is... Meh UGLY DRAGON IS UGLY! >_<... Ok seriously WTF!? Another Pretty DragonPrettier Dragon WOAH BADASS!Woah... Same as before. >_> Ooh it's a godly looking dragon!Ooh, it's a dragon prettier than the other two! ... Okay seriously what the hell is this thing?
Group: Local Mod
Posts: 1,633
Type: Artist
RM Skill: Skilled
Rev Points: 5
QUOTE (Sechs @ Jul 14 2008, 12:15 PM)
Yeah, can you post the script again? It's not in proper format.
It worked fine for me when I copied it.
__________________________
The userbar links to the right thread this time. :P
Click here for other crap
QUOTE (gamezerstudios @ Jan 18 2010, 03:29 AM)
i don't like blogs last time i got one my desktop blew up!
ROFL!!
Dragons and Eggs! Please click :3
Weird Dragon is weird.Pretty Dragon is pretty. Midjet Dragon is a midget.Cool Dragon is cool. Awesome Dragon is AWESOMEOkay Dragon is... Meh UGLY DRAGON IS UGLY! >_<... Ok seriously WTF!? Another Pretty DragonPrettier Dragon WOAH BADASS!Woah... Same as before. >_> Ooh it's a godly looking dragon!Ooh, it's a dragon prettier than the other two! ... Okay seriously what the hell is this thing?
Sorry for the late reply, I just wanted to inform you that the script works.
However, I think you should also mention something about specifying what images to use in this script. Names of picture files must not only have the file extension, but should also be put in quotes so that it works. Nice job overall.
QUOTE (toboisgreat @ Aug 17 2008, 10:01 AM)
It didnt work for me, this is what i have put in the script call, is anything wrong with it?
CODE
BbS.set2(grass, grass2, 1, 4)
Is it correct. Maybe you could put up an example for others. Thank you
Thus, from your example:
CODE
BbS.set2("grass.png", "grass2.png", 1, 4)
Edit: And if any of you are using this with the Tankentai SBS, you will receive an error if you get into surprise attack encounter.
This post has been edited by mbub: Aug 17 2008, 03:09 PM
Group: Member
Posts: 37
Type: Event Designer
RM Skill: Advanced
So, when we now that the script is working, can someone give me an *.txt file of it because I copied it line by line and I got error in the last line(the "end"), I didn't find why! Please, someone which ran it, give me the script in *.txt file, V.
Group: Local Mod
Posts: 1,633
Type: Artist
RM Skill: Skilled
Rev Points: 5
It worked fine for me. By the way, the last post was back in august. x_x
__________________________
The userbar links to the right thread this time. :P
Click here for other crap
QUOTE (gamezerstudios @ Jan 18 2010, 03:29 AM)
i don't like blogs last time i got one my desktop blew up!
ROFL!!
Dragons and Eggs! Please click :3
Weird Dragon is weird.Pretty Dragon is pretty. Midjet Dragon is a midget.Cool Dragon is cool. Awesome Dragon is AWESOMEOkay Dragon is... Meh UGLY DRAGON IS UGLY! >_<... Ok seriously WTF!? Another Pretty DragonPrettier Dragon WOAH BADASS!Woah... Same as before. >_> Ooh it's a godly looking dragon!Ooh, it's a dragon prettier than the other two! ... Okay seriously what the hell is this thing?
Group: Member
Posts: 37
Type: Event Designer
RM Skill: Advanced
Sorry for double posting. So, how can I fix the shaking of the enemies when they damage my hero. I mean I think there was shaking in the original version(without battlebacks) but it was kinda different!