AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  ConnexionConnexion  



Le Deal du moment : -55%
Friteuse sans huile – PHILIPS – Airfryer ...
Voir le deal
49.99 €

Partagez
 

 [VXace] Yanfly Meny Script - Compilation

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
cagt3000
Citadin Lv.7
Citadin Lv.7
cagt3000


Masculin Age : 123
Inscrit le : 08/04/2010
Messages : 218

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:09

Menu Scripts - Compilation
Auteur : Yanfly

Explication
Ce sujet est une compilation des differents scripts de menu fait par Yanfly...

Vous trouverez les menus suivant : Items, Skills, Equip, Status, and Save

Screen
Items
Spoiler:

Skills
Spoiler:

Equip
Spoiler:

Status
Spoiler:

Save
Spoiler:

Script
Les scripts sont dans les posts ci-dessous, a cause de la limite de post du fofo'...

Note au Admins et Modos : A cause de la limite de post du fofo' j'ai du diviser les scripts en plusieurs posts...

Installation
Mettez les tous au-dessus de Main, et en-dessous de Materials

Voici l'ordre dans lequel vous DEVEZ les mettre :

- Equip Engine
- Item Menu
- Save Engine
- Skill Menu
- Status Menu

Lien
Item Menu : http://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-item-menu/
Skill Menu : http://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-skill-menu/
Equip Engine : http://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/ace-equip-engine/
Status Menu : http://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-status-menu/
Save Engine : http://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-save-engine/

Credits
- Yanfly


Dernière édition par cagt3000 le Mer 11 Avr 2012 - 15:59, édité 3 fois
Revenir en haut Aller en bas
http://www.site3000.weebly.com
cagt3000
Citadin Lv.7
Citadin Lv.7
cagt3000


Masculin Age : 123
Inscrit le : 08/04/2010
Messages : 218

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:18

Items
Code:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Ace Item Menu v1.02
# -- Last Updated: 2012.01.05
# -- Level: Normal, Hard
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-ItemMenu"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.05 - Compatibility Update with Equip Dynamic Stats.
# 2012.01.03 - Started Script and Finished.
#            - Compatibility Update with Ace Menu Engine.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# The Ace Item Menu offers more item categorization control and a better layout
# that simulatenously provides information regarding the items to the player,
# while keeping a good amount of the item list visible on screen at once. The
# script can also be customized to rearrange commands and categories.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Item Notetags - These notetags go in the item notebox in the database.
# -----------------------------------------------------------------------------
# <category: string>
# Places this object into the item category for "string". Whenever the selected
# category is highlighted in the Ace Item Menu command window, this object will
# be included and shown in the item window.
#
# <image: string>
# Uses a picture from Graphics\Pictures\ of your RPG Maker VX Ace Project's
# directory with the filename of "string" (without the extension) as the image
# picture shown in the Ace Item Menu.
#
# -----------------------------------------------------------------------------
# Weapon Notetags - These notetags go in the weapon notebox in the database.
# -----------------------------------------------------------------------------
# <category: string>
# Places this object into the item category for "string". Whenever the selected
# category is highlighted in the Ace Item Menu command window, this object will
# be included and shown in the item window.
#
# <image: string>
# Uses a picture from Graphics\Pictures\ of your RPG Maker VX Ace Project's
# directory with the filename of "string" (without the extension) as the image
# picture shown in the Ace Item Menu.
#
# -----------------------------------------------------------------------------
# Armour Notetags - These notetags go in the armour notebox in the database.
# -----------------------------------------------------------------------------
# <category: string>
# Places this object into the item category for "string". Whenever the selected
# category is highlighted in the Ace Item Menu command window, this object will
# be included and shown in the item window.
#
# <image: string>
# Uses a picture from Graphics\Pictures\ of your RPG Maker VX Ace Project's
# directory with the filename of "string" (without the extension) as the image
# picture shown in the Ace Item Menu.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
  module ITEM
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Item Command Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This array adjusts what options appear in the initial item command window
    # before the items are split into separate categories. Add commands, remove
    # commands, or rearrange them. Here's a list of which does what:
    #
    # -------------------------------------------------------------------------
    # :command        Description
    # -------------------------------------------------------------------------
    # :item            Opens up the various item categories. Default.
    # :weapon          Opens up the various weapon categories. Default.
    # :armor          Opens up the various armour categories. Default.
    # :key_item        Shows a list of the various key items. Default.
    #
    # :gogototori      Requires Kread-EX's Go Go Totori Synthesis.
    #
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    COMMANDS =[
      :item,        # Opens up the various item categories. Default.
      :weapon,      # Opens up the various weapon categories. Default.
      :armor,        # Opens up the various armour categories. Default.
      :key_item,    # Shows a list of the various key items. Default.
      :gogototori,  # Requires Kread-EX's Go Go Totori Synthesis.
    # :custom1,      # Custom command 1.
    # :custom2,      # Custom command 2.
    ] # Do not remove this.
   
    #--------------------------------------------------------------------------
    # - Item Custom Commands -
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # For those who use scripts to that may produce unique effects for the item
    # scene, use this hash to manage the custom commands for the Item Command
    # Window. You can disable certain commands or prevent them from appearing
    # by using switches. If you don't wish to bind them to a switch, set the
    # proper switch to 0 for it to have no impact.
    #--------------------------------------------------------------------------
    CUSTOM_ITEM_COMMANDS ={
    # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
      :gogototori => ["Synthesis",            0,        0, :command_totori],
      :custom1 => [ "Custom Name",            0,          0, :command_name1],
      :custom2 => [ "Custom Text",          13,          0, :command_name2],
    } # Do not remove this.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Item Type Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These arrays adjusts and shows the various item types shown for Items,
    # Weapons, and Armours. Note that when using :category symbols, the
    # specific category shown will be equal to the text used for the Display
    # and the included item must contain a category equal to the Display name.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This array contains the order for the Item categories.
    ITEM_TYPES =[
    # [  :symbol,  "Display"],
      [  :field,    "Field"], # Shows Menu-usable items.
      [  :battle,    "Battle"], # Shows Battle-usable items.
      [:category,  "Special"], # Categorized by <category: string>
      [:category,"Ingredient"], # Categorized by <category: string>
      [:key_item,  "Key Item"], # Shows all key items.
      [    :all,      "All"], # Shows all usable items.
    ] # Do not remove this.
   
    # This array contains the order for the Weapon categories.
    WEAPON_TYPES =[
    # [  :symbol,  "Display"],
      [  :types,  "WPNTYPES"], # Lists all of the individual weapon types.
      [:category,  "Training"], # Categorized by <category: string>
      [:category, "Legendary"], # Categorized by <category: string>
      [    :all,      "All"], # Shows all weapons.
    ] # Do not remove this.
   
    # This array contains the order for the Armour categories.
    ARMOUR_TYPES =[
    # [  :symbol,  "Display"],
      [  :slots,  "ARMSLOTS"], # Lists all of the individual armour slots.
      [  :types,  "ARMTYPES"], # Lists all of the individual armours types.
      [:category,  "Training"], # Categorized by <category: string>
      [:category, "Legendary"], # Categorized by <category: string>
      [    :all,      "All"], # Shows all armours.
    ] # Do not remove this.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Item Status Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # The item status window displays information about the item in detail.
    # Adjust the settings below to change the way the status window appears.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    STATUS_FONT_SIZE = 20      # Font size used for status window.
    MAX_ICONS_DRAWN  = 10      # Maximum number of icons drawn for states.
   
    # The following adjusts the vocabulary used for the status window. Each
    # of the vocabulary settings are self explanatory.
    VOCAB_STATUS ={
      :empty      => "---",          # Text used when nothing is shown.
      :hp_recover => "HP Heal",      # Text used for HP Recovery.
      :mp_recover => "MP Heal",      # Text used for MP Recovery.
      :tp_recover => "TP Heal",      # Text used for TP Recovery.
      :tp_gain    => "TP Gain",      # Text used for TP Gain.
      :applies    => "Applies",      # Text used for applied states and buffs.
      :removes    => "Removes",      # Text used for removed states and buffs.
    } # Do not remove this.
   
  end # ITEM
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

module YEA
  module REGEXP
  module BASEITEM
   
    CATEGORY = /<(?:CATEGORIES|category):[ ](.*)>/i
    IMAGE    = /<(?:IMAGE|image):[ ](.*)>/i
   
  end # BASEITEM
  end # REGEXP
end # YEA

#==============================================================================
# ■ Numeric
#==============================================================================

class Numeric
 
  #--------------------------------------------------------------------------
  # new method: group_digits
  #--------------------------------------------------------------------------
  unless $imported["YEA-CoreEngine"]
  def group; return self.to_s; end
  end # $imported["YEA-CoreEngine"]
   
end # Numeric

#==============================================================================
# ■ Vocab
#==============================================================================

module Vocab
 
  #--------------------------------------------------------------------------
  # new method: self.item_status
  #--------------------------------------------------------------------------
  def self.item_status(type)
    return YEA::ITEM::VOCAB_STATUS[type]
  end
 
end # Vocab

#==============================================================================
# ■ DataManager
#==============================================================================

module DataManager
 
  #--------------------------------------------------------------------------
  # alias method: load_database
  #--------------------------------------------------------------------------
  class <<self; alias load_database_aim load_database; end
  def self.load_database
    load_database_aim
    load_notetags_aim
  end
 
  #--------------------------------------------------------------------------
  # new method: load_notetags_aim
  #--------------------------------------------------------------------------
  def self.load_notetags_aim
    groups = [$data_items, $data_weapons, $data_armors]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_aim
      end
    end
  end
 
end # DataManager

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :category
  attr_accessor :image
 
  #--------------------------------------------------------------------------
  # common cache: load_notetags_aim
  #--------------------------------------------------------------------------
  def load_notetags_aim
    @category = []
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::BASEITEM::CATEGORY
        @category.push($1.upcase.to_s)
      when YEA::REGEXP::BASEITEM::IMAGE
        @image = $1.to_s
      end
    } # self.note.split
    #---
  end
 
end # RPG::BaseItem

#==============================================================================
# ■ Game_Temp
#==============================================================================

class Game_Temp
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :scene_item_index
  attr_accessor :scene_item_oy
 
end # Game_Temp

#==============================================================================
# ■ Window_ItemList
#==============================================================================

class Window_ItemList < Window_Selectable
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    return if item.nil?
    rect = item_rect(index)
    rect.width -= 4
    draw_item_name(item, rect.x, rect.y, enable?(item), rect.width - 24)
    draw_item_number(rect, item)
  end
 
end # Window_ItemList

#==============================================================================
# ■ Window_ItemCommand
#==============================================================================

class Window_ItemCommand < Window_Command
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_reader  :item_window
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y)
  end
 
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return 160; end
 
  #--------------------------------------------------------------------------
  # visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return 4; end
 
  #--------------------------------------------------------------------------
  # process_ok
  #--------------------------------------------------------------------------
  def process_ok
    $game_temp.scene_item_index = index
    $game_temp.scene_item_oy = self.oy
    super
  end
 
  #--------------------------------------------------------------------------
  # make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    for command in YEA::ITEM::COMMANDS
      case command
      #--- Default Commands ---
      when :item
        add_command(Vocab::item, :item)
      when :weapon
        add_command(Vocab::weapon, :weapon)
      when :armor
        add_command(Vocab::armor, :armor)
      when :key_item
        add_command(Vocab::key_item, :key_item)
      #--- Imported ---
      when :gogototori
        next unless $imported["KRX-AlchemicSynthesis"]
        process_custom_command(command)
      #--- Custom Commands ---
      else
        process_custom_command(command)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # process_custom_command
  #--------------------------------------------------------------------------
  def process_custom_command(command)
    return unless YEA::ITEM::CUSTOM_ITEM_COMMANDS.include?(command)
    show = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][2]
    continue = show <= 0 ? true : $game_switches[show]
    return unless continue
    text = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][0]
    switch = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][1]
    enabled = switch <= 0 ? true : $game_switches[switch]
    add_command(text, command, enabled)
  end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active
    @item_window.category = current_symbol if @item_window
  end
 
  #--------------------------------------------------------------------------
  # item_window=
  #--------------------------------------------------------------------------
  def item_window=(item_window)
    @item_window = item_window
    update
  end
 
end # Window_ItemCommand

#==============================================================================
# ■ Window_ItemType
#==============================================================================

class Window_ItemType < Window_Command
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_reader  :item_window
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y)
    deactivate
    @type = nil
  end
 
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return 160; end
 
  #--------------------------------------------------------------------------
  # visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return 4; end
 
  #--------------------------------------------------------------------------
  # reveal
  #--------------------------------------------------------------------------
  def reveal(type)
    @type = type
    refresh
    activate
    select(0)
  end
 
  #--------------------------------------------------------------------------
  # make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    return if @type.nil?
    #---
    case @type
    when :item
      commands = YEA::ITEM::ITEM_TYPES
    when :weapon
      commands = YEA::ITEM::WEAPON_TYPES
    else
      commands = YEA::ITEM::ARMOUR_TYPES
    end
    #---
    for command in commands
      case command[0]
      #---
      when :types
        case @type
        when :weapon
          for i in 1...$data_system.weapon_types.size
            name = $data_system.weapon_types[i]
            add_command(name, :w_type, true, i)
          end
        else
          for i in 1...$data_system.armor_types.size
            name = $data_system.armor_types[i]
            add_command(name, :a_type, true, i)
          end
        end
      #---
      when :slots
        if $imported["YEA-AceEquipEngine"]
          maximum = 1
          for key in YEA::EQUIP::TYPES
            maximum = [maximum, key[0]].max
          end
        else
          maximum = 4
        end
        for i in 1..maximum
          name = Vocab::etype(i)
          add_command(name, :e_type, true, i) if name != ""
        end
      #---
      else
        add_command(command[1], command[0], true, @type)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    return unless self.active
    @item_window.category = current_symbol if @item_window
  end
 
  #--------------------------------------------------------------------------
  # item_window=
  #--------------------------------------------------------------------------
  def item_window=(item_window)
    @item_window = item_window
    update
  end
 
end # Window_ItemType

#==============================================================================
# ■ Window_ItemList
#==============================================================================

class Window_ItemList < Window_Selectable
 
  #--------------------------------------------------------------------------
  # alias method: initialize
  #--------------------------------------------------------------------------
  alias window_itemlist_initialize_aim initialize
  def initialize(dx, dy, dw, dh)
    window_itemlist_initialize_aim(dx, dy, dw, dh)
    @ext = :none
    @name = ""
  end
 
  #--------------------------------------------------------------------------
  # alias method: category=
  #--------------------------------------------------------------------------
  alias window_itemlist_category_aim category=
  def category=(category)
    if @types_window.nil?
      window_itemlist_category_aim(category)
    else
      return unless update_types?(category)
      @category = category
      if @types_window.active
        @name = @types_window.current_data[:name]
        @ext = @types_window.current_ext
      end
      refresh
      self.oy = 0
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: update_types?
  #--------------------------------------------------------------------------
  def update_types?(category)
    return true if @category != category
    return false unless @types_window.active
    if category == :category
      return @name != @types_window.current_data[:name]
    end
    return @ext != @types_window.current_ext
  end
 
  #--------------------------------------------------------------------------
  # new method: types_window=
  #--------------------------------------------------------------------------
  def types_window=(window)
    @types_window = window
  end
 
  #--------------------------------------------------------------------------
  # alias method: include?
  #--------------------------------------------------------------------------
  alias window_itemlist_include_aim include?
  def include?(item)
    if @types_window.nil?
      return window_itemlist_include_aim(item)
    else
      return ace_item_menu_include?(item)
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: ace_item_menu_include?
  #--------------------------------------------------------------------------
  def ace_item_menu_include?(item)
    case @category
    #---
    when :field
      return false unless item.is_a?(RPG::Item)
      return item.menu_ok?
    when :battle
      return false unless item.is_a?(RPG::Item)
      return item.battle_ok?
    #---
    when :w_type
      return false unless item.is_a?(RPG::Weapon)
      return item.wtype_id == @types_window.current_ext
    when :a_type
      return false unless item.is_a?(RPG::Armor)
      return item.atype_id == @types_window.current_ext
    when :e_type
      return false unless item.is_a?(RPG::Armor)
      return item.etype_id == @types_window.current_ext
    #---
    when :all
      case @types_window.current_ext
      when :item
        return item.is_a?(RPG::Item)
      when :weapon
        return item.is_a?(RPG::Weapon)
      else
        return item.is_a?(RPG::Armor)
      end
    #---
    when :category
      case @types_window.current_ext
      when :item
        return false unless item.is_a?(RPG::Item)
      when :weapon
        return false unless item.is_a?(RPG::Weapon)
      else
        return false unless item.is_a?(RPG::Armor)
      end
      return item.category.include?(@types_window.current_data[:name].upcase)
    #---
    else
      return window_itemlist_include_aim(item)
    end
  end
 
end # Window_ItemList

#==============================================================================
# ■ Window_ItemStatus
#==============================================================================

class Window_ItemStatus < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, item_window)
    super(dx, dy, Graphics.width - dx, fitting_height(4))
    @item_window = item_window
    @item = nil
    refresh
  end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    update_item(@item_window.item)
  end
 
  #--------------------------------------------------------------------------
  # update_item
  #--------------------------------------------------------------------------
  def update_item(item)
    return if @item == item
    @item = item
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    reset_font_settings
    return draw_empty if @item.nil?
    contents.font.size = YEA::ITEM::STATUS_FONT_SIZE
    draw_item_image
    draw_item_stats
    draw_item_effects
  end
 
  #--------------------------------------------------------------------------
  # draw_empty
  #--------------------------------------------------------------------------
  def draw_empty
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(1, 1, 94, 94)
    contents.fill_rect(rect, colour)
    dx = 96; dy = 0
    dw = (contents.width - 96) / 2
    for i in 0...8
      draw_background_box(dx, dy, dw)
      dx = dx >= 96 + dw ? 96 : 96 + dw
      dy += line_height if dx == 96
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_background_box
  #--------------------------------------------------------------------------
  def draw_background_box(dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
  end
 
  #--------------------------------------------------------------------------
  # draw_item_image
  #--------------------------------------------------------------------------
  def draw_item_image
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(1, 1, 94, 94)
    contents.fill_rect(rect, colour)
    if @item.image.nil?
      icon_index = @item.icon_index
      bitmap = Cache.system("Iconset")
      rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24)
      target = Rect.new(0, 0, 96, 96)
      contents.stretch_blt(target, bitmap, rect)
    else
      bitmap = Cache.picture(@item.image)
      contents.blt(0, 0, bitmap, bitmap.rect, 255)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_item_stats
  #--------------------------------------------------------------------------
  def draw_item_stats
    return unless @item.is_a?(RPG::Weapon) || @item.is_a?(RPG::Armor)
    dx = 96; dy = 0
    dw = (contents.width - 96) / 2
    for i in 0...8
      draw_equip_param(i, dx, dy, dw)
      dx = dx >= 96 + dw ? 96 : 96 + dw
      dy += line_height if dx == 96
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_equip_param
  #--------------------------------------------------------------------------
  def draw_equip_param(param_id, dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
    if $imported["YEA-EquipDynamicStats"]
      draw_percentage_param(param_id, dx, dy, dw)
    else
      draw_set_param(param_id, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_percentage_param
  #--------------------------------------------------------------------------
  def draw_percentage_param(param_id, dx, dy, dw)
    if @item.per_params[param_id] != 0 && @item.params[param_id] != 0
      text = draw_set_param(param_id, dx, dy, dw)
      dw -= text_size(text).width
      draw_percent_param(param_id, dx, dy, dw)
    elsif @item.per_params[param_id] != 0 && @item.params[param_id] == 0
      draw_percent_param(param_id, dx, dy, dw)
    else
      draw_set_param(param_id, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_set_param
  #--------------------------------------------------------------------------
  def draw_set_param(param_id, dx, dy, dw)
    value = @item.params[param_id]
    if $imported["YEA-EquipDynamicStats"] && @item.var_params[param_id] > 0
      value += $game_variables[@item.var_params[param_id]] rescue 0
    end
    change_color(param_change_color(value), value != 0)
    text = value.group
    text = "+" + text if value > 0
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
    return text
  end
 
  #--------------------------------------------------------------------------
  # draw_percent_param
  #--------------------------------------------------------------------------
  def draw_percent_param(param_id, dx, dy, dw)
    value = @item.per_params[param_id]
    change_color(param_change_color(value))
    text = (@item.per_params[param_id] * 100).to_i.group + "%"
    text = "+" + text if @item.per_params[param_id] > 0
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
    return text
  end
 
  #--------------------------------------------------------------------------
  # draw_item_effects
  #--------------------------------------------------------------------------
  def draw_item_effects
    return unless @item.is_a?(RPG::Item)
    dx = 96; dy = 0
    dw = (contents.width - 96) / 2
    draw_hp_recover(dx, dy + line_height * 0, dw)
    draw_mp_recover(dx, dy + line_height * 1, dw)
    draw_tp_recover(dx + dw, dy + line_height * 0, dw)
    draw_tp_gain(dx + dw, dy + line_height * 1, dw)
    dw = contents.width - 96
    draw_applies(dx, dy + line_height * 2, dw)
    draw_removes(dx, dy + line_height * 3, dw)
  end
 
  #--------------------------------------------------------------------------
  # draw_hp_recover
  #--------------------------------------------------------------------------
  def draw_hp_recover(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:hp_recover))
    per = 0
    set = 0
    for effect in @item.effects
      next unless effect.code == 11
      per += (effect.value1 * 100).to_i
      set += effect.value2.to_i
    end
    if per != 0 && set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      dw -= text_size(text).width
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      return
    elsif per != 0
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
    elsif set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_mp_recover
  #--------------------------------------------------------------------------
  def draw_mp_recover(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:mp_recover))
    per = 0
    set = 0
    for effect in @item.effects
      next unless effect.code == 12
      per += (effect.value1 * 100).to_i
      set += effect.value2.to_i
    end
    if per != 0 && set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      dw -= text_size(text).width
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
      draw_text(dx+4, dy, dw-8, line_height, text, 2)
      return
    elsif per != 0
      change_color(param_change_color(per))
      text = per > 0 ? sprintf("+%s%%", per.group) : sprintf("%s%%", per.group)
    elsif set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_tp_recover
  #--------------------------------------------------------------------------
  def draw_tp_recover(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:tp_recover))
    set = 0
    for effect in @item.effects
      next unless effect.code == 13
      set += effect.value1.to_i
    end
    if set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_tp_gain
  #--------------------------------------------------------------------------
  def draw_tp_gain(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:tp_gain))
    set = @item.tp_gain
    if set != 0
      change_color(param_change_color(set))
      text = set > 0 ? sprintf("+%s", set.group) : set.group
    else
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
    end
    draw_text(dx+4, dy, dw-8, line_height, text, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_applies
  #--------------------------------------------------------------------------
  def draw_applies(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:applies))
    icons = []
    for effect in @item.effects
      case effect.code
      when 21
        next unless effect.value1 > 0
        next if $data_states[effect.value1].nil?
        icons.push($data_states[effect.data_id].icon_index)
      when 31
        icons.push($game_actors[1].buff_icon_index(1, effect.data_id))
      when 32
        icons.push($game_actors[1].buff_icon_index(-1, effect.data_id))
      end
      icons.delete(0)
      break if icons.size >= YEA::ITEM::MAX_ICONS_DRAWN
    end
    draw_icons(dx, dy, dw, icons)
  end
 
  #--------------------------------------------------------------------------
  # draw_removes
  #--------------------------------------------------------------------------
  def draw_removes(dx, dy, dw)
    draw_background_box(dx, dy, dw)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::item_status(:removes))
    icons = []
    for effect in @item.effects
      case effect.code
      when 22
        next unless effect.value1 > 0
        next if $data_states[effect.value1].nil?
        icons.push($data_states[effect.data_id].icon_index)
      when 33
        icons.push($game_actors[1].buff_icon_index(1, effect.data_id))
      when 34
        icons.push($game_actors[1].buff_icon_index(-1, effect.data_id))
      end
      icons.delete(0)
      break if icons.size >= YEA::ITEM::MAX_ICONS_DRAWN
    end
    draw_icons(dx, dy, dw, icons)
  end
 
  #--------------------------------------------------------------------------
  # draw_icons
  #--------------------------------------------------------------------------
  def draw_icons(dx, dy, dw, icons)
    dx += dw - 4
    dx -= icons.size * 24
    for icon_id in icons
      draw_icon(icon_id, dx, dy)
      dx += 24
    end
    if icons.size == 0
      change_color(normal_color, false)
      text = Vocab::item_status(:empty)
      draw_text(4, dy, contents.width-8, line_height, text, 2)
    end
  end
 
end # Window_ItemStatus

#==============================================================================
# ■ Scene_Item
#==============================================================================

class Scene_Item < Scene_ItemBase
 
  #--------------------------------------------------------------------------
  # alias method: start
  #--------------------------------------------------------------------------
  alias scene_item_start_aim start
  def start
    scene_item_start_aim
    create_types_window
    create_status_window
    relocate_windows
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: return_scene
  #--------------------------------------------------------------------------
  def return_scene
    $game_temp.scene_item_index = nil
    $game_temp.scene_item_oy = nil
    super
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: create_category_window
  #--------------------------------------------------------------------------
  def create_category_window
    wy = @help_window.height
    @category_window = Window_ItemCommand.new(0, wy)
    @category_window.viewport = @viewport
    @category_window.help_window = @help_window
    @category_window.y = @help_window.height
    if !$game_temp.scene_item_index.nil?
      @category_window.select($game_temp.scene_item_index)
      @category_window.oy = $game_temp.scene_item_oy
    end
    $game_temp.scene_item_index = nil
    $game_temp.scene_item_oy = nil
    @category_window.set_handler(:ok, method(:on_category_ok))
    @category_window.set_handler(:cancel, method(:return_scene))
    @category_window.set_handler(:item, method(:open_types))
    @category_window.set_handler(:weapon, method(:open_types))
    @category_window.set_handler(:armor, method(:open_types))
    process_custom_item_commands
  end
 
  #--------------------------------------------------------------------------
  # new method: process_custom_item_commands
  #--------------------------------------------------------------------------
  def process_custom_item_commands
    for command in YEA::ITEM::COMMANDS
      next unless YEA::ITEM::CUSTOM_ITEM_COMMANDS.include?(command)
      called_method = YEA::ITEM::CUSTOM_ITEM_COMMANDS[command][3]
      @category_window.set_handler(command, method(called_method))
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: create_types_window
  #--------------------------------------------------------------------------
  def create_types_window
    wy = @category_window.y
    @types_window = Window_ItemType.new(Graphics.width, wy)
    @types_window.viewport = @viewport
    @types_window.help_window = @help_window
    @types_window.y = @help_window.height
    @types_window.item_window = @item_window
    @item_window.types_window = @types_window
    @types_window.set_handler(:ok, method(:on_types_ok))
    @types_window.set_handler(:cancel, method(:on_types_cancel))
  end
 
  #--------------------------------------------------------------------------
  # new method: create_status_window
  #--------------------------------------------------------------------------
  def create_status_window
    wx = @category_window.width
    wy = @category_window.y
    @status_window = Window_ItemStatus.new(wx, wy, @item_window)
    @status_window.viewport = @viewport
  end
 
  #--------------------------------------------------------------------------
  # new method: relocate_windows
  #--------------------------------------------------------------------------
  def relocate_windows
    return unless $imported["YEA-AceMenuEngine"]
    case Menu.help_window_location
    when 0 # Top
      @help_window.y = 0
      @category_window.y = @help_window.height
      @item_window.y = @category_window.y + @category_window.height
    when 1 # Middle
      @category_window.y = 0
      @help_window.y = @category_window.height
      @item_window.y = @help_window.y + @help_window.height
    else # Bottom
      @category_window.y = 0
      @item_window.y = @category_window.height
      @help_window.y = @item_window.y + @item_window.height
    end
    @types_window.y = @category_window.y
    @status_window.y = @category_window.y
  end
 
  #--------------------------------------------------------------------------
  # new method: open_categories
  #--------------------------------------------------------------------------
  def open_types
    @category_window.x = Graphics.width
    @types_window.x = 0
    @types_window.reveal(@category_window.current_symbol)
  end
 
  #--------------------------------------------------------------------------
  # new method: on_types_ok
  #--------------------------------------------------------------------------
  def on_types_ok
    @item_window.activate
    @item_window.select_last
  end
 
  #--------------------------------------------------------------------------
  # new method: on_types_cancel
  #--------------------------------------------------------------------------
  def on_types_cancel
    @category_window.x = 0
    @category_window.activate
    @types_window.unselect
    @types_window.x = Graphics.width
  end
 
  #--------------------------------------------------------------------------
  # alias method: on_item_cancel
  #--------------------------------------------------------------------------
  alias scene_item_on_item_cancel_aim on_item_cancel
  def on_item_cancel
    if @types_window.x <= 0
      @item_window.unselect
      @types_window.activate
    else
      scene_item_on_item_cancel_aim
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: command_totori
  #--------------------------------------------------------------------------
  def command_totori
    SceneManager.call(Scene_Alchemy)
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name1
  #--------------------------------------------------------------------------
  def command_name1
    # Do nothing.
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name2
  #--------------------------------------------------------------------------
  def command_name2
    # Do nothing.
  end
 
end # Scene_Item

#==============================================================================
#
# ▼ End of File
#
#==============================================================================

Skills
Code:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Ace Skill Menu v1.01
# -- Last Updated: 2012.01.08
# -- Level: Normal, Hard
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-SkillMenu"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.08 - Compatibility Update: Learn Skill Engine
# 2012.01.02 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This is a menu reordering script for the Skill Menu for RPG Maker VX Ace. The
# script lets you add, remove, and rearrange skill menu additions added by
# other scripts. This script will update periodically to provide better updated
# compatibility with those other scripts.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# Adjust the module's settings to adjust the skill command window.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
  module SKILL_MENU
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Command Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Adjust the command window that appears in the skill command window. Add,
    # remove, or rearrange the commands as you see fit. If you would like to
    # add in custom commands, please refer to the custom hash. Here's a list of
    # what does what:
    #
    # -------------------------------------------------------------------------
    # :command        Description
    # -------------------------------------------------------------------------
    # :stype_list      Displays all of the actor's usable skill types.
    #
    # :tp_mode        Requires YEA - TP Manager
    # :learn_skill    Requires YEA - Learn Skill Engine
    #
    # :grathnode      Requires Kread-EX - Grathnode Install
    # :sslots          Requires YSA - Slots Battle
    #
    # And that's all of the currently available commands. This list will be
    # updated as more scripts become available.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    COMMANDS =[
      :stype_list,  # Displays all of the actor's usable skill types.
      :learn_skill,  # Requires YEA - Learn Skill Engine
      :tp_mode,      # Requires YEA - TP Manager
      :grathnode,    # Requires Kread-EX - Grathnode Install
      :sslots,      # Requires YSA - Slots Battle.
    # :custom1,      # Custom Skill Command 1
    # :custom2,      # Custom Skill Command 2
    ] # Do not remove this.
   
    #--------------------------------------------------------------------------
    # - Skill Custom Commands -
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # For those who use scripts to that may produce unique effects for
    # equipping, use this hash to manage the custom commands for the Skill
    # Command Window. You can disable certain commands or prevent them from
    # appearing by using switches. If you don't wish to bind them to a switch,
    # set the proper switch to 0 for it to have no impact.
    #--------------------------------------------------------------------------
    CUSTOM_SKILL_COMMANDS ={
    # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
      :grathnode => ["Grathnodes",            0,          0, :command_grath],
      :sslots  => [  "Pick Slots",            0,          0, :command_sslot],
      :custom1 => [ "Custom Name",            0,          0, :command_name1],
      :custom2 => [ "Custom Text",          13,          0, :command_name2],
    } # Do not remove this.
   
  end # SKILL_MENU
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

#==============================================================================
# ■ Game_Temp
#==============================================================================

class Game_Temp
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :scene_skill_index
  attr_accessor :scene_skill_oy
 
end # Game_Temp

#==============================================================================
# ■ Window_SkillCommand
#==============================================================================

class Window_SkillCommand < Window_Command
 
  #--------------------------------------------------------------------------
  # alias method: make_command_list
  #--------------------------------------------------------------------------
  alias window_skillcommand_make_command_list_asm make_command_list
  def make_command_list
    unless SceneManager.scene_is?(Scene_Skill)
      window_skillcommand_make_command_list_asm
      return
    end
    return unless @actor
    for command in YEA::SKILL_MENU::COMMANDS
      case command
      #--- Imported YEA ---
      when :stype_list
        add_skill_types
      #--- Imported YEA ---
      when :tp_mode
        next unless $imported["YEA-TPManager"]
        add_tp_modes
      when :learn_skill
        next unless $imported["YEA-LearnSkillEngine"]
        add_learn_skill_command
      #--- Imported Other ---
      when :grathnode
        next unless $imported["KRX-GrathnodeInstall"]
        process_custom_command(command)
      when :sslots
        next unless $imported["YSA-SlotBattle"]
        process_custom_command(command)
      #--- Custom Commands ---
      else
        process_custom_command(command)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: add_skill_types
  #--------------------------------------------------------------------------
  def add_skill_types
    @actor.added_skill_types.each do |stype_id|
      name = $data_system.skill_types[stype_id]
      add_command(name, :skill, true, stype_id)
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: process_custom_command
  #--------------------------------------------------------------------------
  def process_custom_command(command)
    return unless YEA::SKILL_MENU::CUSTOM_SKILL_COMMANDS.include?(command)
    show = YEA::SKILL_MENU::CUSTOM_SKILL_COMMANDS[command][2]
    continue = show <= 0 ? true : $game_switches[show]
    return unless continue
    text = YEA::SKILL_MENU::CUSTOM_SKILL_COMMANDS[command][0]
    switch = YEA::SKILL_MENU::CUSTOM_SKILL_COMMANDS[command][1]
    enabled = switch <= 0 ? true : $game_switches[switch]
    add_command(text, command, enabled, @actor.added_skill_types[0])
  end
 
  #--------------------------------------------------------------------------
  # new method: process_ok
  #--------------------------------------------------------------------------
  def process_ok
    if SceneManager.scene_is?(Scene_Skill)
      $game_temp.scene_skill_index = index
      $game_temp.scene_skill_oy = self.oy
    end
    super
  end
 
end # Window_SkillCommand

#==============================================================================
# ■ Scene_Skill
#==============================================================================

class Scene_Skill < Scene_ItemBase
 
  #--------------------------------------------------------------------------
  # alias method: create_command_window
  #--------------------------------------------------------------------------
  alias scene_skill_create_command_window_asm create_command_window
  def create_command_window
    scene_skill_create_command_window_asm
    if !$game_temp.scene_skill_index.nil? && SceneManager.scene_is?(Scene_Skill)
      @command_window.select($game_temp.scene_skill_index)
      @command_window.oy = $game_temp.scene_skill_oy
    end
    $game_temp.scene_skill_index = nil
    $game_temp.scene_skill_oy = nil
    process_custom_skill_commands
  end
 
  #--------------------------------------------------------------------------
  # new method: process_custom_skill_commands
  #--------------------------------------------------------------------------
  def process_custom_skill_commands
    for command in YEA::SKILL_MENU::COMMANDS
      next unless YEA::SKILL_MENU::CUSTOM_SKILL_COMMANDS.include?(command)
      called_method = YEA::SKILL_MENU::CUSTOM_SKILL_COMMANDS[command][3]
      @command_window.set_handler(command, method(called_method))
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: command_grath
  #--------------------------------------------------------------------------
  def command_grath
    SceneManager.call(Scene_Grathnode)
  end
 
  #--------------------------------------------------------------------------
  # new method: command_sslot
  #--------------------------------------------------------------------------
  def command_sslot
    SceneManager.call(Scene_PickSlots)
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name1
  #--------------------------------------------------------------------------
  def command_name1
    # Do nothing.
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name2
  #--------------------------------------------------------------------------
  def command_name2
    # Do nothing.
  end
 
end # Scene_Skill

#==============================================================================
#
# ▼ End of File
#
#==============================================================================


Dernière édition par cagt3000 le Mer 11 Avr 2012 - 15:28, édité 1 fois
Revenir en haut Aller en bas
http://www.site3000.weebly.com
cagt3000
Citadin Lv.7
Citadin Lv.7
cagt3000


Masculin Age : 123
Inscrit le : 08/04/2010
Messages : 218

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:26

Equip
Code:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Ace Equip Engine v1.06
# -- Last Updated: 2012.02.02
# -- Level: Normal, Hard
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-AceEquipEngine"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.02.02 - Bug Fixed: Crash when changing classes to different equip slots.
# 2012.01.22 - Bug Fixed: <equip slot> notetags updated to factor in spaces.
# 2012.01.05 - Compatibility Update: Equip Dynamic Stats
# 2011.12.30 - Bug Fixed: Stats didn't update.
# 2011.12.23 - Script efficiency optimized.
# 2011.12.18 - Script efficiency optimized.
# 2011.12.13 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# The default equipment system in RPG Maker VX is the standard equipment system
# seen in all of the previous iterations, which consists of weapon, shield,
# headgear, bodygear, and accessory. To break free of that norm, this script
# allows users access to giving actors and/or classes dynamic equipment setups
# (including having multiples of the same categories). In addition to having
# different equip slot setups, newer equipment types can be made to allow for
# more diversity in armour types.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Actor Notetags - These notetags go in the actors notebox in the database.
# -----------------------------------------------------------------------------
# <equip slots>
#  string
#  string
# </equip slots>
# This sets the actor's default slots to whatever is listed in between the two
# notetags. An actor's custom equip slots will take priority over a class's
# custom equip slots, which will take priority over the default equip slots.
# Replace "string" with the proper equipment type name or when in doubt, use
# "equip type: x" with x as the equipment type.
#
# <starting gear: x>
# <starting gear: x, x>
# Adds armour x to the actor's list of starting gear. This is used primarily
# for the newer pieces of gear that can't be added through the starting set of
# equipment through the RPG Maker VX Ace editor by default. Insert multiple of
# these notetags to add more pieces of starting gear if so desired.
#
# <fixed equip: x>
# <fixed equip: x, x>
# This will fix the equip type x. Fixed equip slots mean that the equipment
# already on it are unable to be exchanged in or out by the player. This tag
# has been made so that equip types can be fixed for equip type 5 and above.
# Use multiple of these notetags to add more fixed equipment restrictions.
#
# <sealed equip: x>
# <sealed equip: x, x>
# This will seal the equip type x. Sealed equip slots mean that no equipment
# can be equipped onto that equip type slot. This tag has been made so that
# equip types can be sealed for equip type 5 and above. Use multiple of these
# notetags to add more sealed equipment restrictions.
#
# -----------------------------------------------------------------------------
# Class Notetags - These notetags go in the class notebox in the database.
# -----------------------------------------------------------------------------
# <equip slots>
#  string
#  string
# </equip slots>
# This sets the class's default slots to whatever is listed in between the two
# notetags. An actor's custom equip slots will take priority over a class's
# custom equip slots, which will take priority over the default equip slots.
# Replace "string" with the proper equipment type name or when in doubt, use
# "equip type: x" with x as the equipment type.
#
# <fixed equip: x>
# <fixed equip: x, x>
# This will fix the equip type x. Fixed equip slots mean that the equipment
# already on it are unable to be exchanged in or out by the player. This tag
# has been made so that equip types can be fixed for equip type 5 and above.
# Use multiple of these notetags to add more fixed equipment restrictions.
#
# <sealed equip: x>
# <sealed equip: x, x>
# This will seal the equip type x. Sealed equip slots mean that no equipment
# can be equipped onto that equip type slot. This tag has been made so that
# equip types can be sealed for equip type 5 and above. Use multiple of these
# notetags to add more sealed equipment restrictions.
#
# -----------------------------------------------------------------------------
# Weapon Notetags - These notetags go in the weapons notebox in the database.
# -----------------------------------------------------------------------------
# <fixed equip: x>
# <fixed equip: x, x>
# This will fix the equip type x. Fixed equip slots mean that the equipment
# already on it are unable to be exchanged in or out by the player. This tag
# has been made so that equip types can be fixed for equip type 5 and above.
# Use multiple of these notetags to add more fixed equipment restrictions.
#
# <sealed equip: x>
# <sealed equip: x, x>
# This will seal the equip type x. Sealed equip slots mean that no equipment
# can be equipped onto that equip type slot. This tag has been made so that
# equip types can be sealed for equip type 5 and above. Use multiple of these
# notetags to add more sealed equipment restrictions.
#
# -----------------------------------------------------------------------------
# Armour Notetags - These notetags go in the armour notebox in the database.
# -----------------------------------------------------------------------------
# <equip type: x>
# <equip type: string>
# For the newer equip types, replace x or string with the equip type ID or the
# name of the equip type respectively. This will set that armour to that
# particular equip type.
#
# <fixed equip: x>
# <fixed equip: x, x>
# This will fix the equip type x. Fixed equip slots mean that the equipment
# already on it are unable to be exchanged in or out by the player. This tag
# has been made so that equip types can be fixed for equip type 5 and above.
# Use multiple of these notetags to add more fixed equipment restrictions.
#
# <sealed equip: x>
# <sealed equip: x, x>
# This will seal the equip type x. Sealed equip slots mean that no equipment
# can be equipped onto that equip type slot. This tag has been made so that
# equip types can be sealed for equip type 5 and above. Use multiple of these
# notetags to add more sealed equipment restrictions.
#
# -----------------------------------------------------------------------------
# State Notetags - These notetags go in the states notebox in the database.
# -----------------------------------------------------------------------------
# <fixed equip: x>
# <fixed equip: x, x>
# This will fix the equip type x. Fixed equip slots mean that the equipment
# already on it are unable to be exchanged in or out by the player. This tag
# has been made so that equip types can be fixed for equip type 5 and above.
# Use multiple of these notetags to add more fixed equipment restrictions.
#
# <sealed equip: x>
# <sealed equip: x, x>
# This will seal the equip type x. Sealed equip slots mean that no equipment
# can be equipped onto that equip type slot. This tag has been made so that
# equip types can be sealed for equip type 5 and above. Use multiple of these
# notetags to add more sealed equipment restrictions.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
  module EQUIP
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - General Equip Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This adjusts the default equip configuration. While actors can have their
    # own unique equipment configurations, it's recommended to not change too
    # much as things get really hairy when it comes to proper eventing.
    #
    # ID  Equip Type
    # ---  ------------
    #  0  Weapon
    #  1  Shield
    #  2  Headgear
    #  3  Bodygear
    #  4  Accessory
    #
    # Whatever you set the below slots to, the dual wield setup will be exactly
    # identical except that the second slot will be changed to a weapon (0).
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Adjust this array to set the default slots used for all of your actors
    # and classes if they do not have a custom equipment slot setup.
    DEFAULT_BASE_SLOTS = [ 0, 1, 2, 3, 5, 6, 4, 4]
   
    # This hash adjusts the new equip types (past 4+). Adjust them to match
    # their names properly. You can choose to allow certain types of equipment
    # be removable or not, or whether or not optimize will affect them.
    TYPES ={
    # TypeID => ["Type Name", Removable?, Optimize?],
          0 => [  "Weapon",      false,      true],
          1 => [  "Shield",      true,      true],
          2 => [ "Headgear",      true,      true],
          3 => [ "Bodygear",      true,      true],
          4 => ["Accessory",      true,    false],
          5 => [    "Cloak",      true,      true],
          6 => [ "Necklace",      true,      true],
    } # Do not remove this.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Equip Command List -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # Here, you can adjust the order at which the commands appear (or even
    # remove commands as you see fit). Here's a list of which does what:
    #
    # -------------------------------------------------------------------------
    # :command        Description
    # -------------------------------------------------------------------------
    # :equip          Activates the manual equip window. Default.
    # :optimize        Optimizes equipment for the actor. Default.
    # :clear          Clears all equipment from the actor. Default
    #
    # And that's all of the currently available commands. This list will be
    # updated as more scripts become available.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This array arranges the order of which the commands appear in the Equip
    # Command window in the Equip Scene.
    COMMAND_LIST =[
      :equip,
      :optimize,
      :clear,
    # :custom1,
    # :custom2,
    ] # Do not remove this.
   
    #--------------------------------------------------------------------------
    # - Equip Custom Commands -
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # For those who use scripts to that may produce unique effects for
    # equipping, use this hash to manage the custom commands for the Equip
    # Command Window. You can disable certain commands or prevent them from
    # appearing by using switches. If you don't wish to bind them to a switch,
    # set the proper switch to 0 for it to have no impact.
    #--------------------------------------------------------------------------
    CUSTOM_EQUIP_COMMANDS ={
    # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
      :custom1 => [ "Custom Name",            0,          0, :command_name1],
      :custom2 => [ "Custom Text",          13,          0, :command_name2],
    } # Do not remove this.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Misc Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This section adjusts the minor visuals that you see inside of the newly
    # organized Equip Scene. Adjust the settings as you see fit.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This sets the font size used for the status window in the lower right
    # corner of the screen (which shows stats and comparisons).
    STATUS_FONT_SIZE = 20
   
    # This sets the remove equip command in the item window.
    REMOVE_EQUIP_ICON = 185
    REMOVE_EQUIP_TEXT = "<Remove Equip>"
   
    # This sets the no-equipment text in the slot window.
    NOTHING_ICON = 185
    NOTHING_TEXT = "<Empty>"
   
  end # EQUIP
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

module YEA
  module REGEXP
  module BASEITEM
   
    EQUIP_SLOTS_ON  = /<(?:EQUIP_SLOTS|equip slots)>/i
    EQUIP_SLOTS_OFF = /<\/(?:EQUIP_SLOTS|equip slots)>/i
   
    EQUIP_TYPE_INT = /<(?:EQUIP_TYPE|equip type):[ ]*(\d+)>/i
    EQUIP_TYPE_STR = /<(?:EQUIP_TYPE|equip type):[ ]*(.*)>/i
   
    STARTING_GEAR = /<(?:STARTING_GEAR|starting gear):[ ](\d+(?:\s*,\s*\d+)*)>/i
   
    FIXED_EQUIP = /<(?:FIXED_EQUIP|fixed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i
    SEALED_EQUIP = /<(?:SEALED_EQUIP|sealed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i
   
  end # BASEITEM
  end # REGEXP
end # YEA

#==============================================================================
# ■ Vocab
#==============================================================================

module Vocab
 
  #--------------------------------------------------------------------------
  # overwrite method: self.etype
  #--------------------------------------------------------------------------
  def self.etype(etype)
    return $data_system.terms.etypes[etype] if [0,1,2,3,4].include?(etype)
    return YEA::EQUIP::TYPES[etype][0] if YEA::EQUIP::TYPES.include?(etype)
    return ""
  end
 
end # Vocab

#==============================================================================
# ■ Icon
#==============================================================================

module Icon
 
  #--------------------------------------------------------------------------
  # self.remove_equip
  #--------------------------------------------------------------------------
  def self.remove_equip; return YEA::EQUIP::REMOVE_EQUIP_ICON; end
 
  #--------------------------------------------------------------------------
  # self.nothing_equip
  #--------------------------------------------------------------------------
  def self.nothing_equip; return YEA::EQUIP::NOTHING_ICON; end
   
end # Icon

#==============================================================================
# ■ Numeric
#==============================================================================

class Numeric
 
  #--------------------------------------------------------------------------
  # new method: group_digits
  #--------------------------------------------------------------------------
  unless $imported["YEA-CoreEngine"]
  def group; return self.to_s; end
  end # $imported["YEA-CoreEngine"]
   
end # Numeric

#==============================================================================
# ■ DataManager
#==============================================================================

module DataManager
 
  #--------------------------------------------------------------------------
  # alias method: load_database
  #--------------------------------------------------------------------------
  class <<self; alias load_database_aee load_database; end
  def self.load_database
    load_database_aee
    load_notetags_aee
  end
 
  #--------------------------------------------------------------------------
  # new method: load_notetags_aee
  #--------------------------------------------------------------------------
  def self.load_notetags_aee
    groups = [$data_actors, $data_classes, $data_weapons, $data_armors,
      $data_states]
    for group in groups
      for obj in group
        next if obj.nil?
        obj.load_notetags_aee
      end
    end
  end
 
end # DataManager

#==============================================================================
# ■ RPG::BaseItem
#==============================================================================

class RPG::BaseItem
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :base_equip_slots
  attr_accessor :fixed_equip_type
  attr_accessor :sealed_equip_type
  attr_accessor :extra_starting_equips
 
  #--------------------------------------------------------------------------
  # common cache: load_notetags_aee
  #--------------------------------------------------------------------------
  def load_notetags_aee
    @base_equip_slots = []
    @equip_slots_on = false
    @fixed_equip_type = []
    @sealed_equip_type = []
    @extra_starting_equips = []
    #---
    self.note.split(/[\r\n]+/).each { |line|
      case line
      #---
      when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_ON
        next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)
        @equip_slots_on = true
      when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_OFF
        next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)
        @equip_slots_on = false
      #---
      when YEA::REGEXP::BASEITEM::STARTING_GEAR
        next unless self.is_a?(RPG::Actor)
        $1.scan(/\d+/).each { |num|
        @extra_starting_equips.push(num.to_i) if num.to_i > 0 }
      when YEA::REGEXP::BASEITEM::FIXED_EQUIP
        $1.scan(/\d+/).each { |num|
        @fixed_equip_type.push(num.to_i) if num.to_i > 0 }
      when YEA::REGEXP::BASEITEM::SEALED_EQUIP
        $1.scan(/\d+/).each { |num|
        @sealed_equip_type.push(num.to_i) if num.to_i > 0 }
      #---
      when YEA::REGEXP::BASEITEM::EQUIP_TYPE_INT
        next unless self.is_a?(RPG::Armor)
        @etype_id = [1, $1.to_i].max
      when YEA::REGEXP::BASEITEM::EQUIP_TYPE_STR
        next unless self.is_a?(RPG::Armor)
        for key in YEA::EQUIP::TYPES
          id = key[0]
          next if YEA::EQUIP::TYPES[id][0].upcase != $1.to_s.upcase
          @etype_id = [1, id].max
          break
        end
      #---
      else
        if @equip_slots_on
          case line.upcase
          when /EQUIP TYPE[ ](\d+)/i, /EQUIP TYPE:[ ](\d+)/i
            id = $1.to_i
            @base_equip_slots.push(id) if [0,1,2,3,4].include?(id)
            @base_equip_slots.push(id) if YEA::EQUIP::TYPES.include?(id)
          when /WEAPON/i
            @base_equip_slots.push(0)
          when /SHIELD/i
            @base_equip_slots.push(1)
          when /HEAD/i
            @base_equip_slots.push(2)
          when /BODY/i, /ARMOR/i, /ARMOUR/i
            @base_equip_slots.push(3)
          when /ETC/i, /OTHER/i, /ACCESSOR/i
            @base_equip_slots.push(4)
          else
            text = line.upcase.delete(" ")
            for key in YEA::EQUIP::TYPES
              id = key[0]
              next if YEA::EQUIP::TYPES[id][0].upcase.delete(" ")!= text
              @base_equip_slots.push(id)
              break
            end
          end
        end
      end
    } # self.note.split
    #---
    return unless self.is_a?(RPG::Class)
    if @base_equip_slots.empty?
      @base_equip_slots = YEA::EQUIP::DEFAULT_BASE_SLOTS.clone
    end
  end
 
end # RPG::BaseItem

#==============================================================================
# ■ Game_Temp
#==============================================================================

class Game_Temp
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :eds_actor
  attr_accessor :scene_equip_index
  attr_accessor :scene_equip_oy
 
end # Game_Temp

#==============================================================================
# ■ Game_BaseItem
#==============================================================================

class Game_BaseItem
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :item_id
 
end # Game_BaseItem

#==============================================================================
# ■ Game_BattlerBase
#==============================================================================

class Game_BattlerBase
 
  #--------------------------------------------------------------------------
  # alias method: equip_type_fixed?
  #--------------------------------------------------------------------------
  alias game_battlerbase_equip_type_fixed_aee equip_type_fixed?
  def equip_type_fixed?(etype_id)
    return true if fixed_etypes.include?(etype_id) if actor?
    return game_battlerbase_equip_type_fixed_aee(etype_id)
  end
 
  #--------------------------------------------------------------------------
  # alias method: equip_type_sealed?
  #--------------------------------------------------------------------------
  alias game_battlerbase_equip_type_sealed_aee equip_type_sealed?
  def equip_type_sealed?(etype_id)
    return true if sealed_etypes.include?(etype_id) if actor?
    return game_battlerbase_equip_type_sealed_aee(etype_id)
  end
 
end # Game_BattlerBase

#==============================================================================
# ■ Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # alias method: init_equips
  #--------------------------------------------------------------------------
  alias game_actor_init_equips_aee init_equips
  def init_equips(equips)
    game_actor_init_equips_aee(equips)
    equip_extra_starting_equips
  end
 
  #--------------------------------------------------------------------------
  # new method: equip_extra_starting_equips
  #--------------------------------------------------------------------------
  def equip_extra_starting_equips
    for equip_id in actor.extra_starting_equips
      armour = $data_armors[equip_id]
      next if armour.nil?
      etype_id = armour.etype_id
      next unless equip_slots.include?(etype_id)
      slot_id = empty_slot(etype_id)
      @equips[slot_id].set_equip(etype_id == 0, armour.id)
    end
    refresh
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: equip_slots
  #--------------------------------------------------------------------------
  def equip_slots
    return equip_slots_dual if dual_wield?
    return equip_slots_normal
  end
 
  #--------------------------------------------------------------------------
  # new method: equip_slots_normal
  #--------------------------------------------------------------------------
  def equip_slots_normal
    return self.actor.base_equip_slots if self.actor.base_equip_slots != []
    return self.class.base_equip_slots
  end
 
  #--------------------------------------------------------------------------
  # new method: equip_slots_dual
  #--------------------------------------------------------------------------
  def equip_slots_dual
    array = equip_slots_normal.clone
    array[1] = 0 if array.size >= 2
    return array
  end
 
  #--------------------------------------------------------------------------
  # new method: fixed_etypes
  #--------------------------------------------------------------------------
  def fixed_etypes
    array = []
    array |= self.actor.fixed_equip_type
    array |= self.class.fixed_equip_type
    for equip in equips
      next if equip.nil?
      array |= equip.fixed_equip_type
    end
    for state in states
      next if state.nil?
      array |= state.fixed_equip_type
    end
    return array
  end
 
  #--------------------------------------------------------------------------
  # new method: sealed_etypes
  #--------------------------------------------------------------------------
  def sealed_etypes
    array = []
    array |= self.actor.sealed_equip_type
    array |= self.class.sealed_equip_type
    for equip in equips
      next if equip.nil?
      array |= equip.sealed_equip_type
    end
    for state in states
      next if state.nil?
      array |= state.sealed_equip_type
    end
    return array
  end
 
  #--------------------------------------------------------------------------
  # alias method: change_equip
  #--------------------------------------------------------------------------
  alias game_actor_change_equip_aee change_equip
  def change_equip(slot_id, item)
    if item.nil? && !@optimize_clear
      etype_id = equip_slots[slot_id]
      return unless YEA::EQUIP::TYPES[etype_id][1]
    elsif item.nil? && @optimize_clear
      etype_id = equip_slots[slot_id]
      return unless YEA::EQUIP::TYPES[etype_id][2]
    end
    @equips[slot_id] = Game_BaseItem.new if @equips[slot_id].nil?
    game_actor_change_equip_aee(slot_id, item)
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: optimize_equipments
  #--------------------------------------------------------------------------
  def optimize_equipments
    $game_temp.eds_actor = self
    @optimize_clear = true
    clear_equipments
    @optimize_clear = false
    equip_slots.size.times do |i|
      next if !equip_change_ok?(i)
      next unless can_optimize?(i)
      items = $game_party.equip_items.select do |item|
        item.etype_id == equip_slots[i] &&
        equippable?(item) && item.performance >= 0
      end
      change_equip(i, items.max_by {|item| item.performance })
    end
    $game_temp.eds_actor = nil
  end
 
  #--------------------------------------------------------------------------
  # new method: can_optimize?
  #--------------------------------------------------------------------------
  def can_optimize?(slot_id)
    etype_id = equip_slots[slot_id]
    return YEA::EQUIP::TYPES[etype_id][2]
  end
 
  #--------------------------------------------------------------------------
  # alias method: force_change_equip
  #--------------------------------------------------------------------------
  alias game_actor_force_change_equip_aee force_change_equip
  def force_change_equip(slot_id, item)
    @equips[slot_id] = Game_BaseItem.new if @equips[slot_id].nil?
    game_actor_force_change_equip_aee(slot_id, item)
  end
 
  #--------------------------------------------------------------------------
  # alias method: weapons
  #--------------------------------------------------------------------------
  alias game_actor_weapons_aee weapons
  def weapons
    anti_crash_equips
    return game_actor_weapons_aee
  end
 
  #--------------------------------------------------------------------------
  # alias method: armors
  #--------------------------------------------------------------------------
  alias game_actor_armors_aee armors
  def armors
    anti_crash_equips
    return game_actor_armors_aee
  end
 
  #--------------------------------------------------------------------------
  # alias method: equips
  #--------------------------------------------------------------------------
  alias game_actor_equips_aee equips
  def equips
    anti_crash_equips
    return game_actor_equips_aee
  end
 
  #--------------------------------------------------------------------------
  # new method: equips
  #--------------------------------------------------------------------------
  def anti_crash_equips
    for i in 0...@equips.size
      next unless @equips[i].nil?
      @equips[i] = Game_BaseItem.new
    end
  end
 
end # Game_Actor

#==============================================================================
# ■ Game_Interpreter
#==============================================================================

class Game_Interpreter
 
  #--------------------------------------------------------------------------
  # overwrite method: change equip
  #--------------------------------------------------------------------------
  def command_319
    actor = $game_actors[@params[0]]
    return if actor.nil?
    if @params[1] == 0 && @params[2] != 0
      item = $data_weapons[@params[2]]
      return unless actor.equip_slots.include?(0)
      slot_id = actor.empty_slot(0)
    elsif @params[2] != 0
      item = $data_armors[@params[2]]
      return unless actor.equip_slots.include?(item.etype_id)
      slot_id = actor.empty_slot(item.etype_id)
    else
      slot_id = @params[1]
    end
    actor.change_equip_by_id(slot_id, @params[2])
  end
 
end # Game_Interpreter

#==============================================================================
# ■ Window_EquipStatus
#==============================================================================

class Window_EquipStatus < Window_Base
 
  #--------------------------------------------------------------------------
  # overwrite method: initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy)
    super(dx, dy, window_width, Graphics.height - dy)
    @actor = nil
    @temp_actor = nil
    refresh
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: window_width
  #--------------------------------------------------------------------------
  def window_width; return Graphics.width * 2 / 5; end
 
  #--------------------------------------------------------------------------
  # overwrite method: refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    8.times {|i| draw_item(0, line_height * i, i) }
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(dx, dy, param_id)
    draw_background_colour(dx, dy)
    draw_param_name(dx + 4, dy, param_id)
    draw_current_param(dx + 4, dy, param_id) if @actor
    drx = (contents.width + 22) / 2
    draw_right_arrow(drx, dy)
    draw_new_param(drx + 22, dy, param_id) if @temp_actor
    reset_font_settings
  end
 
  #--------------------------------------------------------------------------
  # new method: draw_background_colour
  #--------------------------------------------------------------------------
  def draw_background_colour(dx, dy)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, contents.width - 2, line_height - 2)
    contents.fill_rect(rect, colour)
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_param_name
  #--------------------------------------------------------------------------
  def draw_param_name(dx, dy, param_id)
    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
    change_color(system_color)
    draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_current_param
  #--------------------------------------------------------------------------
  def draw_current_param(dx, dy, param_id)
    change_color(normal_color)
    dw = (contents.width + 22) / 2
    draw_text(0, dy, dw, line_height, @actor.param(param_id).group, 2)
    reset_font_settings
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_new_param
  #--------------------------------------------------------------------------
  def draw_new_param(dx, dy, param_id)
    contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
    new_value = @temp_actor.param(param_id)
    change_color(param_change_color(new_value - @actor.param(param_id)))
    draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
    reset_font_settings
  end
 
end # Window_EquipStatus

#==============================================================================
# ■ Window_EquipCommand
#==============================================================================

class Window_EquipCommand < Window_HorzCommand
 
  #--------------------------------------------------------------------------
  # overwrite method: make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    for command in YEA::EQUIP::COMMAND_LIST
      case command
      when :equip
        add_command(Vocab::equip2, :equip)
      when :optimize
        add_command(Vocab::optimize, :optimize)
      when :clear
        add_command(Vocab::clear, :clear)
      else
        process_custom_command(command)
      end
    end
  end
 
  #--------------------------------------------------------------------------
  # process_ok
  #--------------------------------------------------------------------------
  def process_ok
    $game_temp.scene_equip_index = index
    $game_temp.scene_equip_oy = self.oy
    super
  end
 
  #--------------------------------------------------------------------------
  # new method: process_custom_command
  #--------------------------------------------------------------------------
  def process_custom_command(command)
    return unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)
    show = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][2]
    continue = show <= 0 ? true : $game_switches[show]
    return unless continue
    text = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][0]
    switch = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][1]
    enabled = switch <= 0 ? true : $game_switches[switch]
    add_command(text, command, enabled)
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: window_width
  #--------------------------------------------------------------------------
  def window_width; return 160; end
 
  #--------------------------------------------------------------------------
  # overwrite method: contents_width
  #--------------------------------------------------------------------------
  def contents_width; return width - standard_padding * 2; end
 
  #--------------------------------------------------------------------------
  # overwrite method: contents_height
  #--------------------------------------------------------------------------
  def contents_height
    ch = height - standard_padding * 2
    return [ch - ch % item_height, row_max * item_height].max
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return 4; end
 
  #--------------------------------------------------------------------------
  # overwrite method: col_max
  #--------------------------------------------------------------------------
  def col_max; return 1; end
   
  #--------------------------------------------------------------------------
  # overwrite method: item_rect
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = Rect.new
    rect.width = item_width
    rect.height = item_height
    rect.x = index % col_max * (item_width + spacing)
    rect.y = index / col_max * item_height
    rect
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: ensure_cursor_visible
  #--------------------------------------------------------------------------
  def ensure_cursor_visible
    self.top_row = row if row < top_row
    self.bottom_row = row if row > bottom_row
  end
   
  #--------------------------------------------------------------------------
  # overwrite method: cursor_down
  #--------------------------------------------------------------------------
  def cursor_down(wrap = false)
    if index < item_max - col_max || (wrap && col_max == 1)
      select((index + col_max) % item_max)
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: cursor_up
  #--------------------------------------------------------------------------
  def cursor_up(wrap = false)
    if index >= col_max || (wrap && col_max == 1)
      select((index - col_max + item_max) % item_max)
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: process_pageup
  #--------------------------------------------------------------------------
  def process_pageup
    Sound.play_cursor
    Input.update
    deactivate
    call_handler(:pageup)
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: process_pagedown
  #--------------------------------------------------------------------------
  def process_pagedown
    Sound.play_cursor
    Input.update
    deactivate
    call_handler(:pagedown)
  end
 
end # Window_EquipCommand

#==============================================================================
# ■ Window_EquipSlot
#==============================================================================

class Window_EquipSlot < Window_Selectable
 
  #--------------------------------------------------------------------------
  # overwrite method: initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, dw)
    super(dx, dy, dw, Graphics.height - dy)
    @actor = nil
    refresh
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: window_height
  #--------------------------------------------------------------------------
  def window_height; return self.height; end
 
  #--------------------------------------------------------------------------
  # overwrite method: visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return item_max; end
 
  #--------------------------------------------------------------------------
  # overwrite method: refresh
  #--------------------------------------------------------------------------
  def refresh
    create_contents
    super
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    return unless @actor
    rect = item_rect_for_text(index)
    change_color(system_color, enable?(index))
    draw_text(rect.x, rect.y, 92, line_height, slot_name(index))
    item = @actor.equips[index]
    dx = rect.x + 92
    dw = contents.width - dx - 24
    if item.nil?
      draw_nothing_equip(dx, rect.y, false, dw)
    else
      draw_item_name(item, dx, rect.y, enable?(index), dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # new method: draw_nothing_equip
  #--------------------------------------------------------------------------
  def draw_nothing_equip(dx, dy, enabled, dw)
    change_color(normal_color, enabled)
    draw_icon(Icon.nothing_equip, dx, dy, enabled)
    text = YEA::EQUIP::NOTHING_TEXT
    draw_text(dx + 24, dy, dw - 24, line_height, text)
  end
 
end # Window_EquipSlot

#==============================================================================
# ■ Window_EquipItem
#==============================================================================

class Window_EquipItem < Window_ItemList
 
  #--------------------------------------------------------------------------
  # overwrite method: col_max
  #--------------------------------------------------------------------------
  def col_max; return 1; end
 
  #--------------------------------------------------------------------------
  # overwrite method: slot_id=
  #--------------------------------------------------------------------------
  def slot_id=(slot_id)
    return if @slot_id == slot_id
    @slot_id = slot_id
    @last_item = nil
    self.oy = 0
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    rect = item_rect(index)
    rect.width -= 4
    if item.nil?
      draw_remove_equip(rect)
      return
    end
    dw = contents.width - rect.x - 24
    draw_item_name(item, rect.x, rect.y, enable?(item), dw)
    draw_item_number(rect, item)
  end
 
  #--------------------------------------------------------------------------
  # new method: draw_remove_equip
  #--------------------------------------------------------------------------
  def draw_remove_equip(rect)
    draw_icon(Icon.remove_equip, rect.x, rect.y)
    text = YEA::EQUIP::REMOVE_EQUIP_TEXT
    rect.x += 24
    rect.width -= 24
    draw_text(rect, text)
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: include?
  #--------------------------------------------------------------------------
  def include?(item)
    if item.nil? && !@actor.nil?
      etype_id = @actor.equip_slots[@slot_id]
      return YEA::EQUIP::TYPES[etype_id][1]
    end
    return true if item.nil?
    return false unless item.is_a?(RPG::EquipItem)
    return false if @slot_id < 0
    return false if item.etype_id != @actor.equip_slots[@slot_id]
    return @actor.equippable?(item)
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: enable?
  #--------------------------------------------------------------------------
  def enable?(item)
    if item.nil? && !@actor.nil?
      etype_id = @actor.equip_slots[@slot_id]
      return YEA::EQUIP::TYPES[etype_id][1]
    end
    return @actor.equippable?(item)
  end
 
  #--------------------------------------------------------------------------
  # new method: show
  #--------------------------------------------------------------------------
  def show
    @last_item = 0
    update_help
    super
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: update_help
  #--------------------------------------------------------------------------
  def update_help
    super
    return if @actor.nil?
    return if @status_window.nil?
    return if @last_item == item
    @last_item = item
    temp_actor = Marshal.load(Marshal.dump(@actor))
    temp_actor.force_change_equip(@slot_id, item)
    @status_window.set_temp_actor(temp_actor)
  end
 
end # Window_EquipItem

#==============================================================================
# ■ Window_EquipActor
#==============================================================================

class Window_EquipActor < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy)
    super(dx, dy, window_width, fitting_height(4))
    @actor = nil
  end
 
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return Graphics.width - 160; end
 
  #--------------------------------------------------------------------------
  # actor=
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    return unless @actor
    draw_actor_face(@actor, 0, 0)
    draw_actor_simple_status(@actor, 108, line_height / 2)
  end
 
end # Window_EquipActor

#==============================================================================
# ■ Scene_Equip
#==============================================================================

class Scene_Equip < Scene_MenuBase
 
  #--------------------------------------------------------------------------
  # overwrite method: create_status_window
  #--------------------------------------------------------------------------
  def create_status_window
    wx = Graphics.width - (Graphics.width * 2 / 5)
    wy = @help_window.height + 120
    @status_window = Window_EquipStatus.new(wx, wy)
    @status_window.viewport = @viewport
    @status_window.actor = @actor
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: create_command_window
  #--------------------------------------------------------------------------
  def create_command_window
    wx = 0
    wy = @help_window.height
    ww = 160
    @command_window = Window_EquipCommand.new(wx, wy, ww)
    @command_window.viewport = @viewport
    @command_window.help_window = @help_window
    if !$game_temp.scene_equip_index.nil?
      @command_window.select($game_temp.scene_equip_index)
      @command_window.oy = $game_temp.scene_equip_oy
    end
    $game_temp.scene_equip_index = nil
    $game_temp.scene_equip_oy = nil
    @command_window.set_handler(:equip,    method(:command_equip))
    @command_window.set_handler(:optimize, method(:command_optimize))
    @command_window.set_handler(:clear,    method(:command_clear))
    @command_window.set_handler(:cancel,  method(:return_scene))
    @command_window.set_handler(:pagedown, method(:next_actor))
    @command_window.set_handler(:pageup,  method(:prev_actor))
    process_custom_equip_commands
    create_actor_window
  end
 
  #--------------------------------------------------------------------------
  # new method: create_actor_window
  #--------------------------------------------------------------------------
  def create_actor_window
    wy = @help_window.height
    @actor_window = Window_EquipActor.new(@command_window.width, wy)
    @actor_window.viewport = @viewport
    @actor_window.actor = @actor
  end
 
  #--------------------------------------------------------------------------
  # new method: process_custom_equip_commands
  #--------------------------------------------------------------------------
  def process_custom_equip_commands
    for command in YEA::EQUIP::COMMAND_LIST
      next unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)
      called_method = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][3]
      @command_window.set_handler(command, method(called_method))
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: create_slot_window
  #--------------------------------------------------------------------------
  def create_slot_window
    wx = 0
    wy = @command_window.y + @command_window.height
    ww = Graphics.width - @status_window.width
    @slot_window = Window_EquipSlot.new(wx, wy, ww)
    @slot_window.viewport = @viewport
    @slot_window.help_window = @help_window
    @slot_window.status_window = @status_window
    @slot_window.actor = @actor
    @slot_window.set_handler(:ok,      method(:on_slot_ok))
    @slot_window.set_handler(:cancel,  method(:on_slot_cancel))
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: create_item_window
  #--------------------------------------------------------------------------
  def create_item_window
    wx = @slot_window.x
    wy = @slot_window.y
    ww = @slot_window.width
    wh = @slot_window.height
    @item_window = Window_EquipItem.new(wx, wy, ww, wh)
    @item_window.viewport = @viewport
    @item_window.help_window = @help_window
    @item_window.status_window = @status_window
    @item_window.actor = @actor
    @item_window.set_handler(:ok,    method(:on_item_ok))
    @item_window.set_handler(:cancel, method(:on_item_cancel))
    @slot_window.item_window = @item_window
    @item_window.hide
  end
 
  #--------------------------------------------------------------------------
  # alias method: command_optimize
  #--------------------------------------------------------------------------
  alias scene_equip_command_optimize_aee command_optimize
  def command_optimize
    scene_equip_command_optimize_aee
    @actor_window.refresh
  end
 
  #--------------------------------------------------------------------------
  # alias method: command_clear
  #--------------------------------------------------------------------------
  alias scene_equip_command_clear_aee command_clear
  def command_clear
    scene_equip_command_clear_aee
    @actor_window.refresh
  end
 
  #--------------------------------------------------------------------------
  # alias method: on_slot_ok
  #--------------------------------------------------------------------------
  alias scene_equip_on_slot_ok_aee on_slot_ok
  def on_slot_ok
    scene_equip_on_slot_ok_aee
    @slot_window.hide
    @item_window.refresh
    @item_window.show
  end
 
  #--------------------------------------------------------------------------
  # alias method: on_item_ok
  #--------------------------------------------------------------------------
  alias scene_equip_on_item_ok_aee on_item_ok
  def on_item_ok
    scene_equip_on_item_ok_aee
    @actor_window.refresh
    @slot_window.show
    @item_window.hide
  end
 
  #--------------------------------------------------------------------------
  # alias method: on_item_cancel
  #--------------------------------------------------------------------------
  alias scene_equip_on_item_cancel_aee on_item_cancel
  def on_item_cancel
    scene_equip_on_item_cancel_aee
    @slot_window.show
    @item_window.hide
  end
 
  #--------------------------------------------------------------------------
  # alias method: on_actor_change
  #--------------------------------------------------------------------------
  alias scene_equip_on_actor_change_aee on_actor_change
  def on_actor_change
    scene_equip_on_actor_change_aee
    @actor_window.actor = @actor
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name1
  #--------------------------------------------------------------------------
  def command_name1
    # Do nothing.
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name2
  #--------------------------------------------------------------------------
  def command_name2
    # Do nothing.
  end
 
end # Scene_Equip

#==============================================================================
#
# ▼ End of File
#
#==============================================================================
Revenir en haut Aller en bas
http://www.site3000.weebly.com
cagt3000
Citadin Lv.7
Citadin Lv.7
cagt3000


Masculin Age : 123
Inscrit le : 08/04/2010
Messages : 218

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:27

Status
Code:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Ace Status Menu v1.01
# -- Last Updated: 2011.12.26
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-StatusMenu"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2011.12.26 - Compatibility Update: Rename Actor
# 2011.12.23 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script changes the status screen completely to something the player can
# interact with more and be able to view actor data with more clarity. The
# player is able to view the general information for an actor (parameters and
# experience), a parameters bar graph, the various hidden extra parameters
# (named properties in the script), and a customizable biography for the actor.
# Also with this script, biographies can be changed at any time using a script
# call to add more of a personal touch to characters.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Script Calls - These commands are used with script calls.
# -----------------------------------------------------------------------------
# $game_actors[x].description = string
# Changes the biography description for actor x to that of the string. Use \n
# to designate linebreaks in the string. If you wish to use text codes, write
# them in the strings as \\n[2] or \\c[3] to make them work properly.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
  module STATUS
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Command Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This section adjusts the commands that appear in the command window used
    # for the status screen. Rearrange the commands, add new ones, remove them
    # as you see fit.
    #
    # -------------------------------------------------------------------------
    # :command        Description
    # -------------------------------------------------------------------------
    # :general        Adds general page.
    # :parameters      Adds parameters page.
    # :properties      Adds properties page.
    # :biography      Adds biography page.
    #
    # :rename          Requires YEA - Rename Actor
    # :retitle        Requires YEA - Retitle Actor
    #
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    COMMANDS =[ # The order at which the menu items are shown.
    # [    :command,    "Display"],
      [    :general,    "General"],
      [ :parameters, "Parameters"],
      [ :properties, "Properties"],
    # [    :custom1,    "Skills"],
    # [    :custom2,  "Equipment"],
    # [    :custom3,      "Class"],
      [  :biography,  "Biography"],
      [    :rename,    "Rename"],  # Requires YEA - Rename Actor
      [    :retitle,    "Retitle"],  # Requires YEA - Rename Actor
    ] # Do not remove this.
   
    #--------------------------------------------------------------------------
    # - Status Custom Commands -
    # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    # For those who use scripts to that may produce unique effects for the
    # status menu, use this hash to manage the custom commands for the Status
    # Command Window. You can disable certain commands or prevent them from
    # appearing by using switches. If you don't wish to bind them to a switch,
    # set the proper switch to 0 for it to have no impact.
    #--------------------------------------------------------------------------
    CUSTOM_STATUS_COMMANDS ={
    # :command => [EnableSwitch, ShowSwitch, Handler Method, Window Draw],
      :custom1 => [          0,          0, :command_name1, :draw_custom1],
      :custom2 => [          0,          0, :command_name2, :draw_custom2],
      :custom3 => [          0,          0, :command_name3, :draw_custom3],
    } # Do not remove this.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - General Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These settings adjust the way the general window visually appears.
    # Not many changes need to be done here other than vocab changes.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    PARAMETERS_VOCAB = "Parameters"        # Title used for Parameters.
    EXPERIENCE_VOCAB = "Experience"        # Title used for Experience.
    NEXT_TOTAL_VOCAB = "Next %s Total EXP"  # Label used for total experience.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Parameters Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These settings adjust the way the parameters window visually appears.
    # Each of the stats have a non-window colour. Adjust them as you see fit.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    PARAM_COLOUR ={
    # ParamID => [:stat,      Colour1,                  Colour2          ],
            2 => [ :atk, Color.new(225, 100, 100), Color.new(240, 150, 150)],
            3 => [ :def, Color.new(250, 150,  30), Color.new(250, 180, 100)],
            4 => [ :mat, Color.new( 70, 140, 200), Color.new(135, 180, 230)],
            5 => [ :mdf, Color.new(135, 130, 190), Color.new(170, 160, 220)],
            6 => [ :agi, Color.new( 60, 180,  80), Color.new(120, 200, 120)],
            7 => [ :luk, Color.new(255, 240, 100), Color.new(255, 250, 200)],
    } # Do not remove this.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Properties Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These settings adjust the way the properties window visually appears.
    # The properties have abbreviations, but leaving them as such makes things
    # confusing (as it's sometimes hard to figure out what the abbreviations
    # mean). Change the way the appear, whether or not they appear, and what
    # order they will appear in.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    PROPERTIES_FONT_SIZE = 16        # Font size used for properties.
   
    # These are the properties that appear in column 1.
    PROPERTIES_COLUMN1 =[
      [:hit, "Hit Rate"],
      [:eva, "Evasion"],
      [:cri, "Critical Hit"],
      [:cev, "Critical Evade"],
      [:mev, "Magic Evasion"],
      [:mrf, "Magic Reflect"],
      [:cnt, "Counter Rate"],
      [:tgr, "Target Rate"],
    ] # Do not remove this.
   
    # These are the properties that appear in column 2.
    PROPERTIES_COLUMN2 =[
      [:hrg, "HP Regen"],
      [:mrg, "MP Regen"],
      [:trg, "TP Regen"],
      [:rec, "Recovery"],
      [:grd, "Guard Rate"],
      [:pha, "Item Boost"],
      [:exr, "EXP Rate"],
      [:tcr, "TP Charge"],
    ] # Do not remove this.
   
    # These are the properties that appear in column 3.
    PROPERTIES_COLUMN3 =[
      [:hcr, "HP Cost Rate"],    # Requires YEA - Skill Cost Manager
      [:mcr, "MP Cost Rate"],
      [:tcr, "TP Cost Rate"],    # Requires YEA - Skill Cost Manager
      [:cdr, "Cooldown Rate"],  # Requires YEA - Skill Restrictions
      [:wur, "Warmup Rate"],    # Requires YEA - Skill Restrictions
      [:pdr, "Physical Damage"],
      [:mort de rire, "Magical Damage"],
      [:fdr, "Floor Damage"],
    ] # Do not remove this.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Biography Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # These settings adjust the way the biography appears including the title
    # used at the top, the font size, and whatnot.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    BIOGRAPHY_NICKNAME_TEXT = "%s the %s"  # How the nickname will appear.
    BIOGRAPHY_NICKNAME_SIZE = 32            # Size of the font used.
   
  end # STATUS
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

#==============================================================================
# ■ Numeric
#==============================================================================

class Numeric
 
  #--------------------------------------------------------------------------
  # new method: group_digits
  #--------------------------------------------------------------------------
  unless $imported["YEA-CoreEngine"]
  def group; return self.to_s; end
  end # $imported["YEA-CoreEngine"]
   
end # Numeric

#==============================================================================
# ■ Game_Temp
#==============================================================================

class Game_Temp
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :scene_status_index
  attr_accessor :scene_status_oy
 
end # Game_Temp

#==============================================================================
# ■ Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
 
  #--------------------------------------------------------------------------
  # new method: description=
  #--------------------------------------------------------------------------
  def description=(text)
    @description = text
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: description
  #--------------------------------------------------------------------------
  def description
    return @description unless @description.nil?
    return actor.description
  end
 
end # Game_Actor

#==============================================================================
# ■ Window_StatusCommand
#==============================================================================

class Window_StatusCommand < Window_Command
 
  #--------------------------------------------------------------------------
  # public instance variables
  #--------------------------------------------------------------------------
  attr_accessor :item_window
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy)
    super(dx, dy)
    @actor = nil
  end
 
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return 160; end
 
  #--------------------------------------------------------------------------
  # actor=
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
 
  #--------------------------------------------------------------------------
  # visible_line_number
  #--------------------------------------------------------------------------
  def visible_line_number; return 4; end
 
  #--------------------------------------------------------------------------
  # ok_enabled?
  #--------------------------------------------------------------------------
  def ok_enabled?
    return handle?(current_symbol)
  end
 
  #--------------------------------------------------------------------------
  # make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    return unless @actor
    for command in YEA::STATUS::COMMANDS
      case command[0]
      #--- Default ---
      when :general, :parameters, :properties, :biography
        add_command(command[1], command[0])
      #--- Yanfly Engine Ace ---
      when :rename
        next unless $imported["YEA-RenameActor"]
        add_command(command[1], command[0], @actor.rename_allow?)
      when :retitle
        next unless $imported["YEA-RenameActor"]
        add_command(command[1], command[0], @actor.retitle_allow?)
      #--- Custom Commands ---
      else
        process_custom_command(command)
      end
    end
    if !$game_temp.scene_status_index.nil?
      select($game_temp.scene_status_index)
      self.oy = $game_temp.scene_status_oy
    end
    $game_temp.scene_status_index = nil
    $game_temp.scene_status_oy = nil
  end
 
  #--------------------------------------------------------------------------
  # process_ok
  #--------------------------------------------------------------------------
  def process_ok
    $game_temp.scene_status_index = index
    $game_temp.scene_status_oy = self.oy
    super
  end
 
  #--------------------------------------------------------------------------
  # process_custom_command
  #--------------------------------------------------------------------------
  def process_custom_command(command)
    return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
    show = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][1]
    continue = show <= 0 ? true : $game_switches[show]
    return unless continue
    text = command[1]
    switch = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][0]
    enabled = switch <= 0 ? true : $game_switches[switch]
    add_command(text, command[0], enabled)
  end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    update_item_window
  end
 
  #--------------------------------------------------------------------------
  # update_item_window
  #--------------------------------------------------------------------------
  def update_item_window
    return if @item_window.nil?
    return if @current_index == current_symbol
    @current_index = current_symbol
    @item_window.refresh
  end
 
  #--------------------------------------------------------------------------
  # item_window=
  #--------------------------------------------------------------------------
  def item_window=(window)
    @item_window = window
    update
  end
 
  #--------------------------------------------------------------------------
  # update_help
  #--------------------------------------------------------------------------
  def update_help
    return if @actor.nil?
    @help_window.set_text(@actor.actor.description)
  end
 
end # Window_StatusCommand

#==============================================================================
# ■ Window_StatusActor
#==============================================================================

class Window_StatusActor < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy)
    super(dx, dy, window_width, fitting_height(4))
    @actor = nil
  end
 
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; return Graphics.width - 160; end
 
  #--------------------------------------------------------------------------
  # actor=
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    return unless @actor
    draw_actor_face(@actor, 0, 0)
    draw_actor_simple_status(@actor, 108, line_height / 2)
  end
 
end # Window_StatusActor

#==============================================================================
# ■ Window_StatusItem
#==============================================================================

class Window_StatusItem < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, command_window)
    super(dx, dy, Graphics.width, Graphics.height - dy)
    @command_window = command_window
    @actor = nil
    refresh
  end
 
  #--------------------------------------------------------------------------
  # actor=
  #--------------------------------------------------------------------------
  def actor=(actor)
    return if @actor == actor
    @actor = actor
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    reset_font_settings
    return unless @actor
    draw_window_contents
  end
 
  #--------------------------------------------------------------------------
  # draw_window_contents
  #--------------------------------------------------------------------------
  def draw_window_contents
    case @command_window.current_symbol
    when :general
      draw_actor_general
    when :parameters
      draw_parameter_graph
    when :properties
      draw_properties_list
    when :biography, :rename, :retitle
      draw_actor_biography
    else
      draw_custom
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_actor_general
  #--------------------------------------------------------------------------
  def draw_actor_general
    change_color(system_color)
    text = YEA::STATUS::PARAMETERS_VOCAB
    draw_text(0, 0, contents.width/2, line_height, text, 1)
    text = YEA::STATUS::EXPERIENCE_VOCAB
    draw_text(contents.width/2, 0, contents.width/2, line_height, text, 1)
    draw_general_parameters
    draw_general_experience
  end
 
  #--------------------------------------------------------------------------
  # draw_general_parameters
  #--------------------------------------------------------------------------
  def draw_general_parameters
    dx = 24
    dy = line_height / 2
    draw_actor_level(dx, line_height*1+dy, contents.width/2 - 24)
    draw_actor_param(0, dx, line_height*2+dy, contents.width/2 - 24)
    draw_actor_param(1, dx, line_height*3+dy, contents.width/2 - 24)
    draw_actor_param(2, dx, line_height*4+dy, contents.width/4 - 12)
    draw_actor_param(4, dx, line_height*5+dy, contents.width/4 - 12)
    draw_actor_param(6, dx, line_height*6+dy, contents.width/4 - 12)
    dx += contents.width/4 - 12
    draw_actor_param(3, dx, line_height*4+dy, contents.width/4 - 12)
    draw_actor_param(5, dx, line_height*5+dy, contents.width/4 - 12)
    draw_actor_param(7, dx, line_height*6+dy, contents.width/4 - 12)
  end
 
  #--------------------------------------------------------------------------
  # draw_actor_level
  #--------------------------------------------------------------------------
  def draw_actor_level(dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::level)
    change_color(normal_color)
    draw_text(dx+4, dy, dw-8, line_height, @actor.level.group, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_actor_param
  #--------------------------------------------------------------------------
  def draw_actor_param(param_id, dx, dy, dw)
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
    change_color(normal_color)
    draw_text(dx+4, dy, dw-8, line_height, @actor.param(param_id).group, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_general_experience
  #--------------------------------------------------------------------------
  def draw_general_experience
    if @actor.max_level?
      s1 = @actor.exp.group
      s2 = "-------"
      s3 = "-------"
    else
      s1 = @actor.exp.group
      s2 = (@actor.next_level_exp - @actor.exp).group
      s3 = @actor.next_level_exp.group
    end
    s_next = sprintf(Vocab::ExpNext, Vocab::level)
    total_next_text = sprintf(YEA::STATUS::NEXT_TOTAL_VOCAB, Vocab::level)
    change_color(system_color)
    dx = contents.width/2 + 12
    dy = line_height * 3 / 2
    dw = contents.width/2 - 36
    draw_text(dx, dy + line_height * 0, dw, line_height, Vocab::ExpTotal)
    draw_text(dx, dy + line_height * 2, dw, line_height, s_next)
    draw_text(dx, dy + line_height * 4, dw, line_height, total_next_text)
    change_color(normal_color)
    draw_text(dx, dy + line_height * 1, dw, line_height, s1, 2)
    draw_text(dx, dy + line_height * 3, dw, line_height, s2, 2)
    draw_text(dx, dy + line_height * 5, dw, line_height, s3, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_parameter_graph
  #--------------------------------------------------------------------------
  def draw_parameter_graph
    draw_parameter_title
    dy = line_height * 3/2
    maximum = 1
    minimum = @actor.param_max(2)
    for i in 2..7
      maximum = [@actor.param(i), maximum].max
      minimum = [@actor.param(i), minimum].min
    end
    maximum += minimum * 0.33 unless maximum == minimum
    for i in 2..7
      rate = calculate_rate(maximum, minimum, i)
      dy = line_height * i - line_height/2
      draw_param_gauge(i, dy, rate)
      change_color(system_color)
      draw_text(28, dy, contents.width - 56, line_height, Vocab::param(i))
      dw = (contents.width - 48) * rate - 8
      change_color(normal_color)
      draw_text(28, dy, dw, line_height, @actor.param(i).group, 2)
    end
  end
 
  #--------------------------------------------------------------------------
  # calculate_rate
  #--------------------------------------------------------------------------
  def calculate_rate(maximum, minimum, param_id)
    return 1.0 if maximum == minimum
    rate = (@actor.param(param_id).to_f - minimum) / (maximum - minimum).to_f
    rate *= 0.67
    rate += 0.33
    return rate
  end
 
  #--------------------------------------------------------------------------
  # draw_param_gauge
  #--------------------------------------------------------------------------
  def draw_param_gauge(param_id, dy, rate)
    dw = contents.width - 48
    colour1 = param_gauge1(param_id)
    colour2 = param_gauge2(param_id)
    draw_gauge(24, dy, dw, rate, colour1, colour2)
  end
 
  #--------------------------------------------------------------------------
  # param_gauge1
  #--------------------------------------------------------------------------
  def param_gauge1(param_id)
    return YEA::STATUS::PARAM_COLOUR[param_id][1]
  end
 
  #--------------------------------------------------------------------------
  # param_gauge2
  #--------------------------------------------------------------------------
  def param_gauge2(param_id)
    return YEA::STATUS::PARAM_COLOUR[param_id][2]
  end
 
  #--------------------------------------------------------------------------
  # draw_parameter_title
  #--------------------------------------------------------------------------
  def draw_parameter_title
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(0, 0, contents.width, contents.height)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    text = YEA::STATUS::PARAMETERS_VOCAB
    draw_text(0, line_height/3, contents.width, line_height, text, 1)
  end
 
  #--------------------------------------------------------------------------
  # draw_properties_list
  #--------------------------------------------------------------------------
  def draw_properties_list
    contents.font.size = YEA::STATUS::PROPERTIES_FONT_SIZE
    draw_properties_column1
    draw_properties_column2
    draw_properties_column3
    reset_font_settings
  end
 
  #--------------------------------------------------------------------------
  # draw_properties_column1
  #--------------------------------------------------------------------------
  def draw_properties_column1
    dx = 24
    dw = (contents.width - 24) / 3 - 24
    dy = 0
    for property in YEA::STATUS::PROPERTIES_COLUMN1
      dy = draw_property(property, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_properties_column2
  #--------------------------------------------------------------------------
  def draw_properties_column2
    dx = 24 + (contents.width - 24) / 3
    dw = (contents.width - 24) / 3 - 24
    dy = 0
    for property in YEA::STATUS::PROPERTIES_COLUMN2
      dy = draw_property(property, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_properties_column3
  #--------------------------------------------------------------------------
  def draw_properties_column3
    dx = 24 + (contents.width - 24) / 3 * 2
    dw = (contents.width - 24) / 3 - 24
    dy = 0
    for property in YEA::STATUS::PROPERTIES_COLUMN3
      dy = draw_property(property, dx, dy, dw)
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_property
  #--------------------------------------------------------------------------
  def draw_property(property, dx, dy, dw)
    fmt = "%1.2f%%"
    case property[0]
    #---
    when :hit
      value = sprintf(fmt, @actor.hit * 100)
    when :eva
      value = sprintf(fmt, @actor.eva * 100)
    when :cri
      value = sprintf(fmt, @actor.cri * 100)
    when :cev
      value = sprintf(fmt, @actor.cev * 100)
    when :mev
      value = sprintf(fmt, @actor.mev * 100)
    when :mrf
      value = sprintf(fmt, @actor.mrf * 100)
    when :cnt
      value = sprintf(fmt, @actor.cnt * 100)
    when :hrg
      value = sprintf(fmt, @actor.hrg * 100)
    when :mrg
      value = sprintf(fmt, @actor.mrg * 100)
    when :trg
      value = sprintf(fmt, @actor.trg * 100)
    when :tgr
      value = sprintf(fmt, @actor.tgr * 100)
    when :grd
      value = sprintf(fmt, @actor.grd * 100)
    when :rec
      value = sprintf(fmt, @actor.rec * 100)
    when :pha
      value = sprintf(fmt, @actor.pha * 100)
    when :mcr
      value = sprintf(fmt, @actor.mcr * 100)
    when :tcr
      value = sprintf(fmt, @actor.tcr * 100)
    when :pdr
      value = sprintf(fmt, @actor.pdr * 100)
    when :mort de rire
      value = sprintf(fmt, @actor.mort de rire * 100)
    when :fdr
      value = sprintf(fmt, @actor.fdr * 100)
    when :exr
      value = sprintf(fmt, @actor.exr * 100)
    when :hcr
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.hcr * 100)
    when :tcr
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.tcr * 100)
    when :gcr
      return dy unless $imported["YEA-SkillCostManager"]
      value = sprintf(fmt, @actor.gcr * 100)
    when :cdr
      return dy unless $imported["YEA-SkillRestrictions"]
      value = sprintf(fmt, @actor.cdr * 100)
    when :wur
      return dy unless $imported["YEA-SkillRestrictions"]
      value = sprintf(fmt, @actor.wur * 100)
    #---
    else; return dy
    end
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
    contents.fill_rect(rect, colour)
    change_color(system_color)
    draw_text(dx+4, dy, dw-8, line_height, property[1], 0)
    change_color(normal_color)
    draw_text(dx+4, dy, dw-8, line_height, value, 2)
    return dy + line_height
  end
 
  #--------------------------------------------------------------------------
  # draw_actor_biography
  #--------------------------------------------------------------------------
  def draw_actor_biography
    fmt = YEA::STATUS::BIOGRAPHY_NICKNAME_TEXT
    text = sprintf(fmt, @actor.name, @actor.nickname)
    contents.font.size = YEA::STATUS::BIOGRAPHY_NICKNAME_SIZE
    draw_text(0, 0, contents.width, line_height*2, text, 1)
    reset_font_settings
    draw_text_ex(24, line_height*2, @actor.description)
  end
 
  #--------------------------------------------------------------------------
  # draw_custom
  #--------------------------------------------------------------------------
  def draw_custom
    current_symbol = @command_window.current_symbol
    return unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(current_symbol)
    method(YEA::STATUS::CUSTOM_STATUS_COMMANDS[current_symbol][3]).call
  end
 
  #--------------------------------------------------------------------------
  # draw_custom1
  #--------------------------------------------------------------------------
  def draw_custom1
    dx = 0; dy = 0
    for skill in @actor.skills
      next if skill.nil?
      next unless @actor.added_skill_types.include?(skill.stype_id)
      draw_item_name(skill, dx, dy)
      dx = dx == contents.width / 2 + 16 ? 0 : contents.width / 2 + 16
      dy += line_height if dx == 0
      return if dy + line_height > contents.height
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_custom2
  #--------------------------------------------------------------------------
  def draw_custom2
    dx = 4; dy = 0; slot_id = 0
    for equip in @actor.equips
      change_color(system_color)
      text = Vocab.etype(@actor.equip_slots[slot_id])
      draw_text(dx, dy, contents.width - dx, line_height, text)
      reset_font_settings
      draw_item_name(equip, dx+92, dy) unless equip.nil?
      slot_id += 1
      dy += line_height
      break if dy + line_height > contents.height
    end
    dw = Graphics.width * 2 / 5 - 24
    dx = contents.width - dw; dy = 0
    param_id = 0
    8.times do
      colour = Color.new(0, 0, 0, translucent_alpha/2)
      rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
      contents.fill_rect(rect, colour)
      size = $imported["YEA-AceEquipEngine"] ? YEA::EQUIP::STATUS_FONT_SIZE : 20
      contents.font.size = size
      change_color(system_color)
      draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
      change_color(normal_color)
      dwa = (Graphics.width * 2 / 5 - 2) / 2
      draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
      reset_font_settings
      change_color(system_color)
      draw_text(dx + dwa, dy, 22, line_height, "→", 1)
      param_id += 1
      dy += line_height
      break if dy + line_height > contents.height
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_custom3
  #--------------------------------------------------------------------------
  def draw_custom3
    return unless $imported["YEA-ClassSystem"]
    data = []
    for class_id in YEA::CLASS_SYSTEM::CLASS_ORDER
      next if $data_classes[class_id].nil?
      item = $data_classes[class_id]
      next unless @actor.unlocked_classes.include?(item.id) or
        YEA::CLASS_SYSTEM::DEFAULT_UNLOCKS.include?(item.id)
      data.push(item)
    end
    dx = 0; dy = 0; class_index = 0
    for class_id in data
      item = data[class_index]
      reset_font_settings
      if item == @actor.class
        change_color(text_color(YEA::CLASS_SYSTEM::CURRENT_CLASS_COLOUR))
      elsif item == @actor.subclass
        change_color(text_color(YEA::CLASS_SYSTEM::SUBCLASS_COLOUR))
      else
        change_color(normal_color)
      end
      icon = item.icon_index
      draw_icon(icon, dx, dy)
      text = item.name
      draw_text(24, dy, contents.width-24, line_height, text)
      next if YEA::CLASS_SYSTEM::MAINTAIN_LEVELS
      level = @actor.class_level(item.id)
      contents.font.size = YEA::CLASS_SYSTEM::LEVEL_FONT_SIZE
      text = sprintf(YEA::CLASS_SYSTEM::CLASS_LEVEL, level.group)
      dwa = contents.width - (Graphics.width * 2 / 5 - 24) - 28
      draw_text(dx, dy, dwa, line_height, text, 2)
      class_index += 1
      dy += line_height
      break if dy + line_height > contents.height
    end
    dw = Graphics.width * 2 / 5 - 24
    dx = contents.width - dw; dy = 0
    param_id = 0
    8.times do
      colour = Color.new(0, 0, 0, translucent_alpha/2)
      rect = Rect.new(dx+1, dy+1, dw - 2, line_height - 2)
      contents.fill_rect(rect, colour)
      contents.font.size = YEA::CLASS_SYSTEM::PARAM_FONT_SIZE
      change_color(system_color)
      draw_text(dx+4, dy, dw, line_height, Vocab::param(param_id))
      change_color(normal_color)
      dwa = (Graphics.width * 2 / 5 - 2) / 2
      draw_text(dx, dy, dwa, line_height, @actor.param(param_id).group, 2)
      reset_font_settings
      change_color(system_color)
      draw_text(dx + dwa, dy, 22, line_height, "→", 1)
      param_id += 1
      dy += line_height
      break if dy + line_height > contents.height
    end
  end
 
end # Window_StatusItem

#==============================================================================
# ■ Scene_Status
#==============================================================================

class Scene_Status < Scene_MenuBase
 
  #--------------------------------------------------------------------------
  # start
  #--------------------------------------------------------------------------
  def start
    super
    create_help_window
    create_command_window
    create_status_window
    create_item_window
    relocate_windows
  end
 
  #--------------------------------------------------------------------------
  # create_command_window
  #--------------------------------------------------------------------------
  def create_command_window
    wy = @help_window.height
    @command_window = Window_StatusCommand.new(0, wy)
    @command_window.viewport = @viewport
    @command_window.actor = @actor
    @command_window.help_window = @help_window
    @command_window.set_handler(:cancel,  method(:return_scene))
    @command_window.set_handler(:pagedown, method(:next_actor))
    @command_window.set_handler(:pageup,  method(:prev_actor))
    process_custom_status_commands
  end
 
  #--------------------------------------------------------------------------
  # process_custom_status_commands
  #--------------------------------------------------------------------------
  def process_custom_status_commands
    for command in YEA::STATUS::COMMANDS
      next unless YEA::STATUS::CUSTOM_STATUS_COMMANDS.include?(command[0])
      called_method = YEA::STATUS::CUSTOM_STATUS_COMMANDS[command[0]][2]
      @command_window.set_handler(command[0], method(called_method))
    end
  end
 
  #--------------------------------------------------------------------------
  # create_status_window
  #--------------------------------------------------------------------------
  def create_status_window
    wy = @help_window.height
    @status_window = Window_StatusActor.new(@command_window.width, wy)
    @status_window.viewport = @viewport
    @status_window.actor = @actor
  end
 
  #--------------------------------------------------------------------------
  # create_item_window
  #--------------------------------------------------------------------------
  def create_item_window
    dy = @command_window.y + @command_window.height
    @item_window = Window_StatusItem.new(0, dy, @command_window)
    @item_window.viewport = @viewport
    @item_window.actor = @actor
    @command_window.item_window = @item_window
  end
 
  #--------------------------------------------------------------------------
  # relocate_windows
  #--------------------------------------------------------------------------
  def relocate_windows
    return unless $imported["YEA-AceMenuEngine"]
    case Menu.help_window_location
    when 0 # Top
      @help_window.y = 0
      @command_window.y = @help_window.height
      @item_window.y = @command_window.y + @command_window.height
    when 1 # Middle
      @command_window.y = 0
      @help_window.y = @command_window.height
      @item_window.y = @help_window.y + @help_window.height
    else # Bottom
      @command_window.y = 0
      @item_window.y = @command_window.height
      @help_window.y = @item_window.y + @item_window.height
    end
    @status_window.y = @command_window.y
  end
 
  #--------------------------------------------------------------------------
  # on_actor_change
  #--------------------------------------------------------------------------
  def on_actor_change
    @command_window.actor = @actor
    @status_window.actor = @actor
    @item_window.actor = @actor
    @command_window.activate
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name1
  #--------------------------------------------------------------------------
  def command_name1
    SceneManager.call(Scene_Skill)
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name2
  #--------------------------------------------------------------------------
  def command_name2
    SceneManager.call(Scene_Equip)
  end
 
  #--------------------------------------------------------------------------
  # new method: command_name3
  #--------------------------------------------------------------------------
  def command_name3
    unless $imported["YEA-ClassSystem"]
      @command_window.activate
      return
    end
    SceneManager.call(Scene_Class)
  end
 
end # Scene_Status

#==============================================================================
#
# ▼ End of File
#
#==============================================================================
Revenir en haut Aller en bas
http://www.site3000.weebly.com
cagt3000
Citadin Lv.7
Citadin Lv.7
cagt3000


Masculin Age : 123
Inscrit le : 08/04/2010
Messages : 218

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:28

Save
Code:
#==============================================================================
#
# ▼ Yanfly Engine Ace - Ace Save Engine v1.02
# -- Last Updated: 2012.01.23
# -- Level: Normal
# -- Requires: n/a
#
#==============================================================================

$imported = {} if $imported.nil?
$imported["YEA-SaveEngine"] = true

#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2012.01.23 - Anti-crash method added for removed maps.
# 2011.12.26 - Compatibility Update: New Game+
# 2011.12.26 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script provides a new save interface for the player. Along with a new
# interface, the player can also load and delete saves straight from the menu
# itself. This will in turn make the save command from the Main Menu always
# available, but the save option within the new save menu will be enabled
# depending on whether or not it is allowed or disallowed. From the interface,
# the player is given more information regarding the save file including the
# the location the player saved at, the amount of gold available, and any
# variables that you want to show the player as well.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# For first time installers, be warned that loading this script the first time
# may not display all information in the status window for save files made
# before the installation of this script. To remedy this, just load up the save
# and save the file again.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
#==============================================================================

module YEA
  module SAVE
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Slot Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This section adjusts how the slot window appears on the left side of the
    # screen. This also adjusts the maximum number of saves a player can make,
    # the way the slot names appear, and the icons used.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    MAX_FILES = 24        # Maximum saves a player can make. Default: 16
    SLOT_NAME = "File %s"  # How the file slots will be named.
   
    # These are the icons
    SAVE_ICON  = 368      # Icon used to indicate a save is present.
    EMPTY_ICON = 375      # Icon used to indicate an empty file.
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Action Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This section adjusts how the action window appears, the sound effect
    # played when deleting files, and what appears in the help window above.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    ACTION_LOAD  = "Load"          # Text used for loading games.
    ACTION_SAVE  = "Save"          # Text used for saving games.
    ACTION_DELETE = "Delete"        # Text used for deleting games.
    DELETE_SOUND  = RPG::SE.new("Collapse3", 100, 100) # Sound for deleting.
   
    # These text settings adjust what displays in the help window.
    SELECT_HELP = "Please select a file slot."
    LOAD_HELP  = "Loads the data from the saved game."
    SAVE_HELP  = "Saves the current progress in your game."
    DELETE_HELP = "Deletes all data from this save file."
   
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # - Status Window Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # This section adjusts how the status window appears in the middle of the
    # screen (that displays the game's data) such as the total playtime, total
    # times saved, total gold, the party's current location, and the variables
    # to be displayed.
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    EMPTY_TEXT = "No Save Data"      # Text used when no save data is present.
    PLAYTIME  = "Playtime"          # Text used for total playtime.
    TOTAL_SAVE = "Total Saves: "    # Text used to indicate total saves.
    TOTAL_GOLD = "Total Gold: "      # Text used to indicate total gold.
    LOCATION  = "Location: "        # Text used to indicate current location.
   
    # These variables will be shown in each of the two columns for those who
    # would want to display more information than just what's shown. Input the
    # variables into the arrays below to designate what data will be shown.
    COLUMN1_VARIABLES = [1, 2, 3]
    COLUMN2_VARIABLES = [4, 5, 6]
   
  end # SAVE
end # YEA

#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================

#==============================================================================
# ■ Icon
#==============================================================================

module Icon
 
  #--------------------------------------------------------------------------
  # self.save_icon
  #--------------------------------------------------------------------------
  def self.save_icon; return YEA::SAVE::SAVE_ICON; end
 
  #--------------------------------------------------------------------------
  # self.empty_icon
  #--------------------------------------------------------------------------
  def self.empty_icon; return YEA::SAVE::EMPTY_ICON; end
   
end # Icon

#==============================================================================
# ■ Numeric
#==============================================================================

class Numeric
 
  #--------------------------------------------------------------------------
  # new method: group_digits
  #--------------------------------------------------------------------------
  unless $imported["YEA-CoreEngine"]
  def group; return self.to_s; end
  end # $imported["YEA-CoreEngine"]
   
end # Numeric

#==============================================================================
# ■ DataManager
#==============================================================================

module DataManager
 
  #--------------------------------------------------------------------------
  # overwrite method: savefile_max
  #--------------------------------------------------------------------------
  def self.savefile_max
    return YEA::SAVE::MAX_FILES
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: self.make_save_header
  #--------------------------------------------------------------------------
  def self.make_save_header
    header = {}
    header[:characters]    = $game_party.characters_for_savefile
    header[:playtime_s]    = $game_system.playtime_s
    header[:system]        = Marshal.load(Marshal.dump($game_system))
    header[:timer]        = Marshal.load(Marshal.dump($game_timer))
    header[:message]      = Marshal.load(Marshal.dump($game_message))
    header[:switches]      = Marshal.load(Marshal.dump($game_switches))
    header[:variables]    = Marshal.load(Marshal.dump($game_variables))
    header[:self_switches] = Marshal.load(Marshal.dump($game_self_switches))
    header[:actors]        = Marshal.load(Marshal.dump($game_actors))
    header[:party]        = Marshal.load(Marshal.dump($game_party))
    header[:troop]        = Marshal.load(Marshal.dump($game_troop))
    header[:map]          = Marshal.load(Marshal.dump($game_map))
    header[:player]        = Marshal.load(Marshal.dump($game_player))
    header
  end
 
end # DataManager

#==============================================================================
# ■ Window_MenuCommand
#==============================================================================

class Window_MenuCommand < Window_Command
 
  #--------------------------------------------------------------------------
  # overwrite method: save_enabled
  #--------------------------------------------------------------------------
  def save_enabled; return true; end
 
end # Window_MenuCommand

#==============================================================================
# ■ Window_FileList
#==============================================================================

class Window_FileList < Window_Selectable
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy)
    super(dx, dy, 128, Graphics.height - dy)
    refresh
    activate
    select(SceneManager.scene.first_savefile_index)
  end
 
  #--------------------------------------------------------------------------
  # item_max
  #--------------------------------------------------------------------------
  def item_max; return DataManager.savefile_max; end
 
  #--------------------------------------------------------------------------
  # current_item_enabled?
  #--------------------------------------------------------------------------
  def current_item_enabled?
    header = DataManager.load_header(index)
    return false if header.nil? && SceneManager.scene_is?(Scene_Load)
    return true
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    create_contents
    draw_all_items
  end
 
  #--------------------------------------------------------------------------
  # draw_item
  #--------------------------------------------------------------------------
  def draw_item(index)
    header = DataManager.load_header(index)
    enabled = !header.nil?
    rect = item_rect(index)
    rect.width -= 4
    draw_icon(save_icon?(header), rect.x, rect.y, enabled)
    change_color(normal_color, enabled)
    text = sprintf(YEA::SAVE::SLOT_NAME, (index + 1).group)
    draw_text(rect.x+24, rect.y, rect.width-24, line_height, text)
  end
 
  #--------------------------------------------------------------------------
  # save_icon?
  #--------------------------------------------------------------------------
  def save_icon?(header)
    return Icon.empty_icon if header.nil?
    return Icon.save_icon
  end
 
end # Window_FileList

#==============================================================================
# ■ Window_FileStatus
#==============================================================================

class Window_FileStatus < Window_Base
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, file_window)
    super(dx, dy, Graphics.width - dx, Graphics.height - dy)
    @file_window = file_window
    @current_index = @file_window.index
    refresh
  end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    return if @file_window.index < 0
    return if @current_index == @file_window.index
    @current_index = @file_window.index
    refresh
  end
 
  #--------------------------------------------------------------------------
  # refresh
  #--------------------------------------------------------------------------
  def refresh
    contents.clear
    reset_font_settings
    @header = DataManager.load_header(@file_window.index)
    if @header.nil?
      draw_empty
    else
      draw_save_contents
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_empty
  #--------------------------------------------------------------------------
  def draw_empty
    colour = Color.new(0, 0, 0, translucent_alpha/2)
    rect = Rect.new(0, 0, contents.width, contents.height)
    contents.fill_rect(rect, colour)
    text = YEA::SAVE::EMPTY_TEXT
    change_color(system_color)
    draw_text(rect, text, 1)
  end
 
  #--------------------------------------------------------------------------
  # draw_save_slot
  #--------------------------------------------------------------------------
  def draw_save_slot(dx, dy, dw)
    reset_font_settings
    change_color(system_color)
    text = sprintf(YEA::SAVE::SLOT_NAME, "")
    draw_text(dx, dy, dw, line_height, text)
    cx = text_size(text).width
    change_color(normal_color)
    draw_text(dx+cx, dy, dw-cx, line_height, (@file_window.index+1).group)
  end
 
  #--------------------------------------------------------------------------
  # draw_save_playtime
  #--------------------------------------------------------------------------
  def draw_save_playtime(dx, dy, dw)
    return if @header[:playtime_s].nil?
    reset_font_settings
    change_color(system_color)
    draw_text(dx, dy, dw, line_height, YEA::SAVE::PLAYTIME, 0)
    change_color(normal_color)
    draw_text(dx, dy, dw, line_height, @header[:playtime_s], 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_save_total_saves
  #--------------------------------------------------------------------------
  def draw_save_total_saves(dx, dy, dw)
    return if @header[:system].nil?
    reset_font_settings
    change_color(system_color)
    text = YEA::SAVE::TOTAL_SAVE
    draw_text(dx, dy, dw, line_height, text)
    cx = text_size(text).width
    change_color(normal_color)
    draw_text(dx+cx, dy, dw-cx, line_height, @header[:system].save_count.group)
  end
 
  #--------------------------------------------------------------------------
  # draw_save_gold
  #--------------------------------------------------------------------------
  def draw_save_gold(dx, dy, dw)
    return if @header[:party].nil?
    reset_font_settings
    change_color(system_color)
    draw_text(dx, dy, dw, line_height, YEA::SAVE::TOTAL_GOLD)
    text = Vocab::currency_unit
    draw_text(dx, dy, dw, line_height, text, 2)
    cx = text_size(text).width
    change_color(normal_color)
    text = @header[:party].gold.group
    draw_text(dx, dy, dw-cx, line_height, text, 2)
  end
 
  #--------------------------------------------------------------------------
  # draw_save_location
  #--------------------------------------------------------------------------
  def draw_save_location(dx, dy, dw)
    return if @header[:map].nil?
    reset_font_settings
    change_color(system_color)
    draw_text(dx, dy, dw, line_height, YEA::SAVE::LOCATION)
    change_color(normal_color)
    cx = text_size(YEA::SAVE::LOCATION).width
    return if $data_mapinfos[@header[:map]].nil?
    text = @header[:map].display_name
    text = $data_mapinfos[@header[:map].map_id].name if text == ""
    draw_text(dx+cx, dy, dw-cx, line_height, text)
  end
 
  #--------------------------------------------------------------------------
  # draw_save_characters
  #--------------------------------------------------------------------------
  def draw_save_characters(dx, dy)
    return if @header[:party].nil?
    reset_font_settings
    make_font_smaller
    dw = (contents.width - dx) / @header[:party].max_battle_members
    dx += dw/2
    for member in @header[:party].battle_members
      next if member.nil?
      member = @header[:actors][member.id]
      change_color(normal_color)
      draw_actor_graphic(member, dx, dy)
      text = member.name
      draw_text(dx-dw/2, dy, dw, line_height, text, 1)
      text = member.level.group
      draw_text(dx-dw/2, dy-line_height, dw-4, line_height, text, 2)
      cx = text_size(text).width
      change_color(system_color)
      text = Vocab::level_a
      draw_text(dx-dw/2, dy-line_height, dw-cx-4, line_height, text, 2)
      dx += dw
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_save_column1
  #--------------------------------------------------------------------------
  def draw_save_column1(dx, dy, dw)
    data = YEA::SAVE::COLUMN1_VARIABLES
    draw_column_data(data, dx, dy, dw)
  end
 
  #--------------------------------------------------------------------------
  # draw_save_column2
  #--------------------------------------------------------------------------
  def draw_save_column2(dx, dy, dw)
    data = YEA::SAVE::COLUMN2_VARIABLES
    draw_column_data(data, dx, dy, dw)
  end
 
  #--------------------------------------------------------------------------
  # draw_column_data
  #--------------------------------------------------------------------------
  def draw_column_data(data, dx, dy, dw)
    return if @header[:variables].nil?
    reset_font_settings
    for variable_id in data
      next if $data_system.variables[variable_id].nil?
      change_color(system_color)
      name = $data_system.variables[variable_id]
      draw_text(dx, dy, dw, line_height, name, 0)
      value = @header[:variables][variable_id].group
      change_color(normal_color)
      draw_text(dx, dy, dw, line_height, value, 2)
      dy += line_height
    end
  end
 
  #--------------------------------------------------------------------------
  # draw_save_contents
  #--------------------------------------------------------------------------
  def draw_save_contents
    draw_save_slot(4, 0, contents.width/2-8)
    draw_save_playtime(contents.width/2+4, 0, contents.width/2-8)
    draw_save_total_saves(4, line_height, contents.width/2-8)
    draw_save_gold(contents.width/2+4, line_height, contents.width/2-8)
    draw_save_location(4, line_height*2, contents.width-8)
    draw_save_characters(0, line_height*5 + line_height/3)
    draw_save_column1(16, line_height*7, contents.width/2-48)
    draw_save_column2(contents.width/2+16, line_height*7, contents.width/2-48)
  end
 
end # Window_FileStatus

#==============================================================================
# ■ Window_FileAction
#==============================================================================

class Window_FileAction < Window_HorzCommand
 
  #--------------------------------------------------------------------------
  # initialize
  #--------------------------------------------------------------------------
  def initialize(dx, dy, file_window)
    @file_window = file_window
    super(dx, dy)
    deactivate
    unselect
  end
 
  #--------------------------------------------------------------------------
  # window_width
  #--------------------------------------------------------------------------
  def window_width; Graphics.width - 128; end
 
  #--------------------------------------------------------------------------
  # col_max
  #--------------------------------------------------------------------------
  def col_max; return 3; end
 
  #--------------------------------------------------------------------------
  # update
  #--------------------------------------------------------------------------
  def update
    super
    return if @file_window.index < 0
    return if @current_index == @file_window.index
    @current_index = @file_window.index
    refresh
  end
 
  #--------------------------------------------------------------------------
  # make_command_list
  #--------------------------------------------------------------------------
  def make_command_list
    @header = DataManager.load_header(@file_window.index)
    add_load_command
    add_save_command
    add_delete_command
  end
 
  #--------------------------------------------------------------------------
  # add_load_command
  #--------------------------------------------------------------------------
  def add_load_command
    add_command(YEA::SAVE::ACTION_LOAD, :load, load_enabled?)
  end
 
  #--------------------------------------------------------------------------
  # load_enabled?
  #--------------------------------------------------------------------------
  def load_enabled?
    return false if @header.nil?
    return true
  end
 
  #--------------------------------------------------------------------------
  # add_save_command
  #--------------------------------------------------------------------------
  def add_save_command
    add_command(YEA::SAVE::ACTION_SAVE, :save, save_enabled?)
  end
 
  #--------------------------------------------------------------------------
  # save_enabled?
  #--------------------------------------------------------------------------
  def save_enabled?
    return false if @header.nil? && SceneManager.scene_is?(Scene_Load)
    return false if SceneManager.scene_is?(Scene_Load)
    return false if $game_system.save_disabled
    return true
  end
 
  #--------------------------------------------------------------------------
  # add_delete_command
  #--------------------------------------------------------------------------
  def add_delete_command
    add_command(YEA::SAVE::ACTION_DELETE, :delete, delete_enabled?)
  end
 
  #--------------------------------------------------------------------------
  # delete_enabled?
  #--------------------------------------------------------------------------
  def delete_enabled?
    return false if @header.nil?
    return true
  end
 
  #--------------------------------------------------------------------------
  # update_help
  #--------------------------------------------------------------------------
  def update_help
    case current_symbol
    when :load; @help_window.set_text(YEA::SAVE::LOAD_HELP)
    when :save; @help_window.set_text(YEA::SAVE::SAVE_HELP)
    when :delete; @help_window.set_text(YEA::SAVE::DELETE_HELP)
    end
  end
 
end # Window_FileAction

#==============================================================================
# ■ Scene_File
#==============================================================================

class Scene_File < Scene_MenuBase
 
  #--------------------------------------------------------------------------
  # overwrite method: start
  #--------------------------------------------------------------------------
  def start
    super
    create_all_windows
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: terminate
  #--------------------------------------------------------------------------
  def terminate
    super
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: update
  #--------------------------------------------------------------------------
  def update
    super
  end
 
  #--------------------------------------------------------------------------
  # new method: create_all_windows
  #--------------------------------------------------------------------------
  def create_all_windows
    create_help_window
    create_file_window
    create_action_window
    create_status_window
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: create_help_window
  #--------------------------------------------------------------------------
  def create_help_window
    @help_window = Window_Help.new
    @help_window.set_text(YEA::SAVE::SELECT_HELP)
  end
 
  #--------------------------------------------------------------------------
  # new method: create_file_window
  #--------------------------------------------------------------------------
  def create_file_window
    wy = @help_window.height
    @file_window = Window_FileList.new(0, wy)
    @file_window.set_handler(:ok, method(:on_file_ok))
    @file_window.set_handler(:cancel, method(:return_scene))
  end
 
  #--------------------------------------------------------------------------
  # new method: create_action_window
  #--------------------------------------------------------------------------
  def create_action_window
    wx = @file_window.width
    wy = @help_window.height
    @action_window = Window_FileAction.new(wx, wy, @file_window)
    @action_window.help_window = @help_window
    @action_window.set_handler(:cancel, method(:on_action_cancel))
    @action_window.set_handler(:load, method(:on_action_load))
    @action_window.set_handler(:save, method(:on_action_save))
    @action_window.set_handler(:delete, method(:on_action_delete))
  end
 
  #--------------------------------------------------------------------------
  # new method: create_status_window
  #--------------------------------------------------------------------------
  def create_status_window
    wx = @action_window.x
    wy = @action_window.y + @action_window.height
    @status_window = Window_FileStatus.new(wx, wy, @file_window)
  end
 
  #--------------------------------------------------------------------------
  # new method: on_file_ok
  #--------------------------------------------------------------------------
  def on_file_ok
    @action_window.activate
    index = SceneManager.scene_is?(Scene_Load) ? 0 : 1
    @action_window.select(index)
  end
 
  #--------------------------------------------------------------------------
  # new method: on_action_cancel
  #--------------------------------------------------------------------------
  def on_action_cancel
    @action_window.unselect
    @file_window.activate
    @help_window.set_text(YEA::SAVE::SELECT_HELP)
  end
 
  #--------------------------------------------------------------------------
  # new method: on_action_load
  #--------------------------------------------------------------------------
  def on_action_load
    if DataManager.load_game(@file_window.index)
      on_load_success
    else
      Sound.play_buzzer
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: on_load_success
  #--------------------------------------------------------------------------
  def on_load_success
    Sound.play_load
    fadeout_all
    $game_system.on_after_load
    SceneManager.goto(Scene_Map)
  end
 
  #--------------------------------------------------------------------------
  # new method: on_action_save
  #--------------------------------------------------------------------------
  def on_action_save
    @action_window.activate
    if DataManager.save_game(@file_window.index)
      on_save_success
      refresh_windows
    else
      Sound.play_buzzer
    end
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: on_save_success
  #--------------------------------------------------------------------------
  def on_save_success; Sound.play_save; end
 
  #--------------------------------------------------------------------------
  # new method: on_action_delete
  #--------------------------------------------------------------------------
  def on_action_delete
    @action_window.activate
    DataManager.delete_save_file(@file_window.index)
    on_delete_success
    refresh_windows
  end
 
  #--------------------------------------------------------------------------
  # new method: on_delete_success
  #--------------------------------------------------------------------------
  def on_delete_success
    YEA::SAVE::DELETE_SOUND.play
  end
 
  #--------------------------------------------------------------------------
  # new method: refresh_windows
  #--------------------------------------------------------------------------
  def refresh_windows
    @file_window.refresh
    @action_window.refresh
    @status_window.refresh
  end
 
end # Scene_File

#==============================================================================
# ■ Scene_Save
#==============================================================================

class Scene_Save < Scene_File
 
  #--------------------------------------------------------------------------
  # overwrite method: on_savefile_ok
  #--------------------------------------------------------------------------
  def on_savefile_ok; super; end
 
  #--------------------------------------------------------------------------
  # overwrite method: on_save_success
  #--------------------------------------------------------------------------
  def on_save_success; super; end
 
end # help_window_text

#==============================================================================
# ■ Scene_Load
#==============================================================================

class Scene_Load < Scene_File
 
  #--------------------------------------------------------------------------
  # overwrite method: on_savefile_ok
  #--------------------------------------------------------------------------
  def on_savefile_ok; super; end
 
  #--------------------------------------------------------------------------
  # overwrite method: on_load_success
  #--------------------------------------------------------------------------
  def on_load_success; super; end
 
end # Scene_Load

#==============================================================================
#
# ▼ End of File
#
#==============================================================================
Revenir en haut Aller en bas
http://www.site3000.weebly.com
Hamburger
Voyageur Lv.10
Voyageur Lv.10
Hamburger


Masculin Age : 27
Inscrit le : 01/08/2011
Messages : 446

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:54

    Très bon script ! C'est très bien expliqué.
    C'est juste dommage que les screens soient en anglais.
Revenir en haut Aller en bas
cagt3000
Citadin Lv.7
Citadin Lv.7
cagt3000


Masculin Age : 123
Inscrit le : 08/04/2010
Messages : 218

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:55

Oui, malheuresement, je ne l'ais pas encore traduit... Mais quand j'aurais le temps, je peux commencer si tu veux Smile
Revenir en haut Aller en bas
http://www.site3000.weebly.com
Hamburger
Voyageur Lv.10
Voyageur Lv.10
Hamburger


Masculin Age : 27
Inscrit le : 01/08/2011
Messages : 446

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 15:58

    Ne le fait pas que pour moi.
    Je ne fonctionne encore que sous VX
Revenir en haut Aller en bas
cagt3000
Citadin Lv.7
Citadin Lv.7
cagt3000


Masculin Age : 123
Inscrit le : 08/04/2010
Messages : 218

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 16:00

OK Smile

De toute facon, j'en ai fais un sondage Very Happy
Revenir en haut Aller en bas
http://www.site3000.weebly.com
Valioos
Illusionniste Lv.12
Illusionniste Lv.12
Valioos


Masculin Age : 31
Inscrit le : 20/03/2009
Messages : 734

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeMer 11 Avr 2012 - 18:12

Sympa même si j'use pas trop ace encore :/
Revenir en haut Aller en bas
Brandobscure001
Seigneur Lv.18
Seigneur Lv.18
Brandobscure001


Masculin Age : 28
Inscrit le : 26/12/2010
Messages : 2220

[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitimeJeu 12 Avr 2012 - 8:21

Je connais déja tout ces script puisque que certain
sont dans mon jeux Eternal Dream Very Happy
Merci du partage.
Revenir en haut Aller en bas
Contenu sponsorisé




[VXace] Yanfly Meny Script - Compilation Empty
MessageSujet: Re: [VXace] Yanfly Meny Script - Compilation   [VXace] Yanfly Meny Script - Compilation Icon_minitime

Revenir en haut Aller en bas
 

[VXace] Yanfly Meny Script - Compilation

Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1

 Sujets similaires

-
» Tout les script Script Yanfly Engine Melody
» [VXAce] Conversion du script Credits Vx=>VxAce
» Problème Script de Yanfly
» Problême SBS Takentaï et script Yanfly bestiaire + scan
» Recherche d'explications du script Yanfly-Custom Battle Actions

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
RPG Maker VX :: Entraide :: Scripts :: Scripts VX.Ace - RGSS3 :: Menu-
Créer un forum | ©phpBB | Forum gratuit d'entraide | Signaler un abus | Cookies | Forum gratuit