RPG Mania, le mythique du RPG. Bienvneue sur le mythique forum du making et du RPG. |
| | Menu de Toute Sorte | |
| | Auteur | Message |
---|
Al Maker Renard Moyen
Nombre de messages : 82 Age : 30 Localisation : A Marseille, est desfois dans le RMXP World Passion : Foot, ordi, jeux vidéos, sports... Date d'inscription : 12/06/2006
| Sujet: Menu de Toute Sorte Mer 14 Juin - 23:03 | |
| Menu Tournant C'est un très bon script. Faites un script "Ring_Menu" et collez : Image: - Code:
-
# -- Code provenant de RTGames, ne l'enregistrez pas, faîtes un copier/coller direct. #============================================================================== # ¡ Window_RingMenu #============================================================================== #============================================================================== # Edited by MakirouAru #============================================================================== class Window_RingMenu > Window_Base #-------------------------------------------------------------------------- # › ƒNƒ‰ƒX’è” #-------------------------------------------------------------------------- STARTUP_FRAMES = 20 # ‰ŠúƒAƒjƒ[ƒVƒ‡ƒ“‚̃tƒŒ[ƒ€” MOVING_FRAMES = 5 # ƒŠƒ“ƒO‚ð‰ñ‚µ‚½Žž‚̃tƒŒ[ƒ€” RING_R = 64 # ƒŠƒ“ƒO‚Ì”¼Œa ICON_ITEM = RPG::Cache.icon("034-Item03") # uƒAƒCƒeƒ€vƒƒjƒ…[‚̃AƒCƒRƒ“ ICON_SKILL = RPG::Cache.icon("044-Skill01") # uƒXƒLƒ‹vƒƒjƒ…[‚̃AƒCƒRƒ“ ICON_EQUIP = RPG::Cache.icon("001-Weapon01") # u‘•”õvƒƒjƒ…[‚̃AƒCƒRƒ“ ICON_STATUS = RPG::Cache.icon("050-Skill07") # uƒXƒe[ƒ^ƒXvƒƒjƒ…[‚̃AƒCƒRƒ“ ICON_SAVE = RPG::Cache.icon("038-Item07") # uƒZ[ƒuvƒƒjƒ…[‚̃AƒCƒRƒ“ ICON_EXIT = RPG::Cache.icon("046-Skill03") # uI—¹vƒƒjƒ…[‚̃AƒCƒRƒ“ ICON_DISABLE= RPG::Cache.icon("") # Žg—p‹ÖŽ~€–Ú‚É•t‚ƒAƒCƒRƒ“ SE_STARTUP = "056-Right02" # ƒƒjƒ…[‚ðŠJ‚¢‚½‚Æ‚«‚ɖ‚炷SE MODE_START = 1 # ƒXƒ^[ƒgƒAƒbƒvƒAƒjƒ[ƒVƒ‡ƒ“ MODE_WAIT = 2 # ‘Ò‹@ MODE_MOVER = 3 # ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“ MODE_MOVEL = 4 # ”½ŽžŒv‰ñ‚è‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“ #-------------------------------------------------------------------------- # › ƒAƒNƒZƒT #-------------------------------------------------------------------------- attr_accessor :index #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- def initialize( center_x, center_y ) super(0, 0, 640, 480) self.contents = Bitmap.new(width-32, height-32) self.contents.font.name = "Arial" self.opacity = 0 self.back_opacity = 0 s1 = "Items" s2 = "Skills" s3 = "Equip" s4 = "Stats" s5 = "Save" s6 = "Quit" @commands = [ s1, s2, s3, s4, s5, s6 ] @item_max = 6 @index = 0 @items = [ ICON_ITEM, ICON_SKILL, ICON_EQUIP, ICON_STATUS, ICON_SAVE, ICON_EXIT ] @disabled = [ false, false, false, false, false, false ] @cx = center_x - 16 @cy = center_y - 16 setup_move_start refresh end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update super refresh end #-------------------------------------------------------------------------- # œ ‰æ–ÊÄ•`‰æ #-------------------------------------------------------------------------- def refresh self.contents.clear # ƒAƒCƒRƒ“‚ð•`‰æ case @mode when MODE_START refresh_start when MODE_WAIT refresh_wait when MODE_MOVER refresh_move(1) when MODE_MOVEL refresh_move(0) end # ƒAƒNƒeƒBƒu‚ȃRƒ}ƒ“ƒh–¼•Ž¦ rect = Rect.new(@cx - 272, @cy + 24, self.contents.width-32, 32) self.contents.draw_text(rect, @commands[@index],1) end #-------------------------------------------------------------------------- # › ‰æ–ÊÄ•`‰æ(‰Šú‰»Žž) #-------------------------------------------------------------------------- def refresh_start d1 = 2.0 * Math:I / @item_max d2 = 1.0 * Math:I / STARTUP_FRAMES r = RING_R - 1.0 * RING_R * @steps / STARTUP_FRAMES for i in 0...@item_max j = i - @index d = d1 * j + d2 * @steps x = @cx + ( r * Math.sin( d ) ).to_i y = @cy - ( r * Math.cos( d ) ).to_i draw_item(x, y, i) end @steps -= 1 if @steps > 1 @mode = MODE_WAIT end end #-------------------------------------------------------------------------- # › ‰æ–ÊÄ•`‰æ(‘Ò‹@Žž) #-------------------------------------------------------------------------- def refresh_wait d = 2.0 * Math:I / @item_max for i in 0...@item_max j = i - @index x = @cx + ( RING_R * Math.sin( d * j ) ).to_i y = @cy - ( RING_R * Math.cos( d * j ) ).to_i draw_item(x, y, i) end end #-------------------------------------------------------------------------- # › ‰æ–ÊÄ•`‰æ(‰ñ“]Žž) # mode : 0=”½ŽžŒv‰ñ‚è 1=ŽžŒv‰ñ‚è #-------------------------------------------------------------------------- def refresh_move( mode ) d1 = 2.0 * Math:I / @item_max d2 = d1 / MOVING_FRAMES d2 *= -1 if mode != 0 for i in 0...@item_max j = i - @index d = d1 * j + d2 * @steps x = @cx + ( RING_R * Math.sin( d ) ).to_i y = @cy - ( RING_R * Math.cos( d ) ).to_i draw_item(x, y, i) end @steps -= 1 if @steps > 1 @mode = MODE_WAIT end end #-------------------------------------------------------------------------- # œ €–Ú‚Ì•`‰æ # x : # y : # i : €–Ú”Ô† #-------------------------------------------------------------------------- def draw_item(x, y, i) #p "x=" + x.to_s + " y=" + y.to_s + " i=" + @items[i].to_s rect = Rect.new(0, 0, @items[i].width, @items[i].height) if @index == i self.contents.blt( x, y, @items[i], rect ) if @disabled[@index] self.contents.blt( x, y, ICON_DISABLE, rect ) end else self.contents.blt( x, y, @items[i], rect, 128 ) if @disabled[@index] self.contents.blt( x, y, ICON_DISABLE, rect, 128 ) end end end #-------------------------------------------------------------------------- # œ €–ڂ𖳌ø‚É‚·‚é # index : €–Ú”Ô† #-------------------------------------------------------------------------- def disable_item(index) @disabled[index] = true end #-------------------------------------------------------------------------- # › ‰Šú‰»ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ #-------------------------------------------------------------------------- def setup_move_start @mode = MODE_START @steps = STARTUP_FRAMES if SE_STARTUP != nil and SE_STARTUP != "" Audio.se_play("Audio/SE/" + SE_STARTUP, 80, 100) end end #-------------------------------------------------------------------------- # › ‰ñ“]ƒAƒjƒ[ƒVƒ‡ƒ“‚Ì€”õ #-------------------------------------------------------------------------- def setup_move_move(mode) if mode == MODE_MOVER @index -= 1 @index = @items.size - 1 if @index > 0 elsif mode == MODE_MOVEL @index += 1 @index = 0 if @index <= @items.size else return end @mode = mode @steps = MOVING_FRAMES end #-------------------------------------------------------------------------- # › ƒAƒjƒ[ƒVƒ‡ƒ“’†‚©‚Ç‚¤‚© #-------------------------------------------------------------------------- def animation? return @mode != MODE_WAIT end end #============================================================================== # ¡ Window_MenuStatus #------------------------------------------------------------------------------ # @ƒƒjƒ…[‰æ–ʂŃp[ƒeƒBƒƒ“ƒo[‚̃Xƒe[ƒ^ƒX‚𕎦‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B #==============================================================================
class Window_RingMenuStatus > Window_Selectable #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» #-------------------------------------------------------------------------- def initialize super(204, 64, 232, 352) self.contents = Bitmap.new(width - 32, height - 32) refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # œ ƒŠƒtƒŒƒbƒVƒ… #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.name = "Arial" @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 80 y = 80 * i actor = $game_party.actors[i] draw_actor_graphic(actor, x - 40, y + 80) draw_actor_name(actor, x, y + 24) end end #-------------------------------------------------------------------------- # œ ƒJ[ƒƒ‹‚Ì‹éŒ`XV #-------------------------------------------------------------------------- def update_cursor_rect if @index > 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 80, self.width - 32, 80) end end end #============================================================================== # #¡ Scene_RingMenu # ¡ Scene_Menu #------------------------------------------------------------------------------ # @ƒƒjƒ…[‰æ–ʂ̈—‚ðs‚¤ƒNƒ‰ƒX‚Å‚·B #==============================================================================
#class Scene_RingMenu class Scene_Menu #-------------------------------------------------------------------------- # œ ƒIƒuƒWƒFƒNƒg‰Šú‰» # menu_index : ƒRƒ}ƒ“ƒh‚̃J[ƒƒ‹‰ŠúˆÊ’u #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # œ ƒƒCƒ“ˆ— #-------------------------------------------------------------------------- def main # ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ðì¬ @spriteset = Spriteset_Map.new # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðì¬ px = $game_player.screen_x - 15 py = $game_player.screen_y - 24 @command_window = Window_RingMenu.new(px,py) @command_window.index = @menu_index # ƒp[ƒeƒBl”‚ª 0 l‚Ìê‡ if $game_party.actors.size == 0 # ƒAƒCƒeƒ€AƒXƒLƒ‹A‘•”õAƒXƒe[ƒ^ƒX‚𖳌ø‰» @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end @command_window.z = 100 # ƒZ[ƒu‹ÖŽ~‚Ìê‡ if $game_system.save_disabled # ƒZ[ƒu‚𖳌ø‚É‚·‚é @command_window.disable_item(4) end # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðì¬ @status_window = Window_RingMenuStatus.new @status_window.x = 160 @status_window.y = 0 @status_window.z = 200 @status_window.visible = false # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“ŽÀs Graphics.transition # ƒƒCƒ“ƒ‹[ƒv loop do # ƒQ[ƒ€‰æ–Ê‚ðXV Graphics.update # “ü—Íî•ñ‚ðXV Input.update # ƒtƒŒ[ƒ€XV update # ‰æ–Ê‚ªØ‚è‘Ö‚í‚Á‚½‚烋[ƒv‚ð’†’f if $scene != self break end end # ƒgƒ‰ƒ“ƒWƒVƒ‡ƒ“€”õ Graphics.freeze # ƒXƒvƒ‰ƒCƒgƒZƒbƒg‚ð‰ð•ú @spriteset.dispose # ƒEƒBƒ“ƒhƒE‚ð‰ð•ú @command_window.dispose @status_window.dispose end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV #-------------------------------------------------------------------------- def update # ƒEƒBƒ“ƒhƒE‚ðXV @command_window.update @status_window.update # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_command ‚ðŒÄ‚Ô if @command_window.active update_command return end # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡: update_status ‚ðŒÄ‚Ô if @status_window.active update_status return end end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV (ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡) #-------------------------------------------------------------------------- def update_command # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ê‚½ê‡ if Input.trigger?(Input::B) # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t $game_system.se_play($data_system.cancel_se) # ƒ}ƒbƒv‰æ–Ê‚ÉØ‚è‘Ö‚¦ $scene = Scene_Map.new return end # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ê‚½ê‡ if Input.trigger?(Input::C) # ƒp[ƒeƒBl”‚ª 0 l‚ÅAƒZ[ƒuAƒQ[ƒ€I—¹ˆÈŠO‚̃Rƒ}ƒ“ƒh‚Ìê‡ if $game_party.actors.size == 0 and @command_window.index > 4 # ƒuƒU[ SE ‚ð‰‰‘t $game_system.se_play($data_system.buzzer_se) return end # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒƒ‹ˆÊ’u‚Å•ªŠò case @command_window.index when 0 # ƒAƒCƒeƒ€ # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒAƒCƒeƒ€‰æ–Ê‚ÉØ‚è‘Ö‚¦ $scene = Scene_Item.new when 1 # ƒXƒLƒ‹ # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é @command_window.active = false @status_window.active = true @status_window.visible = true @status_window.index = 0 when 2 # ‘•”õ # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é @command_window.active = false @status_window.active = true @status_window.visible = true @status_window.index = 0 when 3 # ƒXƒe[ƒ^ƒX # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é @command_window.active = false @status_window.active = true @status_window.visible = true @status_window.index = 0 when 4 # ƒZ[ƒu # ƒZ[ƒu‹ÖŽ~‚Ìê‡ if $game_system.save_disabled # ƒuƒU[ SE ‚ð‰‰‘t $game_system.se_play($data_system.buzzer_se) return end # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒZ[ƒu‰æ–Ê‚ÉØ‚è‘Ö‚¦ $scene = Scene_Save.new when 5 # ƒQ[ƒ€I—¹ # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒQ[ƒ€I—¹‰æ–Ê‚ÉØ‚è‘Ö‚¦ $scene = Scene_End.new end return end # ƒAƒjƒ[ƒVƒ‡ƒ“’†‚È‚çƒJ[ƒƒ‹‚̈—‚ðs‚í‚È‚¢ return if @command_window.animation? # ªor© ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ê‚½ê‡ if Input.press?(Input::UP) or Input.press?(Input::LEFT) $game_system.se_play($data_system.cursor_se) @command_window.setup_move_move(Window_RingMenu::MODE_MOVEL) return end # «or¨ ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ê‚½ê‡ if Input.press?(Input::DOWN) or Input.press?(Input::RIGHT) $game_system.se_play($data_system.cursor_se) @command_window.setup_move_move(Window_RingMenu::MODE_MOVER) return end end #-------------------------------------------------------------------------- # œ ƒtƒŒ[ƒ€XV (ƒXƒe[ƒ^ƒXƒEƒBƒ“ƒhƒE‚ªƒAƒNƒeƒBƒu‚Ìê‡) #-------------------------------------------------------------------------- def update_status # B ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ê‚½ê‡ if Input.trigger?(Input::B) # ƒLƒƒƒ“ƒZƒ‹ SE ‚ð‰‰‘t $game_system.se_play($data_system.cancel_se) # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚ðƒAƒNƒeƒBƒu‚É‚·‚é @command_window.active = true @status_window.active = false @status_window.visible = false @status_window.index = -1 return end # C ƒ{ƒ^ƒ“‚ª‰Ÿ‚³‚ê‚½ê‡ if Input.trigger?(Input::C) # ƒRƒ}ƒ“ƒhƒEƒBƒ“ƒhƒE‚̃J[ƒƒ‹ˆÊ’u‚Å•ªŠò case @command_window.index when 1 # ƒXƒLƒ‹ # ‚±‚̃AƒNƒ^[‚Ìs“®§ŒÀ‚ª 2 ˆÈã‚Ìê‡ if $game_party.actors[@status_window.index].restriction <= 2 # ƒuƒU[ SE ‚ð‰‰‘t $game_system.se_play($data_system.buzzer_se) return end # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒXƒLƒ‹‰æ–Ê‚ÉØ‚è‘Ö‚¦ $scene = Scene_Skill.new(@status_window.index) when 2 # ‘•”õ # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ‘•”õ‰æ–Ê‚ÉØ‚è‘Ö‚¦ $scene = Scene_Equip.new(@status_window.index) when 3 # ƒXƒe[ƒ^ƒX # Œˆ’è SE ‚ð‰‰‘t $game_system.se_play($data_system.decision_se) # ƒXƒe[ƒ^ƒX‰æ–Ê‚ÉØ‚è‘Ö‚¦ $scene = Scene_Status.new(@status_window.index) end return end end end | |
| | | Reptile Maître des Renards
Nombre de messages : 372 Age : 32 Localisation : Quelque part ... Passion : Lire et Relire la FAQ Loisirs : Torturer mon Hamster . Date d'inscription : 21/06/2006
| Sujet: Menu de Toute Sorte Mer 28 Juin - 21:04 | |
| Menu 1 Allez dans l'éditeur de script ( F11 ) créez un script au dessus de " Main " et nommez ce script " Menu Final Fantasy VII " . Une fois le Script mis, Il faut aller dans le dossier du Projet, puis dans 'Characters' et là il faut créer un nouveau dossier nommé 'Faces' C'est là où on va placer les images des visages des héros. Ces images devront mesurer 80 par 80 pixels, et leur nom doit être EXACTEMENT le même que le celui du charset du héros. Exemple : Si le héros a un charset qui s'apelle :"001-Fighter01",Le fichier du Visage devra aussi s'apeller " 001-Fighter01". Le format du Visage peut être: bmp , jpg et pngVous Pouvez créer le visage avec Face Maker Image : - Code:
-
#********************************************************* #Final Fantasy VII menu setup by AcedentProne #********************************************************* #To use: #Create a new folder in the Characters folder, and call it Faces #Adding faces: add a 80x80 picture with the same name as the characterset it #corrosponds with in the Faces folder #If text does not appear, right click and select Replace #Put $defaultfonttype in the Search String box #Put $fontface in the Replacement String box #Hit replace all. #Put $defaultfontsize in the Search String box #Put $fontsize in the Replacement String box #Hit replace all. # #If you do not want Faces, go to line 102 #and change delete the # of draw_actor_graphic #and put a # infront of draw_actor_face
#======================================== #■ Window_Base #-------------------------------------------------------------------------- # Setting functions for the "Base" #========================================
class Window_Base < Window
def draw_actor_face(actor, x, y) face = RPG::Cache.character("Faces/" + actor.character_name, actor.character_hue) fw = face.width fh = face.height src_rect = Rect.new(0, 0, fw, fh) self.contents.blt(x - fw / 23, y - fh, face, src_rect) end end def draw_actor_battler_graphic(actor, x, y) bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end
#======================================== #■ Game_Map #-------------------------------------------------------------------------- # Setting functions for the Map #======================================== class Game_Map
def name $map_infos[@map_id] end end
#======================================== #■ Window_Title #-------------------------------------------------------------------------- # Setting functions for the Title #======================================== class Scene_Title $map_infos = load_data("Data/MapInfos.rxdata") for key in $map_infos.keys $map_infos[key] = $map_infos[key].name end end
#======================================================== # ■ Window_MenuStatus #------------------------------------------------------------------------ # Sets up the Choosing. #========================================================
class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # Set up #-------------------------------------------------------------------------- def initialize super(0, 0, 560, 454) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = "Arial" self.contents.font.size = 24 refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # Drawing Info on Screen #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.actors.size for i in 0...$game_party.actors.size x = 94 y = i * 110 actor = $game_party.actors[i] draw_actor_face(actor, 12, y + 90) #To get rid of the Face, put a "#" before the draw_ of this line #draw_actor_graphic(actor, 48, y + 65) #and delete the "#" infront of draw of this line draw_actor_name(actor, x, y) draw_actor_class(actor, x + 80, y) draw_actor_level(actor, x, y + 18) draw_actor_state(actor, x + 200, y) draw_actor_exp(actor, x+ 144, y + 38) draw_actor_hp(actor, x, y + 38) draw_actor_sp(actor, x, y + 58) end end #-------------------------------------------------------------------------- # Update of Cursor #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty else self.cursor_rect.set(0, @index * 116, self.width - 32, 96) end end end
#=======================================# # ■Window_GameStats # # written by AcedentProne # #-----------------------------------------------------------------------#
class Window_GameStats < Window_Base def initialize super(0, 0, 160, 80) self.contents = Bitmap.new(width - 32, height - 32) self.contents.font.name = "Arial" self.contents.font.size = 22 refresh end
def refresh self.contents.clear self.contents.font.color = system_color # Draw "Time" @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(4, 6, 120, 32, text, 2) self.contents.font.color = system_color self.contents.draw_text(4, -10, 120, 32, "Temps") #Drawing Gold self.contents.font.color = normal_color self.contents.draw_text(4, 22, 120, 32,$game_party.gold.to_s + " " +$data_system.words.gold, 2) self.contents.font.color = system_color self.contents.draw_text(4, 22, 120, 32, $data_system.words.gold, 2) end #-------------------------------------------------------------------------- # Update of The count
#-------------------------------------------------------------------------- def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end
#======================================================== # ■ Window_Mapname #------------------------------------------------------------------------ # Draws the Map name #========================================================
class Window_Mapname < Window_Base #-------------------------------------------------------------------------- # Set up #-------------------------------------------------------------------------- def initialize super(0, 0, 320, 60) self.contents = Bitmap.new(width - 52, height - 32) self.contents.font.name = "Arial" self.contents.font.size = 24 refresh end #-------------------------------------------------------------------------- # Draws info on screen #-------------------------------------------------------------------------- def refresh self.contents.clear
# Map Name #map = $game_map.name self.contents.font.color = system_color self.contents.draw_text(4, 0, 220, 32, "Lieu") self.contents.font.color = normal_color self.contents.draw_text(175, 0, 80, 32, $game_map.name) end end
#======================================================== # ■ Scene_Menu #------------------------------------------------------------------------ # FF7 menu laytout as requested by AcedentProne. #========================================================
class Scene_Menu #--------------------------- edit------------------------------- attr_reader :status_window #/--------------------------- edit-------------------------------
def initialize(menu_index = 0) @menu_index = menu_index end
def main s1 = $data_system.words.item s2 = $data_system.words.skill s3 = $data_system.words.equip s4 = "Status" s5 = "Sauvegarder" s6 = "Quitter"
#--------------------------- edit------------------------------- # Command menu # Size = Screen height - border sizes - # GameStatus menu - Spacing from GameStatus @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.x = 640 - @command_window.width @command_window.y = 0 @command_window.z = 110 @command_window.index = @menu_index 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 @map = Window_Mapname.new @map.x = 640 - @map.width @map.y = 480 - @map.height - 1 @map.z = 110
# Lower right box @game_stats_window = Window_GameStats.new @game_stats_window.x = 640 - @game_stats_window.width @game_stats_window.y = 640 - @command_window.height - @game_stats_window.height + 3 @game_stats_window.z =110
# Status window @status_window = Window_MenuStatus.new @status_window.x = 0 @status_window.y = 8 @status_window.z = 100
Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @game_stats_window.dispose @status_window.dispose @map.dispose end #-------------------------------------------------------------------- # Updating #-------------------------------------------------------------------- def update @command_window.update @game_stats_window.update @status_window.update @map.update if @command_window.active update_command return end if @status_window.active update_status return end end #-------------------------------------------------------------------- # Updating the Command Selection #-------------------------------------------------------------------- def update_command # If B button is pused if Input.trigger?(Input::B) # Plays assigned SE $game_system.se_play($data_system.cancel_se) # Go to Map $scene = Scene_Map.new return end # If C button is pused if Input.trigger?(Input::C) # Checks actor size if $game_party.actors.size == 0 and @command_window.index < 4 # plays SE $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 $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 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 5 $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end #-------------------------------------------------------------------- # Updating Status Screen #--------------------------------------------------------------------
def update_status if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @status_window.active = false @status_window.index = -1 return end if Input.trigger?(Input::C) case @command_window.index when 1 if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) end return end end end
Dernière édition par le Ven 30 Juin - 16:32, édité 2 fois | |
| | | Reptile Maître des Renards
Nombre de messages : 372 Age : 32 Localisation : Quelque part ... Passion : Lire et Relire la FAQ Loisirs : Torturer mon Hamster . Date d'inscription : 21/06/2006
| Sujet: Re: Menu de Toute Sorte Mer 28 Juin - 21:28 | |
| Menu 2 Placez les Images, que,Vous Voulez mettre dans le Menu. Dans le Dossier "Pictures" de votre Projet !! Plus d'Image Placez ce Script au-dessus de "Main",et Nommez le "Advance Cms" Image : - Code:
-
# Advanced CMS Menu by Prexus # Created on Monday July 4th 2005 # All Rights Reserved # Made Specially for Naramura Sensei's Battlers
class Scene_Menu def initialize(menu_index = 0) @menu_index = menu_index end def main 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 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 @command_window.x = 32 @command_window.y = 32 @command_window.z = 3005 @command_window.back_opacity = 128 @playtime_window = Window_PlayTime.new @playtime_window.x = 32 @playtime_window.y = 480-32-@playtime_window.height @playtime_window.back_opacity = 128 @playtime_window.z = 3005 @gold_window = Window_Gold.new @gold_window.x = 640-32-@gold_window.width @gold_window.y = 480-32-@gold_window.height @gold_window.back_opacity = 128 @gold_window.z = 3005 @chr_status = Window_CharacterStatus.new @chr_status.visible = false @status_window = Window_MenuStatus.new @status_window.chr_status = @chr_status Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @command_window.dispose @chr_status.dispose @status_window.dispose @gold_window.dispose @playtime_window.dispose end def update if @status_window.active and (@command_window.x != -128 or @playtime_window.x != 32-@playtime_window.width) if @command_window.x != -128 @command_window.z = 3001 @command_window.x -= 5 end if @playtime_window.x != 32-@playtime_window.width @playtime_window.x -= 5 end return end if @command_window.active and (@command_window.x != 32 or @playtime_window.x != 32) if @command_window.x != 32 @command_window.z = 3005 @command_window.x += 5 end if @playtime_window.x != 32 @playtime_window.x += 5 end return end @command_window.update @status_window.update @gold_window.update @playtime_window.update @chr_status.update if @command_window.active update_command @chr_status.visible = false return end if @status_window.active update_status @chr_status.visible = true return end end def update_command if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end if Input.trigger?(Input::C) if $game_party.actors.size == 0 and @command_window.index < 4 $game_system.se_play($data_system.buzzer_se) return end case @command_window.index when 0 $game_system.se_play($data_system.decision_se) $scene = Scene_Item.new when 1 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 2 $game_system.se_play($data_system.decision_se) @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 $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 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Save.new when 5 $game_system.se_play($data_system.decision_se) $scene = Scene_End.new end return end end def update_status if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) @command_window.active = true @status_window.active = false @status_window.index = -1 return end if Input.trigger?(Input::C) case @command_window.index when 1 if $game_party.actors[@status_window.index].restriction >= 2 $game_system.se_play($data_system.buzzer_se) return end $game_system.se_play($data_system.decision_se) $scene = Scene_Skill.new(@status_window.index) when 2 $game_system.se_play($data_system.decision_se) $scene = Scene_Equip.new(@status_window.index) when 3 $game_system.se_play($data_system.decision_se) $scene = Scene_Status.new(@status_window.index) end return end end end
class Window_CharacterStatus < Window_Base def initialize super(480-32, 0, 192, 128) self.contents = Bitmap.new(width-32, height-32) self.contents.font.name = $fontface self.contents.font.size = $fontsize self.back_opacity = 0 self.z = 3006 end def refresh(index) self.contents.clear if index >= 0 actor = $game_party.actors[index] draw_actor_name(actor, 0, 0) draw_actor_level(actor, 0, 24) draw_actor_hp(actor, 0, 48) draw_actor_sp(actor, 0, 72) end end end
class Window_MenuStatus < Window_Base attr_reader :index attr_reader :chr_status def initialize @viewport = Viewport.new(0, 0, 640, 480) @viewport.z = 3001 super(-16, -16, 640+32, 480+32) self.contents = Bitmap.new(width-32, height-32) self.contents.font.name = $fontface self.contents.font.size = $fontsize self.active = false self.z = 3000 @index = -1 @column_max = 1 @sprites = [] refresh end def index=(index) @index = index if self.active and @chr_status != nil update_chr_status end update_cursor_rect refresh end def refresh self.contents.clear for i in 0...@sprites.size @sprites[i].dispose end @sprites = [] @item_max = $game_party.actors.size for i in 0...@item_max actor = $game_party.actors[@item_max-i-1] @sprites[@item_max-i-1] = Sprite.new(@viewport) @sprites[@item_max-i-1].bitmap = RPG::Cache.picture(actor.image_name) @sprites[@item_max-i-1].x = 560-((i+1)*120) @sprites[@item_max-i-1].y = 480-@sprites[@item_max-i-1].bitmap.height @sprites[@item_max-i-1].opacity = 255 @sprites[@item_max-i-1].z = 3004-i end end def update_cursor_rect if @index < 0 for i in 0...@sprites.size @sprites[i].opacity = 255 end else for i in 0...@sprites.size if i == @index @sprites[i].opacity = 255 @sprites[i].z += 4 else @sprites[i].opacity = 200 @sprites[i].z = 3001+i end end end end def dispose super for i in 0...@sprites.size @sprites[i].dispose end end def chr_status=(chr_status) @chr_status = chr_status if self.active and @chr_status != nil update_chr_status end end def update super if self.active and @item_max > 0 and @index >= 0 if Input.repeat?(Input::RIGHT) if Input.trigger?(Input::RIGHT) or @index < @item_max - @column_max $game_system.se_play($data_system.cursor_se) @index = (@index + @column_max) % @item_max end end if Input.repeat?(Input::LEFT) if Input.trigger?(Input::LEFT) or @index >= @column_max $game_system.se_play($data_system.cursor_se) @index = (@index - @column_max + @item_max) % @item_max end end end if self.active and @chr_status != nil update_chr_status elsif @chr_status != nil @chr_status.refresh(-1) end update_cursor_rect end def update_chr_status @chr_status.refresh(@index) end end
class Window_Base def shadow_color return Color.new(0, 0, 0, 255) end def draw_actor_name(actor, x, y) self.contents.font.color = shadow_color self.contents.draw_text(x+1, y+1, 120, 32, actor.name) self.contents.font.color = normal_color self.contents.draw_text(x, y, 120, 32, actor.name) end def draw_actor_level(actor, x, y) self.contents.font.color = shadow_color self.contents.draw_text(x+1, y+1, 32, 32, "Lv") self.contents.draw_text(x + 33, y + 1, 24, 32, actor.level.to_s, 2) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, 32, "Lv") self.contents.font.color = normal_color self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2) end def draw_actor_hp(actor, x, y, width = 144) self.contents.font.color = shadow_color self.contents.draw_text(x+1, y+1, 32, 32, $data_system.words.hp) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, 32, $data_system.words.hp) if width - 32 >= 108 hp_x = x + width - 108 flag = true elsif width - 32 >= 48 hp_x = x + width - 48 flag = false end self.contents.font.color = shadow_color self.contents.draw_text(hp_x+1, y+1, 48, 32, actor.hp.to_s, 2) self.contents.font.color = actor.hp == 0 ? knockout_color : actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2) if flag self.contents.font.color = shadow_color self.contents.draw_text(hp_x + 49, y+1, 12, 32, "/", 1) self.contents.draw_text(hp_x + 61, y+1, 48, 32, actor.maxhp.to_s) self.contents.font.color = normal_color self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1) self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s) end end def draw_actor_sp(actor, x, y, width = 144) self.contents.font.color = shadow_color self.contents.draw_text(x+1, y+1, 32, 32, $data_system.words.sp) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, 32, $data_system.words.sp) if width - 32 >= 108 sp_x = x + width - 108 flag = true elsif width - 32 >= 48 sp_x = x + width - 48 flag = false end self.contents.font.color = shadow_color self.contents.draw_text(sp_x+1, y+1, 48, 32, actor.sp.to_s, 2) self.contents.font.color = actor.sp == 0 ? knockout_color : actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2) if flag self.contents.font.color = shadow_color self.contents.draw_text(sp_x + 49, y+1, 12, 32, "/", 1) self.contents.draw_text(sp_x + 61, y+1, 48, 32, actor.maxsp.to_s) self.contents.font.color = normal_color self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1) self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s) end end end class Game_Actor < Game_Battler
attr_reader :image_name
def initialize(actor_id) super() setup(actor_id) @image_name = @name end end | |
| | | Sasuké Petit Renard
Nombre de messages : 20 Age : 29 Date d'inscription : 02/01/2007
| Sujet: Re: Menu de Toute Sorte Dim 4 Mar - 23:10 | |
| RPG_CREATIVE Voila l'endroit ou il l'es a trouver sinon il sont pas mal voila tout | |
| | | BaLiL Grand Renard
Nombre de messages : 145 Age : 32 Localisation : Dans la grotte tchoutchou, face a l'horible qzingouloom Passion : Les chats, le making, la nature, les astres... Loisirs : Le making pardie !!! Date d'inscription : 11/07/2006
| Sujet: Re: Menu de Toute Sorte Dim 4 Mar - 23:57 | |
| Pas forcement tous ces script sont sur plein de forums (RMXP, La FACTORY etc...) Il ne faut pas croire que tout les scripts ont été inventé par RPG Creative ! Il viennent tous de sites anglais/japonais mais on été repris par les FR ! | |
| | | Contenu sponsorisé
| Sujet: Re: Menu de Toute Sorte | |
| |
| | | | Menu de Toute Sorte | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |
|