|
|
| Auteur | Message |
---|
SilferMatière
Messages : 173 Age : 31 Loisirs : Mangas,ordi,rmxp Date d'inscription : 08/05/2007
| Sujet: Script menus à la ff7 Mer 25 Juil 2007 - 11:31 | |
| Auteur:??? Titre:Final Fantasy VII Description:Vous aurez un menu à la ff7. Ressources:Faces de vos Héros Images: Installation: Créer un nouveau script au dessus de"Main" et appellez le"Final Fantasy VII" Collez-y le code ci-dessous: Code: - Spoiler:
#********************************************************* #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 = "Dumbledor 1" 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
Ensuite allez dans le dossier de votre projet, allez dans graphics puis dans characters et créer un nouveau dossier appeller"Faces"puis faites entrer les faces de vos héros(les faces doivent imprérativement faire 80x80) Puis c'est terminer^^ et pour infos, vous verrez dans le screept des émoticones, ni faites pas attention le script marche trés bien^^ |
| | | LinkyuEmbryon
Messages : 621 Age : 32 Loisirs : Aucun, pour l'instant Date d'inscription : 10/06/2007
Caractéristiques du membre Evolution: Atome Job: Polyvalent XP: (20/20)
| Sujet: Re: Script menus à la ff7 Mer 25 Juil 2007 - 11:38 | |
| si on voi des smiley dans le script, c'est parce que tu as mis en soiler au lieu de code, et puis ce menu a déjà été posté, mais a cahque fois incomplet. la, il est juste "atrophié". |
| | | SilferMatière
Messages : 173 Age : 31 Loisirs : Mangas,ordi,rmxp Date d'inscription : 08/05/2007
| Sujet: Re: Script menus à la ff7 Mer 25 Juil 2007 - 11:43 | |
| 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 = "Dumbledor 1" 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
Pour ce qui préfère comme sa^^ et il marche c'est sur si vous avez un problème demander moi^^ |
| | | LinkyuEmbryon
Messages : 621 Age : 32 Loisirs : Aucun, pour l'instant Date d'inscription : 10/06/2007
Caractéristiques du membre Evolution: Atome Job: Polyvalent XP: (20/20)
| Sujet: Re: Script menus à la ff7 Mer 25 Juil 2007 - 11:48 | |
| nan, en fait, il faut que tu édite le premier message et que tu mettes [code] a la place de [spoil] autour de ton script. |
| | | SilferMatière
Messages : 173 Age : 31 Loisirs : Mangas,ordi,rmxp Date d'inscription : 08/05/2007
| Sujet: Re: Script menus à la ff7 Mer 25 Juil 2007 - 11:50 | |
| Ok lol il m'en aura fallu du temps^^ - 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 = "Dumbledor 1" 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 |
| | | BipBipBipAtome
Messages : 6 Date d'inscription : 29/07/2007
| Sujet: Re: Script menus à la ff7 Dim 29 Juil 2007 - 11:24 | |
| L'auteur est très célèbre pourtant ... "AcedentProne", ça ne te dis rien ? Et puis, toujours lire le script tout en haut pour savoir l'auteur ... sinon, tant pis. |
| | | Contenu sponsorisé
| Sujet: Re: Script menus à la ff7 | |
| |
| | | |
Sujets similaires | |
|
Page 1 sur 1 | |
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |
|