miguel1 17 Report post Posted October 8, 2009 Hi guys I'm giving you a fake loading bar, this script displays a fake loading bar before screen title. Credits go to arevulopapo, for the script, and me, for posting XD Here take a look: http://img514.imageshack.us/img514/8480/loadingbarwithtittlescr.png (pic1) http://img514.imageshack.us/img514/4875/loadingbarwithbackgroun.png ( pic2) http://img514.imageshack.us/img514/505/loadingbarwithoutbackgr.png (pic3) Instrucions: Basicly it's all in the script, but here's a summary; First: Put this script above the "main", then, go in the script "main" and change: "$scene = Scene_Title.new" by "$scene = Scene_Loading_Bar.new" Then its the settings, i'm just going to tell you how to change the background, the rest you can do it by your selves; Go to line 57 where it's "Background = 1" - if you let it that way, this will make your loading bar background appear just like pic1 - If you want it like pic2, you have to select your picture (you want to put in your background) and put it in ( "Graphics / Pictures" ), and you have to change your pic name to "splash", without the quotation marks. The picture can be of any extension - And last if you want it to be like pic3, all you have to do is, copy this pic i've made to ( "Graphics / Pictures" ) and call it "back", without the quotation marks here's the pic: http://img94.imageshack.us/img94/5720/back.png Demo: http://www.2shared.com/file/8305672/c8f7885/Project36.html Here's the script, enjoy: #=================================================================== # Ultimate Fake Loading Bar # By arevulopapo # May 11 2007 # # This script displays a fake loading screen before the title. # # # Setup: # Put this script above the "main", go in the script "main" and change: # $scene = Scene_Title.new # by # $scene = Scene_Loading_Bar.new # # Settings: # #LOADING_SPEED controls the speed of loading. # #BAR_FILL_TYPE select what will fill the bar. # # 1 - Use only one color to fill the bar. # 2 - Transition of color that occurs throughout the bar. # 3 - color transition smaller. # 4 - an image ( "Graphics / Pictures / bar" any extension) used to fill the bar. # #BAR_FRAME_TYPE select the type of frame (outline): # # 1 - initial frame # 2 - a picture ( "Graphics / Pictures / frame", any extension) which will be shown # 3 - no frame # #BAR_BACK_TYPE select the background (bottom) bar: # # 1 - nothing # 2 - a picture ( "Graphics / Pictures / back", any extension) which will be shown # #FILE_LISTING (true / false) true = shows that files are being loaded, false = do not show. # #BEEP (true / false) will play (or not) a sound ( "Audio / SE / beep, any extension) #when the end of the loading # #BACKGROUND selects the bottom of the screen: # # 1 - the title screen # 2 - a picture ( "Graphics / Pictures / splash", any extension) # 3 - no background (black background) # # NOTE: # Any image used to create bars / frames must 544x32 in size. #=================================================================== LOADING_SPEED = 4 BAR_FILL_TYPE = 1 BAR_FRAME_TYPE = 1 BAR_BACK_TYPE = 1 FILE_LISTING = true BEEP = false BACKGROUND = 1 COLOR_1 = Color.new(255,64,64,255) COLOR_2 = Color.new(128,255,64,255) COLOR_3 = Color.new(16,16,16,255) #=================================================================== # Window #=================================================================== class Window_Loading_Bar < Window_Base #================================================================= attr_reader :finish_flag #================================================================= def initialize() super(0, 384, 640, 64) self.contents = Bitmap.new(608, 32) self.contents.font.size = 16 self.windowskin = nil @finish_flag = false @bar_fill = 0 @file = 0 @flags = [0,0,0] @speed = LOADING_SPEED refresh end #================================================================= def refresh self.contents.clear step = rand(@speed) unless (@bar_fill + step) > 544 @bar_fill += step else @finish_flag = true end #=============================================================== # Draw background bar #=============================================================== case BAR_BACK_TYPE when 1 self.contents.fill_rect(32, 0, 544, 32, COLOR_3) when 2 self.contents.blt(32, 0, RPG::Cache.picture('back.png'), Rect.new(0,0,544,32)) end #=============================================================== # Draw main bar #=============================================================== case BAR_FILL_TYPE when 1 self.contents.fill_rect(32, 0, @bar_fill, 32, COLOR_1) when 2 r = COLOR_1.red + (COLOR_2.red - COLOR_1.red)*@bar_fill/544 g = COLOR_1.green + (COLOR_2.green - COLOR_1.green)*@bar_fill/544 b = COLOR_1.blue + (COLOR_2.blue - COLOR_1.blue)*@bar_fill/544 a = COLOR_1.alpha + (COLOR_2.alpha - COLOR_1.alpha)*@bar_fill/544 self.contents.fill_rect(32, 0, @bar_fill, 32, Color.new(r,g,b,a)) when 3 for i in 0..@bar_fill - 1 r = COLOR_1.red + (COLOR_2.red - COLOR_1.red)*i/544 g = COLOR_1.green + (COLOR_2.green - COLOR_1.green)*i/544 b = COLOR_1.blue + (COLOR_2.blue - COLOR_1.blue)*i/544 a = COLOR_1.alpha + (COLOR_2.alpha - COLOR_1.alpha)*i/544 self.contents.fill_rect(32+i, 0, 1, 32, Color.new(r,g,b,a)) end when 4 self.contents.blt(32, 0, RPG::Cache.picture('bar.png'), Rect.new(0,0,@bar_fill,32)) end #=============================================================== # Draw surrounding rectangle #=============================================================== case BAR_FRAME_TYPE when 1 self.contents.fill_rect(32, 0, 544, 5, Color.new(64,64,64)) self.contents.fill_rect(32, 0, 5, 32, Color.new(64,64,64)) self.contents.fill_rect(571, 0, 5, 32, Color.new(64,64,64)) self.contents.fill_rect(32, 27, 544, 5, Color.new(64,64,64)) self.contents.fill_rect(33, 1, 542, 3, Color.new(128,128,128)) self.contents.fill_rect(33, 28, 542, 3, Color.new(128,128,128)) self.contents.fill_rect(33, 1, 3, 30, Color.new(128,128,128)) self.contents.fill_rect(572, 1, 3, 30, Color.new(128,128,128)) self.contents.fill_rect(34, 2, 540, 1, Color.new(192,192,192)) self.contents.fill_rect(34, 29, 540, 1, Color.new(192,192,192)) self.contents.fill_rect(573, 2, 1, 28, Color.new(192,192,192)) self.contents.fill_rect(34, 2, 1, 28, Color.new(192,192,192)) when 2 self.contents.blt(32, 0, RPG::Cache.picture('frame.png'), Rect.new(0,0,544,32)) end #=============================================================== # Make array of filenames #=============================================================== files_root = Dir.entries(".") files_data = (files_root.include?("Data") ? Dir.entries("Data")+Dir.entries(".") : []) files_graphics = (files_root.include?("Graphics") ? Dir.entries("Graphics")+Dir.entries("Graphics/Animations")+Dir.entries("Graphics/Autotiles")+Dir.entries("Graphics/Battlebacks")+Dir.entries("Graphics/Battlers")+Dir.entries("Graphics/Characters")+Dir.entries("Graphics/Fogs")+Dir.entries("Graphics/Gameovers")+Dir.entries("Graphics/Icons")+Dir.entries("Graphics/Panoramas")+Dir.entries("Graphics/Pictures")+Dir.entries("Graphics/Tilesets")+Dir.entries("Graphics/Titles")+Dir.entries("Graphics/Transitions")+Dir.entries("Graphics/Windowskins") : []) files_audio = (files_root.include?("Audio") ? Dir.entries("Audio")+Dir.entries("Audio/BGM")+Dir.entries("Audio/BGS")+Dir.entries("Audio/SE")+Dir.entries("Audio/ME") : []) if @flags[0] == 0 if @file < files_data.size text = "Data/" + files_data[@file] else @flags[0] = 1 @file = 0 return end elsif @flags[1] == 0 if @file < files_graphics.size text = "Graphics/" + files_graphics[@file] else @flags[1] = 1 @file = 0 return end elsif @flags[2] == 0 if @file < files_audio.size text = "Audio/" + files_audio[@file] else @flags[2] = 1 @file = 0 return end else text = "RGSS102E.DLL" @speed += 1 end #=============================================================== # Draw the filenames loaded #=============================================================== self.contents.draw_text(192,0,608,32,"Loading file: " + text,0) if FILE_LISTING @file += 1 end #================================================================= end #=================================================================== # Scene #=================================================================== class Scene_Loading_Bar #================================================================= def main $data_system = load_data("Data/System.rxdata") $game_system = Game_System.new @sprite = Sprite.new case BACKGROUND when 1 bitmap = RPG::Cache.title($data_system.title_name) when 2 bitmap = RPG::Cache.picture("splash") when 3 bitmap = RPG::Cache.picture("") end @sprite.bitmap = bitmap @loading_bar = Window_Loading_Bar.new Graphics.transition loop do Graphics.update @loading_bar.refresh if @loading_bar.finish_flag == true $scene = Scene_Title.new Audio.se_play("Audio/SE/System01", 100, 100) if BEEP end if $scene != self break end end Graphics.freeze @loading_bar.dispose @sprite.bitmap.dispose @sprite.dispose end #================================================================= end if you have any question, just ask ;) miguel1 3 ShinyToyGuns, Kiriashi and aspire43 reacted to this Share this post Link to post Share on other sites
Nisage 31 Report post Posted October 8, 2009 A loading bar? Never seen one before (for XP/VX, I've seen them in many games before :P) I might be able to use this for one game of mine. This has a certain "theme" that's the same as it. Thanks for sharing :) Share this post Link to post Share on other sites
miguel1 17 Report post Posted October 8, 2009 No problem ;) i'm going to post more scripts that i have, since some are hard to find Share this post Link to post Share on other sites
ShinyToyGuns 29 Report post Posted October 8, 2009 (edited) This is a pretty useful script, although, I noticed one slight problem which is an easy fix...the default value for BAR_BACK_TYPE is 2, which gives an error if you don't have a background for the bar. Other than that, it's a good script. Thanks. :) I've given you Rep Edited October 8, 2009 by ShinyToyGuns Share this post Link to post Share on other sites
miguel1 17 Report post Posted October 8, 2009 Thanks for letting me know that, I'm going to edit my post and put "BAR_BACK_TYPE is 1" Thanks Share this post Link to post Share on other sites
Kiriashi 117 Report post Posted October 8, 2009 (Please make the same changes I mentioned in the minimap script topic. Polraudio please move this out of requests.) Thanks for posting this miguel. It is quite a cool script. Share this post Link to post Share on other sites
Tomo2000 60 Report post Posted October 8, 2009 As I said earlier, there is something wrong with the code [ code ] command as it does this: # Ultimate Fake Loading Bar # By arevulopapo # May 11 2007 Copies it all to a single line. The 3 things above are just the first three lines after I tried copying them. Would you be able to post a download link (preferably on 2shared.com) of a rmxp project with this script in it? That would be great. Thanks in advance ;) ~Tomo2000 Share this post Link to post Share on other sites
miguel1 17 Report post Posted October 8, 2009 As I said earlier, there is something wrong with the code [ code ] command as it does this: # Ultimate Fake Loading Bar # By arevulopapo # May 11 2007 Copies it all to a single line. The 3 things above are just the first three lines after I tried copying them. Would you be able to post a download link (preferably on 2shared.com) of a rmxp project with this script in it? That would be great. Thanks in advance ;) ~Tomo2000 Ok I've put a demo here it is: http://www.2shared.com/file/8305672/c8f7885/Project36.html Share this post Link to post Share on other sites
Kiriashi 117 Report post Posted October 8, 2009 As I said earlier, there is something wrong with the code [ code ] command as it does this: # Ultimate Fake Loading Bar # By arevulopapo # May 11 2007 Copies it all to a single line. The 3 things above are just the first three lines after I tried copying them. Would you be able to post a download link (preferably on 2shared.com) of a rmxp project with this script in it? That would be great. Thanks in advance ;) ~Tomo2000 Did you try deleting those comments and entering them in manually? Share this post Link to post Share on other sites
imapro 1 Report post Posted December 21, 2010 can i put this script on my site {url="http://no-reson.webs.com\"]NoReson.com[/url} :biggrin_002: :biggrin_002: :biggrin_002: :biggrin_002: :biggrin_002: :biggrin_002: Share this post Link to post Share on other sites
Broken Messiah 20 Report post Posted December 21, 2010 Share this post Link to post Share on other sites
laansolo 3 Report post Posted December 21, 2010 *Note* every time you necropost, a baby turns into a time bomb, killing all within range. DON'T NECROPOST AND SAVE SOME LIVES! Share this post Link to post Share on other sites
JengaSoft 0 Report post Posted January 6, 2012 when I try to use splash instead of 1 I get an error.. Help pwease :3 Share this post Link to post Share on other sites
Bigace360 38 Report post Posted January 6, 2012 Unless you give us the error, that is displayed on the script and post it on the site, via writing it or making a screenshot, we can't really help you as we don't know where the problem is ourselves. Share this post Link to post Share on other sites
kellessdee 48 Report post Posted January 7, 2012 1. The instructions state to change the picture file to be named "splash," not the background variable in the script. Did you set Background = splash or did you actually set the picture file's name to be splash? 2. Normally, I am not a stickler for necroposting, but this topic has already been necro'd before. Please check the dates of the topic before posting (the OP is like 2 years old) If you really need help, you should probably start a new topic requesting help. more info: http://www.rmxpunlim...es#necroposting 3. Gamers (well I know I do) HATE loading screens/times...even when they are necessary in large 3d games. Why would you want to make your players sit through a fake loading screen...that doesn't even load anything or do anything other than make the player wait? I don't mean to be so harsh, but isn't that a little sadistic, making your players sit through pointless loading screens? (Just trying to help, really) EDIT: Oh yea, 4. What Bigace said. Share this post Link to post Share on other sites