#==============================================================================# ** dbchest's Leader Lock (v1.0)#==============================================================================# ** Credits (Freeware)#------------------------------------------------------------------------------# a list of credits for those involved in the production of said script.# you are responsible for crediting those mentioned (using discretion).# you do not have to credit special mentions. they are being thanked now.#------------------------------------------------------------------------------# programmer: dbchest (none required, always appreciated)# special thanks: OnlySlightlySane (rpgmakerweb.com) # request#==============================================================================# ** Details#------------------------------------------------------------------------------# this script will lock the party's leader from being accessed through the# formation command in the main menu.#==============================================================================# ** Features#------------------------------------------------------------------------------# disable party leader upon formation command# visual update for identification# play buzzer upon selection attempt#==============================================================================# ** Installation Instructions (Plug and Play)#------------------------------------------------------------------------------# paste script in "Materials" section of the script editor.# no known compatibility issues.# no foreign script requirements.#==============================================================================# ** Scene_Menu#------------------------------------------------------------------------------# This class performs the menu screen processing.#==============================================================================class Scene_Menu < Scene_MenuBase #-------------------------------------------------------------------------- # * [Formation] Command #-------------------------------------------------------------------------- alias disable_leader command_formation def command_formation disable_leader @status_window.disable_leader $formation_command = true end #-------------------------------------------------------------------------- # * Formation [OK] #-------------------------------------------------------------------------- def on_formation_ok if @status_window.index > 0 if @status_window.pending_index >= 0 $game_party.swap_order(@status_window.index, @status_window.pending_index) @status_window.pending_index = -1 @status_window.redraw_item(@status_window.index) else @status_window.pending_index = @status_window.index end @status_window.activate else @status_window.activate end end #-------------------------------------------------------------------------- # * Formation [Cancel] #-------------------------------------------------------------------------- alias refresh_status_window on_formation_cancel def on_formation_cancel refresh_status_window @status_window.refresh $formation_command = false endend#==============================================================================# ** Window_MenuStatus#------------------------------------------------------------------------------# This window displays party member status on the menu screen.#==============================================================================class Window_MenuStatus < Window_Selectable #-------------------------------------------------------------------------- # * Disable Leader #-------------------------------------------------------------------------- def disable_leader clear_item(0) actor = $game_party.members[0] rect = item_rect(0) draw_actor_face(actor, rect.x + 1, rect.y + 1, false) draw_actor_simple_status(actor, rect.x + 108, rect.y + line_height / 2) end #-------------------------------------------------------------------------- # * Processing When OK Button Is Pressed #-------------------------------------------------------------------------- def process_ok if $formation_command && index == 0 Sound.play_buzzer else super $game_party.menu_actor = $game_party.members[index] end endend