Age : 30 Inscrit le : 22/11/2008 Messages : 3382
| Sujet: Incompatibilité entre deux scripts Mar 30 Aoû 2011 - 14:12 | |
| Salut (: J'ai remarqué une incompatibilité plutôt dérangeante entre le menu que j'utilise et le script de Neo Save System V5. Voici tout d'abord les deux scripts: - Spoiler:
- Code:
-
#============================================================================== # ** Script : HUD Menu + V2 # Par Zangther #------------------------------------------------------------------------------ # Pour le forum : # http://rpg-maker-vx.bbactif.com/forum.htm #============================================================================== # Utilisation : # Pas vraiment de configuration a part celle qu'il y a à faire dans le module. # Voila voila ! # Have fun ! #============================================================================== # Change log : # 26 / 08 / 2010 # [ Recitifcation de bug ] : Affichage de la fenêtre de variables si désactivée ne marchait pas. # 03 / 08 / 2010 : MaJ V2 par Zangther # [ Ajout de fonction ] : Afficher ou non en permance les fenêtres de variable et/ou la fenêtre de menu. # [ Ajout de fonction ] : Utiliser ou non la fenêtre de variables. # [ Ajout de fonction ] : Afficher de 1 à 5 variables dans la fenêtre de variables. #==============================================================================
module Zang_MenuHUD # Afficher ou non les fenêtres du menu tout le temps Zang_Afficher = { "Variables" => false, "Menu" => false, } # Touche donc à cela, ton ordinateur va fondre et tu vas rejoindre les enfers è_é # Nom et ID de la variable au dessus de la face et du chara du perso principal Text_VariableTe = "Argent" ID_VariableTe = 1
Up_Variables = { "Actif" => true, # Mettez true / false selon si vous voulez oui / non afficher la barre avec les variables # Voici comment mettre les variables : # Ordre ( 1 / 2 / 3 / 4 ou 5 ) => [[ ID de la variable, N' de l'icon ], afficher ou pas], 1 => [[ 2, 2], true], 2 => [[3, 2], true], 3 => [[4, 2], true], 4 => [[5, 2], true], 5 => [[6, 2], true], } # Toucher à ça revient a te petit-suicider instantanément # Utiliser l'ensemble personnalisé ? true : oui, false : non # Si non, ce sera les options du menu de base Use_ScenesZang = true # Texte du menu état Zang_StatTitle = "État" # Texte pour la barre d'Exp Zang_StateXp = "Exp" # Couleurs de la barre d'XP ( numéro dans le windowskin ) Zang_XpGaugeCol1 = 31 Zang_XpGaugeCol2 = 32 # Nombre d'équipements MAX Zang_EQUIPMAX = 5 # Texte pour précédent et suivant Zang_StatBack = "<= Q" Zang_StatNext = "W =>" # Touches pour changer de personnage dans le menu État # Dispo : # Flèches directionnelles : DOWN LEFT RIGHT UP # Touches : A B C X Y Z L R, pour sacvoir a quoi elle correspondent, testez votre jeu et appuyez sur F1 # Autres touches : SHIFT CTRL ALT F5 F6 F7 F8 F9 # Toujours laisser le Input:: avant la touche. Il n'y a pas d'autres touches disponibles de base. Zang_NextActor = Input::R Zang_BackActor = Input::L # Activer l'accès aux skills depuis la page de status customisée Zang_SkillAcces = true # Texte pour indiquer Zang_SkillIndic = "Accès aux Skills : A" # Touche pour activer Zang_Go2Skill = Input::X end #============================================================================== # ** Scene_Map #------------------------------------------------------------------------------ # This class performs the map screen processing. #==============================================================================
class Scene_Map < Scene_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- alias old_start start def start @window_variable = Window_TopVariables.new @window_hudmenu = Window_HUDMenu.new @status_window = Window_MenuStatus.new(0, 0) @status_window.visible = false @window_variable.visible = Zang_Afficher["Variables"] @window_hudmenu.visible = Zang_Afficher["Menu"] if Use_ScenesZang create_command_window else create_command_window_base end @command_window.visible = Zang_Afficher["Menu"] old_start end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- alias old_terminate terminate def terminate @window_variable.dispose @window_hudmenu.dispose @command_window.dispose @status_window.dispose if !Use_ScenesZang old_terminate end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- alias old_update update def update @window_variable.refresh if @window_variable.visible @window_hudmenu.refresh if @window_hudmenu.visible @command_window.update if Use_ScenesZang if @command_window.active update_command_selection else old_update end else @status_window.update if @status_window.active update_actor_selection_base elsif @command_window.active update_command_selection_base else old_update end end end #-------------------------------------------------------------------------- # * Determine if Menu is Called due to Cancel Button #-------------------------------------------------------------------------- def update_call_menu if Input.trigger?(Input::B) return if $game_map.interpreter.running? # Event being executed? return if $game_system.menu_disabled # Menu forbidden? $game_temp.menu_beep = true # Set SE play flag @window_variable.visible = Up_Variables["Actif" ] @window_hudmenu.visible = true @command_window.visible = true @command_window.active = true end end #-------------------------------------------------------------------------- # * Create Command Window #-------------------------------------------------------------------------- def create_command_window s1 = Vocab::item s2 = Vocab::status s3 = Vocab::save s4 = Vocab::game_end @command_window = Window_Command.new(150, [s1, s2, s3, s4]) @command_window.index = @menu_index @command_window.opacity = 0 @command_window.x = 394 @command_window.y = 200 if $game_party.members.size == 0 @command_window.draw_item(0, false) @command_window.draw_item(1, false) end if $game_system.save_disabled @command_window.draw_item(2, false) end @command_window.active = false end #-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel @command_window.active = false @window_variable.visible = Zang_Afficher["Variables"] @window_hudmenu.visible = Zang_Afficher["Menu"] @command_window.visible = Zang_Afficher["Menu"] elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 2 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 2 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # Item $scene = Scene_Item.new when 1 # Status $scene = Scene_ZangStatus.new when 2 # Save $scene = Scene_File.new(true, false, false) when 3 # End Game $scene = Scene_End.new end end end #-------------------------------------------------------------------------- # * Create Command Window Base #-------------------------------------------------------------------------- def create_command_window_base s1 = Vocab::item s2 = Vocab::skill s3 = Vocab::equip s4 = Vocab::status s5 = Vocab::save s6 = Vocab::game_end @command_window = Window_Command.new(150, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index @command_window.opacity = 0 @command_window.x = 394 @command_window.y = 200 if $game_party.members.size == 0 # If number of party members is 0 @command_window.draw_item(0, false) # Disable item @command_window.draw_item(1, false) # Disable skill @command_window.draw_item(2, false) # Disable equipment @command_window.draw_item(3, false) # Disable status end if $game_system.save_disabled # If save is forbidden @command_window.draw_item(4, false) # Disable save end @command_window.active = false end #-------------------------------------------------------------------------- # * Update Command Selection Base #-------------------------------------------------------------------------- def update_command_selection_base if Input.trigger?(Input::B) Sound.play_cancel @command_window.active = false 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 # Item $scene = Scene_Item.new when 1,2,3 # Skill, equipment, status start_actor_selection_base when 4 # Save $scene = Scene_File.new(true, false, false) when 5 # End Game $scene = Scene_End.new end end end #-------------------------------------------------------------------------- # * Start Actor Selection Base #-------------------------------------------------------------------------- def start_actor_selection_base @command_window.active = false @status_window.active = true @status_window.visible = 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 #-------------------------------------------------------------------------- # * End Actor Selection Base #-------------------------------------------------------------------------- def end_actor_selection_base @command_window.active = true @status_window.active = false @status_window.visible = false @status_window.index = -1 end #-------------------------------------------------------------------------- # * Update Actor Selection Base #-------------------------------------------------------------------------- def update_actor_selection_base if Input.trigger?(Input::B) Sound.play_cancel end_actor_selection_base elsif Input.trigger?(Input::C) $game_party.last_actor_index = @status_window.index Sound.play_decision case @command_window.index when 1 # skill $scene = Scene_Skill.new(@status_window.index) when 2 # equipment $scene = Scene_Equip.new(@status_window.index) when 3 # status $scene = Scene_Status.new(@status_window.index) end end end end
#============================================================================== # ** Scene_Item #==============================================================================
class Scene_Item < Scene_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Return to Original Screen #-------------------------------------------------------------------------- def return_scene if Use_ScenesZang $scene = Scene_Map.new(0) else $scene = Scene_Map.new(0) end end end
#============================================================================== # ** Scene_Skill #==============================================================================
class Scene_Skill < Scene_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Return to Original Screen #-------------------------------------------------------------------------- def return_scene if Use_ScenesZang $scene = Scene_ZangStatus.new(@actor_index) else $scene = Scene_Map.new(1) end end end
#============================================================================== # ** Scene_Equip #==============================================================================
class Scene_Equip < Scene_Base #-------------------------------------------------------------------------- # * Return to Original Screen #-------------------------------------------------------------------------- def return_scene $scene = Scene_Map.new(2) end end
#============================================================================== # ** Scene_Status #==============================================================================
class Scene_Status < Scene_Base #-------------------------------------------------------------------------- # * Return to Original Screen #-------------------------------------------------------------------------- def return_scene $scene = Scene_Map.new(3) end end
#============================================================================== # ** Scene_File #==============================================================================
class Scene_File < Scene_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Return to Original Screen #-------------------------------------------------------------------------- alias return_new return_scene def return_scene if not @from_event if not @from_title if Use_ScenesZang $scene = Scene_Map.new(2) else $scene = Scene_Map.new(4) end else return_new end end end end
#============================================================================== # ** Scene_End #==============================================================================
class Scene_End < Scene_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Return to Original Screen #-------------------------------------------------------------------------- def return_scene if Use_ScenesZang $scene = Scene_Map.new(3) else $scene = Scene_Map.new(5) end end end
#============================================================================== # ** Scene_ZangStatus #------------------------------------------------------------------------------ # Scene_Status modifiée pour inclure la modification de l'equipement dans la Scene et un # réarangement des informations. #==============================================================================
class Scene_ZangStatus < Scene_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index #-------------------------------------------------------------------------- def initialize(actor_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # * Start processing #-------------------------------------------------------------------------- def start super create_menu_background @actor = $game_party.members[@actor_index] @help_window = Window_Help.new $equip_actif = false @status_window = Window_StatusZang.new(@actor) @help_window.set_text(Zang_StatTitle, 1) @equip_window = Window_Equip.new(0, 230, @actor) @equip_window.opacity = 0 @equip_window.active = true equip_start end #-------------------------------------------------------------------------- # * Termination Processing #-------------------------------------------------------------------------- def terminate super dispose_menu_background @status_window.dispose @help_window.dispose @equip_window.dispose equip_terminate end #-------------------------------------------------------------------------- # * Return to Original Screen #-------------------------------------------------------------------------- def return_scene $scene = Scene_Map.new(1) end #-------------------------------------------------------------------------- # * Switch to Next Actor Screen #-------------------------------------------------------------------------- def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_ZangStatus.new(@actor_index) end #-------------------------------------------------------------------------- # * Switch to Previous Actor Screen #-------------------------------------------------------------------------- def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_ZangStatus.new(@actor_index) end #-------------------------------------------------------------------------- # * Switch to Skill Scene #-------------------------------------------------------------------------- def skill_actor $scene = Scene_Skill.new(@actor_index) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super update_menu_background if @equip_window.active update_status_base else update_item_selection end update_equips update_status_window @status_window.update @equip_window.update end #-------------------------------------------------------------------------- # * Status Base Update #-------------------------------------------------------------------------- def update_status_base if Input.trigger?(Input::B) Sound.play_cancel return_scene elsif Input.trigger?(Zang_NextActor) && $game_party.members.size > 1 Sound.play_cursor next_actor elsif Input.trigger?(Zang_BackActor) && $game_party.members.size > 1 Sound.play_cursor prev_actor elsif Input.trigger?(Zang_Go2Skill) && Zang_SkillAcces Sound.play_cursor skill_actor elsif Input.trigger?(Input::C) if @actor.fix_equipment Sound.play_buzzer else Sound.play_decision @equip_window.active = false @item_window.active = true @item_window.visible = true @help_win.visible = true @item_window.index = 0 end $equip_actif = true end end #-------------------------------------------------------------------------- # * Equip Start processing #-------------------------------------------------------------------------- def equip_start @help_win = Window_Help.new @help_win.visible = false create_item_windows @equip_window.help_window = @help_win @equip_window.index = 0 @equistat_window = Window_ZangEquipStatus.new(310, 210, @actor) @equistat_window.opacity = 0 end #-------------------------------------------------------------------------- # * Equip Termination Processing #-------------------------------------------------------------------------- def equip_terminate @help_win.dispose @equistat_window.dispose dispose_item_windows end #-------------------------------------------------------------------------- # * Update Equips #-------------------------------------------------------------------------- def update_equips @help_win.update update_item_windows end #-------------------------------------------------------------------------- # * Create Item Window #-------------------------------------------------------------------------- def create_item_windows @item_windows = [] for i in 0...Zang_EQUIPMAX @item_windows[i] = Window_EquipItem.new(0, 32+24, 544, 184, @actor, i) @item_windows[i].help_window = @help_win @item_windows[i].visible = false @item_windows[i].index -= 1 @item_windows[i].active = false end update_item_windows end #-------------------------------------------------------------------------- # * Dispose of Item Window #-------------------------------------------------------------------------- def dispose_item_windows for window in @item_windows window.dispose end end #-------------------------------------------------------------------------- # * Update Item Window #-------------------------------------------------------------------------- def update_item_windows for i in 0...Zang_EQUIPMAX break if not @item_window if @item_window.visible @item_windows[i].visible = (@equip_window.index == i) @item_windows[i].update end end @item_window = @item_windows[@equip_window.index] end #-------------------------------------------------------------------------- # * Update Status Window #-------------------------------------------------------------------------- def update_status_window if @equip_window.active @equistat_window.set_new_parameters(nil, nil, nil, nil) elsif @item_window.active temp_actor = @actor.clone temp_actor.change_equip(@equip_window.index, @item_window.item, true) new_atk = temp_actor.atk new_def = temp_actor.def new_spi = temp_actor.spi new_agi = temp_actor.agi @equistat_window.set_new_parameters(new_atk, new_def, new_spi, new_agi) end @equistat_window.update end #-------------------------------------------------------------------------- # * Update Item Selection #-------------------------------------------------------------------------- def update_item_selection if Input.trigger?(Input::B) Sound.play_cancel $equip_actif = false @equip_window.active = true @item_window.active = false @item_window.visible = false @help_win.visible = false @item_window.index = -1 elsif Input.trigger?(Input::C) Sound.play_equip $equip_actif = false @actor.change_equip(@equip_window.index, @item_window.item) @equip_window.active = true @item_window.active = false @item_window.visible = false @help_win.visible = false @item_window.index = -1 @equip_window.refresh for item_window in @item_windows item_window.refresh end end end
end
#============================================================================== # ** Game_Actor #==============================================================================
class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # * Get String for Last Level Experience #-------------------------------------------------------------------------- def back_exp_s return (@level-1) < 1 ? @exp_list[@level-1] : 0 end end
#============================================================================== # ** Window_HUDMenu #------------------------------------------------------------------------------ # Affichage du menu avec la variable ( nom & valeur ) et chara & face qui se trouve sur la droite. #==============================================================================
class Window_HUDMenu < Window_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(394, 0, 150, 416) refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if @leader != $game_party.members[0] equipe = $game_party.members @leader = equipe[0] end set_graphics end #-------------------------------------------------------------------------- # * Set TGraphics #-------------------------------------------------------------------------- def set_graphics self.contents.clear set_face set_chara set_variable end #-------------------------------------------------------------------------- # * Set Variable #-------------------------------------------------------------------------- def set_variable self.contents.font.color = normal_color self.contents.draw_text(4, 0, self.width - 40, WLH, Text_VariableTe, 1) self.contents.draw_text(4, 26, self.width - 40, WLH, $game_variables[ID_VariableTe], 2) end #-------------------------------------------------------------------------- # * Set Face #-------------------------------------------------------------------------- def set_face face_name = @leader.face_name face_index = @leader.face_index draw_face(face_name, face_index, 20, 68) end #-------------------------------------------------------------------------- # * Set Chara #-------------------------------------------------------------------------- def set_chara character_name = @leader.character_name character_index = @leader.character_index draw_character(character_name, character_index, 15, 164) end end
#============================================================================== # ** Window_TopVariables #------------------------------------------------------------------------------ # Affichage des variables sur pour le menu. #==============================================================================
class Window_TopVariables < Window_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 394, WLH + 32) end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear get_Z_variable @y = ( 394 - ( @nb_Variables * 72 ) ) / ( @nb_Variables ) @x = @y / 2 for i in 1..5 draw_variable_nameicon(i) end end #-------------------------------------------------------------------------- # * Draw Item Name # item : Item (skill, weapon, armor are also possible) # x : draw spot x-coordinate # y : draw spot y-coordinate # enabled : Enabled flag. When false, draw semi-transparently. #-------------------------------------------------------------------------- def draw_variable_nameicon(index) return if not Up_Variables[1] variable = Up_Variables[index][0] draw_icon(variable[1], @x, 0, true) self.contents.font.color = normal_color self.contents.font.color.alpha = 255 @x += 24 self.contents.draw_text(@x, 0, 172, WLH, $game_variables[variable[0]], 0) @x += 48 + @y end #-------------------------------------------------------------------------- # * Get number of Variables #-------------------------------------------------------------------------- def get_Z_variable @nb_Variables = 0 for i in 1..5 @nb_Variables += 1 if Up_Variables[i][1] end end end
#============================================================================== # ** Window_Status #------------------------------------------------------------------------------ # This window displays full status specs on the status screen. #==============================================================================
class Window_StatusZang < Window_Base include Zang_MenuHUD #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 56, 544, 360) @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_face(@actor, 10, 10) draw_actor_state(@actor, 10, 111) draw_actor_name(@actor, 116, 56) draw_actor_class(@actor, 116, 82) draw_basic_info(338, 32) draw_helps end #-------------------------------------------------------------------------- # * Draw Basic Information # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- def draw_basic_info(x, y) draw_actor_level(@actor, x, y + WLH * 0) draw_actor_exp(@actor, x, y + WLH * 1) draw_actor_hp(@actor, x, y + WLH * 2) draw_actor_mp(@actor, x, y + WLH * 3) end #-------------------------------------------------------------------------- # * Draw EXP # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # width : Width #-------------------------------------------------------------------------- def draw_actor_exp(actor, x, y, width = 120) draw_actor_exp_gauge(actor, x, y, width) self.contents.font.color = system_color self.contents.draw_text(x, y, 30, WLH, Zang_StateXp) self.contents.font.color = exp_color last_font_size = self.contents.font.size xr = x + width if width < 120 self.contents.draw_text(xr - 44, y, 44, WLH, exp_infos[0], 2) else self.contents.draw_text(xr - 99, y, 44, WLH, exp_infos[0], 2) self.contents.font.color = normal_color self.contents.draw_text(xr - 55, y, 11, WLH, "/", 2) self.contents.draw_text(xr - 44, y, 44, WLH, exp_infos[1], 2) end end #-------------------------------------------------------------------------- # * Draw EXP Gauge # actor : actor # x : draw spot x-coordinate # y : draw spot y-coordinate # width : Width #-------------------------------------------------------------------------- def draw_actor_exp_gauge(actor, x, y, width = 120) gw = width * exp_infos[0] / [exp_infos[1], 1].max gc1 = exp_gauge_color1 gc2 = exp_gauge_color2 self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color) self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2) end #-------------------------------------------------------------------------- # * Get EXP Gauge Color 1 #-------------------------------------------------------------------------- def exp_gauge_color1 return text_color(Zang_XpGaugeCol1) end #-------------------------------------------------------------------------- # * Get EXP Gauge Color 2 #-------------------------------------------------------------------------- def exp_gauge_color2 return text_color(Zang_XpGaugeCol2) end #-------------------------------------------------------------------------- # * Get Exp Text Color # actor : actor #-------------------------------------------------------------------------- def exp_color return normal_color end #-------------------------------------------------------------------------- # * Get Experience Info #-------------------------------------------------------------------------- def exp_infos cur_exp = @actor.exp - @actor.back_exp_s.to_i next_exp = @actor.next_exp_s infos = [cur_exp.to_i, next_exp.to_i] return infos end #-------------------------------------------------------------------------- # * Get Experience String #-------------------------------------------------------------------------- def draw_helps if $game_party.members.size > 1 rect_back = self.contents.text_size(Zang_StatBack) rect_back.x = 0 rect_back.y = 300 self.contents.draw_text(rect_back, Zang_StatBack) rect_back = self.contents.text_size(Zang_StatNext) rect_back.x = 544 - 32 - rect_back.width rect_back.y = 300 self.contents.draw_text(rect_back, Zang_StatNext) end if Zang_SkillAcces rect_back = self.contents.text_size(Zang_SkillIndic) rect_back.x = (544 - rect_back.width) / 2 rect_back.y = 300 self.contents.draw_text(rect_back, Zang_SkillIndic) end end end
#============================================================================== # ** Window_ZangEquipStatus #------------------------------------------------------------------------------ # Window_EquipStatus modifié pour les besoin de la New_SceneStatus. #==============================================================================
class Window_ZangEquipStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # x : window X coordinate # y : window Y corrdinate # actor : actor #-------------------------------------------------------------------------- def initialize(x, y, actor) super(x, y, 208, WLH * 5 + 32) @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_parameter(0, WLH * 1, 0) draw_parameter(0, WLH * 2, 1) draw_parameter(0, WLH * 3, 2) draw_parameter(0, WLH * 4, 3) end #-------------------------------------------------------------------------- # * Set Parameters After Equipping # new_atk : attack after equipping # new_def : defense after equipping # new_spi : spirit after equipping # new_agi : agility after equipping #-------------------------------------------------------------------------- def set_new_parameters(new_atk, new_def, new_spi, new_agi) if @new_atk != new_atk or @new_def != new_def or @new_spi != new_spi or @new_agi != new_agi @new_atk = new_atk @new_def = new_def @new_spi = new_spi @new_agi = new_agi refresh end end #-------------------------------------------------------------------------- # * Get Post Equip Parameter Drawing Color # old_value : parameter before equipment change # new_value : parameter after equipment change #-------------------------------------------------------------------------- def new_parameter_color(old_value, new_value) if new_value > old_value # Get stronger return power_up_color elsif new_value == old_value # No change return normal_color else # Get weaker return power_down_color end end #-------------------------------------------------------------------------- # * Draw Parameters # x : draw spot x-coordinate # y : draw spot y-coordinate # type : type of parameter (0 - 3) #-------------------------------------------------------------------------- def draw_parameter(x, y, type) case type when 0 name = Vocab::atk value = @actor.atk new_value = @new_atk when 1 name = Vocab::def value = @actor.def new_value = @new_def when 2 name = Vocab::spi value = @actor.spi new_value = @new_spi when 3 name = Vocab::agi value = @actor.agi new_value = @new_agi end self.contents.font.color = system_color self.contents.draw_text(x + 4, y, 80, WLH, name) self.contents.font.color = normal_color self.contents.draw_text(x + 90, y, 30, WLH, value, 2) self.contents.font.color = system_color self.contents.draw_text(x + 122, y, 20, WLH, ">", 1) if $equip_actif if new_value != nil self.contents.font.color = new_parameter_color(value, new_value) self.contents.draw_text(x + 142, y, 30, WLH, new_value, 2) end end end
Et celui du NSS: https://rpg-maker-vx.bbactif.com/t11727-neo-save-system-vEn clair, ce qui va pas, c'est que lors de la capture d'écran qui s'affiche ensuite dans le screen de sauvegarde, le menu est ouvert. - Spoiler:
On voit donc la map + un bout du menu ouvert à droite de la capture. Y a-t-il moyen d'empêcher ça ou bien je dois oublier le NSS ? ^^'* Merci d'avance! |
|
Ex-Admin Cruelle
Age : 32 Inscrit le : 03/07/2008 Messages : 2441
| Sujet: Re: Incompatibilité entre deux scripts Mar 30 Aoû 2011 - 15:26 | |
| Alors suivant ce que t'utilise t'a au plus deux endroits à changer, on va donc changer les deux ça mange pas de pain. Commence par repérer cette méthode : - Code:
-
#-------------------------------------------------------------------------- # * Update Command Selection #-------------------------------------------------------------------------- def update_command_selection if Input.trigger?(Input::B) Sound.play_cancel @command_window.active = false @window_variable.visible = Zang_Afficher["Variables"] @window_hudmenu.visible = Zang_Afficher["Menu"] @command_window.visible = Zang_Afficher["Menu"] elsif Input.trigger?(Input::C) if $game_party.members.size == 0 and @command_window.index < 2 Sound.play_buzzer return elsif $game_system.save_disabled and @command_window.index == 2 Sound.play_buzzer return end Sound.play_decision case @command_window.index when 0 # Item $scene = Scene_Item.new when 1 # Status $scene = Scene_ZangStatus.new when 2 # Save $scene = Scene_File.new(true, false, false) when 3 # End Game $scene = Scene_End.new end end end Et celle la : - Code:
-
#-------------------------------------------------------------------------- # * Update Command Selection Base #-------------------------------------------------------------------------- def update_command_selection_base if Input.trigger?(Input::B) Sound.play_cancel @command_window.active = false 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 # Item $scene = Scene_Item.new when 1,2,3 # Skill, equipment, status start_actor_selection_base when 4 # Save $scene = Scene_File.new(true, false, false) when 5 # End Game $scene = Scene_End.new end end end Une fois que c'est fait dans la première tu as : - Code:
-
when 2 # Save $scene = Scene_File.new(true, false, false) Et tu met à la place : - Code:
-
when 2 # Save @command_window.visible = false @window_hudmenu.visible = false @window_variable.visible = false $scene = Scene_File.new(true, false, false) Ce qui aura pour effet de cacher les fenêtres avant d'appeler le menu de sauvegarde. Puis dans la deuxiéme méthode c'est la même chose, sauf que la ligne à repérer c'est : - Code:
-
when 4 # Save $scene = Scene_File.new(true, false, false) Et donc à remplacer par : - Code:
-
when 4 # Save @command_window.visible = false @window_hudmenu.visible = false @window_variable.visible = false $scene = Scene_File.new(true, false, false) Voila =) |
|