QuesTMajoR 4 Report post Posted April 20, 2012 Can someone Help me? I can't see the Actor's class at the Menu, The HP,MP, and the Name is only there... BTW: Im using Juan's Custom Menu Script.. Thanks :D Share this post Link to post Share on other sites
0 Bigace360 38 Report post Posted April 20, 2012 Can you post a link to where that is please, before I can help. It's easier on the script so we don't have to go around search for said script and get right to business. Share this post Link to post Share on other sites
0 QuesTMajoR 4 Report post Posted April 20, 2012 Here's The Juan's CMS but Ive already Modified a Lot, but not the Actor's Class. #============================================================================== # ** Juan's Custom Menu #------------------------------------------------------------------------------ # Juan # Version 5.7 # Date 8/10/07 (month, date, year) # Date Last Updated 5/14/10 (month, date, year) #============================================================================== # # #Compatibility: #The load menu should work with any script now. Compatible with the SDK 2.3 #This script should be 100% compatibly with everything except other cmses # # #Features: # # -> menu commands "Item", "Skill", "Equip", "Status", "Options', # "Save", "Load", "Exit" # -> Equip submenu shows complete information about Status resistance/attack, # Element resistance/attack and complete character stat changing. # -> Status screen with overall information about character status # -> Possibility to use a different equip system # -> Icons # -> Animated # #Version History # #Version 1.4 #-> Added option to show actor class #-> Rewrote the status screen so it looks better/shows battles in status screen #-> Fixed load bug #-> Compatibly for SDK 2.3 #Version 1.7 #-> Added faceset support #-> Added Elemental Wheel by Diego #-> Added option to show battle picture in the status screen. #Version 1.8 #-> Fixed alot of bugs #Version 1.4 #-> Fixed Location text bug #-> Fixed the location window size. #Version 2.1 #-> Removed the Location Text size #-> Added Menu Text #-> Added Menu Size #Version 2.3 # -> Updated face set support and now it can display faces in the menu and in the status window. # -> Enhances the elemental wheel with Tsuko edits. #Version 2.5 # -> Moved a few options to the game system class so that you can change them during #game play. # -> Fixed a few bugs with the skill status bug. #Version 2.7 # -> Updated the status window. # -> Fixed face set postion. #Version 3.1 # -> Fixed a typo. # -> Removed gradient bar script. # -> Load command is also disabled unless you have a save file. # -> Improved coding. #Version 3.3 # -> Fixed a bug with the locatin script # -> Improved coding. #Version 3.6 # -> Fixed a bug that occured when using more than three party members. # -> Fixed a bug that the status screen menu. # -> Improve coding. # Version 3.9 # -> Added icons to the menu # -> Added options to use the map background # -> Animated the menu # Versiom 4.1 # -> Added option to animate the menu # -> Added an exit animation # Version 4.5 # -> Added chapter system # -> Added option for real time # -> Improved animated menu option # -> Improved overall coding # Version 4.8 # -> Improved coding # -> Fixed a bug # Version 5.0 # -> Fixed a minor equipment bug # -> Added my options menu # Version 5.1 # -> Improved coding # Version 5.3 # -> Added Soul rage support # -> Supports Unlimited Party Size # -> Improved Coding # Version 5.7 # -> Added Easy Overdrive Bar support # -> Fixed the equip bar # -> New Option Menu Layout # -> Added RMOS Support # # #Instructions #Copy your character faces into a the folder called "Characters". The #facesets must have the same names as the character spritesets with a _face #added at the end and picture size should be 60x60. Make a folder #called CMS in the icons folder. Make a new folder called CMS and put whatever #icon you want in there. Also name the icons menu0 - menu 8. To lock the battle # bgm turn on the battle_bgm_switch or only leave one battle bgm configured. # You can also restore your battle bgm settings after a boss fight or something # similar use $game_system.reset_battle_bgm. # # # #FAQ (Frequently Asked Questions): #None so far # # #Credits #Blizzard for helping me disable load when you don't have a save file and #for helping me animate the menu #Nortos for helping make the menu lag less when animated. #Wcw for helping make icons in the menu. #Dingo for the elemental wheel. #Legacyblade for some help #Tsuko for telling the bugs in the location script. And also for an improved #elemental wheel script(edited from the orginal script.) # # #Author's Notes # This cms will not work with existing save files before this cms #Any bugs #Report them here: #http://forum.chaos-project.com/index.php?topic=11.0 #or #Email me #juanpena119@yahoo.com #Thats it #enjoy #============================================================================== # module Juan_Cfg #============================================================================== module Juan_Cfg #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # START Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # Basic menu configuration # Fonts Fonts = ['Arial', 'Bookman Old Style', 'Comic Sans MS', 'Mistral', 'Papyrus', 'Tahoma', 'Times New Roman'] # true/false if you want to use facesets Face_Sets = false # Display the time instead of playtime true/false Real_Time = false # Show menu icons next to the command window Menu_Icons = false # Set the menu transparenty value between 0 - 255 Menu_Opacity = 200 # Set the menu z transparenty value between 0 - 255 Menu_Z_Opacity = 200 # Show the map background in the menu Map_Background = true # Save file options # The name of the save file usually Save or Saves/Save Save_Name = 'Save' # The number of save files you have note values start at 0 not 1 usually 3 Save_File_Number = 3 # Save file extention think rxdata, or dream4 usually Save_Extention = 'rxdata' #Option Menu Stuff #Windowskins names Windowskins = ['Red', 'Blue', 'Green', 'Black'] #Battle bgm name Battle_Bgms = [ # ['BGM_NAME', VOLUME, PITCH, 'DISPLAY_NAME'] ['001-Battle01', 100, 100, 'BGM 1'], ['002-Battle02', 100, 100, 'BGM 2'], ['003-Battle03', 100, 100, 'BGM 3'], ['004-Battle04', 100, 100, 'BGM 4']] #battle bgm variable Bgm_Variable = 50 # battle bgm lock variable Bgm_Lock = 50 #number of elements applied in the element wheel. Element_Number = 8 #elements that appear on the element wheel in Elements = [1, 2, 3, 4, 5, 6, 7, 8] # set this to true if you want to use a different equip system Custom_Equip_Scene = false # set this to true if you want to use a different options system Custom_Options_Scene = false #true if you want real time instead of a play time window Real_Time = false # Elemental Wheel Colors Graph_Scaline_Color = Color.new(255, 255, 255, 128) Graph_Scaline_Color_Shadow = Color.new(0, 0, 0, 192) Graph_Line_Color_200 = Color.new(255, 64, 64,255) Graph_Line_Color_150 = Color.new(255,128, 64,255) Graph_Line_Color_100 = Color.new(255, 255, 64,255) Graph_Line_Color_50 = Color.new(128, 255, 64, 255) Graph_Line_Color_0 = Color.new(64 ,200 ,128 ,255) Graph_Line_Color_Abs = Color.new(64, 64,255,255) end #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: # END Configuration #:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: #============================================================================== # Game_System #============================================================================== class Game_System attr_accessor :bgm_volume attr_accessor :sfx_volume alias init_juan_cms_later initialize def initialize init_juan_cms_later @bgm_volume = 100 @sfx_volume = 100 end def reset_battle_bgm bgm = Juan_Cfg::Battle_Bgms[$game_variables[Juan_Cfg::Bgm_Variable]] $game_system.battle_bgm = RPG::AudioFile.new(bgm[0]) return # if an event calls this method the "return" is HIGHLY neccesary! end if $dream_music def bgm_play(bgm) @playing_bgm = bgm if bgm != nil && bgm.name != '' vol = correction(@bgm_volume) dream_ed = bgm.clone dream_ed.volume = dream_ed.volume * vol / 100 DREAM.play_encrypted_audio('Audio/BGM/', dream_ed, 0) else Audio.bgm_stop end Graphics.frame_reset end def bgs_play(bgs) @playing_bgs = bgs if bgs != nil && bgs.name != '' vol = correction(@sfx_volume) dream_ed = bgs.clone dream_ed.volume = dream_ed.volume * vol / 100 DREAM.play_encrypted_audio('Audio/BGS/', dream_ed, 1) else Audio.bgs_stop end Graphics.frame_reset end def me_play(me) if me != nil && me.name != '' vol = correction(@bgm_volume) dream_ed = me.clone dream_ed.volume = dream_ed.volume * vol / 100 DREAM.play_encrypted_audio('Audio/ME/', dream_ed, 2) else Audio.me_stop end Graphics.frame_reset end def se_play(se) if se != nil && se.name != '' vol = correction(@sfx_volume) dream_ed = se.clone dream_ed.volume = dream_ed.volume * vol / 100 DREAM.play_encrypted_audio('Audio/SE/', dream_ed, 3) end end else def bgm_play(bgm) @playing_bgm = bgm if bgm != nil && bgm.name != '' vol = correction(@bgm_volume) Audio.bgm_play('Audio/BGM/' + bgm.name , bgm.volume * vol / 100, bgm.pitch) else Audio.bgm_stop end Graphics.frame_reset end def bgs_play(bgs) @playing_bgs = bgs if bgs != nil && bgs.name != '' vol = correction(@sfx_volume) Audio.bgs_play('Audio/BGS/' + bgs.name, bgs.volume * vol / 100, bgs.pitch) else Audio.bgs_stop end Graphics.frame_reset end def me_play(me) if me != nil && me.name != '' vol = correction(@bgm_volume) Audio.me_play('Audio/ME/' + me.name, me.volume * vol / 100, me.pitch) else Audio.me_stop end Graphics.frame_reset end def se_play(se) if se != nil && se.name != '' vol = correction(@sfx_volume) Audio.se_play('Audio/SE/' + se.name, se.volume * vol / 100, se.pitch) end end end def correction(volume) case volume when 100 then return 100 when 95 then return 97 when 90 then return 95 when 85 then return 92 when 80 then return 90 when 75 then return 87 when 70 then return 85 when 65 then return 82 when 60 then return 80 when 55 then return 77 when 50 then return 75 when 45 then return 72 when 40 then return 70 when 35 then return 65 when 30 then return 60 when 25 then return 55 when 20 then return 50 when 15 then return 40 when 10 then return 35 when 5 then return 25 end return 0 end end #============================================================================== # ** Window_New_MenuStatus #------------------------------------------------------------------------------ # This window displays party member status on the menu screen. #============================================================================== class Window_New_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 480, 430) @item_max = $game_party.actors.size if @item_max > 4 height = @item_max * 118 else height = 430 end self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear @item_max = $game_party.actors.size $game_party.actors.each_index {|i| x = 54 y = i * 104 actor = $game_party.actors if Juan_Cfg::Face_Sets draw_actor_face(actor, x - 60, y + 20) else draw_actor_graphic(actor, x - 40, y + 50) end draw_actor_name(actor, x, y) draw_actor_level(actor, x + 144, y) draw_actor_state(actor, x + 210, y) draw_actor_hp(actor, x, y + 22) draw_actor_sp(actor, x + 160, y + 22) if $crls if BlizzCFG::SRS_ACTIVE && BlizzCFG::DRAW_BAR draw_actor_sr_with_bar(actor, x, y + 50) draw_actor_exp(actor, x + 160, y + 50) else draw_actor_sr_with_bar(actor, x, y + 50) draw_actor_exp(actor, x + 160, y + 50) end elsif $easy_overdrive if BlizzCFG::DRAW_OVERDRIVE_BAR draw_actor_overdrive_with_bar(actor, x, y + 50) else draw_actor_overdrive(actor, x, y + 50) end draw_actor_exp(actor, x + 160, y + 50) else draw_actor_exp(actor, x , y + 50) end } end #-------------------------------------------------------------------------- # * Cursor Rectangle Update #-------------------------------------------------------------------------- def update_cursor_rect if @index < 0 self.cursor_rect.empty return end row = @index / @column_max if row < self.top_row self.top_row = row elsif row > top_row + (page_row_max - 1) self.top_row = row - (page_row_max - 1) end y = (@index / @column_max) * 100 - self.oy self.cursor_rect.set(0, y, self.width - 32, 96) end #-------------------------------------------------------------------------- # * Top Row #-------------------------------------------------------------------------- def top_row return self.oy / 100 end #-------------------------------------------------------------------------- # * Set Top Row # row : new row #-------------------------------------------------------------------------- def top_row=(row) self.oy = (row % row_max) * 100 end #-------------------------------------------------------------------------- # * Page Row Max #-------------------------------------------------------------------------- def page_row_max return (self.height / 100) end end #============================================================================== # ** Window_New_Command #------------------------------------------------------------------------------ # This window deals with general command choices. #============================================================================== class Window_New_Command < Window_Command #-------------------------------------------------------------------------- # * Draw Item # index : item number # color : text color #-------------------------------------------------------------------------- if Juan_Cfg::Menu_Icons def draw_item(index, color) self.contents.font.color = color rect = Rect.new(4, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.blt(4, 4 + index*32, RPG::Cache.icon("CMS/menu#{index}"), Rect.new(0, 0, 24, 24)) self.contents.draw_text(32, index*32, 148, 32, @commands[index]) end end end #============================================================================== # Scene_Title #============================================================================== class Scene_Title alias main_juan_cms_later main def main $map_infos = load_data('Data/MapInfos.rxdata') $map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name} main_juan_cms_later end end #============================================================================== # Bitmap #============================================================================== class Bitmap #-------------------------------------------------------------------------- # * Draw Line #-------------------------------------------------------------------------- def draw_elemental_line(start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color) distance = (start_x - end_x).abs + (start_y - end_y).abs if end_color == start_color (1..distance).each {|i| x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i if width == 1 self.set_pixel(x, y, start_color) else self.fill_rect(x, y, width, width, start_color) end } else (1..distance).each {|i| x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i r = start_color.red * (distance-i)/distance + end_color.red * i/distance g = start_color.green * (distance-i)/distance + end_color.green * i/distance b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance if width == 1 self.set_pixel(x, y, Color.new(r, g, b, a)) else self.fill_rect(x, y, width, width, Color.new(r, g, b, a)) end } end end end # Elemental Star Settings #-------------------------------------------------------------------------- # Element Star made by Tsu, based on Prefix's Element Wheel #-------------------------------------------------------------------------- #---------------------------------------------------------------------------- # Draws a triangle that passes (angle-wise) from start to end color #---------------------------------------------------------------------------- def draw_triangle(cx, cy, start_x, start_y, end_x, end_y, start_color, width = 1, end_color = start_color) distance = (start_x - end_x).abs + (start_y - end_y).abs (1..distance).each {|i| x = (start_x + 1.0 * (end_x - start_x) * i / distance).to_i y = (start_y + 1.0 * (end_y - start_y) * i / distance).to_i r = start_color.red * (distance-i)/distance + end_color.red * i/distance g = start_color.green * (distance-i)/distance + end_color.green * i/distance b = start_color.blue * (distance-i)/distance + end_color.blue * i/distance a = start_color.alpha * (distance-i)/distance + end_color.alpha * i/distance draw_elemental_line(cx, cy, x, y, Color.new(r, g, b, a), width, Color.new(r, g, b, a)) } end #============================================================================== # Window_Base #============================================================================== class Window_Base < Window alias draw_actor_parameter_juan_cms_later draw_actor_parameter def draw_actor_parameter(actor, x, y, type) if type == 7 self.contents.font.color = system_color self.contents.draw_text(x, y, 120, 32, 'Evasion') self.contents.font.color = normal_color self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2) else draw_actor_parameter_juan_cms_later(actor, x, y, type) end end #-------------------------------------------------------------------------- # *Draw Elemental Wheel Settings # Elemental Star based on Dingo's Elemental Wheel #-------------------------------------------------------------------------- def draw_actor_element_radar_graph(actor, x, y, radius = 53) cx = x + radius + 24 + 48 cy = y + radius + 24 + 32 (0..Juan_Cfg::Element_Number).each {|loop_i| if loop_i != 0 @pre_x = @now_x @pre_y = @now_y @pre_ex = @now_ex @pre_ey = @now_ey @color1 = @color2 end if loop_i == Juan_Cfg::Element_Number eo = Juan_Cfg::Elements[0] else eo = Juan_Cfg::Elements[loop_i] end er = actor.element_rate(eo) estr = $data_system.elements[eo] @color2 = er<0 ? Juan_Cfg::Graph_Line_Color_Abs: er==0 ? Juan_Cfg::Graph_Line_Color_0 : er<=50 ? Juan_Cfg::Graph_Line_Color_50 : er<=100 ? Juan_Cfg::Graph_Line_Color_100 : er<=150 ? Juan_Cfg::Graph_Line_Color_150 : Juan_Cfg::Graph_Line_Color_200 ers = er<0 ? '[' + (-er).to_s + '%]' : er.to_s + '%' er = er < 0 ? 100 : 90 - (er*0.3) th = Math::PI * (0.5 - 2.0 * loop_i / Juan_Cfg::Element_Number) @now_x = cx + (radius * Math.cos(th)).floor @now_y = cy - (radius * Math.sin(th)).floor @now_wx = cx - 6 + ((radius + 24 * 3 / 2) * Math.cos(th)).floor - 24 @now_wy = cy - ((radius + 24 * 1 / 2) * Math.sin(th)).floor - 24/2 @now_vx = cx + ((radius + 24 * 8 / 2) * Math.cos(th)).floor - 24 @now_vy = cy - ((radius + 24 * 3 / 2) * Math.sin(th)).floor - 24/2 @now_ex = cx + (er*radius/100 * Math.cos(th)).floor @now_ey = cy - (er*radius/100 * Math.sin(th)).floor if loop_i == 0 @pre_x = @now_x @pre_y = @now_y @pre_ex = @now_ex @pre_ey = @now_ey @color1 = @color2 else end next if loop_i == 0 if loop_i != Juan_Cfg::Element_Number self.contents.draw_elemental_line(cx+1,cy+1, @now_x+1,@now_y+1, Juan_Cfg::Graph_Scaline_Color_Shadow) end self.contents.draw_elemental_line(@pre_x+1,@pre_y+1, @now_x+1,@now_y+1, Juan_Cfg::Graph_Scaline_Color_Shadow) self.contents.draw_elemental_line(cx,cy, @now_x,@now_y, Juan_Cfg::Graph_Scaline_Color) self.contents.draw_elemental_line(@pre_x,@pre_y, @now_x,@now_y, Juan_Cfg::Graph_Scaline_Color) self.contents.draw_elemental_line(@pre_ex+1,@pre_ey+1, @now_ex+1,@now_ey+1, Juan_Cfg::Graph_Scaline_Color_Shadow) self.contents.draw_triangle(cx, cy, @pre_ex,@pre_ey, @now_ex,@now_ey, @color1, 1, @color2) self.contents.font.color = system_color self.contents.draw_text(@now_wx,@now_wy, 24*3.1, 24, estr, 1) self.contents.font.color = Color.new(255,255,255,128) self.contents.draw_text(@now_vx,@now_vy, 24*2, 24, ers, 2) self.contents.font.color = normal_color } end #-------------------------------------------------------------------------- # * Get Gold Text Color #-------------------------------------------------------------------------- def gold_color return Color.new(255, 255, 0, 255) end #-------------------------------------------------------------------------- # * Get Up Text Color #-------------------------------------------------------------------------- def up_color return Color.new(0, 255, 0 ) end #-------------------------------------------------------------------------- # * Get Down Text Color #-------------------------------------------------------------------------- def down_color return Color.new(255, 0, 0) end #---------------------------------------------------------------------------- # * Draw Actor Battlers #----------------------------------------------------------------------------- def draw_actor_battler(actor, x, y) if actor != nil && actor.battler_name != '' bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue) cw = bitmap.width ch = bitmap.height src_rect = Rect.new(0, 0, cw,ch) self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect) end end def draw_actor_face(actor, x, y) if actor != nil && actor.character_name != '' if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE hue = 0 else hue = (FACE_HUE ? actor.character_hue : 0) end bitmap = RPG::Cache.character("#{actor.character_name}_face", hue) src_rect = Rect.new(0, 0, bitmap.width, bitmap.height) self.contents.blt(x, y, bitmap, src_rect) end end end #============================================================================== # Game_Map #============================================================================== class Game_Map def name return $map_infos[@map_id] end end #============================================================================== # ** 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 = 'Change Party' s6 = 'Quests' s7 = 'Load' s8 = 'Save' s9 = 'Exit' @command_window = Window_New_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8, s9]) @command_window.index = @menu_index @command_window.opacity = Juan_Cfg::Menu_Opacity @command_window.height = 224 @command_window.x = 0 @command_window.y = -1000 @continue = (0..Juan_Cfg::Save_File_Number).any? {|i| @continue_enabled = (0...CPSL::Save_number).any? {|i|FileTest.exist?(CPSL.make_savename(i))} FileTest.exist?("#{Juan_Cfg::Save_Name}#{i + 1}.#{Juan_Cfg::Save_Extention}")} # If save is forbidden disable save @command_window.disable_item(5) if $game_system.save_disabled # If there are no save files disable load. @command_window.disable_item(6) unless @continue # If number of party members is 0 disable items, skills, equipment, and status (0..3).each {|i| @command_window.disable_item(i)} if $game_party.actors.size == 0 # Make info window @info_window = Window_Info.new @info_window.x = -1000 @info_window.y = 224 # Make location window @window_location = New_Window_Location.new @window_location.x = -1000 @window_location.y = 430 # Make status window @status_window = Window_New_MenuStatus.new @status_window.x = 160 @status_window.y = -1000 # Make spriteset @spriteset = Spriteset_Map.new if Juan_Cfg::Map_Background # Execute transition Graphics.transition # Main loop loop { # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed break if $scene != self } # Prepare for transition Graphics.freeze # Dispose of windows @command_window.dispose @info_window.dispose @window_location.dispose @status_window.dispose @spriteset.dispose if Juan_Cfg::Map_Background end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @command_window.update @info_window.update @window_location.update @status_window.update @spriteset.update if Juan_Cfg::Map_Background # Animate windows animate # If command window is active: call update_command if @command_window.active update_command # If status window is active: call update_status elsif @status_window.active update_status end end #-------------------------------------------------------------------------- # * Animating windows #-------------------------------------------------------------------------- def animate if @intro == nil @command_window.y += 100 if @command_window.y < 0 @info_window.x += 100 if @info_window.x < 0 @window_location.x += 100 if @window_location.x < 0 @status_window.y += 100 if @status_window.y < 0 # Animate initial windows upon exiting menu elsif @intro == true @command_window.y -= 100 if @command_window.y > -1000 @info_window.x -= 100 if @info_window.x > -1000 @window_location.x -= 100 if @window_location.x > -1000 @status_window.y -= 100 if @status_window.y > -1000 # Switch to map screen $scene = Scene_Map.new if @status_window.y == -1000 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) # Use exit animation @intro = true # If C button was pressed elsif Input.trigger?(Input::C) # If command other than save or end game, and party members = 0 if $game_party.actors.size == 0 && @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 = New_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.active = true @status_window.index = 0 when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Make status window active @command_window.active = false @status_window.active = true @status_window.index = 0 when 4 # options # Play decision SE $game_system.se_play($data_system.decision_se) $scene = Scene_Party_Changer.new when 5 # quests $game_system.se_play($data_system.decision_se) # Switch to item screen $scene = Scene_Journal.new when 6 # save if $game_system.save_disabled # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end unless @continue # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If saving is forbidden # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to save screen $scene = New_Scene_Load.new when 7 # load # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to load game screen $scene = Scene_New_Save.new when 8 # end game # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to end game screen $scene = New_Scene_End.new end end end #-------------------------------------------------------------------------- # * Frame Update (when status window is active) #-------------------------------------------------------------------------- def update_status # 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.active = false @status_window.index = -1 # If C button was pressed elsif 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_window.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 = New_Scene_Skill.new(@status_window.index) when 2 # equipment # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to equipment screen if Juan_Cfg::Custom_Equip_Scene $scene = Scene_Equip.new(@status_window.index) else $scene = Scene_New_Equip.new(@status_window.index) end when 3 # status # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to status screen $scene = New_Scene_Status.new(@status_window.index) end end end end #============================================================================== # New_Scene_End #============================================================================== class New_Scene_End #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make command window s1 = ' Cancel' s2 = ' Exit to Menu' s3 = ' Exit to Desktop' @command_window = Window_Command.new(180, [s1, s2, s3]) @command_window.x = 320 - @command_window.width / 2 @command_window.y = 240 - @command_window.height / 2 @command_window.opacity = Juan_Cfg::Menu_Opacity @spriteset = Spriteset_Map.new # Execute transition Graphics.transition # Main loop loop { # Update game screen Graphics.update # Update input information Input.update # Frame Update update # Abort loop if screen is changed break if $scene != self } # Prepare for transition Graphics.freeze # Dispose of window @command_window.dispose @spriteset.dispose # If switching to title screen if $scene.is_a?(Scene_Title) # Fade out screen Graphics.transition Graphics.freeze end end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update command window @command_window.update @spriteset.update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Menu.new(7) # If C button was pressed elsif Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.index when 0 # quit command_cancel when 1 # to title command_to_title when 2 # shutdown command_shutdown end end end #-------------------------------------------------------------------------- # * Process When Choosing [To Title] Command #-------------------------------------------------------------------------- def command_to_title # Play decision SE $game_system.se_play($data_system.decision_se) # Fade out BGM, BGS, and ME Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) # Switch to title screen $scene = Scene_Title.new end #-------------------------------------------------------------------------- # * Process When Choosing [shutdown] Command #-------------------------------------------------------------------------- def command_shutdown # Play decision SE $game_system.se_play($data_system.decision_se) # Fade out BGM, BGS, and ME Audio.bgm_fade(800) Audio.bgs_fade(800) Audio.me_fade(800) # Shutdown $scene = nil end #-------------------------------------------------------------------------- # * Process When Choosing [Cancel] Command #-------------------------------------------------------------------------- def command_cancel # Play decision SE $game_system.se_play($data_system.decision_se) # Switch to menu screen $scene = Scene_Menu.new(7) end end #============================================================================== # New_Scene_Item #============================================================================== class New_Scene_Item #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Make help window, item window @help_window = Window_Help.new @item_window = Window_Item.new # Associate help window @item_window.help_window = @help_window # Make target window (set to invisible / inactive) @target_window = Window_Target.new @target_window.visible = false @target_window.active = false @help_window.opacity = Juan_Cfg::Menu_Opacity @item_window.opacity = Juan_Cfg::Menu_Opacity @target_window.opacity = Juan_Cfg::Menu_Opacity @spriteset = Spriteset_Map.new # Execute transition Graphics.transition # Main loop loop { # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed break if $scene != self } # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @item_window.dispose @target_window.dispose @spriteset.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @help_window.update @item_window.update @target_window.update @spriteset.update # If item window is active: call update_item if @item_window.active update_item # If target window is active: call update_target elsif @target_window.active update_target end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Menu.new(0) # If C button was pressed elsif Input.trigger?(Input::C) # Get currently selected data on the item window @item = @item_window.item # If not a use item and if it can't be used unless @item.is_a?(RPG::Item) && $game_party.item_can_use?(@item.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If effect scope is an ally if @item.scope >= 3 # Activate target window @item_window.active = false @target_window.x = (@item_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) @target_window.index = [4, 6].include?(@item.scope) ? -1 : 0 # If effect scope is other than an ally and command event ID is valid elsif @item.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @item.common_event_id # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Draw item window item @item_window.draw_item(@item_window.index) end # Switch to map screen $scene = Scene_Map.new end end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # If unable to use because items ran out unless $game_party.item_can_use?(@item.id) # Remake item window contents @item_window.refresh end # Erase target window @item_window.active = true @target_window.visible = false @target_window.active = false # If C button was pressed elsif Input.trigger?(Input::C) # If items are used up if $game_party.item_number(@item.id) == 0 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply item effects to entire party used = false $game_party.actors.each {|actor| used |= actor.item_effect(@item)} # If single target elsif @target_window.index >= 0 # Apply item use effects to target actor target = $game_party.actors[@target_window.index] used = target.item_effect(@item) end # If an item was used if used # Play item use SE $game_system.se_play(@item.menu_se) # If consumable if @item.consumable # Decrease used items by 1 $game_party.lose_item(@item.id, 1) # Redraw item window item @item_window.draw_item(@item_window.index) end # Remake target window contents @target_window.refresh # If all party members are dead if $game_party.all_dead? # Switch to game over screen $scene = Scene_Gameover.new # If common event ID is valid elsif @item.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @item.common_event_id # Switch to map screen $scene = Scene_Map.new end # If item wasn't used else # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end end end end #============================================================================== # New_Scene_Skill #============================================================================== class New_Scene_Skill #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index #-------------------------------------------------------------------------- def initialize(actor_index = 0, equip_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Get actor @actor = $game_party.actors[@actor_index] # Make help window, status window, and skill window @help_window = Window_Help.new @status_window = New_Window_SkillStatus.new(@actor) @skill_window = Window_Skill.new(@actor) # Associate help window @skill_window.help_window = @help_window # Make target window (set to invisible / inactive) @target_window = Window_Target.new @target_window.visible = false @target_window.active = false @help_window.opacity = Juan_Cfg::Menu_Opacity @status_window.opacity = Juan_Cfg::Menu_Opacity @skill_window.opacity = Juan_Cfg::Menu_Opacity @target_window.opacity = Juan_Cfg::Menu_Opacity @spriteset = Spriteset_Map.new # Execute transition Graphics.transition # Main loop loop { # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed break if $scene != self } # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @status_window.dispose @skill_window.dispose @target_window.dispose @spriteset.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @help_window.update @status_window.update @skill_window.update @target_window.update @spriteset.update # If skill window is active: call update_skill if @skill_window.active update_skill # If skill target is active: call update_target elsif @target_window.active update_target end end #-------------------------------------------------------------------------- # * Frame Update (if skill window is active) #-------------------------------------------------------------------------- def update_skill # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Menu.new(1) # If C button was pressed elsif Input.trigger?(Input::C) # Get currently selected data on the skill window @skill = @skill_window.skill # If unable to use if @skill == nil || !@actor.skill_can_use?(@skill.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # If effect scope is ally if @skill.scope >= 3 # Activate target window @skill_window.active = false @target_window.x = (@skill_window.index + 1) % 2 * 304 @target_window.visible = true @target_window.active = true # Set cursor position to effect scope (single / all) if [4, 6].include?(@skill.scope) @target_window.index = -1 elsif @skill.scope == 7 @target_window.index = @actor_index - 10 else @target_window.index = 0 end # If effect scope is other than ally and common event ID is valid elsif @skill.common_event_id > 0 # Common event call reservation $game_temp.common_event_id = @skill.common_event_id # Play use skill SE $game_system.se_play(@skill.menu_se) # Use up SP @actor.sp -= @skill.sp_cost # Remake each window content @status_window.refresh @skill_window.refresh @target_window.refresh # Switch to map screen $scene = Scene_Map.new end # If R pr Right button was pressed elsif Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To next actor @actor_index += 1 @actor_index %= $game_party.actors.size # Switch to different skill screen $scene = New_Scene_Skill.new(@actor_index) # If L button or Left was pressed elsif Input.trigger?(Input::L) || Input.trigger?(Input::LEFT) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To previous actor @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Switch to different skill screen $scene = New_Scene_Skill.new(@actor_index) end end #-------------------------------------------------------------------------- # * Frame Update (when target window is active) #-------------------------------------------------------------------------- def update_target # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Erase target window @skill_window.active = true @target_window.visible = false @target_window.active = false # If C button was pressed elsif Input.trigger?(Input::C) # If unable to use because SP ran out unless @actor.skill_can_use?(@skill.id) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # If target is all if @target_window.index == -1 # Apply skill use effects to entire party used = false $game_party.actors.each {|actor| used |= actor.skill_effect(@actor, @skill) } end # If target is user if @target_window.index <= -2 # Apply skill use effects to target actor target = $game_party.actors[@target_window.index + 10] used = target.skill_effect(@actor, @skill) end # If single target if @target_window.index >= 0 # Apply skill use effects to target actor target = $game_party.actors[@target_window.index] used = target.skill_effect(@actor, @skill) end # If skill was used if used # Play skill use SE $game_system.se_play(@skill.menu_se) # Use up SP @actor.sp -= @skill.sp_cost # Remake each window content @status_window.refresh @skill_window.refresh @target_window.refresh # If entire party is dead if $game_party.all_dead? # Switch to game over screen $scene = Scene_Gameover.new # If command event ID is valid elsif @skill.common_event_id > 0 # Command event call reservation $game_temp.common_event_id = @skill.common_event_id # Switch to map screen $scene = Scene_Map.new end # If skill wasn't used else # Play buzzer SE $game_system.se_play($data_system.buzzer_se) end end end end #============================================================================== # ** Scene_Equip #------------------------------------------------------------------------------ # This class performs equipment screen processing. #============================================================================== class Scene_New_Equip #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index # equip_index : equipment index #-------------------------------------------------------------------------- def initialize(actor_index = 0, equip_index = 0) @actor_index = actor_index @equip_index = equip_index end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Get actor @actor = $game_party.actors[@actor_index] # Make windows @help_window = Window_Help.new @help_window.opacity = Juan_Cfg::Menu_Opacity @left_window = Window_New_EquipLeft.new(@actor) @right_window = Window_New_EquipRight.new(@actor) @item_windows = [] (0..4).each {|i| @item_windows.push(Window_New_EquipItem.new(@actor, i))} # Associate help window @right_window.help_window = @help_window @item_windows.each {|win| win.help_window = @help_window} # Make sprite set @spriteset = Spriteset_Map.new if Juan_Cfg::Map_Background # Set cursor position @right_window.index = @equip_index refresh # Execute transition Graphics.transition # Main loop loop { # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end } # Prepare for transition Graphics.freeze # Dispose of windows @help_window.dispose @left_window.dispose @right_window.dispose @item_windows.each {|win| win.dispose} @spriteset.dispose end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh # Set item windows to visible @item_windows.each_index {|i| @item_windows.visible = (@right_window.index == i) } # Get currently equipped item item1 = @right_window.item # Set current item window to @item_window @item_window = @item_windows[@right_window.index] @spriteset.update if Juan_Cfg::Map_Background # Set current item window to @item_window newmode = [@right_window.index, 1].min if newmode != @left_window.mode @left_window.mode = newmode @left_window.refresh end # If right window is active if @right_window.active # Erase parameters for after equipment change @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil, '', '') end # If item window is active if @item_window.active # Get currently selected item item2 = @item_window.item # Change equipment last_hp = @actor.hp last_sp = @actor.sp old_atk = @actor.atk old_pdef = @actor.pdef old_mdef = @actor.mdef old_str = @actor.str old_dex = @actor.dex old_agi = @actor.agi old_int = @actor.int old_eva = @actor.eva @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id) # Get parameters for after equipment change new_atk = @actor.atk new_pdef = @actor.pdef new_mdef = @actor.mdef new_str = @actor.str new_dex = @actor.dex new_agi = @actor.agi new_int = @actor.int new_eva = @actor.eva @left_window.changes = [0, 0, 0, 0, 0, 0, 0, 0] if new_atk > old_atk @left_window.changes[0] = 1 end if new_atk < old_atk @left_window.changes[0] = -1 end if new_pdef > old_pdef @left_window.changes[1] = 1 end if new_pdef < old_pdef @left_window.changes[1] = -1 end if new_mdef > old_mdef @left_window.changes[2] = 1 end if new_mdef < old_mdef @left_window.changes[2] = -1 end if new_str > old_str @left_window.changes[3] = 1 end if new_str < old_str @left_window.changes[3] = -1 end if new_dex > old_dex @left_window.changes[4] = 1 end if new_dex < old_dex @left_window.changes[4] = -1 end if new_agi > old_agi @left_window.changes[5] = 1 end if new_agi < old_agi @left_window.changes[5] = -1 end if new_int > old_int @left_window.changes[6] = 1 end if new_int < old_int @left_window.changes[6] = -1 end if new_eva > old_eva @left_window.changes[7] = 1 end if new_eva < old_eva @left_window.changes[7] = -1 end elem_text = make_elem_text(item2) stat_text = make_stat_text(item2) # Return equipment @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id) @actor.hp = last_hp @actor.sp = last_sp # Draw in left window @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int, new_eva, elem_text, stat_text) end end #-------------------------------------------------------------------------- # * Make Element Text # item : item #-------------------------------------------------------------------------- def make_elem_text(item) text = '' flag = false if item.is_a?(RPG::Weapon) for i in item.element_set if flag text += ', ' end text += $data_system.elements flag = true end end if item.is_a?(RPG::Armor) for i in item.guard_element_set if flag text += ', ' end text += $data_system.elements flag = true end end return text end #-------------------------------------------------------------------------- # * Make Status Text # item : item #-------------------------------------------------------------------------- def make_stat_text(item) text = '' flag = false if item.is_a?(RPG::Weapon) for i in item.plus_state_set if flag text += ', ' end text += $data_states.name flag = true end end if item.is_a?(RPG::Armor) for i in item.guard_state_set if flag text += ', ' end text += $data_states.name flag = true end end return text end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @left_window.update @right_window.update @item_window.update refresh # If right window is active: call update_right if @right_window.active update_right # If item window is active: call update_item elsif @item_window.active update_item end end #-------------------------------------------------------------------------- # * Frame Update (when right window is active) #-------------------------------------------------------------------------- def update_right # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Menu.new(2) # If C button was pressed elsif Input.trigger?(Input::C) # If equipment is fixed if @actor.equip_fix?(@right_window.index) # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Activate item window @right_window.active = false @item_window.active = true @item_window.index = 0 # If R button was pressed elsif Input.trigger?(Input::R) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To next actor @actor_index += 1 @actor_index %= $game_party.actors.size # Switch to different equipment screen $scene = Scene_Equip.new(@actor_index, @right_window.index) # If L button was pressed elsif Input.trigger?(Input::L) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To previous actor @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Switch to different equipment screen $scene = Scene_Equip.new(@actor_index, @right_window.index) end end #-------------------------------------------------------------------------- # * Frame Update (when item window is active) #-------------------------------------------------------------------------- def update_item # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 # If C button was pressed elsif Input.trigger?(Input::C) # Play equip SE $game_system.se_play($data_system.equip_se) # Get currently selected data on the item window item = @item_window.item # Change equipment @actor.equip(@right_window.index, item == nil ? 0 : item.id) # Activate right window @right_window.active = true @item_window.active = false @item_window.index = -1 # Remake right window and item window contents @right_window.refresh @item_window.refresh end end end #============================================================================== # ** Window_New_EquipLeft #------------------------------------------------------------------------------ # This window displays actor parameter changes on the equipment screen. #============================================================================== class Window_New_EquipLeft < Window_Base #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :mode attr_accessor :changes #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 64, 272, 416) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity @actor = actor @mode = 0 @changes = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] @elem_text = '' @stat_text = '' refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 4, 0) draw_actor_level(@actor, 180, 0) self.contents.font.color = normal_color (0..6).each {|i| draw_actor_parameter(@actor, 4, 32 + 32 * i, i)} if @mode == 0 self.contents.font.color = system_color self.contents.draw_text(4, 256, 200, 32, 'Elemental Attack:') self.contents.draw_text(4, 320, 224, 32, 'Status Infliction:') self.contents.font.color = normal_color elsif @mode == 1 self.contents.font.color = system_color self.contents.draw_text(4, 256, 200, 32, 'Elemental Resistance:') self.contents.draw_text(4, 320, 224, 32, 'Status Resistance:') self.contents.font.color = normal_color end self.contents.draw_text(12, 288, 220, 32, @elem_text) self.contents.draw_text(12, 352, 220, 32, @stat_text) if @new_atk != nil self.contents.font.color = system_color self.contents.draw_text(160, 32, 40, 32, '»»', 1) if @changes[0] == 0 self.contents.font.color = normal_color elsif @changes[0] == -1 self.contents.font.color = down_color else self.contents.font.color = up_color end self.contents.draw_text(200, 32, 36, 32, @new_atk.to_s, 2) end if @new_pdef != nil self.contents.font.color = system_color self.contents.draw_text(160, 64, 40, 32, '»»', 1) if @changes[1] == 0 self.contents.font.color = normal_color elsif @changes[1] == -1 self.contents.font.color = down_color else self.contents.font.color = up_color end self.contents.draw_text(200, 64, 36, 32, @new_pdef.to_s, 2) end if @new_mdef != nil self.contents.font.color = system_color self.contents.draw_text(160, 96, 40, 32, '»»', 1) if @changes[2] == 0 self.contents.font.color = normal_color elsif @changes[2] == -1 self.contents.font.color = down_color else self.contents.font.color = up_color end self.contents.draw_text(200, 96, 36, 32, @new_mdef.to_s, 2) end if @new_str != nil self.contents.font.color = system_color self.contents.draw_text(160, 128, 40, 32, '»»', 1) if @changes[3] == 0 self.contents.font.color = normal_color elsif @changes[3] == -1 self.contents.font.color = down_color else self.contents.font.color = up_color end self.contents.draw_text(200, 128, 36, 32, @new_str.to_s, 2) end if @new_dex != nil self.contents.font.color = system_color self.contents.draw_text(160, 160, 40, 32, '»»', 1) if @changes[4] == 0 self.contents.font.color = normal_color elsif @changes[4] == -1 self.contents.font.color = down_color else self.contents.font.color = up_color end self.contents.draw_text(200, 160, 36, 32, @new_dex.to_s, 2) end if @new_agi != nil self.contents.font.color = system_color self.contents.draw_text(160, 192, 40, 32, '»»', 1) if @changes[5] == 0 self.contents.font.color = normal_color elsif @changes[5] == -1 self.contents.font.color = down_color else self.contents.font.color = up_color end self.contents.draw_text(200, 192, 36, 32, @new_agi.to_s, 2) end if @new_int != nil self.contents.font.color = system_color self.contents.draw_text(160, 224, 40, 32, '»»', 1) if @changes[6] == 0 self.contents.font.color = normal_color elsif @changes[6] == -1 self.contents.font.color = down_color else self.contents.font.color = up_color end self.contents.draw_text(200, 224, 36, 32, @new_int.to_s, 2) end end #-------------------------------------------------------------------------- # * Set parameters after changing equipment # new_atk : attack power after changing equipment # new_pdef : physical defense after changing equipment # new_mdef : magic defense after changing equipment # new_str : strength after changing equipment # new_dex : dexterity after changing equipment # new_agi : agility after changing equipment # new_int : intelligence after changing equipment # new_eva : evasion after changing equipment # elem_text : element rating after changing equipment # stat_text : status rating after changing equipment #-------------------------------------------------------------------------- def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex, new_agi, new_int, new_eva, elem_text, stat_text) flag = false if new_atk != @new_atk || new_pdef != @new_pdef || new_mdef != @new_mdef || new_str != @new_str || new_dex != @new_dex || new_agi != @new_agi || new_eva != @new_eva || elem_text != @elem_text || stat_text != @stat_text flag = true end @new_atk = new_atk @new_pdef = new_pdef @new_mdef = new_mdef @new_str = new_str @new_dex = new_dex @new_agi = new_agi @new_int = new_int @new_eva = new_eva @elem_text = elem_text @stat_text = stat_text if flag refresh end end end #============================================================================== # ** Window_New_EquipRight #------------------------------------------------------------------------------ # This window displays items the actor is currently equipped with on the # equipment screen. #============================================================================== class Window_New_EquipRight < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(272, 64, 368, 192) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity @actor = actor refresh self.index = 0 end #-------------------------------------------------------------------------- # * Item Acquisition #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear @data = [] @data.push($data_weapons[@actor.weapon_id]) @data.push($data_armors[@actor.armor1_id]) @data.push($data_armors[@actor.armor2_id]) @data.push($data_armors[@actor.armor3_id]) @data.push($data_armors[@actor.armor4_id]) @item_max = @data.size self.contents.font.color = system_color self.contents.draw_text(4, 0, 92, 32, $data_system.words.weapon) self.contents.draw_text(4, 32, 92, 32, $data_system.words.armor1) self.contents.draw_text(4, 64, 92, 32, $data_system.words.armor2) self.contents.draw_text(4, 96, 92, 32, $data_system.words.armor3) self.contents.draw_text(5, 128, 92, 32, $data_system.words.armor4) @data.each_index {|i| draw_item_name(@data, 92, 32 * i)} end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? '' : self.item.description) end end #============================================================================== # ** Window_New_EquipItem #------------------------------------------------------------------------------ # This window displays choices when opting to change equipment on the # equipment screen. #============================================================================== class Window_New_EquipItem < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization # actor : actor # equip_type : equip region (0-3) #-------------------------------------------------------------------------- def initialize(actor, equip_type) super(272, 256, 368, 224) self.opacity = Juan_Cfg::Menu_Opacity @actor = actor @equip_type = equip_type @column_max = 1 refresh self.active = false self.index = -1 end #-------------------------------------------------------------------------- # * Item Acquisition #-------------------------------------------------------------------------- def item return @data[self.index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] # Add equippable weapons if @equip_type == 0 weapon_set = $data_classes[@actor.class_id].weapon_set (1...$data_weapons.size).each {|i| if $game_party.weapon_number(i) > 0 && weapon_set.include?(i) @data.push($data_weapons) end } end # Add equippable armor if @equip_type != 0 armor_set = $data_classes[@actor.class_id].armor_set (1...$data_armors.size).each {|i| if $game_party.armor_number(i) > 0 && armor_set.include?(i) if $data_armors.kind == @equip_type-1 @data.push($data_armors) end end } end # Add blank page @data.push(nil) # Make a bit map and draw all items @item_max = @data.size self.contents = Bitmap.new(width - 32, row_max * 32) (0...@item_max-1).each {|i| draw_item(i)} s = @data.size-1 self.contents.draw_text(4, s*32, 100, 32, '[Remove]') end #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index) item = @data[index] item = @data[index] x = 4 y = index * 32 case item when RPG::Weapon number = $game_party.weapon_number(item.id) when RPG::Armor number = $game_party.armor_number(item.id) end bitmap = RPG::Cache.icon(item.icon_name) self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24)) self.contents.font.color = normal_color self.contents.draw_text(x + 28, y, 212, 32, item.name, 0) self.contents.draw_text(x + 288, y, 16, 32, ':', 1) self.contents.draw_text(x + 304, y, 24, 32, number.to_s, 2) end #-------------------------------------------------------------------------- # * Help Text Update #-------------------------------------------------------------------------- def update_help @help_window.set_text(self.item == nil ? '' : self.item.description) end end #============================================================================== # New_Scene_Status #============================================================================== class New_Scene_Status #-------------------------------------------------------------------------- # * Object Initialization # actor_index : actor index #-------------------------------------------------------------------------- def initialize(actor_index = 0, equip_index = 0) @actor_index = actor_index end #-------------------------------------------------------------------------- # * Main Processing #-------------------------------------------------------------------------- def main # Get actor @actor = $game_party.actors[@actor_index] # Make status window @status_window = New_Window_Status.new(@actor) @status_window.opacity = Juan_Cfg::Menu_Opacity @spriteset = Spriteset_Map.new # Execute transition Graphics.transition # Main loop loop { # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed break if $scene != self } # Prepare for transition Graphics.freeze # Dispose of windows @status_window.dispose @spriteset.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update @spriteset.update # If B button was pressed if Input.trigger?(Input::B) # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to menu screen $scene = Scene_Menu.new(3) # If R or Right button was pressed elsif Input.trigger?(Input::R) || Input.trigger?(Input::RIGHT) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To next actor @actor_index += 1 @actor_index %= $game_party.actors.size # Switch to different status screen $scene = New_Scene_Status.new(@actor_index) # If L or Left button was pressed elsif Input.trigger?(Input::L) || Input.trigger?(Input::LEFT) # Play cursor SE $game_system.se_play($data_system.cursor_se) # To previous actor @actor_index += $game_party.actors.size - 1 @actor_index %= $game_party.actors.size # Switch to different status screen $scene = New_Scene_Status.new(@actor_index) end end end #============================================================================== # Scene_Save #============================================================================== class Scene_New_Save < Scene_Save #-------------------------------------------------------------------------- # * Decision Processing #-------------------------------------------------------------------------- def on_decision(filename) # Play save SE $game_system.se_play($data_system.save_se) # Write save data file = File.open(filename, 'wb') write_save_data(file) file.close # If called from event if $game_temp.save_calling # Clear save call flag $game_temp.save_calling = false # Switch to map screen $scene = Scene_Map.new return end # Switch to menu screen $scene = Scene_Menu.new(5) end #-------------------------------------------------------------------------- # * Cancel Processing #-------------------------------------------------------------------------- def on_cancel # Play cancel SE $game_system.se_play($data_system.cancel_se) # If called from event if $game_temp.save_calling # Clear save call flag $game_temp.save_calling = false # Switch to map screen $scene = Scene_Map.new return end # Switch to menu screen $scene = Scene_Menu.new(5) end end #============================================================================== # New_Scene_Load #============================================================================== class New_Scene_Load < Scene_Load #-------------------------------------------------------------------------- # * Cancel Processing #-------------------------------------------------------------------------- def on_cancel # Play cancel SE $game_system.se_play($data_system.cancel_se) # Switch to title screen $scene = Scene_Menu.new(6) end end #============================================================================== # New_Window_SkillStatus #============================================================================== class New_Window_SkillStatus < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 64, 640, 64) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_name(@actor, 4, 0) draw_actor_state(@actor, 140, 0) draw_actor_hp(@actor, 284, 0) draw_actor_sp(@actor, 460, 0) end end #============================================================================== # Window_Info #============================================================================== class Window_Info < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 120) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color case $game_party.gold when 0..999 gold = $game_party.gold when 1000..9999 gold = $game_party.gold.to_s array = gold.split(//) gold = array[0].to_s+","+array[1].to_s+array[2].to_s+array[3].to_s when 10000..99999 gold = $game_party.gold.to_s array = gold.split(//) gold = array[0].to_s+array[1].to_s+","+array[2].to_s+array[3].to_s+array[4].to_s when 100000..999999 gold = $game_party.gold.to_s array = gold.split(//) gold = array[0].to_s+array[1].to_s+array[2].to_s+","+array[3].to_s+array[4].to_s+array[5].to_s when 1000000..9999999 gold = $game_party.gold.to_s array = gold.split(//) gold = array[0].to_s+","+array[1].to_s+array[2].to_s+array[3].to_s+","+array[4].to_s+array[5].to_s+array[6].to_s end self.contents.font.color = text_color(6) gold_word = $data_system.words.gold.to_s + ":" cx = contents.text_size(gold_word).width cx2=contents.text_size(gold.to_s).width self.contents.draw_text(0, 0, 150-cx-2, 32, gold_word) self.contents.font.color = text_color(0) self.contents.draw_text(124-cx2+2, 0, cx2, 32, gold.to_s, 2) end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update super if Graphics.frame_count / Graphics.frame_rate != @total_sec refresh end end end #============================================================================== # New_Window_Status #============================================================================== class New_Window_Status < Window_Base #-------------------------------------------------------------------------- # * Object Initialization # actor : actor #-------------------------------------------------------------------------- def initialize(actor) super(0, 0, 640, 480) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity @actor = actor refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear draw_actor_graphic(@actor, 32, 135) draw_actor_battler(@actor, 290, 200) draw_actor_name(@actor, 0, 0) draw_actor_class(@actor, 0, 20) draw_actor_level(@actor, 0, 40) draw_actor_state(@actor, 0, 60) draw_actor_hp(@actor, 0, 130, 162) draw_actor_sp(@actor, 0, 160, 162) draw_actor_exp(@actor, 0, 190) self.contents.font.size = 20 (0..7).each {|i| draw_actor_parameter(@actor, 0, 220 + 28 * i, i)} self.contents.font.color = system_color self.contents.font.size = 16 draw_actor_element_radar_graph(@actor, 200, 240) self.contents.font.size = 20 self.contents.font.bold = true self.contents.draw_text(450, 0, 96, 32, 'Equipment') self.contents.draw_text(450, 40, 96, 32, 'Weapon') self.contents.draw_text(450, 80, 96, 32, 'Shield') self.contents.draw_text(450, 120, 96, 32, 'Helmet') self.contents.draw_text(450, 160, 96, 32, 'Armor') self.contents.draw_text(450, 200, 96, 32, 'Amulet') equips = [$data_weapons[@actor.weapon_id], $data_armors[@actor.armor1_id], $data_armors[@actor.armor2_id], $data_armors[@actor.armor3_id], $data_armors[@actor.armor4_id]] equips.each_index {|i| if @actor.equippable?(equips) draw_item_name(equips, 450, 60 + i*40) else self.contents.font.color = (i == 0 ? knockout_color : crisis_color) self.contents.draw_text(450, 60 + i*40, 182, 32, 'Nothing equipped') end} end end #============================================================================== # New_Window_Location #============================================================================== class New_Window_Location < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 50) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity self.z = Juan_Cfg::Menu_Z_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(0, -9, 100, 32, 'Location') self.contents.font.color = normal_color if $game_map.name.include?('*') self.contents.draw_text(4, -9, 605, 32, $game_map.name.delete!('*'), 2) else self.contents.draw_text(4, -9, 605, 32, $game_map.name, 2) end end end #============================================================================== # ** Window_Options #------------------------------------------------------------------------------ # This window displays options on the menu screen. #============================================================================== class Window_Options < Window_Selectable #-------------------------------------------------------------------------- # * Object Initialization # width : window width # commands : command text string array #-------------------------------------------------------------------------- def initialize super(0, 0, 430, 380) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity @commands = ['Font', 'Font Size', 'Windowskin', 'Bgm Volume', 'Sfx Volume', 'Battle Bgm'] @commands.push 'Bar Style', 'Bar Opacity' if $tons_version && $game_system.BARS @item_max = @commands.size refresh self.index = 0 end #-------------------------------------------------------------------------- # * Get Command #-------------------------------------------------------------------------- def get_command return @commands[index] end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear (0...@item_max).each {|i| draw_item(i, normal_color)} end #-------------------------------------------------------------------------- # * Draw Item # index : item number #-------------------------------------------------------------------------- def draw_item(index, color) self.contents.font.color = color rect = Rect.new(0, 32 * index, self.contents.width - 8, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) self.contents.draw_text(rect, @commands[index]) self.contents.draw_text(0, index / 1 * 32 , self.width - 32, 32, @commands[index], 96) end #-------------------------------------------------------------------------- # * Disable Item # index : item number #-------------------------------------------------------------------------- def disable_item(index) draw_item(index, disabled_color) end end #============================================================================== # ** Window_Option_Help #------------------------------------------------------------------------------ # This window displays menu function on the menu screen. #============================================================================== class Window_Option_Help < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 50) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update(option_update) self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, -9, 440, 32, option_update, 2) end end #============================================================================== # ** Window_Option_Help2 #------------------------------------------------------------------------------ # This window displays configure option on the menu screen. #============================================================================== class Window_Option_Help2 < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 640, 50) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = normal_color self.contents.draw_text(4, -9, 440, 32, 'Configure Options', 0) end end #============================================================================== # ** Window_Font #------------------------------------------------------------------------------ # This window displays font on the menu screen. #============================================================================== class Window_Font < Window_Base attr_accessor :current_font attr_reader :font_name #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) @font_name = Font.default_name @current_font = Juan_Cfg::Fonts.index(@font_name) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Font') self.contents.font.color = normal_color @font_name = Juan_Cfg::Fonts[@current_font] self.contents.font.name = @font_name self.contents.draw_text(4, 32, 120, 32, @font_name, 2) self.contents.font.name = Font.default_name end end #============================================================================== # ** Window_Font_Size #------------------------------------------------------------------------------ # This window displays font size on the menu screen. #============================================================================== class Window_Font_Size < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Font size') self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, Font.default_size.to_s, 2) end end #============================================================================== # ** Window_Windowskin #------------------------------------------------------------------------------ # This window displays windowskin name on the option screen. #============================================================================== class Window_Windowskin < Window_Base attr_reader :current_skin attr_reader :skin_name #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Windowskin') self.contents.font.color = normal_color @skin_name = Juan_Cfg::Windowskins[self.current_skin] self.contents.draw_text(4, 32, 120, 32, @skin_name) end def current_skin return (@current_skin == nil ? 0 : @current_skin) end def current_skin=(val) @current_skin = (val.is_a?(Numeric) ? val : 0) end end #============================================================================== # ** Window_Bgm_Volume #------------------------------------------------------------------------------ # This window displays bgm volume on the option screen. #============================================================================== class Window_Bgm_Volume < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Bgm Volume') self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_system.bgm_volume.to_s, 2) end end #============================================================================== # ** Window_Sfx_Volume #------------------------------------------------------------------------------ # This window displays sfx volume on the option screen. #============================================================================== class Window_Sfx_Volume < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Sfx Volume') self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_system.sfx_volume.to_s, 2) end end #============================================================================== # ** Window_Battle_Bgm #------------------------------------------------------------------------------ # This window displays battle bgm name on the menu screen. #============================================================================== class Window_Battle_Bgm < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear bgm = Juan_Cfg::Battle_Bgms[$game_variables[Juan_Cfg::Bgm_Variable]][3] self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Battle Bgm') self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, bgm, 2) end end #============================================================================== # ** Window_Bar_Style #------------------------------------------------------------------------------ # This window displays bar style on the menu screen. #============================================================================== class Window_Bar_Style < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Bar Style') self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_system.bar_style.to_s, 2) end end #============================================================================== # ** Window_Bar_Opacity #------------------------------------------------------------------------------ # This window displays bar opacity on the menu screen. #============================================================================== class Window_Bar_Opacity < Window_Base #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize super(0, 0, 160, 96) self.contents = Bitmap.new(width - 32, height - 32) self.opacity = Juan_Cfg::Menu_Opacity refresh end #-------------------------------------------------------------------------- # * Refresh #-------------------------------------------------------------------------- def refresh self.contents.clear self.contents.font.color = system_color self.contents.draw_text(4, 0, 120, 32, 'Bar Opacity') self.contents.font.color = normal_color self.contents.draw_text(4, 32, 120, 32, $game_system.bar_opacity.to_s, 2) end end #============================================================================== # ** Scene_New_Options #------------------------------------------------------------------------------ # This class performs option menu screen processing. #============================================================================== class Scene_New_Options #-------------------------------------------------------------------------- # * 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 @command_window = Window_Options.new @command_window.x = 0 @command_window.y = 50 # If battle bgm is forbidden. if $game_switches[Juan_Cfg::Bgm_Lock] || Juan_Cfg::Battle_Bgms.size <= 1 @command_window.disable_item(5) end # Make font command window @font_command_window = Window_Font.new @font_command_window.x = 430 @font_command_window.y = 50 @font_command_window.active = false @font_command_window.visible = false # Make font size command window @font_size_command_window = Window_Font_Size.new @font_size_command_window.x = 430 @font_size_command_window.y = 50 @font_size_command_window.active = false @font_size_command_window.visible = false # Make windowskin command window @windowskin_command_window = Window_Windowskin.new @windowskin_command_window.x = 430 @windowskin_command_window.y = 50 @windowskin_command_window.active = false @windowskin_command_window.visible = false # Make bgm volume command window @bgm_command_window = Window_Bgm_Volume.new @bgm_command_window.x = 430 @bgm_command_window.y = 50 @bgm_command_window.active = false @bgm_command_window.visible = false # Make sfx volume command window @sfx_command_window = Window_Sfx_Volume.new @sfx_command_window.x = 430 @sfx_command_window.y = 50 @sfx_command_window.active = false @sfx_command_window.visible = false # Make battle bgm command window @battle_bgm_command_window = Window_Battle_Bgm.new @battle_bgm_command_window.x = 430 @battle_bgm_command_window.y = 50 @battle_bgm_command_window.active = false @battle_bgm_command_window.visible = false if $tons_version && $game_system.BARS # Make bar style command window @bar_style_command_window = Window_Bar_Style.new @bar_style_command_window.x = 430 @bar_style_command_window.y = 50 @bar_style_command_window.active = false @bar_style_command_window.visible = false # Make bar opacity @bar_opacity_command_window = Window_Bar_Opacity.new @bar_opacity_command_window.x = 430 @bar_opacity_command_window.y = 50 @bar_opacity_command_window.active = false @bar_opacity_command_window.visible = false end # Make option help window @option_help_window = Window_Option_Help.new @option_help_window.x = 0 @option_help_window.y = 430 # Make option help2 window @option_help_window2 = Window_Option_Help2.new @option_help_window2.x = 0 @option_help_window2.y = 0 # Make spriteset @spriteset = Spriteset_Map.new # Execute transition Graphics.transition # Main loop loop { # Update game screen Graphics.update # Update input information Input.update # Frame update update # Abort loop if screen is changed if $scene != self break end } # Prepare for transition Graphics.freeze # Dispose of windows @command_window.dispose @font_command_window.dispose @font_size_command_window.dispose @bgm_command_window.dispose @sfx_command_window.dispose @windowskin_command_window.dispose @battle_bgm_command_window.dispose @bar_style_command_window.dispose if $tons_version && $game_system.BARS @bar_opacity_command_window.dispose if $tons_version && $game_system.BARS @option_help_window.dispose @option_help_window2.dispose @spriteset.dispose end #-------------------------------------------------------------------------- # * Frame Update #-------------------------------------------------------------------------- def update # Update windows @command_window.update @font_command_window.update @font_size_command_window.update @windowskin_command_window.update @bgm_command_window.update @sfx_command_window.update @battle_bgm_command_window.update @bar_style_command_window.update if $tons_version && $game_system.BARS @bar_opacity_command_window.update if $tons_version && $game_system.BARS @option_help_window2.update @spriteset.update command_window_check option_update end #-------------------------------------------------------------------------- # * Command Window Check # checks which command window is active #-------------------------------------------------------------------------- def command_window_check # If command window is active: call update_command if @command_window.active update_command # If font command window is active: call update_font_command elsif @font_command_window.active update_font_command # If font size command is active: call update_font_size elsif @font_size_command_window.active update_font_size_command # If windowskin command window is active: call update_windowskin_command elsif @windowskin_command_window.active update_windowskin_command # If bgm command window is active: call update_bgm_command elsif @bgm_command_window.active update_bgm_command # If sfx command window is active: call update_sfx_command elsif @sfx_command_window.active update_sfx_command # If battle bgm is active: call update_battle_bgm_command elsif @battle_bgm_command_window.active update_battle_bgm_command # If bar style command window is active: call update_bar_style_command elsif @bar_style_command_window.active update_bar_style_command # If bar opacity command window is active: call update_bar_opacity_command elsif @bar_opacity_command_window.active update_bar_opacity_command end end #-------------------------------------------------------------------------- # * Option Window Frame Update #-------------------------------------------------------------------------- def option_update # Branch by command window name case @command_window.get_command when 'Font' @option_help_window.update('Change the font.') when 'Windowskin' @option_help_window.update('Change the game\'s menu apperence.') when 'Bgm Volume' @option_help_window.update('Change the bgm volume') when 'Sfx Volume' @option_help_window.update('Change the sfx volume') when 'Battle Bgm' @option_help_window.update('Change the battle music.') when 'Bar Style' @option_help_window.update('Change the bars visual apperence') when 'Bar Opacity' @option_help_window.update('Change the bar visibility.') 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 menu screen $scene = Scene_Menu.new(4) # If C button was pressed elsif Input.trigger?(Input::C) # Branch by command window cursor position case @command_window.get_command when 'Font' # Make font command window active @font_command_window.active = true @font_command_window.visible = true @command_window.active = false @command_window.index = -1 when 'Font Size' # Make font size window active @font_size_command_window.active = true @font_size_command_window.visible = true @command_window.active = false @command_window.index = -1 when 'Windowskin' # Play decision SE $game_system.se_play($data_system.decision_se) # Make windowskin command window active @command_window.active = false @command_window.index = -1 @windowskin_command_window.active = true @windowskin_command_window.visible = true #@windowskin_command_window.index = 0 when 'Bgm Volume' # Play decision SE $game_system.se_play($data_system.decision_se) # Make bgm command window active @command_window.active = false @command_window.index = -1 @bgm_command_window.active = true @bgm_command_window.visible = true when 'Sfx Volume' # Play decision SE $game_system.se_play($data_system.decision_se) # Make sfx command window active @command_window.active = false @command_window.index = -1 @sfx_command_window.active = true @sfx_command_window.visible = true when 'Battle Bgm' # If battle bgm is forbidden if $game_switches[Juan_Cfg::Bgm_Lock] || Juan_Cfg::Battle_Bgms.size <= 1 # Play buzzer SE $game_system.se_play($data_system.buzzer_se) return end # Play decision SE $game_system.se_play($data_system.decision_se) # Make battle bgm command window active @command_window.active = false @command_window.index = -1 @battle_bgm_command_window.active = true @battle_bgm_command_window.visible = true when 'Bar Style' # Play decision SE $game_system.se_play($data_system.decision_se) # Make bar style command window active @command_window.active = false @command_window.index = -1 @bar_style_command_window.active = true @bar_style_command_window.visible = true when 'Bar Opacity' # Play decision SE $game_system.se_play($data_system.decision_se) # Make bar opacity command window active @command_window.active = false @command_window.index = -1 @bar_opacity_command_window.active = true @bar_opacity_command_window.visible = true end end end #-------------------------------------------------------------------------- # * Frame Update (when font command window is active) #-------------------------------------------------------------------------- def update_font_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 @command_window.active = true @command_window.index = 0 @font_command_window.active = false @font_command_window.visible = false elsif Input.repeat?(Input::RIGHT) $game_system.se_play($data_system.decision_se) @font_command_window.current_font += 1 @font_command_window.current_font %= Juan_Cfg::Fonts.size @font_command_window.refresh elsif Input.repeat?(Input::LEFT) $game_system.se_play($data_system.decision_se) @font_command_window.current_font += Juan_Cfg::Fonts.size - 1 @font_command_window.current_font %= Juan_Cfg::Fonts.size @font_command_window.refresh elsif Input.repeat?(Input::C) $game_system.se_play($data_system.decision_se) Font.default_name = @font_command_window.font_name $scene = Scene_New_Options.new end end #-------------------------------------------------------------------------- # * Frame Update (when font size command window is active) #-------------------------------------------------------------------------- def update_font_size_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 @command_window.active = true @command_window.index = 0 @font_size_command_window.active = false @font_size_command_window.visible = false elsif Input.repeat?(Input::RIGHT) $game_system.se_play($data_system.decision_se) Font.default_size += 1 if Font.default_size > 35 Font.default_size = 35 end @font_size_command_window.refresh elsif Input.repeat?(Input::LEFT) Font.default_size -= 1 if Font.default_size < 15 Font.default_size = 15 end @font_size_command_window.refresh end end #-------------------------------------------------------------------------- # * Frame Update (when font command window is active) #-------------------------------------------------------------------------- def update_windowskin_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 @command_window.active = true @command_window.index = 0 @windowskin_command_window.active = false @windowskin_command_window.visible = false elsif Input.repeat?(Input::RIGHT) $game_system.se_play($data_system.decision_se) @windowskin_command_window.current_skin += 1 @windowskin_command_window.current_skin %= Juan_Cfg::Windowskins.size @windowskin_command_window.refresh elsif Input.repeat?(Input::LEFT) $game_system.se_play($data_system.decision_se) @windowskin_command_window.current_skin += Juan_Cfg::Windowskins.size - 1 @windowskin_command_window.current_skin %= Juan_Cfg::Windowskins.size @windowskin_command_window.refresh elsif Input.repeat?(Input::C) $game_system.se_play($data_system.decision_se) $game_system.windowskin_name = @windowskin_command_window.skin_name end end #-------------------------------------------------------------------------- # * Frame Update (when font command window is active) #-------------------------------------------------------------------------- def update_bgm_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 @command_window.active = true @command_window.index = 0 @bgm_command_window.active = false @bgm_command_window.visible = false elsif Input.repeat?(Input::LEFT) $game_system.bgm_volume -= 1 if $game_system.bgm_volume < 0 $game_system.bgm_volume = 0 end $game_system.bgm_play($game_system.playing_bgm) @bgm_command_window.refresh elsif Input.repeat?(Input::RIGHT) $game_system.bgm_volume += 1 if $game_system.bgm_volume > 100 $game_system.bgm_volume = 100 end $game_system.bgm_play($game_system.playing_bgm) @bgm_command_window.refresh end end #-------------------------------------------------------------------------- # * Frame Update (when font command window is active) #-------------------------------------------------------------------------- def update_sfx_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 @command_window.active = true @command_window.index = 0 @sfx_command_window.active = false @sfx_command_window.visible = false elsif Input.repeat?(Input::LEFT) $game_system.sfx_volume -= 1 if $game_system.sfx_volume < 0 $game_system.sfx_volume = 0 end $game_system.se_play($data_system.cursor_se) @sfx_command_window.refresh elsif Input.repeat?(Input::RIGHT) $game_system.sfx_volume += 1 if $game_system.sfx_volume > 100 $game_system.sfx_volume = 100 end $game_system.se_play($data_system.cursor_se) @sfx_command_window.refresh end end #-------------------------------------------------------------------------- # * Frame Update (when battle bgm command window is active) #-------------------------------------------------------------------------- def update_battle_bgm_command ind = $game_variables[Juan_Cfg::Bgm_Variable] # 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 @command_window.active = true @command_window.index = 0 @battle_bgm_command_window.active = false @battle_bgm_command_window.visible = false elsif Input.repeat?(Input::LEFT) # Play decision SE $game_system.se_play($data_system.decision_se) ind = (ind+Juan_Cfg::Battle_Bgms.size-1) % Juan_Cfg::Battle_Bgms.size @battle_bgm_command_window.refresh elsif Input.repeat?(Input::RIGHT) || Input.repeat?(Input::C) # Play decision SE $game_system.se_play($data_system.decision_se) ind = (ind+1) % Juan_Cfg::Battle_Bgms.size end $game_variables[Juan_Cfg::Bgm_Variable] = ind #$game_system.reset_battle_bgm @battle_bgm_command_window.refresh end #-------------------------------------------------------------------------- # * Frame Update (when bar style command window is active) #-------------------------------------------------------------------------- def update_bar_style_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 @command_window.active = true @command_window.index = 0 @bar_style_command_window.active = false @bar_style_command_window.visible = false elsif Input.repeat?(Input::LEFT) $game_system.bar_style = ($game_system.bar_style + 6) % 7 @bar_style_command_window.refresh elsif Input.repeat?(Input::RIGHT) $game_system.bar_style = ($game_system.bar_style + 1) % 7 $game_system.se_play($data_system.decision_se) @bar_style_command_window.refresh end end #-------------------------------------------------------------------------- # * Frame Update (when bar style command window is active) #-------------------------------------------------------------------------- def update_bar_opacity_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 @command_window.active = true @command_window.index = 0 @bar_opacity_command_window.active = false @bar_opacity_command_window.visible = false elsif Input.repeat?(Input::LEFT) $game_system.bar_opacity -= 1 @bar_opacity_command_window.refresh elsif Input.repeat?(Input::RIGHT) $game_system.bar_opacity += 1 $game_system.se_play($data_system.decision_se) @bar_opacity_command_window.refresh end end end # Compatability for RMXOS # Checks if RMOS is detected and if it's the correct version. if defined?(RMXOS) && RMXOS::VERSION > 1.1 #============================================================================== # Scene_Servers #------------------------------------------------------------------------------ # Displays a connection dialog to connect to an existing server. #============================================================================== class Scene_Servers < Scene_Network alias create_game_data_juan_cms_later create_game_data #---------------------------------------------------------------------------- # Creates initial instances of the game classes. #---------------------------------------------------------------------------- def create_game_data # Load map info $map_infos = load_data('Data/MapInfos.rxdata') $map_infos.keys.each {|key| $map_infos[key] = $map_infos[key].name} create_game_data_juan_cms_later end end end Share this post Link to post Share on other sites
0 Heretic86 25 Report post Posted April 20, 2012 (edited) Plug this in with main somewhere, or anywhere you need to plug it in. I just set it to print the name of the Actors Class. Im sure you'll need it to be different for your purposes. if $game_party for actor in $game_party.actors print $data_classes[actor.class_id].name end end Modify it as you need to. If you need to use a different data type, change the .name to .inspect to get those properties. Quick and dirty. Looks to me like the first time main is run, the $game_party isnt intialized yet. So if the array exists, then you can do what you need to do with it. So copy and paste that into the "while $scene != nil" loop. Does that help? Edit: to avoid confusion, ".name" here is the Name of the Class. Like Fighter or Lancer, not the Actors name. Edited April 20, 2012 by Heretic86 Share this post Link to post Share on other sites
0 QuesTMajoR 4 Report post Posted April 20, 2012 (edited) It keeps on Printing the Actor's Classes! Edited April 20, 2012 by QuesTMajoR Share this post Link to post Share on other sites
0 Bigace360 38 Report post Posted April 20, 2012 (edited) Go to line 366-371 and paste this code anywhere between the 2 lines: draw_actor_class(actor, x + 144, y) Just change the x and y coordinates that you see fit. Edit: To learn more about windows and classes, you should study the default class in the RMXP and go to the help file as well if you click F1 while on the map or in the Script Editor. Plug this in with main somewhere, or anywhere you need to plug it in. I just set it to print the name of the Actors Class. Im sure you'll need it to be different for your purposes. if $game_party for actor in $game_party.actors print $data_classes[actor.class_id].name end end Modify it as you need to. If you need to use a different data type, change the .name to .inspect to get those properties. Quick and dirty. Looks to me like the first time main is run, the $game_party isnt intialized yet. So if the array exists, then you can do what you need to do with it. So copy and paste that into the "while $scene != nil" loop. Does that help? Edit: to avoid confusion, ".name" here is the Name of the Class. Like Fighter or Lancer, not the Actors name. What the hell is all this? Why should he do all this just to input the actors class into window_menustatus Edited April 20, 2012 by bigace Share this post Link to post Share on other sites
0 QuesTMajoR 4 Report post Posted April 20, 2012 Thanks bigace! I'm confused with Juan's CMS because I modified a Lot just Like I said.. Thanks! :D Share this post Link to post Share on other sites
0 Heretic86 25 Report post Posted April 20, 2012 I saw that, I was thinking you were asking for how to get a specific bit of data into a script, then wanted to take it from there. My bad. Yeah, your line that said "Print $data_classes" is what made it constantly print. But if you grab the data the same way and instead of printing, put it in a variable, then you could manipulate it as you needed to. As you saw, it would continually loop through that "print" scenario. You'd probably want to use that in an Initialize method so it doesnt run all the time. Not looking at the code specifically, but just in general... Share this post Link to post Share on other sites
0 QuesTMajoR 4 Report post Posted April 21, 2012 Nah, I just want to make the Actor's Classes appear on the Menu... :D Thnx anyway. Share this post Link to post Share on other sites
Can someone Help me? I can't see the Actor's class at the Menu, The HP,MP, and the Name is only there...
BTW: Im using Juan's Custom Menu Script.. Thanks :D
Share this post
Link to post
Share on other sites