SDK - Standard Development Kit 2.4

I noticed this while I was upgrading.

Thank you for the bug report.
Did you break down Window_Message's methods? I've been waiting on you to start back up on my XMS, and if you missed it I posted my version of the methods breaks on like page 9 or 10 I think. The only issue I had with the method split is I couldn't get Window_Message to go away during battle, but that should be the only bug to fix with it, everything else works fine.
I did, but that file was in the corrupt scripts data. I'll try to re-write it all again soon, just managing quite a few projects at once and getting ready for a move.
I already told you I had broken it down silly Seph, just have to find out why it doesn't go away during battle. I had added constants to it though for Default_Width/Height, but you can get rid of those if you'd like. Here, this is my most recently updated version.

Window_Message splits Show
#===============================================================================
# ** Window_Message
#-------------------------------------------------------------------------------
#    
#===============================================================================
class Window_Message < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Customizable Constants
  #-----------------------------------------------------------------------------
  Default_Width  = 480
  Default_Height = 160
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize
     super(80, 304, Default_Width, Default_Height)
     self.contents       = Bitmap.new(width - 32, height - 32)
     self.visible        = false
     self.z                 = 9998
     self.active          = false
     self.index           = -1
     initialize_variables
     update_settings_text
  end
  #-----------------------------------------------------------------------------
  # * Initialize Variables
  #-----------------------------------------------------------------------------
  def initialize_variables
     @fade_in              = false
     @fade_out             = false
     @contents_showing = false
     @cursor_width       = 0
  end
  #-----------------------------------------------------------------------------
  # * Update Settings Text
  #-----------------------------------------------------------------------------
  def update_settings_text
     self.contents.font.name       = Font.default_name
     self.contents.font.size       = Font.default_size
     self.contents.font.bold       = Font.default_bold
     self.contents.font.italic    = Font.default_italic
     self.contents.font.color     = Font.default_color
  end
  #-----------------------------------------------------------------------------
  # * Create Gold Window
  #-----------------------------------------------------------------------------
  def create_gold_window
     if @gold_window.nil?
        @gold_window    = Window_Gold.new
        @gold_window.z = 9998
        @gold_window.opacity = self.opacity
        @gold_window.back_opacity = self.back_opacity
        if $game_temp.in_battle ; @gold_window.y = 192
        else                             ; @gold_window.y = self.y >= 128 ? 32 : 384
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Dispose
  #-----------------------------------------------------------------------------
  def dispose
     terminate_message
     $game_temp.message_window_showing = false
     dispose_input_number
     super
  end
  #-----------------------------------------------------------------------------
  # * Dispose Input Number Window
  #-----------------------------------------------------------------------------
  def dispose_input_number
     unless @input_number_window.nil?
        @input_number_window.dispose
     end
  end
  #-----------------------------------------------------------------------------
  # * Dispose Gold Window
  #-----------------------------------------------------------------------------
  def dispose_gold
     unless @gold_window.nil?
        @gold_window.dispose
        @gold_window = nil
     end
  end
  #-----------------------------------------------------------------------------
  # * Terminate Message
  #-----------------------------------------------------------------------------
  def terminate_message
     self.active = false
     self.pause = false
     self.index = -1
     self.contents.clear
     @contents_showing = false
     unless $game_temp.message_proc.nil?
        $game_temp.message_proc.call
     end
     clear_game_temp
     dispose_gold
  end
  #-----------------------------------------------------------------------------
  # * Clear Game Temp
  #-----------------------------------------------------------------------------
  def clear_game_temp
     $game_temp.message_text = nil
     $game_temp.message_proc = nil
     $game_temp.choice_start = 99
     $game_temp.choice_max = 0
     $game_temp.choice_cancel_type = 0
     $game_temp.choice_proc = nil
     $game_temp.num_input_start = 99
     $game_temp.num_input_variable_id = 0
     $game_temp.num_input_digits_max = 0
  end
  #-----------------------------------------------------------------------------
  # * Refresh
  #-----------------------------------------------------------------------------
  def refresh
     self.contents.clear
     @x = $game_temp.choice_start.zero? ? 8 : 0
     @y = 0
     @cursor_width = 0
     unless $game_temp.message_text.nil?
        @text = $game_temp.message_text
        begin
           last_text = @text.clone
        end until @text == last_text
        convert_message_codes
        while ((c = @text.slice!(/./m)) != nil)
           interpret_message_codes(c)
           write_message(c)
        end
     end
     refresh_choices
     refresh_input_number
  end
  #-----------------------------------------------------------------------------
  # * Refresh Choices
  #-----------------------------------------------------------------------------
  def refresh_choices
     unless $game_temp.choice_max.zero? || $game_temp.choice_max < 0
        @item_max = $game_temp.choice_max
        self.active = true
        self.index  = 0
     end
  end
  #-----------------------------------------------------------------------------
  # * Refresh Input Number
  #-----------------------------------------------------------------------------
  def refresh_input_number
     if $game_temp.num_input_variable_id > 0
        digits_max = $game_temp.num_input_digits_max
        number = $game_variables[$game_temp.num_input_variable_id]
        @input_number_window = Window_InputNumber.new(digits_max)
        @input_number_window.number = number
        @input_number_window.x = self.x + 8
        @input_number_window.y = self.y + $game_temp.num_input_start * 32
     end
  end
  #-----------------------------------------------------------------------------
  # * Convert Message Codes
  #-----------------------------------------------------------------------------
  def convert_message_codes
     # Convert Variable
     @text.gsub!(/\\[Vv]\[([0-9]+)\]/)         { $game_variables[$1.to_i] }
     # Convert Game Actor Name
     @text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
        !$game_actors[$1.to_i].nil? ? $game_actors[$1.to_i].name : ""
     end
     # Change \\\\ to \000
     @text.gsub!(/\\\\/)                              { "\000" }
     # Change \C[#] to Color
     @text.gsub!(/\\[Cc]\[([0-9]+)\]/)         { "\001[#{$1}]" }
     # Show Gold Window
     @text.gsub!(/\\[Gg]/)                           { "\002" }
  end
  #-----------------------------------------------------------------------------
  # * Interpret Message Codes
  #-----------------------------------------------------------------------------
  def interpret_message_codes(c)
     # If \\
     case c
     when "\000" ; c = "\\"
     when "\001" ; change_text_color ; return
     when "\002" ; create_gold_window ; return
     when "\n"
        if @y >= $game_temp.choice_start
           @cursor_width = [@cursor_width, @x].max
        end
        @y += 1
        @x = 0
        if @y >= $game_temp.choice_start
           @x = 8
        end
        return
     end
  end
  #-----------------------------------------------------------------------------
  # * Write Message
  #-----------------------------------------------------------------------------
  def write_message(c)
     self.contents.draw_text(4 + @x, 32 * @y, 40, 32, c)
     @x += self.contents.text_size(c.to_s).width
  end
  #-----------------------------------------------------------------------------
  # * Change Text Color
  #-----------------------------------------------------------------------------
  def change_text_color
     @text.sub!(/\[([0-9]+)\]/, "")
     color = $1.to_i
     if color >= 0 and color <= 7
        self.contents.font.color = text_color(color)
     end
  end
  #-----------------------------------------------------------------------------
  # * Frame Update
  #-----------------------------------------------------------------------------
  def update
     super
     # Step 1 : Create Message
     if @fade_in
        create_message
        return
     end
     # Step 2 : Proccess Input Number (if applicable)
     unless @input_number_window.nil?
        update_input_number
        return
     end
     # Step 3 : Process Show Choices (if applicable)
     if @contents_showing
        update_show_choices
        return
     end
     # Step 4 : Update Message Idle
     if !@fade_out && !$game_temp.message_text.nil?
     #if @fade_out == false and $game_temp.message_text != nil
        update_message_idle
        return
     end
     # Step 5 : Clear Message
     if self.visible
        clear_message
        return
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Fade In
  #-----------------------------------------------------------------------------
  def create_message
     self.contents_opacity += 24
     unless @input_number_window.nil?
        @input_number_window.contents_opacity += 24
     end
     if self.contents_opacity == 255
        @fade_in = false
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Input Number
  #-----------------------------------------------------------------------------
  def update_input_number
     @input_number_window.update
     if Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        $game_variables[$game_temp.num_input_variable_id] =
           @input_number_window.number
        $game_map.need_refresh = true
        @input_number_window.dispose
        @input_number_window = nil
        terminate_message
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Show Choices
  #-----------------------------------------------------------------------------
  def update_show_choices
     # If choice isn't being displayed, show pause sign
     if $game_temp.choice_max.zero? ; self.pause = true
     end
     # Cancel
     if Input.trigger?(Input::B)
        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
           $game_system.se_play($data_system.cancel_se)
           $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
           terminate_message
        end
     end
     # Confirm
     if Input.trigger?(Input::C)
        if $game_temp.choice_max > 0
           $game_system.se_play($data_system.decision_se)
           $game_temp.choice_proc.call(self.index)
        end
        terminate_message
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Message Waiting
  #-----------------------------------------------------------------------------
  def update_message_idle
     @contents_showing = true
     $game_temp.message_window_showing = true
     reset_window
     refresh
     Graphics.frame_reset
     self.visible = true
     self.contents_opacity = 0
     if @input_number_window != nil
        @input_number_window.contents_opacity = 0
     end
     @fade_in = true
  end
  #-----------------------------------------------------------------------------
  # * Close Message
  #-----------------------------------------------------------------------------
  def clear_message
     @fade_out = true
     self.opacity -= 48
     if self.opacity == 0
        self.visible = false
        @fade_out = false
        $game_temp.message_window_showing = false
     end
     update_settings_text
  end 
  #-----------------------------------------------------------------------------
  # * Reset Window
  #-----------------------------------------------------------------------------
  def reset_window
     if $game_temp.in_battle ; self.y = 16
     else ; reset_position
     end
     if $game_system.message_frame.zero? ; self.opacity = 255
     else                                               ; self.opacity = 0
     end
     self.back_opacity = 160
  end
  #-----------------------------------------------------------------------------
  # * Reset Position
  #-----------------------------------------------------------------------------
  def reset_position
     case $game_system.message_position
     when 0 ; self.y = 16
     when 1 ; self.y = 160
     when 2 ; self.y = 304
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Cursor Rect
  #-----------------------------------------------------------------------------
  def update_cursor_rect
     if @index >= 0
        n = $game_temp.choice_start + @index
        self.cursor_rect.set(8, n * 32, @cursor_width, 32)
     else
        self.cursor_rect.empty
     end
  end
end
Expand to see the code.
Ok. Here is how I broke down Window_Message
#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) ||
   SDK::Indidual_Parts.include?('WINDOW_MESSAGE#REFRESH')

#==============================================================================
# ** Window_Message
#==============================================================================

class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  SDK.log_branch(:Window_Message, :refresh, :refresh_start, :refresh_text,
    :refresh_text_sub, :refresh_text_loop, :refresh_text_format,
    :refresh_text_color, :refresh_text_line_break, :refresh_show_gold,
    :refresh_draw_text, :refresh_text?, :refresh_choice,
    :refresh_number_input)
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    refresh_start                   # Refresh Start
    refresh_text if refresh_text?   # Refresh Text if text change
    refresh_choice                  # Refresh Choice setup
    refresh_number_input            # Refresh Number Input setup
  end
  #--------------------------------------------------------------------------
  # * Refresh: Start
  #--------------------------------------------------------------------------
  def refresh_start
    # Clear contents and set normal font
    self.contents.clear
    self.contents.font.color = normal_color
    # Start text position and cursor width
    @refresh_x = $game_temp.choice_start == 0 ? 8 : 0
    @refresh_y = 0
    @cursor_width = 0
  end
  #--------------------------------------------------------------------------
  # * Refresh: Text? Test
  #--------------------------------------------------------------------------
  def refresh_text?
    return $game_temp.message_text != nil
  end
  #--------------------------------------------------------------------------
  # * Refresh: Text
  #--------------------------------------------------------------------------
  def refresh_text
    @refresh_text = $game_temp.message_text   # Set refresh text
    refresh_text_sub                          # Text substitution
    refresh_text_loop                         # Text loop
  end
  #--------------------------------------------------------------------------
  # * Refresh: Text Substitution
  #--------------------------------------------------------------------------
  def refresh_text_sub
    # Control text processing
    begin
      last_text = @refresh_text.clone
      @refresh_text.gsub!(/\\[Vv]\[([0-9]+)\]/) { $game_variables[$1.to_i] }
    end until @refresh_text == last_text
    @refresh_text.gsub!(/\\[Nn]\[([0-9]+)\]/) do
      $game_actors[$1.to_i] != nil ? $game_actors[$1.to_i].name : ""
    end
    # Change "\\\\" to "\000" for convenience
    @refresh_text.gsub!(/\\\\/) { "\000" }
    # Change "\\C" to "\001" and "\\G" to "\002"
    @refresh_text.gsub!(/\\[Cc]\[([0-9]+)\]/) { "\001[#{$1}]" }
    @refresh_text.gsub!(/\\[Gg]/) { "\002" }
  end
  #--------------------------------------------------------------------------
  # * Refresh: Text Loop
  #--------------------------------------------------------------------------
  def refresh_text_loop
    # Get 1 text character in c (loop until unable to get text)
    while ((c = @refresh_text.slice!(/./m)) != nil)
      # If \\, Return to original text
      c = "\\" if c == "\000"
      next if refresh_text_format(c)
      next if refresh_show_gold(c)
      refresh_draw_text(c)
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh: Text Format
  #--------------------------------------------------------------------------
  def refresh_text_format(c)
    return true if refresh_text_color(c)        # Text color
    return true if refresh_text_line_break(c)   # Line Break
    return false
  end
  #--------------------------------------------------------------------------
  # * Refresh: Text Format - Color
  #--------------------------------------------------------------------------
  def refresh_text_color(c)
    # If \C[n]
    if c == "\001"
      # Change text color
      text.sub!(/\[([0-9]+)\]/, "")
      color = $1.to_i
      self.contents.font.color = text_color(color) if color.between?(0, 7)
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Refresh: Text Format - Line Break
  #--------------------------------------------------------------------------
  def refresh_text_line_break(c)
    # If new line text
    if c == "\n"
      # Update cursor width if choice
      if @refresh_y >= $game_temp.choice_start
        @cursor_width = [@cursor_width, @refresh_x].max
      end
      # Add 1 to y
      @refresh_y += 1
      @refresh_x = @refresh_y >= $game_temp.choice_start ? 8 : 0
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Refresh: Show Gold
  #--------------------------------------------------------------------------
  def refresh_show_gold(c)
    # If \G
    if c == "\002"
      # Make gold window
      if @gold_window == nil
        @gold_window = Window_Gold.new
        @gold_window.x = 560 - @gold_window.width
        if $game_temp.in_battle
          @gold_window.y = 192
        else
          @gold_window.y = self.y >= 128 ? 32 : 384
        end
        @gold_window.opacity = self.opacity
        @gold_window.back_opacity = self.back_opacity
      end
      # go to next text
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # * Refresh: Draw Text
  #--------------------------------------------------------------------------
  def refresh_draw_text(c)
    # Draw text
    self.contents.draw_text(4 + @refresh_x, 32 * @refresh_y, 40, 32, c)
    # Add x to drawn text width
    @refresh_x += self.contents.text_size(c).width
  end
  #--------------------------------------------------------------------------
  # * Refresh: Choice Setup
  #--------------------------------------------------------------------------
  def refresh_choice
    # If choice
    if $game_temp.choice_max > 0
      @item_max = $game_temp.choice_max
      self.active = true
      self.index = 0
    end
  end
  #--------------------------------------------------------------------------
  # * Refresh: Number Input Setup
  #--------------------------------------------------------------------------
  def refresh_number_input
    # If number input
    if $game_temp.num_input_variable_id > 0
      digits_max = $game_temp.num_input_digits_max
      number = $game_variables[$game_temp.num_input_variable_id]
      @input_number_window = Window_InputNumber.new(digits_max)
      @input_number_window.number = number
      @input_number_window.x = self.x + 8
      @input_number_window.y = self.y + $game_temp.num_input_start * 32
    end
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


I am pushing to get this updated tonight!

(I also cleaned the thread out and will do every update)
Its much different from my version, but no big deal it looks like you broke up the refresh method more than I did. Is there any last minute changes you might make to the refresh split?

I'm not sure what was causing the message window to freeze during battle but somehow I got it fixed, and here's the newest update I did to Window_Message#update, (I think my XMS was really the problem.)

#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) ||
    SDK::Indidual_Parts.include?('WINDOW_MESSAGE#UPDATE')

#==============================================================================
# ** Window_Message
#==============================================================================
class Window_Message < Window_Selectable
  #--------------------------------------------------------------------------
  SDK.log_branch(:Window_Message, :update, :update_message_show,
  :update_input_number, :update_show_choices, :update_pause,
  :update_choice_canel, :update_choice_decision, :update_message_idle,
  :update_message_clear, :update_position, :update_cursor_rect)
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
     super
     # Step 1 : Create Message
     if @fade_in
        update_message_show
        return
     end
     # Step 2 : Proccess Input Number (if applicable)
     unless @input_number_window.nil?
        update_input_number
        return
     end
     # Step 3 : Process Show Choices (if applicable)
     if @contents_showing
        update_show_choices
        return
     end
     # Step 4 : Update Message Idle
     if !@fade_out && !$game_temp.message_text.nil?
     #if @fade_out == false and $game_temp.message_text != nil
        update_message_idle
        return
     end
     # Step 5 : Clear Message
     if self.visible
        update_message_clear
        return
     end
  end
  #--------------------------------------------------------------------------
  # * Update Show Message
  #--------------------------------------------------------------------------
  def update_message_show
     self.contents_opacity += 24
     unless @input_number_window.nil?
        @input_number_window.contents_opacity += 24
     end
     if self.contents_opacity == 255
        @fade_in = false
     end
  end
  #--------------------------------------------------------------------------
  # * Update Input Number
  #--------------------------------------------------------------------------
  def update_input_number
     @input_number_window.update
     if Input.trigger?(Input::C)
        $game_system.se_play($data_system.decision_se)
        $game_variables[$game_temp.num_input_variable_id] =
           @input_number_window.number
        $game_map.need_refresh = true
        @input_number_window.dispose
        @input_number_window = nil
        terminate_message
     end
  end
  #--------------------------------------------------------------------------
  # * Update Show Choices
  #--------------------------------------------------------------------------
  def update_show_choices
     update_pause
     # Cancel
     if Input.trigger?(Input::B)
        update_choice_cancel
     # Confirm
     elsif Input.trigger?(Input::C)
        update_choice_decision
     end
  end
  #--------------------------------------------------------------------------
  # * Update Choice Cancel
  #--------------------------------------------------------------------------
  def update_choice_cancel
     if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
        $game_system.se_play($data_system.cancel_se)
        $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
        terminate_message
     end
  end
  #--------------------------------------------------------------------------
  # * Update Choice Decision
  #--------------------------------------------------------------------------
  def update_choice_decision
     if $game_temp.choice_max > 0
        $game_system.se_play($data_system.decision_se)
        $game_temp.choice_proc.call(self.index)
     end
     terminate_message
  end
  #--------------------------------------------------------------------------
  # * Update Pause
  #--------------------------------------------------------------------------
  def update_pause
     # If choice isn't being displayed, show pause sign
     self.pause = $game_temp.choice_max.zero?
  end
  #--------------------------------------------------------------------------
  # * Update Message Idle
  #--------------------------------------------------------------------------
  def update_message_idle
     @contents_showing = true
     $game_temp.message_window_showing = true
     update_position
     self.opacity = $game_system.message_frame.zero? ? 255 : 0
     self.back_opacity = 160
     refresh
     Graphics.frame_reset
     self.visible = true
     self.contents_opacity = 0
     if @input_number_window != nil
        @input_number_window.contents_opacity = 0
     end
     @fade_in = true
  end
  #--------------------------------------------------------------------------
  # * Update Clear Message
  #--------------------------------------------------------------------------
  def update_message_clear
     @fade_out = true
     self.opacity -= 48
     if self.opacity == 0
        self.visible = false
        @fade_out = false
        $game_temp.message_window_showing = false
     end
  end 
  #--------------------------------------------------------------------------
  # * Update Position
  #--------------------------------------------------------------------------
  def update_position
     if $game_temp.in_battle
        self.y = 16
     else       
        case $game_system.message_position
        when 0 ; self.y = 16
        when 1 ; self.y = 160
        when 2 ; self.y = 304
        end
     end
  end
  #--------------------------------------------------------------------------
  # * Update Cursor Rect
  #--------------------------------------------------------------------------
  def update_cursor_rect
     if @index >= 0
        n = $game_temp.choice_start + @index
        self.cursor_rect.set(8, n * 32, @cursor_width, 32)
     else
        self.cursor_rect.empty
     end
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


...And, I think that should cover every aspect of the default Window_Message, right? I just need you to finalize it so I can get back to work on my XMS.
That looks fine.

Sorry about the delay. I've been juggling an idea in my head, but decided against it due to it causing problems. Instead, I am adding 2 more constant options:
Use_Spriteset_Base
Use_Scene_Base
Expand to see the code.


The idea here is in Part 2, if you don't use Spriteset_Base, it still does the method splits but doesn't use the Spriteset_Base class. In Part 3/4, if you don't use Scene_Base, it splits the update methods like in Part 4 but doesn't require Scene_Base. This is just for people who can't use the base classes for whatever reasons. Chances are it will be un-needed, but just incase, I am throwing it in. At least you will no longer need part 3 for part 4.
Whoops missed a bug...stupid $game_temp/$game_system x_X

self.opacity = $game_temp.message_frame.zero? ? 255 : 0
Expand to see the code.


is supposed to be

self.opacity = $game_system.message_frame.zero? ? 255 : 0
Expand to see the code.


I updated the post, now it should be perfect! I think whoever doesn't use part of your SDK should bite their own bubbles! (Just kidding!) Good to see you looking out for people :P
Ummm Im Getting an Error at line 8650: Syntax Error Occured
Well with that much information I can honestly tell you I have no idea what your problem is.
Oh Woops Im So Sorry Seph I Figured out whats wrong and forgot to edit my post :)
Is 2.5 going to be done pretty soon? Any last minute things you doing with it?

It seems as though you have a bunch of logging tools, even a part in the SDK module to write the logs to file, but there's no constant allowing you to auto-write the files at the start of the game. I mean, I guess you could just put SDK.write_ whatever somewhere on a one line but I made this which auto-writes everything (enabled by constants), then disables the script (so its not re-writting later on.)

SDK::AutoWrite Show
#===============================================================================
# ~** SDK Auto-Write File List **~
#-------------------------------------------------------------------------------
# Written by  : Kain Nobel
# Version     : 2.0
# Last Update : 10.04.2008
#===============================================================================
#-------------------------------------------------------------------------------
# * SDK Log
#-------------------------------------------------------------------------------
SDK.log('SDK.AutoWrite2File', 'Kain Nobel', 2.0, '10.04.2008')
SDK.disable('SDK.AutoWrite2File')
#-------------------------------------------------------------------------------
# * SDK Enabled Test - BEGIN
#-------------------------------------------------------------------------------
if SDK.enabled?('SDK.AutoWrite2File')
#=============================================================================== 
# ** SDK::AutoWrite
#-------------------------------------------------------------------------------
#   This module handles which type of file logs will be written.
#===============================================================================

module SDK::AutoWrite
  List_Of_Aliases    = true
  List_Of_Enabled    = true
  List_Of_Scripts    = true
  List_Of_Overwrites = true
end

#===============================================================================
# ** Scene_Title
#-------------------------------------------------------------------------------
#   These files are written when you visit Scene_Title.
#===============================================================================

class Scene_Title < SDK::Scene_Base
  #-----------------------------------------------------------------------------
  # * Alias Listing
  #-----------------------------------------------------------------------------
  alias_method :sdk_autologfile_scene_title_main, :main
  #-----------------------------------------------------------------------------
  # * Main
  #-----------------------------------------------------------------------------
  def main
    if SDK::AutoWrite::List_Of_Scripts == true
      SDK.write
    end
    if SDK::AutoWrite::List_Of_Enabled == true
      SDK.write_enabled
    end
    if SDK::AutoWrite::List_Of_Aliases == true
      SDK.write_aliases
    end
    if SDK::AutoWrite::List_Of_Overwrites == true
      SDK.write_overwrites
    end
    sdk_autologfile_scene_title_main
    SDK.disable('SDK.AutoWrite2File')
  end
end

#-------------------------------------------------------------------------------
# * SDK Enabled Test - END
#-------------------------------------------------------------------------------
end
Expand to see the code.
I can add that to the 2.5. Not a bad idea.


I am about half-way moved in now, but I can try to get more work on this done and finishing it soon.
Post updated October 21, 2008

Part 2 Submission : Window_Selectable+ Show
#===============================================================================
# ** Window_Selectable
#-------------------------------------------------------------------------------
#   Added and modified methods, so you don't have to redefine common methods in
# sub-methods of Window_Selectable
#===============================================================================

class Window_Selectable < Window_Base
  #-----------------------------------------------------------------------------
  # * Public Instance Variables
  #-----------------------------------------------------------------------------
  attr_accessor :item_max
  attr_accessor :column_max
  attr_accessor :row_height
  attr_accessor :page_row_max
  attr_accessor :spacing
  attr_accessor :cursor_height
  attr_accessor :cursor_width
  #-----------------------------------------------------------------------------
  # * Alias Listings
  #-----------------------------------------------------------------------------
  alias_method :sdk_win_select_initialize, :initialize
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize(x, y, width, height)
    # The usual...
    sdk_win_select_initialize(x, y, width, height)
    # Default values of these customizable instances are set
    @row_height     = 32
    @page_row_max   = 0
    @spacing        = 0
    @cursor_ox      = 0
    @cursor_oy      = 0
    @cursor_height  = 32
    @cursor_width   = nil
  end
  #-----------------------------------------------------------------------------
  # * Cursor X
  #-----------------------------------------------------------------------------
  def cursor_x
    @cursor_ox = 0 unless @cursor_ox.is_a?(Integer)
    x = @index % @column_max * (cursor_width + 32)
    return x + @cursor_ox * (@index % @column_max)
  end
  #-----------------------------------------------------------------------------
  # * Cursor Y
  #-----------------------------------------------------------------------------
  def cursor_y
    @cursor_oy = 0 unless @cursor_oy.is_a?(Integer)
    y = (@index / @column_max * @row_height - self.oy)
    return y + (@cursor_oy * self.index / @column_max)
  end
  #-----------------------------------------------------------------------------
  # * Cursor Height
  #-----------------------------------------------------------------------------
  def cursor_height
    # Default to 32 unless instance is integer
    unless @cursor_height.is_a?(Integer)
      @cursor_height = 32
    end
    # Return proper instance value
    return @cursor_height
  end
  #-----------------------------------------------------------------------------
  # * Cursor Width
  #-----------------------------------------------------------------------------
  def cursor_width
    # Default to cursor width alithrogram unless instance is integer
    unless @cursor_width.is_a?(Integer)
      @cursor_width = (self.width / @column_max - 32)
    end
    # Return proper instance value
    return @cursor_width
  end
  #-----------------------------------------------------------------------------
  # * Clone Cursor
  #-----------------------------------------------------------------------------
  def clone_cursor(opacity = 128)
    row = @index / @column_max
    self.top_row = row if row < self.top_row
    self.top_row = row - (page_row_max - 1) if row > top_row + (page_row_max - 1)
    y = (@index / @column_max) * 120
    src_rect = Rect.new(0, 0, cursor_width, cursor_height)
    bitmap = Bitmap.new(cursor_width, cursor_height)
    bitmap.stretch_blt(src_rect, self.windowskin, Rect.new(128, 64, 32, 32))
    contents.blt(0, y, bitmap, src_rect, opacity)
  end
  #-----------------------------------------------------------------------------
  # * Update Cursor Rect
  #-----------------------------------------------------------------------------
  def update_cursor_rect
    # Set rect to empty and return method if index less than 0
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # If current row is before top row
    if self.row < self.top_row
      # Scroll so that current row becomes top row
      self.top_row = self.row
    end
    # If current row is more to back than back row
    if row > self.top_row + (self.page_row_max - 1)
      # Scroll so that current row becomes back row
      self.top_row = self.row - (self.page_row_max - 1)
    end
    self.cursor_rect.set(cursor_x, cursor_y, cursor_width, cursor_height)
  end
  #-----------------------------------------------------------------------------
  # * Row
  #-----------------------------------------------------------------------------
  def row
    return @index / @column_max
  end
  #-----------------------------------------------------------------------------
  # * Top Row
  #-----------------------------------------------------------------------------
  def top_row
    # If instance is integer and equal or more than 1
    if @row_height.is_a?(Integer) && @row_height >= 1
      # Return Y offset divided by instance
      return self.oy / @row_height
    end
  end
  #-----------------------------------------------------------------------------
  # * Define Top_Row = (row)
  #-----------------------------------------------------------------------------
  def top_row=(row)
    # If instance is integer
    if @row_height.is_a?(Integer)
      # Row adjusted to 0 if row is less than 0
      row = row < 0 ? 0 : row > row_max - 1 ? row_max - 1 : row
      # Self Y offset is set based off instance
      self.oy = row * (@row_height >= 1 ? @row_height : 32)
    end
  end
  #-----------------------------------------------------------------------------
  # * Page Row Max = (Max)
  #-----------------------------------------------------------------------------
  def page_row_max=(max = nil)
    # If max is integer, set instance to value, else set to origional value
    @page_row_max = max.is_a?(Integer) ? max: page_row_max
    # Return instance
    return @page_row_max
  end
  #-----------------------------------------------------------------------------
  # * Page Row Max
  #-----------------------------------------------------------------------------
  def page_row_max
    # If instance setting is integer and more than or equals 1
    if @page_row_max.is_a?(Integer) && @page_row_max >= 1
      # instance representation is returned
      return @page_row_max
    else
      # Subtract a frame height of 32 from the window height, and divide it by
      # 1 row height of 32
      return (self.height - 32) / 32
    end
  end
  #-----------------------------------------------------------------------------
  # * Frame Update
  #-----------------------------------------------------------------------------
  def update
    super
    # If cursor is movable
    if self.active and @item_max > 0 and @index >= 0
      # If pressing down on the directional buttons
      update_input_down   if Input.repeat?(Input::DOWN)
      # If the up directional button was pressed
      update_input_up     if Input.repeat?(Input::UP)
      # If the right directional button was pressed
      update_input_right  if Input.repeat?(Input::RIGHT)
      # If the left directional button was pressed
      update_input_left   if Input.repeat?(Input::LEFT)
      # If R button was pressed
      update_page_up    if Input.repeat?(Input::R)
      # If L button was pressed
      update_page_down  if Input.repeat?(Input::L)
    end
    # Update help text (update_help is defined by the subclasses)
    if self.active and @help_window != nil
      update_help
    end
    # Update cursor rectangle
    update_cursor_rect
  end
  #-----------------------------------------------------------------------------
  # * Update Input Down
  #-----------------------------------------------------------------------------
  def update_input_down
    # If column count is 1 and directional button was pressed down with no
    # repeat, or if cursor position is more to the front than
    # (item count - column count)
    if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
       @index < @item_max - @column_max
      # Move cursor down
      $game_system.se_play($data_system.cursor_se)
      @index = (@index + @column_max) % @item_max
    end
  end
  #-----------------------------------------------------------------------------
  # * Update Input Up
  #-----------------------------------------------------------------------------
  def update_input_up
    # If column count is 1 and directional button was pressed up with no
    # repeat, or if cursor position is more to the back than column count
    if (@column_max == 1 and Input.trigger?(Input::UP)) or
       @index >= @column_max
      # Move cursor up
      $game_system.se_play($data_system.cursor_se)
      @index = (@index - @column_max + @item_max) % @item_max
    end
  end
  #-----------------------------------------------------------------------------
  # * Update Input Right
  #-----------------------------------------------------------------------------
  def update_input_right
    # If column count is 2 or more, and cursor position is closer to front
    # than (item count -1)
    if @column_max >= 2 and @index < @item_max - 1
      # Move cursor right
      $game_system.se_play($data_system.cursor_se)
      @index += 1
    end
  end
  #-----------------------------------------------------------------------------
  # * Update Input Right
  #-----------------------------------------------------------------------------
  def update_input_left
    # If column count is 2 or more, and cursor position is more back than 0
    if @column_max >= 2 and @index > 0
      # Move cursor left
      $game_system.se_play($data_system.cursor_se)
      @index -= 1
    end
  end
  #-----------------------------------------------------------------------------
  # * Update Page Up
  #-----------------------------------------------------------------------------
  def update_page_up
    # If bottom row being displayed is more to front than bottom data row
    if self.top_row + (self.page_row_max - 1) < (self.row_max - 1)
      # Move cursor 1 page back
      $game_system.se_play($data_system.cursor_se)
      @index = [@index + self.page_item_max, @item_max - 1].min
      self.top_row += self.page_row_max
    end
  end
  #-----------------------------------------------------------------------------
  # * Update Page Down
  #-----------------------------------------------------------------------------
  def update_page_down
    # If top row being displayed is more to back than 0
    if self.top_row > 0
      # Move cursor 1 page forward
      $game_system.se_play($data_system.cursor_se)
      @index = [@index - self.page_item_max, 0].max
      self.top_row -= self.page_row_max
    end
  end
end
Expand to see the code.


Part 2 Submission : Window_Command+ Show
#===============================================================================
# ** Window_Command
#-------------------------------------------------------------------------------
#     Window Command has simply been enhanced with 2 additional initialize args,
# one to specify commands shown at a time, the other to specify alignment, both
# arguments are optional and not required.
#===============================================================================
class Window_Command < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Public Instance Variables
  #-----------------------------------------------------------------------------
  attr_reader :disabled_indices
  attr_reader :disabled_commands
  #-----------------------------------------------------------------------------
  # * Alias Listing
  #-----------------------------------------------------------------------------
  alias_method :cms_win_command_initialize, :initialize
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #        width     : window width
  #        commands : command text string array
  #        size       : how many commands to be shown at a time (optional)
  #        align     : are commands aligned left, right or center (optional)
  #-----------------------------------------------------------------------------
  def initialize(width, commands, max_h = 1)
     cms_win_command_initialize(width, commands)
     self.height = max_h != 1 ? 32 + max_h * 32 : 32 + commands.size * 32
     self.contents = Bitmap.new(width - 32, @item_max * 32)
     @disabled_indices = []
     @disabled_commands = []
     refresh
     self.index = 0
  end
  #-----------------------------------------------------------------------------
  # * Draw Item
  #-----------------------------------------------------------------------------
  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.draw_text(rect, @commands[index])
  end
  #-----------------------------------------------------------------------------
  # * Draw Items
  #-----------------------------------------------------------------------------
  def draw_items
     self.contents.clear
     for i in [email hidden]
        if @disabled_commands.include?(@commands[i])
           draw_item(i, disabled_color)
        else
           draw_item(i, normal_color)
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Command == (?)
  #-----------------------------------------------------------------------------
  def command_is?(command)
     return command[@index] == command
  end
  #-----------------------------------------------------------------------------
  # * Change Command
  #-----------------------------------------------------------------------------
  def change_command(old, new)
     if old.is_a?(Integer) && new.is_a?(String)
        if @commands.size <= old
           @commands[old] = new
           erase_command(old)
           draw_item(i, normal_color)
        end
     elsif old.is_a?(String) && new.is_a?(String)
        for i in [email hidden]
           if @commands[index] == old
              @commands[index] = new
           end
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Disable Command
  #-----------------------------------------------------------------------------
  def disable_command(name)
     for index in [email hidden]
        if @commands[index] == name
           erase_command(index)
           disable_item(index)
           @disabled_indices << index
           @disabled_commands << name
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Enable Command(name)
  #-----------------------------------------------------------------------------
  def enable_command(name)
     for index in [email hidden]
        if @commands[index] == name
           erase_command(index)
           draw_item(index, normal_color)
           @disabled_indices.delete(index)
           @disabled_commands.delete(name)
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Command Disabled?
  #-----------------------------------------------------------------------------
  def command_disabled?(name)
     return @disabled_commands.include?(name)
  end
  #-----------------------------------------------------------------------------
  # * Index Disabled?
  #-----------------------------------------------------------------------------
  def index_disabled?(index = @index)
     return @disabled_indices.include?(index)
  end
  #-----------------------------------------------------------------------------
  # * Clear Command
  #-----------------------------------------------------------------------------
  def erase_command(index)
     rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
     self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  end
end
Expand to see the code.
I'll take a look.

Sorry about the slow update. I am trying to shorten the code an organize things into actual classes, rather than parts. The new format is a little easier.

if SDK::Use_Spriteset_Base

class Spriteset_Map > SDK::Spriteset_Base
  if SDK.use_part(2, 'SPRITESET_MAP#INITIALIZE')
  # spriteset_map#initialize with spriteset_base
  else
  # regular initialize with spriteset_base
  end
  # update and rest of methods
end

else

class Spriteset_Map
  if SDK.use_part(2, 'SPRITESET_MAP#INITIALIZE')
  # spriteset_map#initialize without spriteset_base
  end
end
Expand to see the code.


I have to do that for all the spriteset and scene classes. Essientially, you could use Spriteset_Base and Scene_Base now without even using part 2 or 3. Now, you also don't need part 3 for part 4. So the organization is a lot more complex, but allows even more users. Just a lot of logic.
'GAME_MAP#PASSABLE?' Show
#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) || SDK::Indidual_Parts.include?('GAME_MAP#PASSABLE?')

#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#   This class handles the map. It includes scrolling and passable determining
#   functions. Refer to "$game_map" for the instance of this class.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Scene_Map, :passable?, :passable_event_tile?, :passable_event?,
  :passable_tile?)
  #--------------------------------------------------------------------------
  # * Determine if Passable
  #        x              : x-coordinate
  #        y              : y-coordinate
  #        d              : direction (0,2,4,6,8,10)
  #                           *   0,10 = determine if all directions are impassable
  #        self_event : Self (If event is determined passable)
  #--------------------------------------------------------------------------
  def passable?(x, y, d, self_event = nil)
     # Impassable if coordinates given are outside of the map
     return false unless valid?(x, y)
     # Change direction (0,2,4,6,8,10) to obstacle bit (0,1,2,4,8,0)
     bit = (1 << (d / 2 - 1)) & 0x0f
     # Loop in all events
     for event in events.values
        if passable_event_tile?(event, x, y, self_event)
           unless passable_event?(event, bit).nil?
              return passable_event?(event, bit)
           end
        end
     end
     # Loop searches in order from top of layer
     for i in [2, 1, 0]
        # Get tile ID
        tile_id = data[x, y, i]
        unless passable_tile?(tile_id, bit).nil?
           return passable_tile?(tile_id, bit)
        end
     end
     # passable
     return true
  end
  #--------------------------------------------------------------------------
  # * Passable : Event Tile ?
  #--------------------------------------------------------------------------
  def passable_event_tile?(event, x, y, self_event)
     # If tiles other than self are consistent with coordinates
     return (event.tile_id >= 0 && event != self_event && event.x == x &&
     event.y == y && !event.through)
  end
  #--------------------------------------------------------------------------
  # * Passable : Event ?
  #--------------------------------------------------------------------------
  def passable_event?(event, bit)
     # If obstacle bit is set
     if @passages[event.tile_id] & bit != 0
        # impassable
        return false
     # If obstacle bit is set in all directions
     elsif @passages[event.tile_id] & 0x0f == 0x0f
        # impassable
        return false
     # If priorities other than that are 0
     elsif @priorities[event.tile_id] == 0
        # passable
        return true
     end
     return nil
  end
  #--------------------------------------------------------------------------
  # * Passable : Tile ?
  #--------------------------------------------------------------------------
  def passable_tile?(tile_id, bit)
     # Tile ID acquistion failure
     if tile_id == nil
        # impassable
        return false
     # If obstacle bit is set
     elsif @passages[tile_id] & bit != 0
        # impassable
        return false
     # If obstacle bit is set in all directions
     elsif @passages[tile_id] & 0x0f == 0x0f
        # impassable
        return false
     # If priorities other than that are 0
     elsif @priorities[tile_id] == 0
        # passable
        return true
     end
     return nil
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


'GAME_SCREEN#UPDATE Show
#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) || SDK::Indidual_Parts.include?('GAME_SCREEN#UPDATE')

#==============================================================================
# ** Game_Screen
#------------------------------------------------------------------------------
#   This class handles screen maintenance data, such as change in color tone,
#   flashing, etc. Refer to "$game_screen" for the instance of this class.
#==============================================================================

class Game_Screen
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Game_Screen, :update, :update_tone, :update_flash,
  :update_shake, :update_weather, :update_pictures)
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
     update_tone if @tone_duration >= 1
     update_flash if @flash_duration >= 1
     update_shake if @shake_duration >= 1 or @shake != 0
     update_weather if @weather_duration >= 1
     update_pictures
  end
  #--------------------------------------------------------------------------
  # * Update Tone
  #--------------------------------------------------------------------------
  def update_tone
     d = @tone_duration
     @tone.red = (@tone.red * (d - 1) + @tone_target.red) / d
     @tone.green = (@tone.green * (d - 1) + @tone_target.green) / d
     @tone.blue = (@tone.blue * (d - 1) + @tone_target.blue) / d
     @tone.gray = (@tone.gray * (d - 1) + @tone_target.gray) / d
     @tone_duration -= 1
  end
  #--------------------------------------------------------------------------
  # *
  #--------------------------------------------------------------------------
  def update_flash
     d = @flash_duration
     @flash_color.alpha = @flash_color.alpha * (d - 1) / d
     @flash_duration -= 1
  end
  #--------------------------------------------------------------------------
  # *
  #--------------------------------------------------------------------------
  def update_shake
     delta = (@shake_power * @shake_speed * @shake_direction) / 10.0
     if @shake_duration <= 1 and @shake * (@shake + delta) < 0
        @shake = 0
     else
        @shake += delta
     end
     if @shake > @shake_power * 2
        @shake_direction = -1
     end
     if @shake < - @shake_power * 2
        @shake_direction = 1
     end
     if @shake_duration >= 1
        @shake_duration -= 1
     end
  end
  #--------------------------------------------------------------------------
  # * Update Weather
  #--------------------------------------------------------------------------
  def update_weather
     d = @weather_duration
     @weather_max = (@weather_max * (d - 1) + @weather_max_target) / d
     @weather_duration -= 1
     if @weather_duration == 0
        @weather_type = @weather_type_target
     end
  end
  #--------------------------------------------------------------------------
  # * Update Pictures
  #--------------------------------------------------------------------------
  def update_pictures
     if $game_temp.in_battle
        for i in 51..100
           @pictures[i].update
        end
     else
        for i in 1..50
           @pictures[i].update
        end
     end
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


'GAME_CHARACTER#MOVE_TYPE_RANDOM' Show
#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) ||
   SDK::Indidual_Parts.include?('GAME_CHARACTER#MOVE_TYPE_CUSTOM')

#==============================================================================
# ** Game_Character
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================

class Game_Character
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Game_Character, :move_type_custom, :move_type_custom_moving?,
  :move_type_custom_repeat?, :move_type_custom_movement,
  :move_type_custom_skippable?, :move_type_custom_wait,
  :move_type_custom_direction, :move_type_custom_other)
  SDK.log_branch(:Game_Character, :move_type_custom, :move_type_custom_repeat?,
  :move_type_custom_repeat, :move_type_custom_release)
  #--------------------------------------------------------------------------
  # * Move Type : Custom
  #--------------------------------------------------------------------------
  def move_type_custom
    # Interrupt if not stopping
    if move_type_custom_moving?
      return
    end
    # Loop until finally arriving at move command list
    while @move_route_index < @move_route.list.size
      # Acquiring move command
      command = @move_route.list[@move_route_index]
      # If command code is 0 (last part of list)
      if command.code == 0
        move_type_custom_repeat?(command)
        return
      end
      # During move command (from move down to jump)
      if command.code <= 14
        move_type_custom_movement(command)
        if move_type_custom_skippable?
          # If movement failure occurs when [Ignore if can't move] option is OFF
          move_type_custom_blocked
          return
        end
        @move_route_index += 1
        return
      end
      # If waiting
      if command.code == 15
        move_type_custom_wait(command)
        return
      end
      # If direction change command
      if command.code >= 16 and command.code <= 26
        move_type_custom_direction(command)
        @move_route_index += 1
        return
      end
      # If other command
      if command.code >= 27
        move_type_custom_other(command)
        @move_route_index += 1
      end
    end
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Moving?
  #-----------------------------------------------------------------------------
  def move_type_custom_moving?
    return (jumping? or moving?)
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Repeat?
  #-----------------------------------------------------------------------------
  def move_type_custom_repeat?(command)
    # If [repeat action] option is ON
    if @move_route.repeat
      move_type_custom_repeat
    end
    # If [repeat action] option is OFF
    unless @move_route.repeat
      # If move route is forcing
      if @move_route_forcing and not @move_route.repeat
        move_type_custom_release
      end
      # Clear stop count
      @stop_count = 0
    end
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Repeat
  #-----------------------------------------------------------------------------
  def move_type_custom_repeat
    # First return to the move route index
    @move_route_index = 0
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Reset
  #-----------------------------------------------------------------------------
  def move_type_custom_release
    # Release forced move route
    @move_route_forcing = false
    # Restore original move route
    @move_route = @original_move_route
    @move_route_index = @original_move_route_index
    @original_move_route = nil
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Movement
  #-----------------------------------------------------------------------------
  def move_type_custom_movement(command)
    # Branch by command code
    case command.code
    when 1  # Move down
      move_down
    when 2  # Move left
      move_left
    when 3  # Move right
      move_right
    when 4  # Move up
      move_up
    when 5  # Move lower left
      move_lower_left
    when 6  # Move lower right
      move_lower_right
    when 7  # Move upper left
      move_upper_left
    when 8  # Move upper right
      move_upper_right
    when 9  # Move at random
      move_random
    when 10  # Move toward player
      move_toward_player
    when 11  # Move away from player
      move_away_from_player
    when 12  # 1 step forward
      move_forward
    when 13  # 1 step backward
      move_backward
    when 14  # Jump
      jump(command.parameters[0], command.parameters[1])
    end
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Skippable?
  #-----------------------------------------------------------------------------
  def move_type_custom_skippable?
    return (@move_route.skippable and moving? and jumping?)
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Blocked
  #-----------------------------------------------------------------------------
  def move_type_custom_blocked
    # Insert code here :)
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Wait
  #-----------------------------------------------------------------------------
  def move_type_custom_wait(command)
    # Set wait count
    @wait_count = command.parameters[0] * 2 - 1
    @move_route_index += 1
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Direction
  #-----------------------------------------------------------------------------
  def move_type_custom_direction(command)
    # Branch by command code
    case command.code
    when 16  # Turn down
      turn_down
    when 17  # Turn left
      turn_left
    when 18  # Turn right
      turn_right
    when 19  # Turn up
      turn_up
    when 20  # Turn 90° right
      turn_right_90
    when 21  # Turn 90° left
      turn_left_90
    when 22  # Turn 180°
      turn_180
    when 23  # Turn 90° right or left
      turn_right_or_left_90
    when 24  # Turn at Random
      turn_random
    when 25  # Turn toward player
      turn_toward_player
    when 26  # Turn away from player
      turn_away_from_player
    end
  end
  #-----------------------------------------------------------------------------
  # * Move Type Custom : Other
  #-----------------------------------------------------------------------------
  def move_type_custom_other(command)
    # Branch by command code
    case command.code
    when 27  # Switch ON
      $game_switches[command.parameters[0]] = true
      $game_map.need_refresh = true
    when 28  # Switch OFF
      $game_switches[command.parameters[0]] = false
      $game_map.need_refresh = true
    when 29  # Change speed
      @move_speed = command.parameters[0]
    when 30  # Change freq
      @move_frequency = command.parameters[0]
    when 31  # Move animation ON
      @walk_anime = true
    when 32  # Move animation OFF
      @walk_anime = false
    when 33  # Stop animation ON
      @step_anime = true
    when 34  # Stop animation OFF
      @step_anime = false
    when 35  # Direction fix ON
      @direction_fix = true
    when 36  # Direction fix OFF
      @direction_fix = false
    when 37  # Through ON
      @through = true
    when 38  # Through OFF
      @through = false
    when 39  # Always on top ON
      @always_on_top = true
    when 40  # Always on top OFF
      @always_on_top = false
    when 41  # Change Graphic
      @tile_id = 0
      @character_name = command.parameters[0]
      @character_hue = command.parameters[1]
      if @original_direction != command.parameters[2]
        @direction = command.parameters[2]
        @original_direction = @direction
        @prelock_direction = 0
      end
      if @original_pattern != command.parameters[3]
        @pattern = command.parameters[3]
        @original_pattern = @pattern
      end
    when 42  # Change Opacity
      @opacity = command.parameters[0]
    when 43  # Change Blending
      @blend_type = command.parameters[0]
    when 44  # Play SE
      $game_system.se_play(command.parameters[0])
    when 45  # Script
      result = eval(command.parameters[0])
    end
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


'GAME_ENEMY#MAKE_ACTION' Show
#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) || SDK::Indidual_Parts.include?('GAME_ENEMY#MAKE_ACTION')

#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
#   This class handles enemies. It's used within the Game_Troop class
#   ($game_troop).
#==============================================================================

class Game_Enemy < Game_Battler
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Game_Enemy, :make_action, :action_condition_turn_met?,
  :action_condition_hp_met?, :action_condition_level_met?, :make_action_rating,
  :make_action_ratings_total, :make_action_random)
  #--------------------------------------------------------------------------
  # * Make Action
  #--------------------------------------------------------------------------
  def make_action
     # Clear current action
     self.current_action.clear
     # End method if unable to move
     return unless self.movable?
     # Extract current effective actions
     available_actions = []
     for action in self.actions
        # Confirm turn conditions
        next if !action_condition_turn_met?(action)
        # Confirm HP conditions
        next if !action_condition_hp_met?(action)
        # Confirm level conditions
        next if !action_condition_level_met?(action)
        # Confirm switch conditions
        next if !action_condition_switch_met?(action)
        # Add this action to applicable conditions
        available_actions.push(action)
        rating_max = make_action_rating(action)
     end
     # Calculate total with max rating value at 3 (exclude 0 or less)
     ratings_total = make_action_ratings_total(rating_max, available_actions)
     # If ratings total isn't 0
     if ratings_total > 0
       make_action_random(rating_max, ratings_total, available_actions)
     end
  end
  #--------------------------------------------------------------------------
  # * Action Condition : Turn ?
  #--------------------------------------------------------------------------
  def action_condition_turn_met?(action)
     n = $game_temp.battle_turn
     a = action.condition_turn_a
     b = action.condition_turn_b
     return (b == 0 and n != a) || (b > 0 && (n < 1 || n < a || n % b != a % b))
  end
  #--------------------------------------------------------------------------
  # * Action Condition : Health ?
  #--------------------------------------------------------------------------
  def action_condition_hp_met?(action)
     return !(self.hp * 100.0 / self.maxhp > action.condition_hp)
  end
  #--------------------------------------------------------------------------
  # * Action Condition : Level ?
  #--------------------------------------------------------------------------
  def action_condition_level_met?(action)
     return !($game_party.max_level < action.condition_level)
  end
  #--------------------------------------------------------------------------
  # * Action Condition : Level ?
  #--------------------------------------------------------------------------
  def action_condition_switch_met?(action)
     switch_id = action.condition_switch_id
     return !(switch_id > 0 and $game_switches[switch_id] == false)
  end
  #--------------------------------------------------------------------------
  # * Make Action : Rating
  #--------------------------------------------------------------------------
  def make_action_rating(action)
     if action.rating > 0
        return action.rating
     end
     return 0
  end
  #--------------------------------------------------------------------------
  # * Make Action : Ratings Total
  #--------------------------------------------------------------------------
  def make_action_ratings_total(rating_max, available_actions)
     ratings_total = 0
     for action in available_actions
        if action.rating > rating_max - 3
           ratings_total += action.rating - (rating_max - 3)
        end
     end
     return ratings_total
  end
  #--------------------------------------------------------------------------
  # * Make Action : Random
  #--------------------------------------------------------------------------
  def make_action_random(rating_max, ratings_total, available_actions)
     # Create random numbers
     value = rand(ratings_total)
     # Set things that correspond to created random numbers as current action
     for action in available_actions
        if action.rating > rating_max - 3
           if value < action.rating - (rating_max - 3)
              self.current_action.kind = action.kind
              self.current_action.basic = action.basic
              self.current_action.skill_id = action.skill_id
              self.current_action.decide_random_target_for_enemy
              return
           else
              value -= action.rating - (rating_max - 3)
           end
        end
     end
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


'PART 4#SCENE_ITEM' Show
#==============================================================================
# ** Enable Part III Check
#==============================================================================
if SDK::Parts.include?(4) || SDK::Indidual_Parts.include?('PART 4#SCENE_ITEM')

#==============================================================================
# ** Scene_Item
#------------------------------------------------------------------------------
#   This class performs item screen processing.
#==============================================================================

class Scene_Item < SDK::Scene_Base
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Scene_Item, :update_item, :update_item_cancel,
  :update_item_decision,:update_item_data, :update_item_cant_use?,
  :update_item_scope_ally, :update_item_common_event)
  #--------------------------------------------------------------------------
  # * Update Item
  #--------------------------------------------------------------------------
  def update_item
     # If B button was pressed
     if Input.trigger?(Input::B)
        # Update Item Cancel processing
        update_item_cancel
     end
     # If C button was pressed
     if Input.trigger?(Input::C)
        # Update Item Decision processing
        update_item_decision
     end
  end
  #--------------------------------------------------------------------------
  # * Update Item : Cancel
  #--------------------------------------------------------------------------
  def update_item_cancel
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to menu screen
     $scene = Scene_Menu.new(0)
  end
  #--------------------------------------------------------------------------
  # * Update Item : Decision
  #--------------------------------------------------------------------------
  def update_item_decision
     # Get currently selected data on the item window
     update_item_data
     # If not a use item
     if update_item_cant_use?
        # 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 an ally
     if @item.scope >= 3
        # Update Item Scope Ally
        update_item_scope_ally
     # If effect scope is other than an ally
     else
        # If command event ID is valid
        if @item.common_event_id > 0
           # Update Item Common Event
           update_item_common_event
           return
        end
     end
     return
  end 
  #--------------------------------------------------------------------------
  # * Update Item : Set Data
  #--------------------------------------------------------------------------
  def update_item_data
     @item = @item_window.item
  end
  #--------------------------------------------------------------------------
  # * Update Item : Can't Use?
  #--------------------------------------------------------------------------
  def update_item_cant_use?
     return true unless @item.is_a?(RPG::Item)
     return true unless $game_party.item_can_use?(@item.id)
     return false
  end
  #--------------------------------------------------------------------------
  # * Update Item : Scope Ally
  #--------------------------------------------------------------------------
  def update_item_scope_ally
     # 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)
     if @item.scope == 4 || @item.scope == 6
        @target_window.index = -1
     else
        @target_window.index = 0
     end
  end
  #--------------------------------------------------------------------------
  # * Update Item : Common Event
  #--------------------------------------------------------------------------
  def update_item_common_event
     # 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

#==============================================================================
# ** Ends Enable Part III Check
#==============================================================================
end
Expand to see the code.


'PART 4#SCENE_SKILL' Show
#==============================================================================
# ** Enable Part III Check
#==============================================================================
if SDK::Parts.include?(4) || SDK::Indidual_Parts.include?('PART 4#SCENE_SKILL')

#==============================================================================
# ** Scene_Skill
#------------------------------------------------------------------------------
#   This class performs skill screen processing.
#==============================================================================

class Scene_Skill < SDK::Scene_Base
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Scene_Skill, :update_skill, :update_skill_cancel,
  :update_skill_decision, :update_skill_next_actor, :update_skill_prev_actor)
  SDK.log_branch(:Scene_Skill, :update_skill_decision, :update_skill_cant_use?,
  :update_skill_scope_ally, :update_skill_common_event)
  #--------------------------------------------------------------------------
  # * Frame Update (if skill window is active)
  #--------------------------------------------------------------------------
  def update_skill
     # If B button was pressed
     if Input.trigger?(Input::B)
        update_skill_cancel
        return
     # If C button was pressed
     elsif Input.trigger?(Input::C)
        update_skill_decision
        return
     # If R button was pressed
     elsif Input.trigger?(Input::R)
        update_skill_next_actor
        return
     # If L button was pressed
     elsif Input.trigger?(Input::L)
        update_skill_prev_actor
        return
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Skill : Page Up
  #-----------------------------------------------------------------------------
  def update_skill_next_actor
     # 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 = Scene_Skill.new(@actor_index)
  end
  #-----------------------------------------------------------------------------
  # * Update Skill : Page Down
  #-----------------------------------------------------------------------------
  def update_skill_prev_actor
     # 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 = Scene_Skill.new(@actor_index)
  end
  #-----------------------------------------------------------------------------
  # * Update Skill : Cancel
  #-----------------------------------------------------------------------------
  def update_skill_cancel
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to menu screen
     $scene = Scene_Menu.new(1)
     return
  end
  #-----------------------------------------------------------------------------
  # * Update Skill : Decision
  #-----------------------------------------------------------------------------
  def update_skill_decision
     # Get currently selected data on the skill window
     @skill = @skill_window.skill
     # If unable to use
     if update_skill_cant_use?
        # 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
        update_skill_scope_ally
     # If effect scope is other than ally
     else
        # If common event ID is valid
        if @skill.common_event_id > 0
           update_skill_common_event
           return
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Skill : Can't Use?
  #-----------------------------------------------------------------------------
  def update_skill_cant_use?
     return @skill.nil? || [email protected]_can_use?(@skill.id)
  end
  #-----------------------------------------------------------------------------
  # * Update Skill : Scope Ally
  #-----------------------------------------------------------------------------
  def update_skill_scope_ally
     # 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 @skill.scope == 4 || @skill.scope == 6
        @target_window.index = -1
     elsif @skill.scope == 7
        @target_window.index = @actor_index - 10
     else
        @target_window.index = 0
     end
  end
  #-----------------------------------------------------------------------------
  # * Update Skill : Common Event
  #-----------------------------------------------------------------------------
  def update_skill_common_event
     # 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
end

#==============================================================================
# ** Ends Enable Part III Check
#==============================================================================
end
Expand to see the code.


'PART 4#SCENE_EQUIP' Show
#==============================================================================
# ** Enable Part III Check
#==============================================================================
if SDK::Parts.include?(4) || SDK::Indidual_Parts.include?('PART 4#SCENE_EQUIP')

#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
#   This class performs equipment screen processing.
#==============================================================================

class Scene_Equip < SDK::Scene_Base
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Scene_Equip, :refresh, :refresh_visibility,
  :refresh_current_window, :refresh_clear_parameters,
  :refresh_modified_parameters)
  SDK.log_branch(:Scene_Equip, :update_right, :update_right_cancel,
  :update_right_decision, :update_right_next_actor, :update_right_prev_actor)
  SDK.log_branch(:Scene_Equip, :update_item, :update_item_cancel,
  :update_item_decision)
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
     # Set item window to visible
     refresh_visibility
     # Set current item window to @item_window
     @item_window = refresh_current_window
     # If right window is active
     refresh_clear_parameters if @right_window.active
     # If item window is active
     refresh_modified_parameters if @item_window.active
  end
  #--------------------------------------------------------------------------
  # * Refresh : Visibility
  #--------------------------------------------------------------------------
  def refresh_visibility
     @item_window1.visible = (@right_window.index == 0)
     @item_window2.visible = (@right_window.index == 1)
     @item_window3.visible = (@right_window.index == 2)
     @item_window4.visible = (@right_window.index == 3)
     @item_window5.visible = (@right_window.index == 4)
  end
  #--------------------------------------------------------------------------
  # * Refresh : Current Window
  #--------------------------------------------------------------------------
  def refresh_current_window
     case @right_window.index
     when 0 then return @item_window1
     when 1 then return @item_window2
     when 2 then return @item_window3
     when 3 then return @item_window4
     when 4 then return @item_window5
     end
  end
  #--------------------------------------------------------------------------
  # * Refresh : Clear Parameters
  #--------------------------------------------------------------------------
  def refresh_clear_parameters    
     # Erase parameters for after equipment change
     @left_window.set_new_parameters(nil, nil, nil)
  end
  #--------------------------------------------------------------------------
  # * Refresh New Parameters
  #--------------------------------------------------------------------------
  def refresh_modified_parameters
     # Get currently equipped item
     item1 = @right_window.item
     # Get currently selected item
     item2 = @item_window.item
     # Change equipment
     last_hp = @actor.hp
     last_sp = @actor.sp
     @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
     # 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)
  end 
  #--------------------------------------------------------------------------
  # * Frame Update (when right window is active)
  #--------------------------------------------------------------------------
  def update_right
     # If B button was pressed
     if Input.trigger?(Input::B)
        update_right_cancel
        return
     end
     # If C button was pressed
     if Input.trigger?(Input::C)
        update_right_decision
        return
     end
     # If R button was pressed
     if Input.trigger?(Input::R)
        update_right_next_actor
        return
     end
     # If L button was pressed
     if Input.trigger?(Input::L)
        update_right_prev_actor
        return
     end
  end
  #--------------------------------------------------------------------------
  # * Update Right : Cancel
  #--------------------------------------------------------------------------
  def update_right_cancel
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to menu screen
     $scene = Scene_Menu.new(2)
  end
  #--------------------------------------------------------------------------
  # * Update Right : Decision
  #--------------------------------------------------------------------------
  def update_right_decision
     # 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
  end
  #--------------------------------------------------------------------------
  # * Update Right :
  #--------------------------------------------------------------------------
  def update_right_next_actor
     # 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)
  end
  #--------------------------------------------------------------------------
  # * Update Right :
  #--------------------------------------------------------------------------
  def update_right_prev_actor
     # 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
  #--------------------------------------------------------------------------
  # * Update Item
  #--------------------------------------------------------------------------
  def update_item
     # If B button was pressed
     if Input.trigger?(Input::B)
        update_item_cancel
        return
     end
     # If C button was pressed
     if Input.trigger?(Input::C)
        update_item_decision
        return
     end
  end
  #--------------------------------------------------------------------------
  # * Update Item : Cancel
  #--------------------------------------------------------------------------
  def update_item_cancel
     # 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
  end
  #--------------------------------------------------------------------------
  # * Update Item : Decision
  #--------------------------------------------------------------------------
  def update_item_decision
     # 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

#==============================================================================
# ** Ends Enable Part III Check
#==============================================================================
end
Expand to see the code.


'PART 4#SCENE_STATUS' Show
#==============================================================================
# ** Enable Part III Check
#==============================================================================
if SDK::Parts.include?(4) ||
    SDK::Indidual_Parts.include?('PART 4#SCENE_STATUS')

#==============================================================================
# ** Scene_Status
#------------------------------------------------------------------------------
#   This class performs status screen processing.
#==============================================================================

class Scene_Status < SDK::Scene_Base
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Scene_Status, :update, :update_main_cancel,
  :update_main_next_actor, :update_main_prev_actor)
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
     super
     # If B button was pressed
     if Input.trigger?(Input::B)
        update_main_cancel
        return
     end
     # If R button was pressed
     if Input.trigger?(Input::R)
        update_main_next_actor
        return
     end
     # If L button was pressed
     if Input.trigger?(Input::L)
        update_main_prev_actor
        return
     end
  end
  #--------------------------------------------------------------------------
  # * Update Main Cancel
  #--------------------------------------------------------------------------
  def update_main_cancel
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to menu screen
     $scene = Scene_Menu.new(3)
  end
  #--------------------------------------------------------------------------
  # * Update Main Next Actor
  #--------------------------------------------------------------------------
  def update_main_next_actor
     # 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 = Scene_Status.new(@actor_index)
  end
  #--------------------------------------------------------------------------
  # * Update Scene Prev Actor
  #--------------------------------------------------------------------------
  def update_main_prev_actor
     # 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 = Scene_Status.new(@actor_index)
  end
end

#==============================================================================
# ** Ends Enable Part III Check
#==============================================================================
end
Expand to see the code.
Huh, I just noticed a nice feature of SMF...it marks the thread with new replies if the last post was modified.  Nice.  And I would have to agree that those methods splits are a good idea.

How's the progress, Seph?
HAH! This didn't fit...

'PART 4#SCENE_DEBUG' Show
#==============================================================================
# ** Enable Part IV Check
#==============================================================================
if SDK::Parts.include?(4) || SDK::Indidual_Parts.include?('PART 4#SCENE_DEBUG')

#==============================================================================
# ** Scene_Debug
#------------------------------------------------------------------------------
#   This class performs debug screen processing.
#==============================================================================

class Scene_Debug < SDK::Scene_Base
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Scene_Debug, :update_left, :update_left_cancel,
  :update_left_decision, :update_left_help)
  SDK.log_branch(:Scene_Debug, :update_right, :update_right_cancel,
  :update_switch, :update_variable)
  SDK.log_branch(:Scene_Debug, :update_variable, :update_variable_add_1,
  :update_variable_sub_1, :update_variable_add_10, :update_variable_sub_10)
  #--------------------------------------------------------------------------
  # * Frame Update (when left window is active)
  #--------------------------------------------------------------------------
  def update_left
     # If B button was pressed
     if Input.trigger?(Input::B)
        update_left_cancel
        return
     end
     # If C button was pressed
     if Input.trigger?(Input::C)
        update_left_decision
        return
     end
  end
  #--------------------------------------------------------------------------
  # * Update Left : Cancel
  #--------------------------------------------------------------------------
  def update_left_cancel
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to map screen
     $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # * Update Left : Decision
  #--------------------------------------------------------------------------
  def update_left_decision
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Display help
     update_left_help
     # Activate right window
     @left_window.active = false
     @right_window.active = true
     @right_window.index = 0
  end
  #--------------------------------------------------------------------------
  # * Update Left : Help
  #--------------------------------------------------------------------------
  def update_left_help
     if @left_window.mode == 0
        text1 = "C (Enter) : ON / OFF"
        @help_window.contents.draw_text(4, 0, 406, 32, text1)
     else
        text1 = "Left : -1    Right : +1"
        text2 = "L (Pageup) : -10"
        text3 = "R (Pagedown) : +10"
        @help_window.contents.draw_text(4, 0, 406, 32, text1)
        @help_window.contents.draw_text(4, 32, 406, 32, text2)
        @help_window.contents.draw_text(4, 64, 406, 32, text3)
     end
  end
  #--------------------------------------------------------------------------
  # * Update Right
  #--------------------------------------------------------------------------
  def update_right
     # If B button was pressed
     if Input.trigger?(Input::B)
        update_right_cancel
        return
     end
     # Get selected switch / variable ID
     current_id = @right_window.top_id + @right_window.index
     # If switch
     if @right_window.mode == 0
        # If C button was pressed
        if Input.trigger?(Input::C)
           update_switch(current_id)
           return
        end
     end
     # If variable
     if @right_window.mode == 1
        update_variable(current_id)
     end
  end
  #--------------------------------------------------------------------------
  # * Update Right : Cancel
  #--------------------------------------------------------------------------
  def update_right_cancel
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Activate left window
     @left_window.active = true
     @right_window.active = false
     @right_window.index = -1
     # Erase help
     @help_window.contents.clear
  end
  #--------------------------------------------------------------------------
  # * Update Switch
  #--------------------------------------------------------------------------
  def update_switch(id)
     # Play decision SE
     $game_system.se_play($data_system.decision_se)
     # Reverse ON / OFF
     $game_switches[id] = !$game_switches[id]
     @right_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Update Variable
  #--------------------------------------------------------------------------
  def update_variable(id)
     # If right button was pressed
     if Input.repeat?(Input::RIGHT)
        update_variable_add_1(id)
        return
     end
     # If left button was pressed
     if Input.repeat?(Input::LEFT)
        update_variable_sub_1(id)
        return
     end
     # If R button was pressed
     if Input.repeat?(Input::R)
        update_variable_add_10(id)
        return
     end
     # If L button was pressed
     if Input.repeat?(Input::L)
        update_variable_sub_10(id)
        return
     end
  end
  #--------------------------------------------------------------------------
  # * Update Variable : Add +1
  #--------------------------------------------------------------------------
  def update_variable_add_1(id)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # Increase variables by 1
     $game_variables[id] += 1
     # Maximum limit check
     if $game_variables[id] > 99999999
        $game_variables[id] = 99999999
     end
     @right_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Update Variable : Sub -1
  #--------------------------------------------------------------------------
  def update_variable_sub_1(id)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # Decrease variables by 1
     $game_variables[id] -= 1
     # Minimum limit check
     if $game_variables[id] < -99999999
        $game_variables[id] = -99999999
     end
     @right_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Update Variable : Add +10
  #--------------------------------------------------------------------------
  def update_variable_add_10(id)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # Increase variables by 10
     $game_variables[id] += 10
     # Maximum limit check
     if $game_variables[id] > 99999999
        $game_variables[id] = 99999999
     end
     @right_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Update Variable : Sub -10
  #--------------------------------------------------------------------------
  def update_variable_sub_10(id)
     # Play cursor SE
     $game_system.se_play($data_system.cursor_se)
     # Decrease variables by 10
     $game_variables[id] -= 10
     # Minimum limit check
     if $game_variables[id] < -99999999
        $game_variables[id] = -99999999
     end
     @right_window.refresh
  end
end

#==============================================================================
# ** Ends Enable Part IV Check
#==============================================================================
end
Expand to see the code.


'INTERPRETER#SETUP_STARTING_EVENT' Show
#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) ||
  SDK::Indidual_Parts.include?('INTERPRETER#SETUP_STARTING_EVENT')

#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
#   This interpreter runs event commands. This class is used within the
#   Game_System class and the Game_Event class.
#==============================================================================

class Interpreter
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Interpreter, :setup_starting_event,
  :setup_starting_event_refresh, :setup_starting_common_event_reserve,
  :setup_starting_map_events, :setup_starting_common_events)
  SDK.log_branch(:Interpreter, :setup_starting_event, :setup_starting_map_events,
  :setup_starting_event_lock)
  #--------------------------------------------------------------------------
  # * Starting Event Setup
  #--------------------------------------------------------------------------
  def setup_starting_event
     # Refresh objects
     if $game_map.need_refresh
        setup_starting_event_refresh
     end
     # If common event call is reserved
     if $game_temp.common_event_id > 0
        setup_starting_common_event_reserve
        return
     end
     # Loop (Map Events)
     for event in $game_map.events.values
        # If running event is found
        if event.starting
           setup_starting_map_events(event)
           return
        end
     end
     # Loop (Common Events)
     for common_event in $data_common_events.compact
        # If trigger is auto run, and condition switch is ON
        if common_event.trigger == 1 and $game_switches[common_event.switch_id]
           setup_starting_common_events(common_event)
           return
        end
     end
  end
  #---------------------------------------------------------------------------
  # * Setup Starting Event Refresh Map
  #---------------------------------------------------------------------------
  def setup_starting_event_refresh
     # Refresh map if necessary
     $game_map.refresh
  end
  #---------------------------------------------------------------------------
  # * Setup Starting Common Event Reserve
  #---------------------------------------------------------------------------
  def setup_starting_common_event_reserve
     # Set up event
     setup($data_common_events[$game_temp.common_event_id].list, 0)
     # Release reservation
     $game_temp.common_event_id = 0
  end
  #---------------------------------------------------------------------------
  # * Setup Starting Map Events
  #---------------------------------------------------------------------------
  def setup_starting_map_events(event)
     # If not auto run
     if event.trigger < 3
        setup_starting_event_lock(event)
     end
     # Set up event
     setup(event.list, event.id)
  end
  #---------------------------------------------------------------------------
  # * Setup Starting Event Lock
  #---------------------------------------------------------------------------
  def setup_starting_event_lock
     # Clear starting flag
     event.clear_starting
     # Lock
     event.lock
  end
  #---------------------------------------------------------------------------
  # * Setup Starting Common Events
  #---------------------------------------------------------------------------
  def setup_starting_common_events(common_event)
     # Set up event
     setup(common_event.list, 0)
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


'INTERPRETER#COMMAND_111' Show
#==============================================================================
# ** Enable Part II Check
#==============================================================================
if SDK::Parts.include?(2) ||
  SDK::Indidual_Parts.include?('INTERPRETER#COMMAND_111')
 
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
#   This interpreter runs event commands. This class is used within the
#   Game_System class and the Game_Event class.
#==============================================================================

class Interpreter
  #--------------------------------------------------------------------------
  # * SDK Log Branch
  #--------------------------------------------------------------------------
  SDK.log_branch(:Interpreter, :command_111, :condition_switch,
  :condition_variable, :condition_local, :condition_timer, :condition_actor,
  :condition_enemy_state, :condition_facing, :condition_gold, :condition_items,
  :condition_weapons, :condition_armors, :condition_input, :condition_script)
  #---------------------------------------------------------------------------
  # * Conditional Branch
  #---------------------------------------------------------------------------
  def command_111
     result = false
     case @parameters[0]
     when 0  ; result = condition_switch
     when 1  ; result = condition_variable
     when 2  ; result = condition_local
     when 3  ; result = condition_timer
     when 4  ; result = condition_actor
     when 5  ; result = condition_enemy_state
     when 6  ; result = condition_facing
     when 7  ; result = condition_gold
     when 8  ; result = condition_items
     when 9  ; result = condition_weapons
     when 10 ; result = condition_armors
     when 11 ; result = condition_input
     when 12 ; result = condition_script
     end
     @branch[@list[@index].indent] = result
     if @branch[@list[@index].indent] == true
        @branch.delete(@list[@index].indent)
        return true
     end
     return command_skip
  end
  #-----------------------------------------------------------------------------
  # * Condition Switch
  #-----------------------------------------------------------------------------
  def condition_switch
     return ($game_switches[@parameters[1]] == (@parameters[2] == 0))
  end
  #-----------------------------------------------------------------------------
  # * Condition Variable
  #-----------------------------------------------------------------------------
  def condition_variable
     value1 = $game_variables[@parameters[1]]
     if @parameters[2].zero? ; value2 = @parameters[3]
     else                             ; value2 = $game_variables[@parameters[3]]
     end
     case @parameters[4]
     when 0 ; return (value1 == value2)
     when 1 ; return (value1 >= value2)
     when 2 ; return (value1 <= value2)
     when 3 ; return (value1 > value2)
     when 4 ; return (value1 < value2)
     when 5 ; return (value1 != value2)
     end
  end
  #-----------------------------------------------------------------------------
  # * Condition Local
  #-----------------------------------------------------------------------------
  def condition_local
     if @event_id > 0
        key = [$game_map.map_id, @event_id, @parameters[1]]
        if @parameters[2].zero? ; return ($game_self_switches[key] == true)
        else                             ; return ($game_self_switches[key] != true)
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Condition Timer
  #-----------------------------------------------------------------------------
  def condition_timer
     if $game_system.timer_working
        sec = $game_system.timer / Graphics.frame_rate
        if @parameters[2].zero? ; return (sec >= @parameters[1])
        else                             ; return (sec <= @parameters[1])
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Condition Actor
  #-----------------------------------------------------------------------------
  def condition_actor
     actor = $game_actors[@parameters[1]]
     unless actor.nil?
        case @parameters[2]
        when 0 ; return ($game_party.actors.include?(actor))
        when 1 ; return (actor.name == @parameters[3])
        when 2 ; return (actor.skill_learn?(@parameters[3]))
        when 3 ; return (actor.weapon_id == @parameters[3])
        when 4 ; return (actor.armor1_id == @parameters[3] or
                          actor.armor2_id == @parameters[3] or
                          actor.armor3_id == @parameters[3] or
                          actor.armor4_id == @parameters[3])
        when 5 ; return (actor.state?(@parameters[3]))
        end
     end
  end
  #-----------------------------------------------------------------------------
  # * Condition Enemy State
  #-----------------------------------------------------------------------------
  def condition_enemy_state
     enemy = $game_troop.enemies[@parameters[1]]
     unless enemy.nil?
        case @parameters[2]
        when 0 ; return (enemy.exist?)
        when 1 ; return (enemy.state?(@parameters[3]))
        end
     end    
  end
  #-----------------------------------------------------------------------------
  # * Condition Facing
  #-----------------------------------------------------------------------------
  def condition_facing
     character = get_character(@parameters[1])
     unless character.nil?
        return (character.direction == @parameters[2])
     end
  end
  #-----------------------------------------------------------------------------
  # * Condition Gold
  #-----------------------------------------------------------------------------
  def condition_gold
     if @parameters[2].zero? ; return ($game_party.gold >= @parameters[1])
     else                             ; return ($game_party.gold <= @parameters[1])
     end    
  end
  #-----------------------------------------------------------------------------
  # * Condition Items
  #-----------------------------------------------------------------------------
  def condition_items
     return ($game_party.item_number(@parameters[1]) > 0)
  end
  #-----------------------------------------------------------------------------
  # * Condition Weapons
  #-----------------------------------------------------------------------------
  def condition_weapons
     return ($game_party.weapon_number(@parameters[1]) > 0)
  end
  #-----------------------------------------------------------------------------
  # * Condition Armors
  #-----------------------------------------------------------------------------
  def condition_armors
     return ($game_party.armor_number(@parameters[1]) > 0)
  end
  #-----------------------------------------------------------------------------
  # * Condition Input
  #-----------------------------------------------------------------------------
  def condition_input
     return (Input.press?(@parameters[1]))
  end
  #-----------------------------------------------------------------------------
  # * Condition Script
  #-----------------------------------------------------------------------------
  def condition_script
     return eval(@parameters[1]).nil? ? false : eval(@parameters[1])
  end
end

#==============================================================================
# ** Ends Enable Part II Check
#==============================================================================
end
Expand to see the code.


Seph, I was thinking of re-writting the Window_HorizCommand prettymuch entirely. I mean, it would still retain its old functionality and arguments, but I wanted to enhance it. For instance, I don't like the way the commands are handled, such as the fact that if you include too many they just squish up instead of scrolling.

Also, I was thinking of adding additional arguments to the initialize, and changing the way c_spacing handles itself. Instead of (width / c_spacing) or whatever, I'd do something like initialize(width, commands[, max_shown, column_max]) and allow the window to have columns like...

max_shown = 3
column_max = 2

command 1  |  command 2  |  command 3
command 4  |  command 5  |  command 6

Which would change the Window_HorizCommand height to include two + columns of commands if this is something you're wanting to do.

Also, I'm thinking of scrolling the commands too, just like the origional vertical Window Command, so you can scroll commands left and right. Do you plan on making any changes like this? If not do you care if I change it?
I was always a bit unclear on how c_spacing worked, but I have a multi-row command window sitting around that I could spruce up for the SDK if you're interested.
c_spacing, in my honest opinion, is a very useless argument (or, I just don't see anybody going through the trouble of changing it.) Besides, the window doesn't scroll commands left/right, just squishes them together, so you're limited to just the number of commands you can squeeze into the window. I think that it should be redefined in a major way, because its pretty limited.

I'm working on a new version of Window_HorizCommand myself based off the newly defined Window_Selectable, but you should post your window anyway, there's probably alot we could do with it :thumb:
This is a mildly improved Window_Command which integrates horizontal command windows with variable rows.  It's still limited by Window_Selectable, in that it squishes commands together rather than making a left-right scrollable window.  This is because making it otherwise would require a rewrite of Window_Selectable, which it sounds like you have anyway Kain.  In order to use it you simply need to provide a column_max variable in the initialization.  To make a single row command window, you would just provide commands.size.  To make a two row command window, commands.size / 2.

I honestly think that the update_cursor_rect method of Window_Selectable is flawed...the cursor width is defined:
cursor_width = self.width / @column_max - 32
While it should be defined:
cursor_width = (self.width - 32) / @column_max

If it were like that it wouldn't squish the cursor rects like it does...but since that's the Window_Selectable, that's this Window_Command.  This is truly just a wrapper to put text into Window_Selectable.  Again, we could use an improvement on Window_Selectable...

Here's my work:
#===============================================================================
# Â ¦ Window_Command
#-------------------------------------------------------------------------------
#   Written by mewsterus
#===============================================================================

class Window_Command < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Public Instance Variables
  #-----------------------------------------------------------------------------
  attr_reader   :column_max
  attr_reader   :commands
  #-----------------------------------------------------------------------------
  # Make the window
  #-----------------------------------------------------------------------------
  def initialize(width, commands, column_max = 1, align = column_max == 1 ? 0:1)
    h = commands.size % column_max == 0 ? commands.size / column_max * 32 :
                                          commands.size / column_max * 32 + 32
    super(0, 0, width, h + 32)
    @column_max = column_max
    @item_max = commands.size
    @commands = commands
    @align = align
    self.contents = Bitmap.new(width - 32, h)
    refresh
  end
  #-----------------------------------------------------------------------------
  # @ Refresh the window
  #-----------------------------------------------------------------------------
  def refresh
    # Return if Window is Not Initialized
    return if self.contents.nil?
    # Deletes Existing Contents
    self.contents.dispose
    # Recreates Contents
    h = @item_max % @column_max == 0 ? @item_max / @column_max * 32 :
                                       @item_max / @column_max * 32 + 32
    self.contents = Bitmap.new(width - 32, h)
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #-----------------------------------------------------------------------------
  # @ Draw choice
  #-----------------------------------------------------------------------------
  def draw_item(index, color)
    cursor_width = self.width / @column_max - 32
    x = index % @column_max * (cursor_width + 32)
    y = index / @column_max * 32
    rect = Rect.new(x + 4, y, cursor_width - 8, 32)
    self.contents.font.color = color
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index], @align)
  end
  #-----------------------------------------------------------------------------
  # @ Disable choice
  #-----------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
  #-----------------------------------------------------------------------------
  # * Command
  #-----------------------------------------------------------------------------
  def command(index = self.index)
    return @commands[index]
  end
  #-----------------------------------------------------------------------------
  # * Commands
  #-----------------------------------------------------------------------------
  def commands=(commands)
    # Return if Commands are the Same
    return if @commands == commands
    # Reset Commands
    @commands = commands
    # Resets Item Max
    @item_max = @commands.size
    # Refresh Window
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Column Maximum
  #-----------------------------------------------------------------------------
  def column_max=(column_max)
    # Return if Column Maximum is the Same
    return if @column_man == column_max
    # Reset Column max
    @column_max = column_max
    # Refresh Window
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Width
  #-----------------------------------------------------------------------------
  def width=(width)
    # Return if Width is the Same
    return if self.width == width
    # Reset Width
    super(width)
    # Refresh Window
    refresh
  end
end
Expand to see the code.
Yeah, that broken down Window_Selectable is alot easier and quicker to use than the standard, and is somewhat more flexible, you don't even have to 'redefine' top_row or page_row_max or nothing, its all set in initialize via @instances. I even broke down the updates for Input.press stuff. However, default window classes still have their own update_cursor_rect redefinitions, in that case you may sometimes need to just call 'super' for that method in future defs.

Hm, I see what you're talking about with update_cursor_rect, and I was having troubles converting Window_HorizCommand to my new version of Window_Selectable for the same reasons, the update_cursor_rect and draw_item stuff gave me trouble trying to do it left/right instead of up/down. When I'm not working on anything important, I'm gonna take another look at it unless anybody else wants to try.

I'm gonna play around with your new Window_Command too and see how it works, I'm glad somebody went with this idea, it could probably be a cool alternative to use with/instead of Window_HorizCommand.
Another small addition to the ever-growing SDK lib...

"SPRITE_CHARACETER#UPDATE" Show
#==============================================================================
# ** Sprite_Character
#------------------------------------------------------------------------------
#  This sprite is used to display the character.It observes the Game_Character
#  class and automatically changes sprite conditions.
#==============================================================================

class Sprite_Character < RPG::Sprite
  #--------------------------------------------------------------------------
  # * Update Graphic?
  #--------------------------------------------------------------------------
  def update_graphic?
    return true if @tile_id != @character.tile_id
    return true if @character_name != @character.character_name
    return true if @character_hue != @character.character_hue
    return false
  end
  #--------------------------------------------------------------------------
  # * Update : Graphic
  #--------------------------------------------------------------------------
  def update_graphic
    # Remember tile ID, file name, and hue
    @tile_id = @character.tile_id
    @character_name = @character.character_name
    @character_hue = @character.character_hue
    # If tile ID value is valid
    if @tile_id >= 384
      update_graphic_tile_valid
    # If tile ID value is invalid
    else
      update_graphic_tile_invalid
    end
  end
  #--------------------------------------------------------------------------
  # * Update Graphic Tile Valid
  #--------------------------------------------------------------------------
  def update_graphic_tile_valid
    self.bitmap = RPG::Cache.tile($game_map.tileset_name, @tile_id,
      @character.character_hue)
    self.src_rect.set(0, 0, 32, 32)
    self.ox = 16
    self.oy = 32
  end
  #--------------------------------------------------------------------------
  # * Update Graphic Tile Invalid
  #--------------------------------------------------------------------------
  def update_graphic_tile_invalid
    self.bitmap = RPG::Cache.character(@character.character_name,
      @character.character_hue)
    @cw = bitmap.width / 4
    @ch = bitmap.height / 4
    self.ox = @cw / 2
    self.oy = @ch
  end
  #--------------------------------------------------------------------------
  # * Update Tile Valid
  #--------------------------------------------------------------------------
  def update_tile_valid
    # Set rectangular transfer
    sx = @character.pattern * @cw
    sy = (@character.direction - 2) / 2 * @ch
    self.src_rect.set(sx, sy, @cw, @ch)
  end
  #--------------------------------------------------------------------------
  # * Update Sprite Settings
  #--------------------------------------------------------------------------
  def update_sprite_settings
    # Set sprite coordinates
    self.x = @character.screen_x
    self.y = @character.screen_y
    self.z = @character.screen_z(@ch)
    # Set opacity level, blend method, and bush depth
    self.opacity = @character.opacity
    self.blend_type = @character.blend_type
    self.bush_depth = @character.bush_depth
  end
  #--------------------------------------------------------------------------
  # * Update Sprite Animation
  #--------------------------------------------------------------------------
  def update_sprite_animation
    animation = $data_animations[@character.animation_id]
    animation(animation, true)
    @character.animation_id = 0
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    # If tile ID, file name, or hue are different from current ones
    if update_graphic?
      update_graphic
    end
    # Set visible situation
    self.visible = (not @character.transparent)
    # If graphic is character
    if @tile_id == 0
      update_tile_valid
    end
    update_sprite_settings
    # Animation
    if @character.animation_id != 0
      update_sprite_animation
    end
  end
end
Expand to see the code.


There you go Seph, now we've written almost another half of an SDK here... update, update !!! :D
Sorry for the lack of updates but it looks like you guys have posted some good things here. I'll be going over them and working on getting this updated before the holidays.
I've made improvements to that Window_Command since posting it.  These improvements basically allow to enable and disable commands at will, selecting them by name instead of index if desired, and to check whether they are enabled or not based on index or command name.  I used these features extensively in Map Image Maker for the options scene, so it never had to keep track of what command was which; I could change commands from ON to OFF and they would still function correctly when using a @command_window.command case.

#===============================================================================
# Â ¦ Window_Command
#-------------------------------------------------------------------------------
#   Written by mewsterus
#===============================================================================

class Window_Command < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Public Instance Variables
  #-----------------------------------------------------------------------------
  attr_reader   :column_max
  attr_reader   :commands
  #-----------------------------------------------------------------------------
  # Make the window
  #-----------------------------------------------------------------------------
  def initialize(width, commands, column_max = 1, align = column_max == 1 ? 0:1)
    return if commands.size == 0
    h = commands.size % column_max == 0 ? commands.size / column_max * 32 :
                                          commands.size / column_max * 32 + 32
    super(0, 0, width, h + 32)
    @column_max = column_max
    @item_max = commands.size
    @commands = commands
    @enabled = []
    @align = align
    self.contents = Bitmap.new(width - 32, h)
    refresh
    self.index = 0
  end
  #-----------------------------------------------------------------------------
  # @ Refresh the window
  #-----------------------------------------------------------------------------
  def refresh
    # Return if Window is Not Initialized
    return if self.contents.nil?
    # Deletes Existing Contents
    self.contents.dispose
    # Recreates Contents
    h = @item_max % @column_max == 0 ? @item_max / @column_max * 32 :
                                       @item_max / @column_max * 32 + 32
    self.height = h + 32
    self.contents = Bitmap.new(width - 32, h)
    for i in 0...@item_max
      enable_item(i)
    end
  end
  #-----------------------------------------------------------------------------
  # @ Draw choice
  #-----------------------------------------------------------------------------
  def draw_item(index, color = normal_color)
    cursor_width = self.width / @column_max - 32
    x = index % @column_max * (cursor_width + 32)
    y = index / @column_max * 32
    rect = Rect.new(x + 4, y, cursor_width - 8, 32)
    self.contents.font.color = color
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index], @align)
  end
  #-----------------------------------------------------------------------------
  # @ Disable choice
  #-----------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
    @enabled[index] = false
  end
  #-----------------------------------------------------------------------------
  # @ Enable choice
  #-----------------------------------------------------------------------------
  def enable_item(index)
    draw_item(index, normal_color)
    @enabled[index] = true
  end
  #-----------------------------------------------------------------------------
  # @ Is this choice enabled?
  #-----------------------------------------------------------------------------
  def item_enabled?(index)
    return @enabled[index]
  end
  #-----------------------------------------------------------------------------
  # @ Disable choice
  #-----------------------------------------------------------------------------
  def disable_command(command)
    return if @commands.index(command) == nil
    draw_item(@commands.index(command), disabled_color)
    @enabled[@commands.index(command)] = false
  end
  #-----------------------------------------------------------------------------
  # @ Enable choice
  #-----------------------------------------------------------------------------
  def enable_command(command)
    return if @commands.index(command) == nil
    draw_item(@commands.index(command), normal_color)
    @enabled[@commands.index(command)] = true
  end
  #-----------------------------------------------------------------------------
  # @ Is this choice enabled?
  #-----------------------------------------------------------------------------
  def command_enabled?(command)
    return false if @commands.index(command) == nil
    return @enabled[@commands.index(command)]
  end
  #-----------------------------------------------------------------------------
  # * Command
  #-----------------------------------------------------------------------------
  def command(index = self.index)
    return @commands[index]
  end
  #-----------------------------------------------------------------------------
  # * Commands
  #-----------------------------------------------------------------------------
  def commands=(commands)
    # Return if Commands are the Same
    return if @commands == commands
    # Reset Commands
    @commands = commands
    # Resets Item Max
    @item_max = @commands.size
    # Refresh Window
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Commands
  #-----------------------------------------------------------------------------
  def set_command(index, command)
    @commands[index] = command
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Commands
  #-----------------------------------------------------------------------------
  def change_command(orig, command)
    return if @commands.index(orig) == nil
    @commands[@commands.index(orig)] = command
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Column Maximum
  #-----------------------------------------------------------------------------
  def column_max=(column_max)
    # Return if Column Maximum is the Same
    return if @column_man == column_max
    # Reset Column max
    @column_max = column_max
    # Refresh Window
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Width
  #-----------------------------------------------------------------------------
  def width=(width)
    # Return if Width is the Same
    return if self.width == width
    # Reset Width
    super(width)
    # Refresh Window
    refresh
  end
end
Expand to see the code.

Example of usage:
      case @command_window.command
      when "Characters: OFF"
        root.characters_on = true
        @command_window.change_command("Characters: OFF", "Characters: ON")
      when "Characters: ON"
        root.characters_on = false
        @command_window.change_command("Characters: ON", "Characters: OFF")
Expand to see the code.

  def update_top_window
    # If there is an existing tilemap, allow saving and manipulating
    if @tilemaps[@left_window.index]['map'] == nil
      @top_window.change_command("Save", "Generate")
      @top_window.disable_command("Manipulate")
    else
      @top_window.change_command("Generate", "Save")
      @top_window.enable_command("Manipulate")
    end
  end
Expand to see the code.

      when "Manipulate"
        unless @top_window.command_enabled?("Manipulate")
          $game_system.se_play($data_system.buzzer_se)
          return
        end
Expand to see the code.
Not too bad. I've done the same thing as well and always use a Window_Command#command vs Window_Command#index on conditional branching. But the rest of what you have looks great and shouldn't cause any other complications.
http://npshare.de/files/88f86f65/wcs.txt << look at this i think you get good ideas.

PS: this is a wip from me an under develop
please dont play dump with this exept you try to make it better.

PPS: this is an APD script.
if you dont know what is the apd watch there http://itzamna.rmxp.de/drupal/node/44
An ADP...? Your link isn't working and I don't know what that is, can you explain?

Like, what is all this stuff supposed to do for you?

Content Hidden Show
#--------------------------------------------------------------------------
# * APD überhaupt installiert?
#--------------------------------------------------------------------------

unless $APD_install == true
   print("Bitte installieren Sie zuerst die APD.")
   exit
end

#--------------------------------------------------------------------------
# * modul registieren
#--------------------------------------------------------------------------

APD.core_register("wcs",0.6,0,"Window Command System","Hanmac")

#--------------------------------------------------------------------------
# * vorrausetzungen festlegen
#--------------------------------------------------------------------------

APD.core_exist?("apd","core") { |i| i>0.6 }

if APD.core_activ?
   module APD
    def self.wcs_config
      #gibt an ob der text in dem commando ein lkey sein muss
      APD["need_lkey"] ||={}
      APD["need_lkey"]["wcs"] = false

      #gibt an ob der code von deaktivierten Commandos ignoiert werden soll
      APD["wcs_lock_disabled"] =true

      APD["wcs_default_active"] = true

      APD["wcs_icon"] = {
        #lkey => icon nr
      }
     
     
      if APD.core_active?("audio")
        APD["audio_active"]["wcs"] = true
      end
    end
  end
Expand to see the code.


We do need a standardized Vocab & Terms module though, like in VX. I already use a standard one I wrote for a couple different systems in my project.

Vocab/Abbrv modules Show
#===============================================================================
# ** Vocab
#-------------------------------------------------------------------------------
#   ...
#===============================================================================
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
# ~**                 CUSTOMIZABLE CONSTANTS - BEGIN                       **~ #
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
module Vocab
  #-----------------------------------------------------------------------------
  # * Load Data System
  #-----------------------------------------------------------------------------
  $data_system ||= load_data('Data/System.rxdata')
  #-----------------------------------------------------------------------------
  # * Base HP / SP
  #-----------------------------------------------------------------------------
  HP    = $data_system.words.hp
  SP    = $data_system.words.sp
  #-----------------------------------------------------------------------------
  # * Max HP / SP
  #-----------------------------------------------------------------------------
  MaxHP = "Maximum #{HP}"
  MaxSP = "Maximum #{SP}"
  #-----------------------------------------------------------------------------
  # * Name, Class & Level
  #-----------------------------------------------------------------------------
  Name  = "Name"
  Class = "Class"
  Level = "Level"
  Exp   = "Exp "
  Next  = "Next"
  #-----------------------------------------------------------------------------
  # * Equipment Attributes
  #-----------------------------------------------------------------------------
  Atk   = $data_system.words.atk
  PDef  = $data_system.words.pdef
  MDef  = $data_system.words.mdef
  Eva   = "Evade"
  #-----------------------------------------------------------------------------
  # * Battler Attributes
  #-----------------------------------------------------------------------------
  Str   = $data_system.words.str
  Dex   = $data_system.words.dex
  Agi   = $data_system.words.agi
  Int   = $data_system.words.int
  #=============================================================================
  # ** Vocab::Scope
  #=============================================================================
  module Scope
    No_Target     = "None"
    One_Enemy     = "One Enemy"
    All_Enemy     = "All Enemies"
    One_Ally      = "One Ally"
    All_Ally      = "All Allies"
    One_Ally_Dead = "One Dead Ally"
    All_Ally_Dead = "All Dead Allies"
    Self_Target   = "Self"
  end
  #=============================================================================
  # ** Vocab::Occasion
  #=============================================================================
  module Occasion
    Always  = "Always"
    Battle  = "Only In Battle"
    Menu    = "Only In Menu"
    Never   = "Never"
  end
end
#===============================================================================
# ** Abbrv
#-------------------------------------------------------------------------------
#   ...
#===============================================================================
module Abbrv
  #-----------------------------------------------------------------------------
  # * Base HP / SP
  #-----------------------------------------------------------------------------
  HP    = "HP"
  SP    = "SP"
  #-----------------------------------------------------------------------------
  # * Max HP / SP
  #-----------------------------------------------------------------------------
  MaxHP = "Max#{HP}"
  MaxSP = "Max#{SP}"
  #-----------------------------------------------------------------------------
  # * Actor Attributes
  #-----------------------------------------------------------------------------
  Level = "Lvl."
  Exp   = "Exp."
  Next  = "Next"
  #-----------------------------------------------------------------------------
  # * Equipment Attributes
  #-----------------------------------------------------------------------------
  Atk   = "Atk"
  PDef  = "Def"
  MDef  = "Spr"
  Eva   = "Eva"
  #-----------------------------------------------------------------------------
  # * Battler Attributes
  #-----------------------------------------------------------------------------
  Str   = "Str"
  Dex   = "Dex"
  Agi   = "Agi"
  Int   = "Int"
end
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
# ~**                  CUSTOMIZABLE CONSTANTS - END                        **~ #
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
#===============================================================================
# ** RPG::Item
#===============================================================================
class RPG::Item
  #-----------------------------------------------------------------------------
  # * Name
  #-----------------------------------------------------------------------------
  def name
    if Vocab::MaxHP.is_a?(String)
      @name.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @name.gsub!("MaxSP", Vocab::MaxSP)
    end
    @name.gsub!("HP", Vocab::HP)
    @name.gsub!("SP", Vocab::SP)
    @name.gsub!("ATK", Vocab::Atk)
    @name.gsub!("PDEF", Vocab::PDef)
    @name.gsub!("MDEF", Vocab::MDef)
    @name.gsub!("EVA", Vocab::Eva)
    @name.gsub!("STR", Vocab::Str)
    @name.gsub!("DEX", Vocab::Dex)
    @name.gsub!("AGI", Vocab::Agi)
    @name.gsub!("INT", Vocab::Int)
    return @name
  end
  #-----------------------------------------------------------------------------
  # * Description
  #-----------------------------------------------------------------------------
  def description
    if Vocab::MaxHP.is_a?(String)
      @description.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @description.gsub!("MaxSP", Vocab::MaxSP)
    end
    @description.gsub!("HP", Vocab::HP)
    @description.gsub!("SP", Vocab::SP)
    @description.gsub!("ATK", Vocab::Atk)
    @description.gsub!("PDEF", Vocab::PDef)
    @description.gsub!("MDEF", Vocab::MDef)
    @description.gsub!("EVA", Vocab::Eva)
    @description.gsub!("STR", Vocab::Str)
    @description.gsub!("DEX", Vocab::Dex)
    @description.gsub!("AGI", Vocab::Agi)
    @description.gsub!("INT", Vocab::Int)
    return @description
  end
  #-----------------------------------------------------------------------------
  # * Scope S
  #-----------------------------------------------------------------------------
  def scope_s
    case @scope
    when 0 ; return Vocab::Scope::No_Target
    when 1 ; return Vocab::Scope::One_Enemy
    when 2 ; return Vocab::Scope::All_Enemy
    when 3 ; return Vocab::Scope::One_Ally
    when 4 ; return Vocab::Scope::All_Ally
    when 5 ; return Vocab::Scope::One_Ally_Dead
    when 6 ; return Vocab::Scope::All_Ally_Dead
    when 7 ; return Vocab::Scope::Self_Target
    end
  end
  #-----------------------------------------------------------------------------
  # * Occasion S
  #-----------------------------------------------------------------------------
  def occasion_s
    case @occasion
    when 0 ; return Vocab::Occasion::Always
    when 1 ; return Vocab::Occasion::Battle
    when 2 ; return Vocab::Occasion::Menu
    when 3 ; return Vocab::Occasion::Never
    end
  end
end

#===============================================================================
# ** RPG::Armor
#===============================================================================
class RPG::Armor
  #-----------------------------------------------------------------------------
  # * Name
  #-----------------------------------------------------------------------------
  def name
    if Vocab::MaxHP.is_a?(String)
      @name.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @name.gsub!("MaxSP", Vocab::MaxSP)
    end
    @name.gsub!("HP", Vocab::HP)
    @name.gsub!("SP", Vocab::SP)
    @name.gsub!("ATK", Vocab::Atk)
    @name.gsub!("PDEF", Vocab::PDef)
    @name.gsub!("MDEF", Vocab::MDef)
    @name.gsub!("EVA", Vocab::Eva)
    @name.gsub!("STR", Vocab::Str)
    @name.gsub!("DEX", Vocab::Dex)
    @name.gsub!("AGI", Vocab::Agi)
    @name.gsub!("INT", Vocab::Int)
    return @name
  end
  #-----------------------------------------------------------------------------
  # * Description
  #-----------------------------------------------------------------------------
  def description
    if Vocab::MaxHP.is_a?(String)
      @description.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @description.gsub!("MaxSP", Vocab::MaxSP)
    end
    @description.gsub!("HP", Vocab::HP)
    @description.gsub!("SP", Vocab::SP)
    @description.gsub!("ATK", Vocab::Atk)
    @description.gsub!("PDEF", Vocab::PDef)
    @description.gsub!("MDEF", Vocab::MDef)
    @description.gsub!("EVA", Vocab::Eva)
    @description.gsub!("STR", Vocab::Str)
    @description.gsub!("DEX", Vocab::Dex)
    @description.gsub!("AGI", Vocab::Agi)
    @description.gsub!("INT", Vocab::Int)
    return @description
  end
end

#===============================================================================
# ** RPG::Weapon
#===============================================================================
class RPG::Weapon
  #-----------------------------------------------------------------------------
  # * Name
  #-----------------------------------------------------------------------------
  def name
    if Vocab::MaxHP.is_a?(String)
      @name.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @name.gsub!("MaxSP", Vocab::MaxSP)
    end
    @name.gsub!("HP", Vocab::HP)
    @name.gsub!("SP", Vocab::SP)
    @name.gsub!("ATK", Vocab::Atk)
    @name.gsub!("PDEF", Vocab::PDef)
    @name.gsub!("MDEF", Vocab::MDef)
    @name.gsub!("EVA", Vocab::Eva)
    @name.gsub!("STR", Vocab::Str)
    @name.gsub!("DEX", Vocab::Dex)
    @name.gsub!("AGI", Vocab::Agi)
    @name.gsub!("INT", Vocab::Int)
    return @name
  end
  #-----------------------------------------------------------------------------
  # * Description
  #-----------------------------------------------------------------------------
  def description
    if Vocab::MaxHP.is_a?(String)
      @description.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @description.gsub!("MaxSP", Vocab::MaxSP)
    end
    @description.gsub!("HP", Vocab::HP)
    @description.gsub!("SP", Vocab::SP)
    @description.gsub!("ATK", Vocab::Atk)
    @description.gsub!("PDEF", Vocab::PDef)
    @description.gsub!("MDEF", Vocab::MDef)
    @description.gsub!("EVA", Vocab::Eva)
    @description.gsub!("STR", Vocab::Str)
    @description.gsub!("DEX", Vocab::Dex)
    @description.gsub!("AGI", Vocab::Agi)
    @description.gsub!("INT", Vocab::Int)
    return @description
  end
end

#===============================================================================
# ** RPG::Skill
#===============================================================================
class RPG::Skill
  #-----------------------------------------------------------------------------
  # * Name
  #-----------------------------------------------------------------------------
  def name
    if Vocab::MaxHP.is_a?(String)
      @name.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @name.gsub!("MaxSP", Vocab::MaxSP)
    end
    @name.gsub!("HP", Vocab::HP)
    @name.gsub!("SP", Vocab::SP)
    @name.gsub!("ATK", Vocab::Atk)
    @name.gsub!("PDEF", Vocab::PDef)
    @name.gsub!("MDEF", Vocab::MDef)
    @name.gsub!("EVA", Vocab::Eva)
    @name.gsub!("STR", Vocab::Str)
    @name.gsub!("DEX", Vocab::Dex)
    @name.gsub!("AGI", Vocab::Agi)
    @name.gsub!("INT", Vocab::Int)
    return @name
  end
  #-----------------------------------------------------------------------------
  # * Description
  #-----------------------------------------------------------------------------
  def description
    if Vocab::MaxHP.is_a?(String)
      @description.gsub!("MaxHP", Vocab::MaxHP)
    end
    if Vocab::MaxSP.is_a?(String)
      @description.gsub!("MaxSP", Vocab::MaxSP)
    end
    @description.gsub!("HP", Vocab::HP)
    @description.gsub!("SP", Vocab::SP)
    @description.gsub!("ATK", Vocab::Atk)
    @description.gsub!("PDEF", Vocab::PDef)
    @description.gsub!("MDEF", Vocab::MDef)
    @description.gsub!("EVA", Vocab::Eva)
    @description.gsub!("STR", Vocab::Str)
    @description.gsub!("DEX", Vocab::Dex)
    @description.gsub!("AGI", Vocab::Agi)
    @description.gsub!("INT", Vocab::Int)
    return @description
  end
  #-----------------------------------------------------------------------------
  # * Scope S
  #-----------------------------------------------------------------------------
  def scope_s
    case @scope
    when 0 ; return Vocab::Scope::No_Target
    when 1 ; return Vocab::Scope::One_Enemy
    when 2 ; return Vocab::Scope::All_Enemy
    when 3 ; return Vocab::Scope::One_Ally
    when 4 ; return Vocab::Scope::All_Ally
    when 5 ; return Vocab::Scope::One_Ally_Dead
    when 6 ; return Vocab::Scope::All_Ally_Dead
    when 7 ; return Vocab::Scope::Self_Target
    end
  end
  #-----------------------------------------------------------------------------
  # * Occasion S
  #-----------------------------------------------------------------------------
  def occasion_s
    case @occasion
    when 0 ; return Vocab::Occasion::Always
    when 1 ; return Vocab::Occasion::Battle
    when 2 ; return Vocab::Occasion::Menu
    when 3 ; return Vocab::Occasion::Never
    end
  end
end
Expand to see the code.


Theres seperate but similiar modules for Vocab (full words) and Abbrv (Abbrviations) of terms for battler attributes and armor / item / skill / weapon attributes, and (optional) I made a text sub system that changes certain things used in database items and translates them to their appropriate Vocab/Abbrv.

(For instance, you write "Boosts ATK" in the item description in database, it'll return "Boosts #{Vocab::ATK}") whatever Vocab::ATK is set to.
witch link cant you open?


the window command system can check automaticly what code it schould be run.

like:
windowsys.add_command(pos,string,code,enabled)

1. if the string is a key for the Lang-modul, it prints the sting in the correct lang
2. the code is runnig with eval (it can be more than one command)
3. enabled can be also a string witch is evaluate a run-time

!4! this script is full automatic

instat of
Content Hidden Show
def update_command

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # If command other than save or end game, and party members = 0

      if $game_party.actors.size == 0 and @command_window.index < 4

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Branch by command window cursor position

      case @command_window.index

      when 0  # item

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to item screen

        $scene = Scene_Item.new

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @status_window.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  # save

        # If saving is forbidden

        if $game_system.save_disabled

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to save screen

        $scene = Scene_Save.new

      when 5  # end game

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_End.new

      end

      return

    end
Expand to see the code.

use this
@command_window.update
Expand to see the code.



for your vocab see this:

http://itzamna.rmxp.de/drupal/node/203

with this you can change the lang in the whole game at run-time


PS: i like to build scripts that runs in both versions
Not sure how noob of a question this might be considered but how do I disable certain parts of the SDK in 2.4?

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=1802