|
| [resolu]aide sur le script menu moghunter | |
| |
Auteur | Message |
---|
Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 10:08 | |
| Bonjour Tout d'abord voici le script de menu moghunter - Code:
-
################################################## # Mog Menu Yui V 1.0 # ################################################## # By Moghunter # http://www.atelier-rgss.com ################################################## # Menu com layout em pictures. # É necessário criar uma pasta com o nome de # Menus e colocar todas as imagens dentro dela, de resto # é só criar o seu próprio estilo de menu através de um #editor de imagem. #------------------------------------------------- ############### # module Cache # ############### module Cache def self.menu(filename) load_bitmap("Graphics/Menus/", filename) end end ############### # Window_Base # ############### class Window_Base < Window def draw_actor_level_menu(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, WLH, Vocab::level_a) self.contents.font.color = normal_color self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2) end def draw_currency_value_menu(value, x, y, width) cx = contents.text_size(Vocab::gold).width self.contents.font.color = normal_color self.contents.draw_text(x, y, width-cx-2, WLH, value, 1) end def draw_actor_hp_menu(actor, x, y) back = Cache.menu("Meter_Back") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = Cache.menu("HP_Meter") cw = meter.width * actor.hp / actor.maxhp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = Cache.menu("HP_Text") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2) end def draw_actor_mp_menu(actor, x, y) back = Cache.menu("Meter_Back") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = Cache.menu("MP_Meter") cw = meter.width * actor.mp / actor.maxmp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = Cache.menu("MP_Text") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.mp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.mp.to_s, 2) end def draw_actor_name_menu(actor, x, y) self.contents.font.color = text_color(23) self.contents.draw_text(x, y, 108, WLH, actor.name,1) end def draw_actor_level_menu(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, WLH, " L") self.contents.font.color = text_color(10) self.contents.draw_text(x + 18, y, 24, WLH, actor.level, 1) end end ############ # Game_Map # ############ class Game_Map attr_reader :map_id def mpname $mpname = load_data("Data/MapInfos.rvdata") $mpname[@map_id].name end end ######################## # Window_Selectable_Menu # ######################## class Window_Selectable_Menu < Window_Base attr_reader :item_max attr_reader :column_max attr_reader :index def initialize(x, y, width, height, spacing = 32) @item_max = 1 @column_max = 1 @index = -1 @spacing = spacing super(x, y, width, height) end def create_contents self.contents.dispose self.contents = Bitmap.new(width - 32, [height - 32, row_max * WLH].max) end def index=(index) @index = index end def row_max return (@item_max + @column_max - 1) / @column_max end def top_row return self.oy / WLH end def top_row=(row) row = 0 if row < 0 row = row_max - 1 if row > row_max - 1 self.oy = row * WLH end def page_row_max return (self.height - 32) / WLH end def page_item_max return page_row_max * @column_max end def bottom_row return top_row + page_row_max - 1 end def bottom_row=(row) self.top_row = row - (page_row_max - 1) end def cursor_movable? return false if (not visible or not active) return false if (index < 0 or index > @item_max or @item_max == 0) return false if (@opening or @closing) return true end def cursor_down(wrap = false) if (@index < @item_max - @column_max) or (wrap and @column_max == 1) @index = (@index + @column_max) % @item_max end end def cursor_up(wrap = false) if (@index >= @column_max) or (wrap and @column_max == 1) @index = (@index - @column_max + @item_max) % @item_max end end def cursor_right(wrap = false) if (@column_max >= 2) and (@index < @item_max - 1 or (wrap and page_row_max == 1)) @index = (@index + 1) % @item_max end end def cursor_left(wrap = false) if (@column_max >= 2) and (@index > 0 or (wrap and page_row_max == 1)) @index = (@index - 1 + @item_max) % @item_max end end def update super if cursor_movable? last_index = @index if Input.repeat?(Input::DOWN) cursor_down(Input.trigger?(Input::DOWN)) end if Input.repeat?(Input::UP) cursor_up(Input.trigger?(Input::UP)) end if Input.repeat?(Input::RIGHT) cursor_down(Input.trigger?(Input::DOWN)) end if Input.repeat?(Input::LEFT) cursor_up(Input.trigger?(Input::UP)) end
if @index != last_index Sound.play_cursor end end end end ####################### # Window_MenuStatus_Yui # ####################### class Window_MenuStatus_Yui < Window_Selectable_Menu def initialize(x, y) super(x, y, 460, 300) self.contents.font.bold = true self.contents.font.shadow = true self.contents.font.size = 16 refresh self.active = false self.index = -1 end def refresh self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members if actor.index == 0 draw_actor_graphic(actor, 65, 110) draw_actor_name_menu(actor, 15, 120) draw_actor_level_menu(actor, -5, 55) draw_actor_state(actor, 20, 100) draw_actor_hp_menu(actor, -30, 25) draw_actor_mp_menu(actor, 0, 45) elsif actor.index == 1 draw_actor_graphic(actor, 170, 210) draw_actor_name_menu(actor, 120, 220) draw_actor_level_menu(actor, 100, 155) draw_actor_state(actor, 125, 200) draw_actor_hp_menu(actor, 75, 120) draw_actor_mp_menu(actor, 105, 145) elsif actor.index == 2 draw_actor_graphic(actor, 265, 110) draw_actor_name_menu(actor, 215, 120) draw_actor_level_menu(actor, 195, 55) draw_actor_state(actor, 220, 100) draw_actor_hp_menu(actor, 170, 20) draw_actor_mp_menu(actor, 205, 45) elsif actor.index == 3 draw_actor_graphic(actor, 370, 210) draw_actor_name_menu(actor, 320, 220) draw_actor_level_menu(actor, 370, 155) draw_actor_state(actor, 325, 200) draw_actor_hp_menu(actor, 275, 120) draw_actor_mp_menu(actor, 245, 145) end end end def update_cursor end end ############### # Window_Time # ############### class Window_Mapname < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) self.contents.font.bold = true self.contents.font.size = 16 refresh end def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 0, 120, 32, $game_map.mpname.to_s, 1) end end ################### # Window_Gold_Menu # ################### class Window_Gold_Menu < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) self.contents.font.bold = true self.contents.font.size = 16 self.contents.font.color = power_up_color refresh end def refresh self.contents.clear draw_currency_value_menu($game_party.gold, 10, 0, 120) end end ############### # Window_Time # ############### class Window_Time < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) self.contents.font.bold = true self.contents.font.size = 16 self.contents.font.color = power_up_color refresh end def refresh self.contents.clear @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.draw_text(4, 0, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end ############## # Scene_Menu # ############## class Scene_Menu def main start perform_transition Input.update loop do Graphics.update Input.update update break if $scene != self end Graphics.update pre_terminate Graphics.freeze terminate end def initialize(menu_index = 0) @menu_index = menu_index end def perform_transition Graphics.transition(10, "Graphics/System/BattleStart", 80) end def start @menu_back = Plane.new @menu_back.bitmap = Cache.menu("Background") @menu_layout = Sprite.new @menu_layout.bitmap = Cache.menu("Menu_Layout") @menu_com = Sprite.new @menu_com.bitmap = Cache.menu("Menu_Com01") @menu_select = Sprite.new @menu_select.bitmap = Cache.menu("Menu_Select00") create_command_window @gold_window = Window_Gold_Menu.new(195, 45) @status_window = Window_MenuStatus_Yui.new(100, 60) @playtime_window = Window_Time .new(165, 0) @mapname_window = Window_Mapname.new(195,360) @status_window.opacity = 0 @playtime_window.opacity = 0 @mapname_window.opacity = 0 @gold_window.opacity = 0 end def pre_terminate end def terminate @menu_back.dispose @menu_layout.dispose @menu_com.dispose @menu_select.dispose @command_window.dispose @gold_window.dispose @status_window.dispose @playtime_window.dispose @mapname_window.dispose end def update @menu_back.ox += 1 @command_window.update @gold_window.update @status_window.update @mapname_window.update @playtime_window.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::save s6 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index @command_window.openness = 0 @command_window.open @command_window.opacity = 0 @command_window.contents_opacity = 0 if $game_system.save_disabled @command_window.draw_item(4, false) end end def update_command_selection case @command_window.index when 0 @menu_com.bitmap = Cache.menu("Menu_Com01") when 1 @menu_com.bitmap = Cache.menu("Menu_Com02") when 2 @menu_com.bitmap = Cache.menu("Menu_Com03") when 3 @menu_com.bitmap = Cache.menu("Menu_Com04") when 4 @menu_com.bitmap = Cache.menu("Menu_Com05") when 5 @menu_com.bitmap = Cache.menu("Menu_Com06") end if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 $scene = Scene_Item.new when 1,2,3 start_actor_selection when 4 $scene = Scene_Save.new when 5 $scene = Scene_End.new end end end def start_actor_selection @command_window.active = false @status_window.active = true if $game_party.last_actor_index < @status_window.item_max @status_window.index = $game_party.last_actor_index else @status_window.index = 0 end end def end_actor_selection @command_window.active = true @status_window.active = false @menu_select.bitmap = Cache.menu("Menu_Select00") @status_window.index = -1 end def update_actor_selection case @status_window.index when 0 @menu_select.bitmap = Cache.menu("Menu_Select01") when 1 @menu_select.bitmap = Cache.menu("Menu_Select02") when 2 @menu_select.bitmap = Cache.menu("Menu_Select03") when 3 @menu_select.bitmap = Cache.menu("Menu_Select04") end if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when 1 $scene = Scene_Skill.new(@status_window.index) when 2 $scene = Scene_Equip.new(@status_window.index) when 3 $scene = Scene_Status.new(@status_window.index) end end end end $mogscript = {} if $mogscript == nil $mogscript["menu_yui"] = true Maintenant voici ma demande. En fait j'aimerais faire en sorte que a la place des chara comme ceci Il y ai les faceset des personnages. est-ce possible ?
Dernière édition par Shyno19 le Jeu 22 Sep 2011 - 17:20, édité 1 fois |
| | | Dhamma Metta Chevalier Dragon (niveau 5)
Messages postés : 1897 Date d'inscription : 22/06/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 12:08 | |
| Je veux bien essayer de modifier le menu mais peux-tu m'envoyer directement ton projet? (ça m'aiderai grandement pour voir les modifications).
Je ne te jure rien mais je vais essayer. |
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 12:22 | |
| c'est en cours de upload le fichier fait 46 mo (faut dire qu'il ya plein de truc un peu inutile)
Mon projet : http://www.mediafire.com/?e8s8o006yuxpjv0
Le projet test ou il y a le menu : http://www.mediafire.com/?9mebfyfpdrn9g7v
Car oui je test les modif de script sur un projet différent pour éviter les bug ^^
Dernière édition par Shyno19 le Jeu 22 Sep 2011 - 12:31, édité 1 fois |
| | | Dhamma Metta Chevalier Dragon (niveau 5)
Messages postés : 1897 Date d'inscription : 22/06/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 12:28 | |
| |
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 12:31 | |
| |
| | | Dhamma Metta Chevalier Dragon (niveau 5)
Messages postés : 1897 Date d'inscription : 22/06/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 13:26 | |
| je prends ton projet test, c'est tout ce qu'il me faut. ^^ |
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 14:15 | |
| |
| | | Jin Ancien staffeux
Messages postés : 8557 Date d'inscription : 08/12/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 15:41 | |
| - Code:
-
if actor.index == 0 draw_actor_face(actor, 65, 110) draw_actor_name_menu(actor, 15, 120) draw_actor_level_menu(actor, -5, 55) draw_actor_state(actor, 20, 100) draw_actor_hp_menu(actor, -30, 25) draw_actor_mp_menu(actor, 0, 45) elsif actor.index == 1 draw_actor_face(actor, 170, 210) draw_actor_name_menu(actor, 120, 220) draw_actor_level_menu(actor, 100, 155) draw_actor_state(actor, 125, 200) draw_actor_hp_menu(actor, 75, 120) draw_actor_mp_menu(actor, 105, 145) elsif actor.index == 2 draw_actor_face(actor, 265, 110) draw_actor_name_menu(actor, 215, 120) draw_actor_level_menu(actor, 195, 55) draw_actor_state(actor, 220, 100) draw_actor_hp_menu(actor, 170, 20) draw_actor_mp_menu(actor, 205, 45) elsif actor.index == 3 draw_actor_face(actor, 370, 210) draw_actor_name_menu(actor, 320, 220) draw_actor_level_menu(actor, 370, 155) draw_actor_state(actor, 325, 200) draw_actor_hp_menu(actor, 275, 120) draw_actor_mp_menu(actor, 245, 145) end end end def update_cursor end end Dans cette partie là, la ligne draw_actor_graphic(actor, 65, 110) Aller hop, copie colle ca et ton probleme est reglé ! Apres à toi de changer les coordonnées Actor index 0 = celui en haut à gauche Actor index 1 = celui en bas à gauche Actor index 2 = celui en haut à droite Actor index 3 = celui en bas à droite Quand je disais que je powned molok et nuki, c'était pas pour blaguer xD |
| | | Invité Invité
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 16:05 | |
| - Citation :
- Quand je disais que je powned molok et nuki, c'était pas pour blaguer xD
C'est surtout qu'on s'en fou d'avoir une petite jauge remplie et qu'on s'en fou d'aider les autres... |
| | | Jin Ancien staffeux
Messages postés : 8557 Date d'inscription : 08/12/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 16:06 | |
| - Molok a écrit:
-
- Citation :
- Quand je disais que je powned molok et nuki, c'était pas pour blaguer xD
C'est surtout qu'on s'en fou d'avoir une petite jauge remplie et qu'on s'en fou d'aider les autres... C'est surtout que je blague... j'ai modifié 4 ligne quoi \o/ C'pas un exploit |
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 17:11 | |
| ça marche nikel je te remercie pour ton aide |
| | | Jin Ancien staffeux
Messages postés : 8557 Date d'inscription : 08/12/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 17:12 | |
| Il y a pas de soucis. Pense à mettre "Résolu" sur le titre. |
| | | Dhamma Metta Chevalier Dragon (niveau 5)
Messages postés : 1897 Date d'inscription : 22/06/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Jeu 22 Sep 2011 - 17:31 | |
| Jin m'a devancé, mais il est toujours mieux de vérifier les positions des faceset... Je les ai mieux positionné. - Code:
-
if actor.index == 0 draw_actor_face(actor, 30, 30) draw_actor_name_menu(actor, 15, 120) draw_actor_level_menu(actor, -5, 55) draw_actor_state(actor, 20, 100) draw_actor_hp_menu(actor, -30, 25) draw_actor_mp_menu(actor, 0, 45) elsif actor.index == 1 draw_actor_face(actor, 125, 127) draw_actor_name_menu(actor, 120, 220) draw_actor_level_menu(actor, 100, 155) draw_actor_state(actor, 125, 200) draw_actor_hp_menu(actor, 75, 120) draw_actor_mp_menu(actor, 105, 145) elsif actor.index == 2 draw_actor_face(actor, 220, 30) draw_actor_name_menu(actor, 215, 120) draw_actor_level_menu(actor, 195, 55) draw_actor_state(actor, 220, 100) draw_actor_hp_menu(actor, 170, 20) draw_actor_mp_menu(actor, 205, 45) elsif actor.index == 3 draw_actor_face(actor, 320, 127) draw_actor_name_menu(actor, 320, 220) draw_actor_level_menu(actor, 370, 155) draw_actor_state(actor, 325, 200) draw_actor_hp_menu(actor, 275, 120) draw_actor_mp_menu(actor, 245, 145) Par contre le curseur de sélection des persos est masqué. ce que tu peux faire, c'est diminuer la taille des faceset pour ne plus masquer le curseur de sélection, ou alors on modifie le curseur. - Spoiler:
Les faceset cache le curseur. - Spoiler:
J'ai modifié la position du curseur (et son design). C'est moche, tu pourras faire mieux que moi. Si tu préfères le curseur en bas, voici le code: - Spoiler:
- Code:
-
################################################## # Mog Menu Yui V 1.0 # ################################################## # By Moghunter # http://www.atelier-rgss.com ################################################## # Menu com layout em pictures. # É necessário criar uma pasta com o nome de # Menus e colocar todas as imagens dentro dela, de resto # é só criar o seu próprio estilo de menu através de um #editor de imagem. #------------------------------------------------- ############### # module Cache # ############### module Cache def self.menu(filename) load_bitmap("Graphics/Menus/", filename) end end ############### # Window_Base # ############### class Window_Base < Window def draw_actor_level_menu(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, WLH, Vocab::level_a) self.contents.font.color = normal_color self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2) end def draw_currency_value_menu(value, x, y, width) cx = contents.text_size(Vocab::gold).width self.contents.font.color = normal_color self.contents.draw_text(x, y, width-cx-2, WLH, value, 1) end def draw_actor_hp_menu(actor, x, y) back = Cache.menu("Meter_Back") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = Cache.menu("HP_Meter") cw = meter.width * actor.hp / actor.maxhp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = Cache.menu("HP_Text") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2) end def draw_actor_mp_menu(actor, x, y) back = Cache.menu("Meter_Back") cw = back.width ch = back.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, back, src_rect) meter = Cache.menu("MP_Meter") cw = meter.width * actor.mp / actor.maxmp ch = meter.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 65, y - ch + 30, meter, src_rect) text = Cache.menu("MP_Text") cw = text.width ch = text.height src_rect = Rect.new(0, 0, cw, ch) self.contents.blt(x + 35, y - ch + 30, text, src_rect) self.contents.font.color = Color.new(0,0,0,255) self.contents.draw_text(x + 81, y - 1, 48, 32, actor.mp.to_s, 2) self.contents.font.color = Color.new(255,255,255,255) self.contents.draw_text(x + 80, y - 2, 48, 32, actor.mp.to_s, 2) end def draw_actor_name_menu(actor, x, y) self.contents.font.color = text_color(23) self.contents.draw_text(x, y, 108, WLH, actor.name,1) end def draw_actor_level_menu(actor, x, y) self.contents.font.color = system_color self.contents.draw_text(x, y, 32, WLH, " L") self.contents.font.color = text_color(10) self.contents.draw_text(x + 18, y, 24, WLH, actor.level, 1) end end ############ # Game_Map # ############ class Game_Map attr_reader :map_id def mpname $mpname = load_data("Data/MapInfos.rvdata") $mpname[@map_id].name end end ######################## # Window_Selectable_Menu # ######################## class Window_Selectable_Menu < Window_Base attr_reader :item_max attr_reader :column_max attr_reader :index def initialize(x, y, width, height, spacing = 32) @item_max = 1 @column_max = 1 @index = -1 @spacing = spacing super(x, y, width, height) end def create_contents self.contents.dispose self.contents = Bitmap.new(width - 32, [height - 32, row_max * WLH].max) end def index=(index) @index = index end def row_max return (@item_max + @column_max - 1) / @column_max end def top_row return self.oy / WLH end def top_row=(row) row = 0 if row < 0 row = row_max - 1 if row > row_max - 1 self.oy = row * WLH end def page_row_max return (self.height - 32) / WLH end def page_item_max return page_row_max * @column_max end def bottom_row return top_row + page_row_max - 1 end def bottom_row=(row) self.top_row = row - (page_row_max - 1) end def cursor_movable? return false if (not visible or not active) return false if (index < 0 or index > @item_max or @item_max == 0) return false if (@opening or @closing) return true end def cursor_down(wrap = false) if (@index < @item_max - @column_max) or (wrap and @column_max == 1) @index = (@index + @column_max) % @item_max end end def cursor_up(wrap = false) if (@index >= @column_max) or (wrap and @column_max == 1) @index = (@index - @column_max + @item_max) % @item_max end end def cursor_right(wrap = false) if (@column_max >= 2) and (@index < @item_max - 1 or (wrap and page_row_max == 1)) @index = (@index + 1) % @item_max end end def cursor_left(wrap = false) if (@column_max >= 2) and (@index > 0 or (wrap and page_row_max == 1)) @index = (@index - 1 + @item_max) % @item_max end end def update super if cursor_movable? last_index = @index if Input.repeat?(Input::DOWN) cursor_down(Input.trigger?(Input::DOWN)) end if Input.repeat?(Input::UP) cursor_up(Input.trigger?(Input::UP)) end if Input.repeat?(Input::RIGHT) cursor_down(Input.trigger?(Input::DOWN)) end if Input.repeat?(Input::LEFT) cursor_up(Input.trigger?(Input::UP)) end
if @index != last_index Sound.play_cursor end end end end ####################### # Window_MenuStatus_Yui # ####################### class Window_MenuStatus_Yui < Window_Selectable_Menu def initialize(x, y) super(x, y, 460, 300) self.contents.font.bold = true self.contents.font.shadow = true self.contents.font.size = 16 refresh self.active = false self.index = -1 end def refresh self.contents.clear @item_max = $game_party.members.size for actor in $game_party.members if actor.index == 0 draw_actor_face(actor, 30, 30) draw_actor_name_menu(actor, 15, 120) draw_actor_level_menu(actor, -5, 55) draw_actor_state(actor, 20, 100) draw_actor_hp_menu(actor, -30, 25) draw_actor_mp_menu(actor, 0, 45) elsif actor.index == 1 draw_actor_face(actor, 125, 127) draw_actor_name_menu(actor, 120, 220) draw_actor_level_menu(actor, 100, 155) draw_actor_state(actor, 125, 200) draw_actor_hp_menu(actor, 75, 120) draw_actor_mp_menu(actor, 105, 145) elsif actor.index == 2 draw_actor_face(actor, 220, 30) draw_actor_name_menu(actor, 215, 120) draw_actor_level_menu(actor, 195, 55) draw_actor_state(actor, 220, 100) draw_actor_hp_menu(actor, 170, 20) draw_actor_mp_menu(actor, 205, 45) elsif actor.index == 3 draw_actor_face(actor, 320, 127) draw_actor_name_menu(actor, 320, 220) draw_actor_level_menu(actor, 370, 155) draw_actor_state(actor, 325, 200) draw_actor_hp_menu(actor, 275, 120) draw_actor_mp_menu(actor, 245, 145) end end end def update_cursor end end ############### # Window_Time # ############### class Window_Mapname < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) self.contents.font.bold = true self.contents.font.size = 16 refresh end def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, 0, 120, 32, $game_map.mpname.to_s, 1) end end ################### # Window_Gold_Menu # ################### class Window_Gold_Menu < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) self.contents.font.bold = true self.contents.font.size = 16 self.contents.font.color = power_up_color refresh end def refresh self.contents.clear draw_currency_value_menu($game_party.gold, 10, 0, 120) end end ############### # Window_Time # ############### class Window_Time < Window_Base def initialize(x, y) super(x, y, 160, WLH + 32) self.contents.font.bold = true self.contents.font.size = 16 self.contents.font.color = power_up_color refresh end def refresh self.contents.clear @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.draw_text(4, 0, 120, 32, text, 2) end def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end ############## # Scene_Menu # ############## class Scene_Menu def main start perform_transition Input.update loop do Graphics.update Input.update update break if $scene != self end Graphics.update pre_terminate Graphics.freeze terminate end def initialize(menu_index = 0) @menu_index = menu_index end def perform_transition Graphics.transition(10, "Graphics/System/BattleStart", 80) end def start @menu_back = Plane.new @menu_back.bitmap = Cache.menu("Background") @menu_layout = Sprite.new @menu_layout.bitmap = Cache.menu("Menu_Layout") @menu_com = Sprite.new @menu_com.bitmap = Cache.menu("Menu_Com01") @menu_select = Sprite.new @menu_select.bitmap = Cache.menu("Menu_Select200") create_command_window @gold_window = Window_Gold_Menu.new(195, 45) @status_window = Window_MenuStatus_Yui.new(100, 60) @playtime_window = Window_Time .new(165, 0) @mapname_window = Window_Mapname.new(195,360) @status_window.opacity = 0 @playtime_window.opacity = 0 @mapname_window.opacity = 0 @gold_window.opacity = 0 end def pre_terminate end def terminate @menu_back.dispose @menu_layout.dispose @menu_com.dispose @menu_select.dispose @command_window.dispose @gold_window.dispose @status_window.dispose @playtime_window.dispose @mapname_window.dispose end def update @menu_back.ox += 1 @command_window.update @gold_window.update @status_window.update @mapname_window.update @playtime_window.update if @command_window.active update_command_selection elsif @status_window.active update_actor_selection end end def create_command_window s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::save s6 = Vocab::game_end @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index @command_window.openness = 0 @command_window.open @command_window.opacity = 0 @command_window.contents_opacity = 0 if $game_system.save_disabled @command_window.draw_item(4, false) end end def update_command_selection case @command_window.index when 0 @menu_com.bitmap = Cache.menu("Menu_Com01") when 1 @menu_com.bitmap = Cache.menu("Menu_Com02") when 2 @menu_com.bitmap = Cache.menu("Menu_Com03") when 3 @menu_com.bitmap = Cache.menu("Menu_Com04") when 4 @menu_com.bitmap = Cache.menu("Menu_Com05") when 5 @menu_com.bitmap = Cache.menu("Menu_Com06") end if Input.trigger?(Input::B) Sound.play_cancel $scene = Scene_Map.new elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 4 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 4 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 $scene = Scene_Item.new when 1,2,3 start_actor_selection when 4 $scene = Scene_File.new(true, false, false) when 5 $scene = Scene_End.new end end end def start_actor_selection @command_window.active = false @status_window.active = true if $game_party.last_actor_index < @status_window.item_max @status_window.index = $game_party.last_actor_index else @status_window.index = 0 end end def end_actor_selection @command_window.active = true @status_window.active = false @menu_select.bitmap = Cache.menu("Menu_Select200") @status_window.index = -1 end def update_actor_selection case @status_window.index when 0 @menu_select.bitmap = Cache.menu("Menu_Select201") when 1 @menu_select.bitmap = Cache.menu("Menu_Select202") when 2 @menu_select.bitmap = Cache.menu("Menu_Select203") when 3 @menu_select.bitmap = Cache.menu("Menu_Select204") end if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when 1 $scene = Scene_Skill.new(@status_window.index) when 2 $scene = Scene_Equip.new(@status_window.index) when 3 $scene = Scene_Status.new(@status_window.index) end end end end $mogscript = {} if $mogscript == nil $mogscript["menu_yui"] = true
Le dossier Menu est à changer par celui qui est dans ce lien. http://www.megaupload.com/?d=LNJTQAVW Si tu veux changer le curseur , voici les codes à modifier. (j'ai mis les lignes pour que ça plus facile pour t'y repérer) - Code:
-
@menu_select.bitmap = Cache.menu("Menu_Select200") (ligne.338)
@menu_select.bitmap = Cache.menu("Menu_Select200") (ligne.443)
@menu_select.bitmap = Cache.menu("Menu_Select201") (ligne.449)
@menu_select.bitmap = Cache.menu("Menu_Select202") (ligne.451)
@menu_select.bitmap = Cache.menu("Menu_Select203") (ligne.453)
@menu_select.bitmap = Cache.menu("Menu_Select204") (ligne.455)
@menu_select.bitmap = Cache.menu("Menu_Select204")
|
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 10:58 | |
| Merci bien pour ton aide. J'ai réussi a bien placer les faceset, nom lvl etc comme ceci : |
| | | Jin Ancien staffeux
Messages postés : 8557 Date d'inscription : 08/12/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 13:54 | |
| et ben on peut dire qu'on a fait du bon boulot Ce menu... je crois que maintenant il me donne envie de l'utiliser x) j'le trouvais bidon avec les petit bonhomme ^^ |
| | | Invité Invité
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 16:00 | |
| Le rendu final est magnifique, bien joué. =) |
| | | Teraglehn Ancien staffeux
Messages postés : 3628 Date d'inscription : 23/09/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 17:32 | |
| en effet c'est super ! tu as fait les image toi même ? (le seul petit défaut d'intégration, c'est que les halo sont coupé pour "MP" et "HP" mais rien de bien méchant ) |
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 18:16 | |
| j'ai fait les images objets, compétences etc...
en revanche pour ce qui est du halo qui fait un peu couper sur le perso 1 c'est en fait que j'ai du placer a la limite, si j'essayer de le mettre encore plus vers la gauche une partie serait couper.
Mais la je suis en trin de refaire l'interface^^ |
| | | Teraglehn Ancien staffeux
Messages postés : 3628 Date d'inscription : 23/09/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 18:17 | |
| ok ^^ en tout cas c'est classe |
| | | Jin Ancien staffeux
Messages postés : 8557 Date d'inscription : 08/12/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 19:10 | |
| tes images elle sont en .png ? Si oui, il ne devrait pas y avoir de problème normalement.
|
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 19:18 | |
| oui toute les images sont en png mais je pense que la limite vient du script en lui même, après j'en sais rien du tout. enfin bref après quelques modif je suis arriver à ça : pour ce qui est du Background je ne l'aime pas spécialement mais si vous avez des idées parce que je vois pas trop ce que je pourrais mettre, surtout que le background fait un défilement de la droite vers la gauche^^ |
| | | Jin Ancien staffeux
Messages postés : 8557 Date d'inscription : 08/12/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 19:48 | |
| Pourquoi ma mettre un truc fixe et sobre ? |
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 19:53 | |
| ben ça viens du script le fait qu'il défile faudrait que je vois comment enlever ce défilement. |
| | | Jin Ancien staffeux
Messages postés : 8557 Date d'inscription : 08/12/2010 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 19:54 | |
| |
| | | Shyno19 Ninja (niveau 5)
Messages postés : 220 Date d'inscription : 21/09/2011 Jauge LPC :
| Sujet: Re: [resolu]aide sur le script menu moghunter Ven 23 Sep 2011 - 20:27 | |
| |
| | | Contenu sponsorisé
| Sujet: Re: [resolu]aide sur le script menu moghunter | |
| |
| | | |
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |