|
| | [script] script barre de chargement! | |
| | Auteur | Message |
---|
Jefulrich Membre
Nombre de messages : 8 Age : 33 Votre niveau sur RPG Maker : Mi-débutant Date d'inscription : 05/04/2008
Mes points RPG's Points: (50/1000)
| Sujet: [script] script barre de chargement! 07/04/08, 08:21 pm | |
| Bonjour! J'aimerais savoir si c'était possible davoir un script pour RMVX? Déscription: Une barre de chargement qui se lance lors du lancement d'une partie (nouvelle et/ou enregistré)! Qui aille de 0 à 100% en un temps que le créateur peut definir! Merci à celui qui me le créra, son nom sera dans les crédit de mon jeu! | |
| | | nova Architecte
Nombre de messages : 265 Age : 35 Votre niveau sur RPG Maker : ??? Awards : Date d'inscription : 09/02/2008
Mes points RPG's Points: (1000/1000)
| Sujet: Re: [script] script barre de chargement! 08/04/08, 02:42 pm | |
| Je connais un script sur RPGM XP, mais pas sur VX. Je vais essayer de retrouver le script et l'adapter sur VX. | |
| | | Jefulrich Membre
Nombre de messages : 8 Age : 33 Votre niveau sur RPG Maker : Mi-débutant Date d'inscription : 05/04/2008
Mes points RPG's Points: (50/1000)
| Sujet: Re: [script] script barre de chargement! 08/04/08, 07:29 pm | |
| Merci beaucoup de te donner autant de mal pour sa! | |
| | | nova Architecte
Nombre de messages : 265 Age : 35 Votre niveau sur RPG Maker : ??? Awards : Date d'inscription : 09/02/2008
Mes points RPG's Points: (1000/1000)
| Sujet: Re: [script] script barre de chargement! 09/04/08, 12:17 pm | |
| J'ai réussi à retrouver le script, mais pour XP. Essaie de l'adapter sur VX. Voici le screen : Et voici le script : Appeler ce script "bitmap" - Citation :
- # A gradient bar... no need to explain
# Made By Illusion class Bitmap def gradient_fill_rect(x, y, width = nil, height = nil, color = nil) if x.is_a?(Rect) color = y height = x.height end origin_aplha = color.alpha temp_color_alpha = 0 for i in 0...height temp_color_alpha += origin_aplha / height.to_f temp_color = Color.new(color.red, color.green, color.blue, temp_color_alpha) if x.is_a?(Rect) self.fill_rect(x, temp_color) else self.fill_rect(x, y + i, width, height - i, temp_color) end end end end Appeler ce script "Game_system" - Citation :
- class Game_System
#-------------------------------------------------------------------------- # ● Returns the default windowskin name. #-------------------------------------------------------------------------- def windowskin_name if @windowskin_name == nil begin return $data_system.windowskin_name rescue return '001-Blue01' end else return @windowskin_name end end end Appeler ce script "Window_base" - Citation :
- # ■ Window_Base
#------------------------------------------------------------------------------ # Some modifications to make some special effects. # By : Illusion # Descriptions : # self.shake = true >> Will shake the window and its contents. # self.bounce(x or y or both) >> Will "bounce" the window up, donw, left and right. # self.continuous_transparency = true >> Will make the window fade in and out. # Before setting one these settings in your scene do this : # @window_thing.x = desired x # @window_thing.y = desired y # @window_thing.update # @window_thing.effect_attribute = true or false #==============================================================================
class Window_Base attr_accessor :shake attr_accessor :bounce_x attr_accessor :bounce_y attr_accessor :continuous_transparency alias effects_initialize initialize alias effects_update update def initialize(x, y, width, height) @old_x = x @old_y = y effects_initialize(x, y, width, height) self.shake = false self.bounce_x = false self.bounce_y = false self.continuous_transparency = false end def update @old_x = self.x unless move_effects @old_y = self.y unless move_effects effects_update # If the window has a shake status, shake it. if self.shake self.x = @old_x + rand(5) self.y = @old_y - rand(5) end # If the window has a bouncing status, move it. if self.bounce_y @down = true if self.y < @old_y - 40 @down = false if self.y > @old_y+ 10 self.y += 1 if @down self.y -= 1 unless @down end if self.bounce_x @left = true if self.x < @old_x - 20 @left = false if self.x > @old_x + 30 self.x += 1 if @left self.x -= 1 unless @left end # If the window has a transparency status, change its transparency it. if self.continuous_transparency @opacity_up = true if self.opacity <= 10 @opacity_up = false if self.opacity >= 255 self.opacity += 2 if @opacity_up self.opacity -= 2 unless @opacity_up end end #------------------------------------------------------------- # ● Enables bouncing effect #------------------------------------------------------------- def bounce self.bounce_x = self.bounce_y = true end #------------------------------------------------------------- # ● Checks that no window effect is active. #------------------------------------------------------------- def move_effects a = false a = true if self.bounce_x a = true if self.bounce_y a = true if self.shake return a end end Appeler ce script "Window_load_data" - Citation :
- #==============================================================================
# ■ Window_Load_Data #------------------------------------------------------------------------------ # Shows the loading data bar and percentage. # By : Illusion #==============================================================================
class Window_Load_Data < Window_Base attr_accessor :text attr_accessor :color #-------------------------------------------------------------------------- # ● Initializes the window. #-------------------------------------------------------------------------- def initialize super(190, 206, 250 + 32, 30 + 32 - 15) self.contents = Bitmap.new(250, 32 - 6) self.contents.font.name = $defaultfonttype self.contents.font.size = 16 self.contents.font.color = Color.new(255, 255, 255, 255) @text = "" @color = Color.new(0, 0, 0, 255) self.visible = true end #-------------------------------------------------------------------------- # ● Updates the bar and the text. #-------------------------------------------------------------------------- def set_text_and_bar(percentage) percentage = percentage.floor.to_i update # Clears the contents. self.contents.clear self.contents.gradient_fill_rect(0, 0, (percentage / 100.0 * self.contents.width), self.contents.height, @color) text = @text+percentage.to_s+'%' self.contents.draw_text(8, -4, text.size * 32, 32, text, 0) end end Appeler ce script "Cene_Title" - Citation :
- #==============================================================================
# ■ Scene_Title #------------------------------------------------------------------------------ # Custom load window added. # By Illusion #==============================================================================
class Scene_Title #-------------------------------------------------------------------------- # ● Main #-------------------------------------------------------------------------- def main # Go to B_TEST if user is testing a batttle. if $BTEST battle_test return end # Create a new game_system $game_system = Game_System.new # Create the Sprites and windows. @sprite = Sprite.new @sprite.bitmap = RPG::Cache.title(load_data("Data/System.rxdata").title_name) # If data is already loaded, skip this part. if $data_system == nil Graphics.transition @window = Window_Load_Data.new @window.color = Color.new(rand(255), rand(255), rand(255), 255) @window.width = 283 @window.height = 60 load_hero_data @window.color.set(rand(255), rand(255), rand(255)) load_class_data @window.color.set(rand(255), rand(255), rand(255)) load_skill_data @window.color.set(rand(255), rand(255), rand(255)) load_item_data @window.color.set(rand(255), rand(255), rand(255)) load_weapons_data @window.color.set(rand(255), rand(255), rand(255)) load_armor_data @window.color.set(rand(255), rand(255), rand(255)) load_ennemy_data @window.color.set(rand(255), rand(255), rand(255)) load_troop_data @window.color.set(rand(255), rand(255), rand(255)) load_states_data @window.color.set(rand(255), rand(255), rand(255)) load_animations_data @window.color.set(rand(255), rand(255), rand(255)) load_tilesets_data @window.color.set(rand(255), rand(255), rand(255)) load_common_events_data @window.color.set(rand(255), rand(255), rand(255)) load_system_data Graphics.freeze @window.dispose end # Define the commands. s1 = "New Game" s2 = "Continue" s3 = "Exit" @command_window = Window_Command.new(192, [s1, s2, s3]) @command_window.back_opacity = 160 @command_window.x = 320 - @command_window.width / 2 @command_window.y = 288 @command_window.update # Makes the command window bounce, removed if not desired. @command_window.bounce # Checks if a save file exists. @continue_enabled = false for i in 0..3 if FileTest.exist?("Save#{i+1}.sav") @continue_enabled = true end end # Disable the command if no save file exists, otherwise, place cursor on the continue option. if @continue_enabled @command_window.index = 1 else @command_window.disable_item(1) end # Play title BGM. $game_system.bgm_play($data_system.title_bgm) # Stop the ME and BGS. Audio.me_stop Audio.bgs_stop # De-freeze the screen. Graphics.transition # メインループ loop do # Update the screen. Graphics.update # Update the keyboard input. Input.update # Update. update # If $scene is not a Scene_Title, break. if $scene != self break end end # Freezes the screen. Graphics.freeze # Release all the bitmaps / erase them. @command_window.dispose @sprite.bitmap.dispose @sprite.dispose end #-------------------------------------------------------------------------- # ● Load Hero data #-------------------------------------------------------------------------- def load_hero_data @window.text = 'Chargement personnages ' size = load_data("Data/Actors.rxdata").size $data_actors = [] for i in 0...size + 1 $data_actors[i] = load_data("Data/Actors.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load class data #-------------------------------------------------------------------------- def load_class_data @window.text ='Chargement classes ' size = load_data("Data/Classes.rxdata").size $data_classes = [] for i in 0...size + 1 $data_classes[i] = load_data("Data/Classes.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load skill data #-------------------------------------------------------------------------- def load_skill_data @window.text = 'Chargement compétences ' size = load_data("Data/Skills.rxdata").size $data_skills = [] for i in 0...size + 1 $data_skills[i] = load_data("Data/Skills.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load item data #-------------------------------------------------------------------------- def load_item_data @window.text = 'Chargement Objets ' size = load_data("Data/Items.rxdata").size $data_items = [] for i in 0...size + 1 $data_items[i] = load_data("Data/Items.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load weapons data #-------------------------------------------------------------------------- def load_weapons_data size = load_data("Data/Weapons.rxdata").size $data_weapons = [] @window.text = 'Chargement armes ' for i in 0...size + 1 $data_weapons[i] = load_data("Data/Weapons.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load armor data #-------------------------------------------------------------------------- def load_armor_data size = load_data("Data/Armors.rxdata").size $data_armors = [] @window.text = 'Chargement armures ' for i in 0...size + 1 $data_armors[i] = load_data("Data/Armors.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load ennemy data #-------------------------------------------------------------------------- def load_ennemy_data size = load_data("Data/Enemies.rxdata").size $data_enemies = [] @window.text = 'Chargement ennemies ' for i in 0...size + 1 $data_enemies[i] = load_data("Data/Enemies.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load troop data #-------------------------------------------------------------------------- def load_troop_data size = load_data("Data/Troops.rxdata").size $data_troops = [] @window.text = 'Chargement troops ' for i in 0...size + 1 $data_troops[i] = load_data("Data/Troops.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load states data #-------------------------------------------------------------------------- def load_states_data size = load_data("Data/States.rxdata").size $data_states = [] @window.text = 'Chargement états' for i in 0...size + 1 $data_states[i] = load_data("Data/States.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load animations data #-------------------------------------------------------------------------- def load_animations_data size = load_data("Data/Animations.rxdata").size $data_animations = [] @window.text = 'Chargement animation ' for i in 0...size + 1 $data_animations[i] = load_data("Data/Animations.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load tilesets data #-------------------------------------------------------------------------- def load_tilesets_data size = load_data("Data/Tilesets.rxdata").size $data_tilesets = [] @window.text = 'Chargement décors ' for i in 0...size + 1 $data_tilesets[i] = load_data("Data/Tilesets.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load common events data #-------------------------------------------------------------------------- def load_common_events_data size = load_data("Data/CommonEvents.rxdata").size $data_common_events = [] @window.text = 'Chargement évènement commun ' for i in 0...size $data_common_events[i] = load_data("Data/CommonEvents.rxdata")[i] @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end #-------------------------------------------------------------------------- # ● Load system data #-------------------------------------------------------------------------- def load_system_data system_attr_data = ['magic_number', 'party_members', 'elements', 'switches', 'variables', 'windowskin_name', 'title_name ', 'gameover_name' , 'battle_transition', 'title_bgm', 'battle_bgm ', 'battle_end_me ', 'gameover_me ', 'cursor_se', 'decision_se', 'cancel_se', 'buzzer_se', 'equip_se', 'shop_se ', 'save_se ', 'load_se', 'battle_start_se', 'escape_se', 'actor_collapse_se ', 'enemy_collapse_se', 'words', 'start_map_id', 'start_x', 'start_y', 'test_battlers', 'test_troop_id', 'battleback_name ', 'battler_name ', 'battler_hue', 'edit_map_id '] size = system_attr_data.size $data_system = RPG::System.new @window.text = 'Chargement systeme ' for i in 0...size + 1 eval('$data_system.'+system_attr_data[i]+' = load_data("Data/System.rxdata").'+system_attr_data[i]) rescue nil @window.set_text_and_bar((i / size.to_f * 100).to_i) Graphics.update Input.update end end end | |
| | | Jefulrich Membre
Nombre de messages : 8 Age : 33 Votre niveau sur RPG Maker : Mi-débutant Date d'inscription : 05/04/2008
Mes points RPG's Points: (50/1000)
| Sujet: Re: [script] script barre de chargement! 10/04/08, 07:13 pm | |
| | |
| | | dragon-stef Membre
Nombre de messages : 5 Age : 28 Votre niveau sur RPG Maker : maitre Date d'inscription : 04/05/2008
| Sujet: Re: [script] script barre de chargement! 04/05/08, 08:53 pm | |
| Sur VX je ne pense pas que l'on peut | |
| | | dragon-stef Membre
Nombre de messages : 5 Age : 28 Votre niveau sur RPG Maker : maitre Date d'inscription : 04/05/2008
| Sujet: Re: [script] script barre de chargement! 04/05/08, 08:54 pm | |
| Il faut adapter celui de XP | |
| | | cucureuill Membre
Nombre de messages : 19 Age : 32 Localisation : à quelque pars ^^ Votre niveau sur RPG Maker : Pro du mapping ^^ Date d'inscription : 12/03/2008
Mes points RPG's Points: (162/1000)
| Sujet: Re: [script] script barre de chargement! 05/05/08, 03:11 pm | |
| Double post interdit ...
Essaie le script avant de dire n'importe quoi -_- | |
| | | Jeuv Membre
Nombre de messages : 3 Age : 33 Votre niveau sur RPG Maker : Excellent Date d'inscription : 26/10/2008
| Sujet: Re: [script] script barre de chargement! 26/10/08, 09:16 pm | |
| J'ai créé le script de barre de chargement pour VX et ça m'a pris une semaine mais bon mon script est testé et fonctionnel. Si quelqu'un le veut qu'il écrive mon pseudo (Parasoft) et mon blog (jeuvideo.over-blog.org). Dans le script main, tout en bas de la liste, vous changez: Code: | $scene = Scene_Title.new
|
par Code: | $scene = Scene_Chargement.new
| Pour la barre de chargement c'est simple : Vous prennez cette ressource (ou pas si vous voulez la mettre vous même). Et vous la mettez dans le dossier system. Il faut aussi mettre une image appelée fond dans le dossier system (ou pas si vous ne voulez pas de fond). Mettez ce script au-dessus de Main : Code: | #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # Chargement par Parasoft #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
FOND = "fond" # image a placer dans le dossier system BARRE = "barre" # image a placer dans le dossier system DUREE = 20 # en secondes TEXTE = "Chargement en cours..." # texte a afficher X_BAR = nil #position x de la barre, nil par default Y_BAR = nil #position y de la barre, nil par default LONG = 400 #longueur de la barre HAUT = 28 #hauteur de la barre TITRE = true # afficher le nom du projet ? COULEUR_FOND = Color.new(0, 0, 0, 100) # couleur fond barre COULEUR_BARRE = Color.new(0, 0, 250, 255) # couleur barre class Scene_Chargement def main $bar , $b , $tps =0, 0, DUREE*60 @fond = Sprite.new @barre = Sprite.new @barre.visible = false @fonb = Sprite.new @fond.bitmap = Cache.system(FOND) rescue @fond.bitmap = Bitmap.new(544, 416) @fenetre = Window_Barre.new((544-360)/2, 316/3, 360, 200) @barre.bitmap = Cache.system(BARRE) rescue nil if X_BAR == nil or Y_BAR == nil @barre.x, @barre.y = (544-LONG)/2, 240 else @barre.x, @barre.y = X_BAR, Y_BAR end @xb, @yb = @barre.x, @barre.y @fonb.bitmap = Bitmap.new(544, 416) Graphics.transition loop do Graphics.update Input.update update break if $scene != self end Graphics.freeze @fond.dispose @fenetre.dispose @barre.dispose end def update @barre.visible = true if $tps > 0 and $bar <300 $tps -= 1 else $scene = Scene_Title.new # scene a executer a la fin du chargement end $b = LONG - LONG * $tps/(DUREE*60) @barre.src_rect.set(0, 0, $b , HAUT) @fonb.bitmap.fill_rect(@xb-1, @yb-1, LONG+2 , HAUT+2, COULEUR_FOND) @fond.update @fenetre.update @barre.update end end
class Window_Barre < Window_Base def initialize(x, y, width, height) @width, @height = width, height super(x, y, @width, @height) self.opacity = 0 refresh end def refresh self.contents.clear w = contents.text_size(TEXTE).width self.contents.draw_text((@width-w)/3, 40, w, WLH, TEXTE) tx = ($b.to_f/LONG)*100 s = contents.text_size(tx.to_i.to_s + " %").width self.contents.draw_text((@width-s)/3+32, 120, s, WLH, tx.to_i.to_s + " %") t = $tps / Graphics.frame_rate end def update super refresh end end
|
| |
| | | Contenu sponsorisé
| Sujet: Re: [script] script barre de chargement! | |
| |
| | | | [script] script barre de chargement! | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |
|