Knifewalker 0 Report post Posted March 18, 2011 Basiclly what I want to do is put each charactors info in a seperate window. I want to turn this: into this: All help is greatly appreciated. Share this post Link to post Share on other sites
0 Broken Messiah 20 Report post Posted March 18, 2011 During your game will there always be four party members active? Share this post Link to post Share on other sites
0 Knifewalker 0 Report post Posted March 18, 2011 No. If possible, I would like the windows with no current party member to be hidden, but I'll be happy with empty windows too Share this post Link to post Share on other sites
0 kellessdee 48 Report post Posted March 18, 2011 (edited) It wouldn't be too difficult, you would just need to make Window_MenuStatus inherit from Window_Base and only draw for 1 actor, and in Scene_Menu you change it to draw x amount of status windows (x being the number of party members. Replace Window_MenuStatus with this #============================================================================== # ** Window_MenuStatus #------------------------------------------------------------------------------ # This window displays party member status on the menu screen. #============================================================================== class Window_MenuStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize(x, y, actor) super(x, y, 480, 120) self.contents = Bitmap.new(width - 32, height - 32) @actor = actor refresh @selected = false end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear x = 64 y = 0 draw_actor_graphic(@actor, x - 40, y + 80) draw_actor_name(@actor, x, y) draw_actor_class(@actor, x + 144, y) draw_actor_level(@actor, x, y + 32) draw_actor_state(@actor, x + 90, y + 32) draw_actor_exp(@actor, x, y + 64) draw_actor_hp(@actor, x + 236, y + 32) draw_actor_sp(@actor, x + 236, y + 64) end #-------------------------------------------------------------------------- # * Set Selected # selected : new selected (true = selected, false = unselected) #-------------------------------------------------------------------------- def selected=(selected) @selected = selected update_cursor_rect end #-------------------------------------------------------------------------- # * Cursor Rectangle Update #-------------------------------------------------------------------------- def update_cursor_rect if @selected self.cursor_rect.set(-8, -8, self.width - 16, self.height - 16) else self.cursor_rect.empty end end end And replace Scene_Menu with this #============================================================================== # ** Scene_Menu #------------------------------------------------------------------------------ # This class performs menu screen processing. #============================================================================== class Scene_Menu #-------------------------------------------------------------------------- # * Object Initialization # menu_index : command cursor's initial position #-------------------------------------------------------------------------- def initialize(menu_index = 0) @menu_index = menu_index end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make command window s1 = $data_system.words.item s2 = $data_system.words.skill s3 = $data_system.words.equip s4 = "Status" s5 = "Save" s6 = "End Game" @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6]) @command_window.index = @menu_index # If number of party members is 0 if $game_party.actors.size == 0 # Disable items, skills, equipment, and status @command_window.disable_item(0) @command_window.disable_item(1) @command_window.disable_item(2) @command_window.disable_item(3) end # If save is forbidden if $game_system.save_disabled # Disable save @command_window.disable_item(4) end # Make play time window @playtime_window = Window_PlayTime.new @playtime_window.x = 0 @playtime_window.y = 224 # Make steps window @steps_window = Window_Steps.new @steps_window.x = 0 @steps_window.y = 320 # Make gold window @gold_window = Window_Gold.new @gold_window.x = 0 @gold_window.y = 416 # Make status window @status_window = [] @status_max = $game_party.actors.size for i in 0...@status_max x = 160 y = 120 * i @status_window.push(Window_MenuStatus.new(x, y, $game_party.actors[i])) end @status_index = 0 # Execute transition Graphics.transition # Main loop loop do # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end end # Prepare for transition Graphics.freeze # Dispose of windows @command_window.dispose @playtime_window.dispose @steps_window.dispose @gold_window.dispose for i in 0...@status_max @status_window[i].dispose end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @command_window.update @playtime_window.update @steps_window.update @gold_window.update for i in 0...@status_max @status_window[i].update end # If command window is active: call update_command if @command_window.active update_command return # If status window is active: call update_status else update_status return end end #-------------------------------------------------------------------------- # * Frame Update (when command window is active) #-------------------------------------------------------------------------- def update_command # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to map screen $scene = Scene_Map.new return end # If C button was pressed if Input.trigger?(Input::C) # If command other than save or end game, and party members = 0 if $game_party.actors.size == 0 and @command_window.index < 4 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Branch by command window cursor position case @command_window.index when 0 # item # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to item screen $scene = Scene_Item.new when 1 # skill # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window[@status_index].selected = true when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window[@status_index].selected = true when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window[@status_index].selected = true when 4 # save # If saving is forbidden if $game_system.save_disabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to save screen $scene = Scene_Save.new when 5 # end game # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to end game screen $scene = Scene_End.new end return end end #-------------------------------------------------------------------------- # * Frame Update (when status window is active) #-------------------------------------------------------------------------- def update_status # If UP button was pressed if Input.repeat?(Input::UP) if Input.trigger?(Input::UP) || @status_index > 0 # Play cursor SE $game_system.se_play($data_system.cursor_se) # Change index @status_window[@status_index].selected = false @status_index = (@status_index + 3) % 4 @status_window[@status_index].selected = true end return end # If DOWN button was pressed if Input.repeat?(Input::DOWN) if Input.trigger?(Input::DOWN) || @status_index < @status_max - 1 # Play cursor SE $game_system.se_play($data_system.cursor_se) # Change index @status_window[@status_index].selected = false @status_index = (@status_index + 1) % 4 @status_window[@status_index].selected = true end return end # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Make command window active @command_window.active = true @status_window[@status_index].selected = false return end # If C button was pressed if Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 1 # skill # If this actor's action limit is 2 or more if $game_party.actors[@status_index].restriction >= 2 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to skill screen $scene = Scene_Skill.new(@status_index) when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to equipment screen $scene = Scene_Equip.new(@status_index) when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen $scene = Scene_Status.new(@status_index) end return end end end Is that what you were looking for? It's exactly how rmxp handles the SaveFile Selection, it draws 4 separate non-selectable windows and defines new methods to handle selection. Edited March 18, 2011 by kellessdee Share this post Link to post Share on other sites
0 brewmeister 3 Report post Posted March 18, 2011 Nice. I would have totally cheated & just made the status window transparent & drawn 4 dummy windows beneath it... 2 Errors: Line 63: Graphics.transition(20, "Graphics/Transitions/trans_grass") Should probably be just... Graphics.transition and line 217: if $game_party.actors[@status_window.index].restriction >= 2 should be... if $game_party.actors[@status_index].restriction >= 2 Be Well Share this post Link to post Share on other sites
0 kellessdee 48 Report post Posted March 18, 2011 LMAO Sorrrryy you are right Line 63: Graphics.transition(20, "Graphics/Transitions/trans_grass") should definitely be Graphics.transition I used the project that i was messing around with menu transitioning lol and the other line you mentioned you are correct as well! The second mistake was a total goof I forgot to modify that part as well I edited my post to fix those mistakes. Thanks brewmeister, good eye :P And 4 dummy windows would be really easy and work just as well (then you wouldn't need to modify Window_MenuStatus except for making it transparent) but I try to avoid making too many dummy windows, it can get messy. Share this post Link to post Share on other sites
0 Knifewalker 0 Report post Posted March 18, 2011 Thanks alot, that's exactly what I'm looking for. Share this post Link to post Share on other sites
Basiclly what I want to do is put each charactors info in a seperate window.
I want to turn this:
into this:
All help is greatly appreciated.
Share this post
Link to post
Share on other sites