Sujet: Modification d'arbre de compétences Lun 27 Juin 2011 - 13:54
Bonjour à tous. Je voudrai savoir si un scripteur veux bien modifier cescript qui est uns cript d'arbre des compétences. La modification consisterait à pouvoir rajouter que au lieu d'une compétence, il y ai un changement de classe et donc d'arbre de compétences.
Merci d'avance, pmoli12.
Frozen'
Mage Lv.11
Age : 29 Inscrit le : 20/04/2011 Messages : 572
Sujet: Re: Modification d'arbre de compétences Lun 27 Juin 2011 - 14:46
Modifier un script a ce point risque d'être compliqué ... Mais pour un changement de classe tu peux te servir de ce script:
Code:
#=============================================================== #============================================================================== # ** Scene_Job #------------------------------------------------------------------------------ # This Script was written by The Black Knight # (aka tk_blackknight, aka Keith Brewer, aka rockstar1986) # # IF YOU USE THIS SCRIPT, ALL I ASK IS THAT YOU PUT MY NAME IN THE CREDITS # It's free to use as long as you do put me in the credits. # # # WHAT IT DOES: # This script basically just gives you a graphical interface to allow # the player to select which job to switch to for a character. # # This script was created upon request by Baka Artses Studios Inc. #==============================================================================
@class_status_window.dispose @scenename_window.dispose @command_window.dispose @command_window2.dispose @help_window.dispose end #-------------------------------------------------------------------------- # * Switch to Next Actor Screen #-------------------------------------------------------------------------- def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_Job.new(@actor_index, @from_menu) end #-------------------------------------------------------------------------- # * Switch to Previous Actor Screen #-------------------------------------------------------------------------- def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_Job.new(@actor_index, @from_menu) end #-------------------------------------------------------------------------- # * Update Class Selection Window >> This allows it to check for input #-------------------------------------------------------------------------- def update_class_selection if Input.trigger?(Input::B) Sound.play_cancel @command_window2.active = true @command_window.active = false elsif Input.trigger?(Input::C) Sound.play_decision case @command_window.index when 0 @actor.class_id = 1 $scene = Scene_Job.new(@actor_index, @from_menu) when 1 @actor.class_id = 2 $scene = Scene_Job.new(@actor_index, @from_menu) when 2 @actor.class_id = 3 $scene = Scene_Job.new(@actor_index, @from_menu) when 3 @actor.class_id = 4 $scene = Scene_Job.new(@actor_index, @from_menu) when 4 @actor.class_id = 5 $scene = Scene_Job.new(@actor_index, @from_menu) when 5 @actor.class_id = 6 $scene = Scene_Job.new(@actor_index, @from_menu) when 6 @actor.class_id = 7 $scene = Scene_Job.new(@actor_index, @from_menu) when 7 @actor.class_id = 8 $scene = Scene_Job.new(@actor_index, @from_menu) end end end #-------------------------------------------------------------------------- # * Update Class Selection Window >> This allows it to check for input #-------------------------------------------------------------------------- def update_option_selection if Input.trigger?(Input::B) Sound.play_cancel if @from_menu == false $scene = Scene_Map.new else $scene = Scene_Menu.new end elsif Input.trigger?(Input::C) Sound.play_decision case @command_window2.index when 0 Sound.play_decision @command_window.active = true @command_window2.active = false when 1 Sound.play_decision if @from_menu == false $scene = Scene_Map.new else $scene = Scene_Menu.new end end end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update update_menu_background if @command_window.active #If the Command Window is active, tell the help window to say this: @help_window.set_text("Change to which class?") else #Otherwise, tell it to say this: @help_window.set_text("") end if @command_window2.active update_option_selection else update_class_selection end @command_window.update @command_window2.update @class_status_window.update @help_window.update if Input.trigger?(Input::R) Sound.play_cursor next_actor elsif Input.trigger?(Input::L) Sound.play_cursor prev_actor end super end end #============================================================================== # ** Window_ClassStatus #------------------------------------------------------------------------------ # This window displays full status specs on the Job Change screen. #==============================================================================
class Window_ClassStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 112, 544, 128) @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 128, 0) draw_actor_class(@actor, 128, 24) draw_actor_face(@actor, 0, 0) draw_actor_graphic(@actor, 96, 96) draw_basic_info(216, 0) #~ draw_parameters(32, 160) draw_exp_info(364, 0) #~ draw_equipments(288, 160) 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_state(@actor, x, y + WLH * 1) draw_actor_hp(@actor, x, y + WLH * 2) draw_actor_mp(@actor, x, y + WLH * 3) end #-------------------------------------------------------------------------- # * Draw Parameters # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_parameters(x, y) #~ draw_actor_parameter(@actor, x, y + WLH * 0, 0) #~ draw_actor_parameter(@actor, x, y + WLH * 1, 1) #~ draw_actor_parameter(@actor, x, y + WLH * 2, 2) #~ draw_actor_parameter(@actor, x, y + WLH * 3, 3) #~ end #-------------------------------------------------------------------------- # * Draw Experience Information # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- def draw_exp_info(x, y) s1 = @actor.exp_s s2 = @actor.next_rest_exp_s s_next = sprintf(Vocab::ExpNext, Vocab::level) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal) self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next) self.contents.font.color = normal_color self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 0) self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 0) end #-------------------------------------------------------------------------- # * Draw Equipment # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_equipments(x, y) #~ self.contents.font.color = system_color #~ self.contents.draw_text(x, y, 120, WLH, Vocab::equip) #~ for i in 0..4 #~ draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1)) #~ end #~ end end #============================================================================== # ** Window_ClassStatus #------------------------------------------------------------------------------ # This window displays full status specs on the Job Change screen. #==============================================================================
class Window_ClassStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 112, 544, 128) @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 128, 0) draw_actor_class(@actor, 128, 24) draw_actor_face(@actor, 0, 0) draw_actor_graphic(@actor, 96, 96) draw_basic_info(216, 0) #~ draw_parameters(32, 160) draw_exp_info(364, 0) #~ draw_equipments(288, 160) 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_state(@actor, x, y + WLH * 1) draw_actor_hp(@actor, x, y + WLH * 2) draw_actor_mp(@actor, x, y + WLH * 3) end #-------------------------------------------------------------------------- # * Draw Parameters # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_parameters(x, y) #~ draw_actor_parameter(@actor, x, y + WLH * 0, 0) #~ draw_actor_parameter(@actor, x, y + WLH * 1, 1) #~ draw_actor_parameter(@actor, x, y + WLH * 2, 2) #~ draw_actor_parameter(@actor, x, y + WLH * 3, 3) #~ end #-------------------------------------------------------------------------- # * Draw Experience Information # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- def draw_exp_info(x, y) s1 = @actor.exp_s s2 = @actor.next_rest_exp_s s_next = sprintf(Vocab::ExpNext, Vocab::level) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal) self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next) self.contents.font.color = normal_color self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 0) self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 0) end #-------------------------------------------------------------------------- # * Draw Equipment # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_equipments(x, y) #~ self.contents.font.color = system_color #~ self.contents.draw_text(x, y, 120, WLH, Vocab::equip) #~ for i in 0..4 #~ draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1)) #~ end #~ end end class Window_SceneName < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # x : window X coordinate # y : window Y coordinate #-------------------------------------------------------------------------- def initialize(x, y, text) super(x, y, 160, 56) @text = text refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(4, 0, 128, WLH, @text, 1) end end
pmoli12
Poulet carnivore Lv.2
Inscrit le : 25/06/2011 Messages : 16
Sujet: Re: Modification d'arbre de compétences Lun 27 Juin 2011 - 18:48
Okay merci, je vais voir un peu ce que ce script sait faire.
Frozen'
Mage Lv.11
Age : 29 Inscrit le : 20/04/2011 Messages : 572
Sujet: Re: Modification d'arbre de compétences Lun 27 Juin 2011 - 18:56
J'avais oublié un détail, j'ai traduit les termes anglais. Crédits pour Rockstar1986.
Code:
#=============================================================== #============================================================================== # ** Scene_Job #------------------------------------------------------------------------------ # This Script was written by The Black Knight # (aka tk_blackknight, aka Keith Brewer, aka rockstar1986) # # IF YOU USE THIS SCRIPT, ALL I ASK IS THAT YOU PUT MY NAME IN THE CREDITS # It's free to use as long as you do put me in the credits. # # # WHAT IT DOES: # This script basically just gives you a graphical interface to allow # the player to select which job to switch to for a character. # # This script was created upon request by Baka Artses Studios Inc. #==============================================================================
@class_status_window.dispose @scenename_window.dispose @command_window.dispose @command_window2.dispose @help_window.dispose end #-------------------------------------------------------------------------- # * Switch to Next Actor Screen #-------------------------------------------------------------------------- def next_actor @actor_index += 1 @actor_index %= $game_party.members.size $scene = Scene_Job.new(@actor_index, @from_menu) end #-------------------------------------------------------------------------- # * Switch to Previous Actor Screen #-------------------------------------------------------------------------- def prev_actor @actor_index += $game_party.members.size - 1 @actor_index %= $game_party.members.size $scene = Scene_Job.new(@actor_index, @from_menu) end #-------------------------------------------------------------------------- # * Update Class Selection Window >> This allows it to check for input #-------------------------------------------------------------------------- def update_class_selection if Input.trigger?(Input::B) Sound.play_cancel @command_window2.active = true @command_window.active = false elsif Input.trigger?(Input::C) Sound.play_decision case @command_window.index when 0 @actor.class_id = 1 $scene = Scene_Job.new(@actor_index, @from_menu) when 1 @actor.class_id = 2 $scene = Scene_Job.new(@actor_index, @from_menu) when 2 @actor.class_id = 3 $scene = Scene_Job.new(@actor_index, @from_menu) when 3 @actor.class_id = 4 $scene = Scene_Job.new(@actor_index, @from_menu) when 4 @actor.class_id = 5 $scene = Scene_Job.new(@actor_index, @from_menu) when 5 @actor.class_id = 6 $scene = Scene_Job.new(@actor_index, @from_menu) when 6 @actor.class_id = 7 $scene = Scene_Job.new(@actor_index, @from_menu) when 7 @actor.class_id = 8 $scene = Scene_Job.new(@actor_index, @from_menu) end end end #-------------------------------------------------------------------------- # * Update Class Selection Window >> This allows it to check for input #-------------------------------------------------------------------------- def update_option_selection if Input.trigger?(Input::B) Sound.play_cancel if @from_menu == false $scene = Scene_Map.new else $scene = Scene_Menu.new end elsif Input.trigger?(Input::C) Sound.play_decision case @command_window2.index when 0 Sound.play_decision @command_window.active = true @command_window2.active = false when 1 Sound.play_decision if @from_menu == false $scene = Scene_Map.new else $scene = Scene_Menu.new end end end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update update_menu_background if @command_window.active #If the Command Window is active, tell the help window to say this: @help_window.set_text("Change to which class?") else #Otherwise, tell it to say this: @help_window.set_text("") end if @command_window2.active update_option_selection else update_class_selection end @command_window.update @command_window2.update @class_status_window.update @help_window.update if Input.trigger?(Input::R) Sound.play_cursor next_actor elsif Input.trigger?(Input::L) Sound.play_cursor prev_actor end super end end #============================================================================== # ** Window_ClassStatus #------------------------------------------------------------------------------ # This window displays full status specs on the Job Change screen. #==============================================================================
class Window_ClassStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 112, 544, 128) @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 128, 0) draw_actor_class(@actor, 128, 24) draw_actor_face(@actor, 0, 0) draw_actor_graphic(@actor, 96, 96) draw_basic_info(216, 0) #~ draw_parameters(32, 160) draw_exp_info(364, 0) #~ draw_equipments(288, 160) 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_state(@actor, x, y + WLH * 1) draw_actor_hp(@actor, x, y + WLH * 2) draw_actor_mp(@actor, x, y + WLH * 3) end #-------------------------------------------------------------------------- # * Draw Parameters # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_parameters(x, y) #~ draw_actor_parameter(@actor, x, y + WLH * 0, 0) #~ draw_actor_parameter(@actor, x, y + WLH * 1, 1) #~ draw_actor_parameter(@actor, x, y + WLH * 2, 2) #~ draw_actor_parameter(@actor, x, y + WLH * 3, 3) #~ end #-------------------------------------------------------------------------- # * Draw Experience Information # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- def draw_exp_info(x, y) s1 = @actor.exp_s s2 = @actor.next_rest_exp_s s_next = sprintf(Vocab::ExpNext, Vocab::level) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal) self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next) self.contents.font.color = normal_color self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 0) self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 0) end #-------------------------------------------------------------------------- # * Draw Equipment # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_equipments(x, y) #~ self.contents.font.color = system_color #~ self.contents.draw_text(x, y, 120, WLH, Vocab::equip) #~ for i in 0..4 #~ draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1)) #~ end #~ end end #============================================================================== # ** Window_ClassStatus #------------------------------------------------------------------------------ # This window displays full status specs on the Job Change screen. #==============================================================================
class Window_ClassStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 112, 544, 128) @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 128, 0) draw_actor_class(@actor, 128, 24) draw_actor_face(@actor, 0, 0) draw_actor_graphic(@actor, 96, 96) draw_basic_info(216, 0) #~ draw_parameters(32, 160) draw_exp_info(364, 0) #~ draw_equipments(288, 160) 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_state(@actor, x, y + WLH * 1) draw_actor_hp(@actor, x, y + WLH * 2) draw_actor_mp(@actor, x, y + WLH * 3) end #-------------------------------------------------------------------------- # * Draw Parameters # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_parameters(x, y) #~ draw_actor_parameter(@actor, x, y + WLH * 0, 0) #~ draw_actor_parameter(@actor, x, y + WLH * 1, 1) #~ draw_actor_parameter(@actor, x, y + WLH * 2, 2) #~ draw_actor_parameter(@actor, x, y + WLH * 3, 3) #~ end #-------------------------------------------------------------------------- # * Draw Experience Information # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- def draw_exp_info(x, y) s1 = @actor.exp_s s2 = @actor.next_rest_exp_s s_next = sprintf(Vocab::ExpNext, Vocab::level) self.contents.font.color = system_color self.contents.draw_text(x, y + WLH * 0, 180, WLH, Vocab::ExpTotal) self.contents.draw_text(x, y + WLH * 2, 180, WLH, s_next) self.contents.font.color = normal_color self.contents.draw_text(x, y + WLH * 1, 180, WLH, s1, 0) self.contents.draw_text(x, y + WLH * 3, 180, WLH, s2, 0) end #-------------------------------------------------------------------------- # * Draw Equipment # x : Draw spot X coordinate # y : Draw spot Y coordinate #-------------------------------------------------------------------------- #~ def draw_equipments(x, y) #~ self.contents.font.color = system_color #~ self.contents.draw_text(x, y, 120, WLH, Vocab::equip) #~ for i in 0..4 #~ draw_item_name(@actor.equips[i], x + 16, y + WLH * (i + 1)) #~ end #~ end end class Window_SceneName < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # x : window X coordinate # y : window Y coordinate #-------------------------------------------------------------------------- def initialize(x, y, text) super(x, y, 160, 56) @text = text refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.draw_text(4, 0, 128, WLH, @text, 1) end end