ferroxMolécule
Messages : 74 Loisirs : JEUX VIDEO, DORMIR, FRITES, RPG Date d'inscription : 24/07/2010
Caractéristiques du membre Evolution: Atome Job: Making XP: (20/20)
| Sujet: Voici un script de menu assez beau, + translucide. Mer 28 Juil 2010 - 17:42 | |
| Bonjour, ce script là je l'ai encore trouvé sur RPG créative. L'auteur est inconnu Lien original:http://rpgcreative.net/rpgmaker/scripts-52-menu-5.html Il y a 5 scripts à remplacer, il est testé par moi et il est fonctionnel. Pour éviter de remplacer 5 scripts pour rien, je vous ai dégoté un screen(si l'image ne s'affiche pas, faites le moi savoir au plus vite.: Alors maintenant on va s'attaquer aux scripts. Commençons par le commencement Il faut remplacer scene_menu par ça: - Code:
-
#============================================================== # ¦ Scene_Menu #------------------------------------------------------------------------------ # ?????????????????? #=============================================================== class Window_Title < Window_Base #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def initialize super(38, 60, 156, 70) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end def refresh self.contents.clear self.contents.font.color = system_color self.contents.font.color = normal_color self.contents.draw_text(30, 5, 100, 30, "TITLE") end end #-------------------------------- class Scene_Menu #-------------------------------------------------------------------------- # ? ????????? # menu_index : ????????????? #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # ? ????? #-------------------------------------------------------------------------- def main # ????????????? @scene_menu = Window_Title.new @scene_menu.x = 6 @scene_menu.y = 0 @scene_menu.back_opacity = 160 # ???????????? @sprite = Spriteset_Map.new s1 = $data_system.words.item s2 = $data_system.words.skill s3 = $data_system.words.equip s4 = "Statut" s5 = "Sauvegarder" s6 = "Quitter" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index @command_window.x = 5 @command_window.y = 66 @command_window.back_opacity = 160 # ??????? 0 ???? if $game_party.actors.size == 0 # ????????????????????? @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end # ???????? if $game_system.save_disabled # ????????? @command_window.disable_item(4) end # ????????????? @playtime_window = Window_PlayTime.new @playtime_window.x = 320 @playtime_window.y = 0 @playtime_window.back_opacity = 160 # ?????????? @steps_window = Window_MapName.new @steps_window.x = 480 @steps_window.y = 0 @steps_window.back_opacity = 160 # ???????????? @gold_window = Window_Gold.new @gold_window.x = 162 @gold_window.y = 0 @gold_window.back_opacity = 160 # ????????????? @status_window = Window_MenuStatus.new @status_window.x = 160 @status_window.y = 65 @status_window.back_opacity = 160 # ????????? Graphics.transition # ?????? loop do # ???????? Graphics.update # ??????? Input.update # ?????? update # ???????????????? if $scene != self break end end # ????????? Graphics.freeze # ???????? @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose @status_window.dispose @scene_menu.dispose @sprite.dispose end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def update # ???????? @command_window.update @playtime_window.update @steps_window.update @gold_window.update @status_window.update # ??????????????????: update_command ??? if @command_window.active update_command return end # ???????????????????: update_status ??? if @status_window.active update_status return end end #-------------------------------------------------------------------------- # ? ?????? (??????????????????) #-------------------------------------------------------------------------- def update_command # B ?????????? if Input.trigger?(Input::B) # ????? SE ??? $game_system.se_play($data_system.cancel_se) # ?????????? $scene = Scene_Map.new return end # C ?????????? if Input.trigger?(Input::C) # ??????? 0 ?????????????????????? if $game_party.actors.size == 0 and @command_window.index < 4 # ??? SE ??? $game_system.se_play($data_system.buzzer_se) return end # ??????????????????? case @command_window.index when 0 # ???? # ?? SE ??? $game_system.se_play($data_system.decision_se) # ??????????? $scene = Scene_Item.new when 1 # ??? # ?? SE ??? $game_system.se_play($data_system.decision_se) # ??????????????????? @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 # ?? # ?? SE ??? $game_system.se_play($data_system.decision_se) # ??????????????????? @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 # ????? # ?? SE ??? $game_system.se_play($data_system.decision_se) # ??????????????????? @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 # ??? # ???????? if $game_system.save_disabled # ??? SE ??? $game_system.se_play($data_system.buzzer_se) return end # ?? SE ??? $game_system.se_play($data_system.decision_se) # ?????????? $scene = Scene_Save.new when 5 # ????? # ?? SE ??? $game_system.se_play($data_system.decision_se) # ???????????? $scene = Scene_End.new end return end end #-------------------------------------------------------------------------- # ? ?????? (???????????????????) #-------------------------------------------------------------------------- def update_status # B ?????????? if Input.trigger?(Input::B) # ????? SE ??? $game_system.se_play($data_system.cancel_se) # ?????????????????? @command_window.active = true @status_window.active = false @status_window.index = -1 return end # C ?????????? if Input.trigger?(Input::C) # ??????????????????? case @command_window.index when 1 # ??? # ???????????? 2 ????? if $game_party.actors[@status_window.index].restriction >= 2 # ??? SE ??? $game_system.se_play($data_system.buzzer_se) return end # ?? SE ??? $game_system.se_play($data_system.decision_se) # ?????????? $scene = Scene_Skill.new(@status_window.index) when 2 # ?? # ?? SE ??? $game_system.se_play($data_system.decision_se) # ????????? $scene = Scene_Equip.new(@status_window.index) when 3 # ????? # ?? SE ??? $game_system.se_play($data_system.decision_se) # ???????????? $scene = Scene_Status.new(@status_window.index) end return end end end
Ensuite remplacer Windows_MenuStatus par: - Code:
-
#==================================================================== # ¦ Window_MenuStatus #------------------------------------------------------------------------------ # ?????????????????????????????????? #=====================================================================
class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def initialize super(0, 0, 480, 415) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 64 y = i * 95 actor = $game_party.actors[i] draw_actor_graphic(actor, x - 30, y + 70) draw_actor_name(actor, x, y) draw_actor_class(actor, x + 134, y) draw_actor_level(actor, x, y + 30) draw_actor_state(actor, x + 80, y + 30) draw_actor_exp(actor, x, y + 60) draw_actor_hp(actor, x + 226, y + 30) draw_actor_sp(actor, x + 226, y + 60) end end #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 95, self.width - 32, 95) end end end
Ensuite remplacer Windws_steps (les trois autres scripts sont tous juste au dessus de windows_menustatus) par: - Code:
-
#==================================================================== # ¦ Window_MenuStatus #------------------------------------------------------------------------------ # ?????????????????????????????????? #=====================================================================
class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def initialize super(0, 0, 480, 415) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 64 y = i * 95 actor = $game_party.actors[i] draw_actor_graphic(actor, x - 30, y + 70) draw_actor_name(actor, x, y) draw_actor_class(actor, x + 134, y) draw_actor_level(actor, x, y + 30) draw_actor_state(actor, x + 80, y + 30) draw_actor_exp(actor, x, y + 60) draw_actor_hp(actor, x + 226, y + 30) draw_actor_sp(actor, x + 226, y + 60) end end #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 95, self.width - 32, 95) end end end
Remplacer Windows_Playtime par: - Code:
-
#============================================================================== # ¦ Window_PlayTime #------------------------------------------------------------------------------ # ????????????????????????? #==============================================================================
class Window_PlayTime < Window_Base #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 70) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, -8, 120, 32, "Temps") @total_sec = Graphics.frame_count / Graphics.frame_rate hour = @total_sec / 60 / 60 min = @total_sec / 60 % 60 sec = @total_sec % 60 text = sprintf("%02d:%02d:%02d", hour, min, sec) self.contents.font.color = normal_color self.contents.draw_text(0, 12, 120, 32, text, 2) end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end
ET LE DERNIER! remplacez Window_gold par: - Code:
-
#============================================================================== # ¦ Window_Gold #------------------------------------------------------------------------------ # ????????????????? #==============================================================================
class Window_Gold < Window_Base #-------------------------------------------------------------------------- # ? ????????? #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 70) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = $fontface self.contents.font.size = $fontsize refresh end #-------------------------------------------------------------------------- # ? ?????? #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, -8, 120, 32, "Argent") cx = contents.text_size($data_system.words.gold).width self.contents.font.color = normal_color self.contents.draw_text(0, 12, 120-cx-2, 32, $game_party.gold.to_s, 2) end end Et voilà c'est terminé, j'espère que ce script aidera beaucoup de monde. BYE,ferrox
Dernière édition par ferrox le Mer 4 Aoû 2010 - 6:29, édité 1 fois |
|
ferroxMolécule
Messages : 74 Loisirs : JEUX VIDEO, DORMIR, FRITES, RPG Date d'inscription : 24/07/2010
Caractéristiques du membre Evolution: Atome Job: Making XP: (20/20)
| Sujet: Re: Voici un script de menu assez beau, + translucide. Jeu 29 Juil 2010 - 10:25 | |
| Juste, je viens de me rendre compte que on pouvait modifier "title", voir le screnn, à la ligne 21 de Scene_Menu, le premier script que j'ai posté - Code:
-
self.contents.draw_text(30, 5, 100, 30, "TITLE") Remplacez TITLE par le nom que vous voulez. |
|