dbchest's Leader Lock

dbchest

Beast Master
Veteran
Joined
Oct 1, 2013
Messages
434
Reaction score
306
First Language
English
Primarily Uses
RMMV
Party Leader Lock v1.0​

by dbchest

Introduction

this script disables access to the actor at the top of the selection index of the menu status, also considered the party's leader. access is disabled only within the formation command.

 

Features

- plays buzzer on attempt to select party leader.

- actor face graphic serves as visual aid of disabling.

- disables party leader access upon selecting the "Formation" command in your main menu.

Screenshots











 

How to Use

plug and play.

insert below default scripts, above main.

 

Demo

primary link:

http://www.mediafire.com/download/mbyhcaprwot5ox2/dbchest's_Party_Leader_Lock_v1.0_(final).exe

 

Script

Code:
#==============================================================================# ** 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
 

FAQ

you may PM me directly with any questions, comments, or concerns.
 

Credit and Thanks

- programmer: dbchest (none required, always appreciated)

- special thanks: OnlySlightlySane for the request (this is a special mention, no credit required)
 
Last edited by a moderator:

Nosidag

Veteran
Veteran
Joined
Sep 29, 2013
Messages
30
Reaction score
3
First Language
English
Primarily Uses
Wow dude that is EXACTLY what I was looking for. Thanks soo much. I'd ask how you put all of that together, but that's a whole nother thread lol. I need to learn this stuff. Genius!
 

ShinGamix

DS Style 4Ever!
Veteran
Joined
Mar 18, 2012
Messages
3,905
Reaction score
451
First Language
April Fools
Primarily Uses
N/A
This could come in handy for parts of games. Good idea and way to go!
 
Joined
May 6, 2015
Messages
1
Reaction score
0
First Language
English
Primarily Uses
A year and a half later this script is still tremendously useful. Though it does have a bug. If you select a character for moving then press cancel, the leader's pic lights back up and no longer plays the buzzer sound. It can easily be fixed by replacing the "Formation [Cancel]" section in this script with this:

#-------------------------------------------------------------------------- # * Formation [Cancel] #-------------------------------------------------------------------------- alias refresh_status_window on_formation_cancel def on_formation_cancel if @status_window.pending_index >= 0 @status_window.pending_index = -1 @status_window.activate else refresh_status_window @status_window.refresh $formation_command = false end end So now the surrounding code should appear like this:

Code:
    else      @status_window.activate    end  end  #--------------------------------------------------------------------------  # * Formation [Cancel]  #--------------------------------------------------------------------------  alias refresh_status_window on_formation_cancel  def on_formation_cancel    if @status_window.pending_index >= 0      @status_window.pending_index = -1      @status_window.activate    else      refresh_status_window      @status_window.refresh      $formation_command = false    end  endend#==============================================================================# ** Window_MenuStatus#------------------------------------------------------------------------------#  This window displays party member status on the menu screen.#==============================================================================
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,868
Messages
1,017,066
Members
137,576
Latest member
SadaSoda
Top