Страница 156 из 190 ПерваяПервая ... 56106146154155156157158166 ... ПоследняяПоследняя
Показано с 1,551 по 1,560 из 1899

Тема: Поиск скриптов

  1. #1551
    Местный Аватар для Narikatel
    Информация о пользователе
    Регистрация
    08.02.2015
    Адрес
    Пенза
    Сообщений
    161
    Записей в дневнике
    1
    Репутация: 4 Добавить или отнять репутацию

    По умолчанию

    И сразу ещё одна просьба, но вообщем ни чё не нашли.
    Скрипт есть такой на vx ace, что бы при одевании экипировки она отображалась на персонаже.. Вообщем ищу его
    Последний раз редактировалось Рольф; 30.06.2015 в 01:49.

  2. #1552
    Маститый Аватар для HopeBree
    Информация о пользователе
    Регистрация
    27.03.2013
    Сообщений
    1,204
    Записей в дневнике
    6
    Репутация: 38 Добавить или отнять репутацию

    По умолчанию

    плохо искали
    Спойлер Victor Engine - Basic Module:
    PHP код:
    #==============================================================================
    # ** Victor Engine - Basic Module
    #------------------------------------------------------------------------------
    # Author : Victor Sant
    #
    # Version History:
    #  v 1.00 - 2011.12.19 > First release
    #  v 1.01 - 2011.12.21 > Added Event Troop notes
    #  v 1.02 - 2011.12.22 > Added character frames value
    #  v 1.03 - 2011.12.30 > Added Actor and Enemy notes
    #  v 1.04 - 2012.01.01 > Added party average level and map actors
    #  v 1.05 - 2012.01.04 > Compatibility with Characters Scripts
    #  v 1.06 - 2012.01.07 > Compatibility with Fog and Light Effect
    #                      > Added new Sprite Character functions
    #  v 1.07 - 2012.01.11 > Compatibility with Control Text and Codes
    #  v 1.08 - 2012.01.13 > Compatibility with Trait Control
    #  v 1.09 - 2012.01.15 > Fixed the Regular Expressions problem with "" and “”
    #  v 1.10 - 2012.01.18 > Compatibility with Automatic Battlers
    #  v 1.11 - 2012.01.26 > Compatibility with Followers Options
    #                        Compatibility with Animated Battle beta
    #  v 1.12 - 2012.02.08 > Compatibility with Animated Battle
    #  v 1.13 - 2012.02.18 > Fix for non RTP dependant encrypted projects
    #  v 1.14 - 2012.03.11 > Better version handling and required messages
    #  v 1.15 - 2012.03.11 > Added level variable for enemies (to avoid crashes)
    #  v 1.16 - 2012.03.21 > Compatibility with Follower Control
    #  v 1.17 - 2012.03.22 > Compatibility with Follower Control new method
    #  v 1.18 - 2012.03.22 > Added Battler Types tag support 
    #  v 1.19 - 2012.05.20 > Compatibility with Map Turn Battle
    #  v 1.20 - 2012.05.21 > Fix for older RMVXa versions
    #  v 1.21 - 2012.05.29 > Compatibility with Pixel Movement
    #  v 1.22 - 2012.07.02 > Compatibility with Terrain States
    #  v 1.23 - 2012.07.03 > Fix for Pixel Movement
    #  v 1.24 - 2012.07.17 > Compatibility with Critical Hit Effects
    #  v 1.25 - 2012.07.24 > Compatibility with Moving Plaforms
    #  v 1.26 - 2012.07.30 > Compatibility with Automatic Battlers
    #  v 1.27 - 2012.08.01 > Compatibility with Custom Slip Effect
    #  v 1.28 - 2012.08.01 > Compatibility with Custom Slip Effect v 1.01
    #  v 1.29 - 2012.11.03 > Fixed returning value division by 0 error.
    #  v 1.30 - 2012.12.13 > Compatibility with State Graphics
    #  v 1.31 - 2012.12.16 > Compatibility with Active Time Battle
    #  v 1.32 - 2012.12.24 > Compatibility with Active Time Battle v 1.01
    #  v 1.33 - 2012.12.30 > Compatibility with Leap Attack
    #  v 1.34 - 2013.01.07 > Compatibility with Critical Hit Effects v 1.01
    #  v 1.35 - 2013.02.13 > Compatibility with Cooperation Skills
    #------------------------------------------------------------------------------
    #   This is the basic script for the system from Victory Engine and is
    # required to use the scripts from the engine. This script offer some new
    # functions to be used within many scripts of the engine.
    #------------------------------------------------------------------------------
    # Compatibility
    #   Required for the Victor Engine

    # * Overwrite methods
    #   class << Cache
    #     def self.character(filename)
    #
    #   class Sprite_Character < Sprite_Base
    #     def set_character_bitmap
    #
    #   class Game_Battler < Game_BattlerBase
    #     def item_effect_recover_hp(user, item, effect)
    #     def item_effect_recover_mp(user, item, effect)
    #     def item_effect_gain_tp
    #
    # * Alias methods
    #   class Game_Interpreter
    #     def command_108
    #
    #   class Window_Base < Window
    #     def convert_escape_characters(text)
    #
    #------------------------------------------------------------------------------
    # Instructions:
    #  To instal the script, open you script editor and paste this script on
    #  a new section bellow the Materials section.
    #
    #------------------------------------------------------------------------------
    # New functions
    #
    # * Random number between two vales
    #   rand_between(min, max)
    #    min : min value
    #    max : max value
    #   Can be called from any class, this method return an random value between
    #   two specific numbers
    #
    # * Random array value
    #   <Array>.random
    #   <Array>.random!
    #   Returns a random object from the array, the method .random! is destructive,
    #   removing the value returned from the array.
    #
    # * Sum of the numeric values of a array
    #   <Array>.sum
    #   Returns the sum of all numeric values
    #
    # * Average of all numeric values from the array
    #   <Array>.average(float = false)
    #    float : float flag
    #   Returns the average of all numeric values, if floa is true, the value
    #   returned is a float, otherwise it's a integer.
    #
    # * Note for events
    #   <Event>.note
    #   By default, events doesn't have note boxes. This command allows to use
    #   comments as note boxes, following the same format as the ones on the
    #   database. Returns all comments on the active page of the event.
    #
    # * Comment calls
    #   <Event>.comment_call
    #   Another function for comment boxes, by default, they have absolutely no
    #   effect in game when called. But this method allows to make the comment
    #   box to behave like an script call, but with the versatility of the
    #   note boxes. Remember that the commands will only take effect if there
    #   is scripts to respond to the comment code.
    #
    #==============================================================================

    #==============================================================================
    # ** Victor Engine
    #------------------------------------------------------------------------------
    #   Setting module for the Victor Engine
    #==============================================================================

    module Victor_Engine
      
    #--------------------------------------------------------------------------
      # * New method: required_script
      #--------------------------------------------------------------------------
      
    def self.required_script(namereqversiontype 0)
        if 
    type != :bellow && (!$imported[req] || $imported[req] < version)
          
    msg "The script '%s' requires the script\n"
          
    case type
          when 
    :above
            msg 
    += "'%s' v%s or higher above it to work properly\n"
          
    else
            
    msg += "'%s' v%s or higher to work properly\n"
          
    end
          msg 
    += "Go to [url]http://victorscripts.wordpress.com/[/url] to download this script."
          
    self.exit_message(msgnamereqversion)
        
    elsif type == :bellow && $imported[req]
          
    msg =  "The script '%s' requires the script\n"
          
    msg += "'%s' to be put bellow it\n"
          
    msg += "move the scripts to the proper position"
          
    self.exit_message(msgnamereqversion)
        
    end
      end
      
    #--------------------------------------------------------------------------
      # * New method: exit_message
      #--------------------------------------------------------------------------
      
    def self.exit_message(messagenamereqversion)
        
    name self.script_name(name)
        
    req  self.script_name(req)
        
    msgbox(sprintf(messagenamereqversion))
        exit
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: script_name
      #--------------------------------------------------------------------------
      
    def self.script_name(nameext "VE")
        
    name name.to_s.gsub("_"" ").upcase.split
        name
    .collect! {|charchar == ext "#{char} -" char.capitalize }
        
    name.join(" ")
      
    end
    end

    $imported 
    ||= {}
    $imported[:ve_basic_module] = 1.35

    #==============================================================================
    # ** Object
    #------------------------------------------------------------------------------
    #  This class is the superclass of all other classes.
    #==============================================================================

    class Object
      
    #--------------------------------------------------------------------------
      # * Include setting module
      #--------------------------------------------------------------------------
      
    include Victor_Engine
      
    #-------------------------------------------------------------------------
      # * New method: rand_between
      #-------------------------------------------------------------------------
      
    def rand_between(minmax)
        
    min rand(max min 1)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: numeric?
      #--------------------------------------------------------------------------
      
    def numeric?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: string?
      #--------------------------------------------------------------------------
      
    def string?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: array?
      #--------------------------------------------------------------------------
      
    def array?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: float?
      #--------------------------------------------------------------------------
      
    def float?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: symbol?
      #--------------------------------------------------------------------------
      
    def symbol?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: item?
      #--------------------------------------------------------------------------
      
    def item?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: skill?
      #--------------------------------------------------------------------------
      
    def skill?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: file_exist?
      #--------------------------------------------------------------------------
      
    def file_exist?(pathfilename)
        
    $file_list ||= {}
        
    $file_list[path filename] ||= file_test(pathfilename)
        
    $file_list[path filename]
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: get_file_list
      #--------------------------------------------------------------------------
      
    def file_test(pathfilename)
        
    bitmap Cache.load_bitmap(pathfilenamerescue nil
        bitmap 
    true false
      end
      
    #--------------------------------------------------------------------------
      # * New method: character_exist?
      #--------------------------------------------------------------------------
      
    def character_exist?(filename)
        
    file_exist?("Graphics/Characters/"filename)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: battler_exist?
      #--------------------------------------------------------------------------
      
    def battler_exist?(filename)
        
    file_exist?("Graphics/Battlers/"filename)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: face_exist?
      #--------------------------------------------------------------------------
      
    def face_exist?(filename)
        
    file_exist?("Graphics/Faces/"filename)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: get_filename
      #--------------------------------------------------------------------------
      
    def get_filename
        
    "["'“‘]([^"'”‘”’]+)["'”’]"
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: get_all_values
      #--------------------------------------------------------------------------
      
    def get_all_values(value1value2 nil)
        
    value2 value1 unless value2
        
    /<#{value1}>((?:[^<]|<[^\/])*)<\/#{value2}>/im
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: make_symbol
      #--------------------------------------------------------------------------
      
    def make_symbol(string)
        
    string.downcase.gsub(" ""_").to_sym
      end
      
    #--------------------------------------------------------------------------
      # * New method: make_string
      #--------------------------------------------------------------------------
      
    def make_string(symbol)
        
    symbol.to_s.gsub("_"" ").upcase
      end
      
    #--------------------------------------------------------------------------
      # * New method: returning_value
      #--------------------------------------------------------------------------
      
    def returning_value(ix)
        
    = [21].max
        i 
    y  >= ? (2) - 
      end
      
    #--------------------------------------------------------------------------
      # New method: in_rect?
      #--------------------------------------------------------------------------
      
    def in_rect?(whx1y1x2y2fx 0)
        
    awahaxaybxby setup_area(whx1y1x2y2fx)
        
    bx ax aw && bx ax aw && by ay ah && by ay ah
      end
      
    #--------------------------------------------------------------------------
      # New method: in_radius?
      #--------------------------------------------------------------------------
      
    def in_radius?(whx1y1x2y2fx 0)
        
    awahaxaybxby setup_area(whx1y1x2y2fx)
        ((
    bx ax) ** aw ** 2) + ((by ay) ** ah ** 2) <= 1
      end
      
    #--------------------------------------------------------------------------
      # New method: setup_area
      #--------------------------------------------------------------------------
      
    def setup_area(whx1y1x2y2fx)
        
    aw w
        ah 
    aw
        ax 
    x1
        ay 
    y1
        bx 
    x2
        by 
    y2
        bx 
    += fx if ax bx
        bx 
    -= fx if ax bx
        
    [awahaxaybxby]
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: get_param_id
      #--------------------------------------------------------------------------
      
    def get_param_id(text)
        case 
    text.upcase
        when 
    "MAXHP""HP" then 0
        when 
    "MAXMP""MP" then 1
        when 
    "ATK" then 2
        when 
    "DEF" then 3
        when 
    "MAT" then 4
        when 
    "MDF" then 5
        when 
    "AGI" then 6
        when 
    "LUK" then 7
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_param_text
      #--------------------------------------------------------------------------
      
    def get_param_text(id)
        case 
    id
        when 0 then 
    "HP" 
        
    when 1 then "MP"
        
    when 2 then "ATK"
        
    when 3 then "DEF"
        
    when 4 then "MAT"
        
    when 5 then "MDF"
        
    when 6 then "AGI"
        
    when 7 then "LUK"
        
    end
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_xparam_id
      #--------------------------------------------------------------------------
      
    def get_xparam_id(text)
        case 
    text.upcase
        when 
    "HIT" then 0
        when 
    "EVA" then 1
        when 
    "CRI" then 2
        when 
    "CEV" then 3
        when 
    "MEV" then 4
        when 
    "MRF" then 5
        when 
    "CNT" then 6
        when 
    "HRG" then 7
        when 
    "MRG" then 8
        when 
    "TRG" then 9
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_xparam_text
      #--------------------------------------------------------------------------
      
    def get_xparam_text(id)
        case 
    id
        when 0 then 
    "HIT" 
        
    when 1 then "EVA"
        
    when 2 then "CRI"
        
    when 3 then "CEV"
        
    when 4 then "MEV"
        
    when 5 then "MRF"
        
    when 6 then "CNT"
        
    when 7 then "HRG"
        
    when 8 then "MRG"
        
    when 9 then "TRG"
        
    end
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_sparam_id
      #--------------------------------------------------------------------------
      
    def get_sparam_id(text)
        case 
    text.upcase
        when 
    "TGR" then 0
        when 
    "GRD" then 1
        when 
    "REC" then 2
        when 
    "PHA" then 3
        when 
    "MCR" then 4
        when 
    "TCR" then 5
        when 
    "PDR" then 6
        when 
    "MDR" then 7
        when 
    "FDR" then 8
        when 
    "EXR" then 9
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_sparam_text
      #--------------------------------------------------------------------------
      
    def get_sparam_text(id)
        case 
    id
        when 0 then 
    "TGR" 
        
    when 1 then "GRD"
        
    when 2 then "REC"
        
    when 3 then "PHA"
        
    when 4 then "MCR"
        
    when 5 then "TCR"
        
    when 6 then "PDR"
        
    when 7 then "MDR"
        
    when 8 then "FDR"
        
    when 9 then "EXR"
        
    end
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_cond
      #--------------------------------------------------------------------------
      
    def get_cond(text)
        case 
    text.upcase
        when 
    "HIGHER"    then ">"
        
    when "LOWER"     then "<"
        
    when "EQUAL"     then "=="
        
    when "DIFFERENT" then "!="
        
    else "!="
        
    end
      end
    end

    #==============================================================================
    # ** String
    #------------------------------------------------------------------------------
    #  The string class. Can handle character sequences of arbitrary lengths. 
    #==============================================================================

    class String
      
    #--------------------------------------------------------------------------
      # * New method: string?
      #--------------------------------------------------------------------------
      
    def string?
        return 
    true
      end
    end

    #==============================================================================
    # ** String
    #------------------------------------------------------------------------------
    #  The class that represents symbols.
    #==============================================================================

    class Symbol
      
    #--------------------------------------------------------------------------
      # * New method: symbol?
      #--------------------------------------------------------------------------
      
    def symbol?
        return 
    true
      end
    end

    #==============================================================================
    # ** Numeric
    #------------------------------------------------------------------------------
    #  This is the abstract class for numbers.
    #==============================================================================

    class Numeric
      
    #--------------------------------------------------------------------------
      # * New method: numeric?
      #--------------------------------------------------------------------------
      
    def numeric?
        return 
    true
      end
      
    #--------------------------------------------------------------------------
      # * New method: ceil?
      #--------------------------------------------------------------------------
      
    def ceil?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: to_ceil
      #--------------------------------------------------------------------------
      
    def to_ceil
        self 
    self.abs.ceil : -self.abs.ceil
      end
    end

    #==============================================================================
    # ** Float
    #------------------------------------------------------------------------------
    #  This is the abstract class for the floating point values.
    #==============================================================================

    class Float
      
    #--------------------------------------------------------------------------
      # * New method: float?
      #--------------------------------------------------------------------------
      
    def float?
        return 
    true
      end
      
    #--------------------------------------------------------------------------
      # * New method: ceil?
      #--------------------------------------------------------------------------
      
    def ceil?
        
    self != self.ceil
      end
    end

    #============================================================================== 
    # ** Array     
    #------------------------------------------------------------------------------
    #  This class store arbitrary Ruby objects.
    #==============================================================================

    class Array
      
    #--------------------------------------------------------------------------
      # * New method: array?
      #--------------------------------------------------------------------------
      
    def array?
        return 
    true
      end
      
    #-------------------------------------------------------------------------
      # * New method: random
      #-------------------------------------------------------------------------
      
    def random
        self
    [rand(size)]
      
    end
      
    #-------------------------------------------------------------------------
      # * New method: random!
      #-------------------------------------------------------------------------
      
    def random!
        
    self.delete_at(rand(size))
      
    end
      
    #---------------------------------------------------------------------------
      # * New method: sum
      #---------------------------------------------------------------------------
      
    def sum
        self
    .inject(0) {|rn+= (n.numeric? ? 0)} 
      
    end
      
    #---------------------------------------------------------------------------
      # * New method: average
      #---------------------------------------------------------------------------
      
    def average(float false)
        
    self.sum / [(float size.to_f size.to_i), 1].max
      end
      
    #---------------------------------------------------------------------------
      # * New method: next_item
      #---------------------------------------------------------------------------
      
    def next_item
        item 
    self.shift
        self
    .push(item)
        
    item
      end
      
    #---------------------------------------------------------------------------
      # * New method: previous_item
      #---------------------------------------------------------------------------
      
    def previous_item
        item 
    self.pop
        self
    .unshift(item)
        
    item
      end
    end

    #==============================================================================
    # ** RPG::Troop::Page
    #------------------------------------------------------------------------------
    #  This is the data class for battle events (pages).
    #==============================================================================

    class RPG::Troop::Page
      
    #--------------------------------------------------------------------------
      # * New method: note
      #--------------------------------------------------------------------------
      
    def note
        
    return "" if !@list || @list.size <= 0
        comment_list 
    = []
        @list.
    each do |item|
          
    next unless item && (item.code == 108 || item.code == 408)
          
    comment_list.push(item.parameters[0])
        
    end
        comment_list
    .join("\r\n")
      
    end
    end

    #==============================================================================
    # ** RPG::UsableItem
    #------------------------------------------------------------------------------
    #  This is the superclass for skills and items.
    #==============================================================================

    class RPG::UsableItem RPG::BaseItem
      
    #--------------------------------------------------------------------------
      # * New method: for_all_targets?
      #--------------------------------------------------------------------------
      
    def for_all_targets?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: element_set
      #--------------------------------------------------------------------------
      
    def element_set
        
    [damage.element_id]
      
    end
    end

    #==============================================================================
    # ** RPG::Skill
    #------------------------------------------------------------------------------
    #  This is the data class for skills.
    #==============================================================================

    class RPG::Skill RPG::UsableItem
      
    #--------------------------------------------------------------------------
      # * New method: item?
      #--------------------------------------------------------------------------
      
    def item?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: skill?
      #--------------------------------------------------------------------------
      
    def skill?
        return 
    true
      end
      
    #--------------------------------------------------------------------------
      # * New method: type_set
      #--------------------------------------------------------------------------
      
    def type_set
        
    [stype_id]
      
    end  
    end

    #==============================================================================
    # ** RPG::Item
    #------------------------------------------------------------------------------
    #  This is the data class for items.
    #==============================================================================

    class RPG::Item RPG::UsableItem
      
    #--------------------------------------------------------------------------
      # * New method: item?
      #--------------------------------------------------------------------------
      
    def item?
        return 
    true
      end 
      
    #--------------------------------------------------------------------------
      # * New method: skill?
      #--------------------------------------------------------------------------
      
    def skill?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: type_set
      #--------------------------------------------------------------------------
      
    def type_set
        
    [itype_id]
      
    end
    end

    #==============================================================================
    # ** Cache
    #------------------------------------------------------------------------------
    #  This module loads each of graphics, creates a Bitmap object, and retains it.
    # To speed up load times and conserve memory, this module holds the created
    # Bitmap object in the internal hash, allowing the program to return
    # preexisting objects when the same bitmap is requested again.
    #==============================================================================

    class << Cache
      
    #--------------------------------------------------------------------------
      # * Overwrite method: character
      #--------------------------------------------------------------------------
      
    def character(filenamehue 0)
        
    load_bitmap("Graphics/Characters/"filenamehue)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: cache
      #--------------------------------------------------------------------------
      
    def cache
        
    @cache
      end
    end

    #==============================================================================
    # ** BattleManager
    #------------------------------------------------------------------------------
    #  This module handles the battle processing
    #==============================================================================

    class << BattleManager
      
    #--------------------------------------------------------------------------
      # * New method: all_battle_members
      #--------------------------------------------------------------------------
      
    def all_battle_members
        $game_party
    .members $game_troop.members
      end
      
    #--------------------------------------------------------------------------
      # * New method: all_dead_members
      #--------------------------------------------------------------------------
      
    def all_dead_members
        $game_party
    .dead_members $game_troop.dead_members
      end
      
    #--------------------------------------------------------------------------
      # * New method: all_movable_members
      #--------------------------------------------------------------------------
      
    def all_movable_members
        $game_party
    .movable_members $game_troop.movable_members
      end
    end

    #==============================================================================
    # ** Game_BattlerBase
    #------------------------------------------------------------------------------
    #  This class handles battlers. It's used as a superclass of the Game_Battler
    # classes.
    #==============================================================================

    class Game_BattlerBase
      
    #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      
    attr_reader   :buffs
      
    #--------------------------------------------------------------------------
      # * New method: get_param
      #--------------------------------------------------------------------------
      
    def get_param(text)
        case 
    text.upcase
        when 
    "MAXHP" then self.mhp
        when 
    "MAXMP" then self.mmp
        when 
    "MAXTP" then self.max_tp
        
    else eval("self.#{text.downcase}")
        
    end
      end
      
    #--------------------------------------------------------------------------
      # * New method: type
      #--------------------------------------------------------------------------
      
    def type
        
    list = []
        
    get_all_notes.scan(/<BATTLER TYPE: ((?:\w+ *,? *)+)>/i) do
          $
    1.scan(/(\d+)/i) { list.push(make_symbol($1)) }
        
    end
        
    list.uniq
      end
      
    #--------------------------------------------------------------------------
      # * New method: danger?
      #--------------------------------------------------------------------------
      
    def danger?
        
    hp mhp 25 100
      end
      
    #--------------------------------------------------------------------------
      # * New method: sprite
      #--------------------------------------------------------------------------
      
    def sprite
        valid 
    SceneManager.scene_is?(Scene_Battle) && SceneManager.scene.spriteset
        valid 
    SceneManager.scene.spriteset.sprite(self) : nil
      end
      
    #--------------------------------------------------------------------------
      # * New method: element_set
      #--------------------------------------------------------------------------
      
    def element_set(item)
        
    element_set  item.element_set
        element_set 
    += atk_elements if item.damage.element_id 0
        element_set
    .delete(0)
        
    element_set.compact
      end
      
    #--------------------------------------------------------------------------
      # * New method: add_state_normal
      #--------------------------------------------------------------------------
      
    def add_state_normal(state_idrate 1user self)
        
    chance  rate
        chance 
    *= state_rate(state_id)
        
    chance *= luk_effect_rate(user)
        
    add_state(state_id) if rand chance
      end
      
    #--------------------------------------------------------------------------
      # * New method: damaged?
      #--------------------------------------------------------------------------
      
    def damaged?
        @
    result.hp_damage != || @result.mp_damage != || @result.tp_damage != 0
      end
      
    #--------------------------------------------------------------------------
      # * New method: mtp
      #--------------------------------------------------------------------------
      
    def mtp
        
    return 100
      end
    end

    #==============================================================================
    # ** Game_Battler
    #------------------------------------------------------------------------------
    #  This class deals with battlers. It's used as a superclass of the Game_Actor
    # and Game_Enemy classes.
    #==============================================================================

    class Game_Battler Game_BattlerBase
      
    #--------------------------------------------------------------------------
      # * Overwrite method: item_effect_recover_hp
      #--------------------------------------------------------------------------
      
    def item_effect_recover_hp(useritemeffect)
        
    value item_value_recover_hp(useritemeffect).to_i
        
    @result.hp_damage -= value
        
    @result.success    true
        self
    .hp += value
      end
      
    #--------------------------------------------------------------------------
      # * Overwrite method: item_effect_recover_mp
      #--------------------------------------------------------------------------
      
    def item_effect_recover_mp(useritemeffect)
        
    value item_value_recover_mp(useritemeffect).to_i
        
    @result.mp_damage -= value
        
    @result.success    true if value != 0
        self
    .mp += value
      end
      
    #--------------------------------------------------------------------------
      # * Overwrite method: item_effect_gain_tp
      #--------------------------------------------------------------------------
      
    def item_effect_gain_tp(useritemeffect)
        
    value    item_value_recover_tp(useritemeffect)
        
    self.tp += value
      end
      
    #--------------------------------------------------------------------------
      # * New method: item_value_recover_hp
      #--------------------------------------------------------------------------
      
    def item_value_recover_hp(useritemeffect)
        
    value  = (mhp effect.value1 effect.value2) * rec
        value 
    *= user.pha if item.is_a?(RPG::Item)
        
    value
      end
      
    #--------------------------------------------------------------------------
      # * New method: item_value_recover_mp
      #--------------------------------------------------------------------------
      
    def item_value_recover_mp(useritemeffect)
        
    value  = (mmp effect.value1 effect.value2) * rec
        value 
    *= user.pha if item.is_a?(RPG::Item)
        
    value
      end
      
    #--------------------------------------------------------------------------
      # * New method: item_value_recover_tp
      #--------------------------------------------------------------------------
      
    def item_value_recover_tp(useritemeffect)
        
    effect.value1.to_i
      end
      
    #--------------------------------------------------------------------------
      # * New method: cri_rate
      #--------------------------------------------------------------------------
      
    def cri_rate(useritem)
        
    user.cri
      end
      
    #--------------------------------------------------------------------------
      # * New method: cri_eva
      #--------------------------------------------------------------------------
      
    def cri_eva(useritem)
        
    cev
      end
      
    #--------------------------------------------------------------------------
      # * New method: setup_critical
      #--------------------------------------------------------------------------
      
    def setup_critical(useritem)
        
    cri_rate(useritem) * (cri_eva(useritem))
      
    end
    end

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

    class Game_Enemy Game_Battler
      
    #--------------------------------------------------------------------------
      # * New method: id
      #--------------------------------------------------------------------------
      
    def id
        
    @enemy_id
      end
      
    #--------------------------------------------------------------------------
      # * New method: note
      #--------------------------------------------------------------------------
      
    def note
        enemy 
    enemy.note ""
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: get_all_notes
      #--------------------------------------------------------------------------
      
    def get_all_notes(*args)
        
    notes  ""
        
    notes += note if !args.include?(:self)
        
    states.compact.each {|statenotes += state.note } if !args.include?(:state)
        
    notes
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_all_objects
      #--------------------------------------------------------------------------
      
    def get_all_objects(*args)
        
    result = []
        
    result += [self] if !args.include?(:self)
        
    result += states.compact if !args.include?(:state)
        
    result
      end
      
    #--------------------------------------------------------------------------
      # * New method: level
      #--------------------------------------------------------------------------
      
    def level
        
    return 1
      end
      
    #--------------------------------------------------------------------------
      # * New method: skill_learn?
      #--------------------------------------------------------------------------
      
    def skill_learn?(skill)
        
    skill.skill? && skills.include?(skill)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: skills
      #--------------------------------------------------------------------------
      
    def skills
        
    (enemy_actions added_skills).sort.collect {|id$data_skills[id] }
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: enemy_actions
      #--------------------------------------------------------------------------
      
    def enemy_actions
        enemy
    .actions.collect {|actionaction.skill_id }
      
    end
    end

    #==============================================================================
    # ** Game_Actor
    #------------------------------------------------------------------------------
    #  This class handles actors. It's used within the Game_Actors class
    # ($game_actors) and referenced by the Game_Party class ($game_party).
    #==============================================================================

    class Game_Actor Game_Battler
      
    #--------------------------------------------------------------------------
      # * New method: note
      #--------------------------------------------------------------------------
      
    def note
        actor 
    actor.note ""
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: hue
      #--------------------------------------------------------------------------
      
    def hue
        
    @hue ? @hue 0
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_all_notes
      #--------------------------------------------------------------------------
      
    def get_all_notes(*args)
        
    notes ""
        
    notes += note if !args.include?(:self)
        
    notes += self.class.note if !args.include?(:class)
        
    equips.compact.each {|equipnotes += equip.note } if !args.include?(:equip)
        
    states.compact.each {|statenotes += state.note } if !args.include?(:state)
        
    notes
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_all_objects
      #--------------------------------------------------------------------------
      
    def get_all_objects(*args)
        
    result = []
        
    result += [self] if !args.include?(:self)
        
    result += [self.class]   if !args.include?(:class)
        
    result += equips.compact if !args.include?(:equip)
        
    result += states.compact if !args.include?(:state)
        
    result
      end
      
    #--------------------------------------------------------------------------
      # * New method: in_active_party?
      #--------------------------------------------------------------------------
      
    def in_active_party?
        
    $game_party.battle_members.include?(self)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: in_reserve_party?
      #--------------------------------------------------------------------------
      
    def in_reserve_party?
        
    $game_party.reserve_members.include?(self)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: in_party?
      #--------------------------------------------------------------------------
      
    def in_party?
        
    $game_party.all_members.include?(self)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: map_animation
      #--------------------------------------------------------------------------
      
    def map_animation(id)
        
    $game_map.actors.each do |member|
          
    member.animation_id id if member.actor == self
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: on_damage_floor
      #--------------------------------------------------------------------------
      
    def on_damage_floor?
        
    $game_player.on_damage_floor?
      
    end
    end

    #==============================================================================
    # ** Game_Unit
    #------------------------------------------------------------------------------
    #  This class handles units. It's used as a superclass of the Game_Party and
    # Game_Troop classes.
    #==============================================================================

    class Game_Unit
      
    #--------------------------------------------------------------------------
      # * New method: refresh
      #--------------------------------------------------------------------------
      
    def refresh
        members
    .each {|membermember.refresh }
      
    end
    end

    #==============================================================================
    # ** Game_Party
    #------------------------------------------------------------------------------
    #  This class handles the party. It includes information on amount of gold 
    # and items. The instance of this class is referenced by $game_party.
    #==============================================================================

    class Game_Party Game_Unit
      
    #--------------------------------------------------------------------------
      # * New method: average_level
      #--------------------------------------------------------------------------
      
    def average_level
        battle_members
    .collect {|actoractor.level }.average
      end
      
    #--------------------------------------------------------------------------
      # * New method: reserve_members
      #--------------------------------------------------------------------------
      
    def reserve_members
        all_members 
    battle_members
      end
    end

    #==============================================================================
    # ** Game_Map
    #------------------------------------------------------------------------------
    #  This class handles maps. It includes scrolling and passage determination
    # functions. The instance of this class is referenced by $game_map.
    #==============================================================================

    class Game_Map
      
    #--------------------------------------------------------------------------
      # * New method: event_list
      #--------------------------------------------------------------------------
      
    def event_list
        events
    .values
      end
      
    #--------------------------------------------------------------------------
      # * New method: note
      #--------------------------------------------------------------------------
      
    def note
        
    @map ? @map.note ""
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: vehicles
      #--------------------------------------------------------------------------
      
    def vehicles
        
    @vehicles
      end
      
    #--------------------------------------------------------------------------
      # * New method: map_events
      #--------------------------------------------------------------------------
      
    def map_events
        
    @map.events
      end
      
    #--------------------------------------------------------------------------
      # * New method: actors
      #--------------------------------------------------------------------------
      
    def actors
        
    [$game_player] + $game_player.followers.visible_followers
      end
    end

    #==============================================================================
    # ** Game_CharacterBase
    #------------------------------------------------------------------------------
    #  This class deals with characters. Common to all characters, stores basic
    # data, such as coordinates and graphics. It's used as a superclass of the
    # Game_Character class.
    #==============================================================================

    class Game_CharacterBase
      
    #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      
    attr_accessor :move_speed
      attr_accessor 
    :move_frequency
      
    #--------------------------------------------------------------------------
      # * New method: player?
      #--------------------------------------------------------------------------
      
    def player?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: event?
      #--------------------------------------------------------------------------
      
    def event?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: follower?
      #--------------------------------------------------------------------------
      
    def follower?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: vehicle?
      #--------------------------------------------------------------------------
      
    def vehicle?
        return 
    false
      end
      
    #--------------------------------------------------------------------------
      # * New method: frames
      #--------------------------------------------------------------------------
      
    def frames
        
    return 3
      end
      
    #--------------------------------------------------------------------------
      # * New method: hue
      #--------------------------------------------------------------------------
      
    def hue
        
    @hue ? @hue 0
      end
    end

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

    class Game_Character Game_CharacterBase
      
    #--------------------------------------------------------------------------
      # * New method: move_toward_position
      #--------------------------------------------------------------------------
      
    def move_toward_position(xy)
        
    sx distance_x_from(x)
        
    sy distance_y_from(y)
        if 
    sx.abs sy.abs
          move_straight
    (sx 6)
          
    move_straight(sy 2) if !@move_succeed && sy != 0
        elsif sy 
    != 0
          move_straight
    (sy 2)
          
    move_straight(sx 6) if !@move_succeed && sx != 0
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: move_toward_position
      #--------------------------------------------------------------------------
      
    def turn_toward_position(xy)
        
    sx distance_x_from(x)
        
    sy distance_y_from(y)
        if 
    sx.abs sy.abs
          set_direction
    (sx 6)
        
    elsif sy != 0
          set_direction
    (sy 2)
        
    end
      end
    end

    #==============================================================================
    # ** Game_Player
    #------------------------------------------------------------------------------
    #  This class handles the player.
    # The instance of this class is referenced by $game_map.
    #==============================================================================

    class Game_Player Game_Character
      
    #--------------------------------------------------------------------------
      # * New method: player?
      #--------------------------------------------------------------------------
      
    def player?
        return 
    true
      end
      
    #--------------------------------------------------------------------------
      # * New method: perform_transfer
      #--------------------------------------------------------------------------
      
    def new_map_id
        
    @new_map_id
      end
      
    #--------------------------------------------------------------------------
      # * New method: hue
      #--------------------------------------------------------------------------
      
    def hue
        actor 
    actor.hue 0
      end
    end

    #==============================================================================
    # ** Game_Follower
    #------------------------------------------------------------------------------
    #  This class handles the followers. Followers are the actors of the party
    # that follows the leader in a line. It's used within the Game_Followers class.
    #==============================================================================

    class Game_Follower Game_Character
      
    #--------------------------------------------------------------------------
      # * New method: follower?
      #--------------------------------------------------------------------------
      
    def follower?
        return 
    true
      end
      
    #--------------------------------------------------------------------------
      # * New method: index
      #--------------------------------------------------------------------------
      
    def index
        
    @member_index
      end
      
    #--------------------------------------------------------------------------
      # * New method: gathering?
      #--------------------------------------------------------------------------
      
    def gathering?
        
    $game_player.followers.gathering? && !gather?
      
    end
    end

    #==============================================================================
    # ** Game_Followers
    #------------------------------------------------------------------------------
    #  This class handles the followers. It's a wrapper for the built-in class
    # "Array." It's used within the Game_Player class.
    #==============================================================================

    class Game_Followers
      
    #--------------------------------------------------------------------------
      # * New method: get_actor
      #--------------------------------------------------------------------------
      
    def get_actor(id)
        list = [
    $game_player] + visible_followers
        
    list.select {|followerfollower.actor && follower.actor.id == id }.first
      end
      
    #--------------------------------------------------------------------------
      # * Method fix: visble_folloers
      #--------------------------------------------------------------------------
      
    unless method_defined?(:visible_followers)
        
    def visible_followersvisible_folloersend
      end
    end

    #==============================================================================
    # ** Game_Vehicle
    #------------------------------------------------------------------------------
    #  This class handles vehicles. It's used within the Game_Map class. If there
    # are no vehicles on the current map, the coordinates is set to (-1,-1).
    #==============================================================================

    class Game_Vehicle Game_Character
      
    #--------------------------------------------------------------------------
      # * New method: vehicle?
      #--------------------------------------------------------------------------
      
    def vehicle?
        return 
    true
      end
      
    #--------------------------------------------------------------------------
      # * New method: map_id
      #--------------------------------------------------------------------------
      
    def map_id
        
    @map_id 
      end
      
    #--------------------------------------------------------------------------
      # * New method: type
      #--------------------------------------------------------------------------
      
    def type
        
    @type
      end
      
    #--------------------------------------------------------------------------
      # * New method: aerial?
      #--------------------------------------------------------------------------
      
    def aerial?
        
    type == :airship
      end 
      
    #--------------------------------------------------------------------------
      # * New method: above?
      #--------------------------------------------------------------------------
      
    def above?
        
    aerial?
      
    end
    end

    #==============================================================================
    # ** Game_Event
    #------------------------------------------------------------------------------
    #  This class deals with events. It handles functions including event page 
    # switching via condition determinants, and running parallel process events.
    # It's used within the Game_Map class.
    #==============================================================================

    class Game_Event Game_Character
      
    #--------------------------------------------------------------------------
      # * New method: name
      #--------------------------------------------------------------------------
      
    def name
        
    @event.name
      end
      
    #--------------------------------------------------------------------------
      # * New method: event?
      #--------------------------------------------------------------------------
      
    def event?
        return 
    true
      end
      
    #--------------------------------------------------------------------------
      # * New method: erased?
      #--------------------------------------------------------------------------
      
    def erased?
        @
    erased
      end
      
    #--------------------------------------------------------------------------
      # * New method: note
      #--------------------------------------------------------------------------
      
    def note
        
    return ""     if !@page || !@page.list || @page.list.size <= 0
        
    return @notes if @notes && @page.list == @note_page
        
    @note_page = @page.list.dup
        comment_list 
    = []
        @
    page.list.each do |item|
          
    next unless item && (item.code == 108 || item.code == 408)
          
    comment_list.push(item.parameters[0])
        
    end
        
    @notes comment_list.join("\r\n")
        @
    notes
      end  
    end

    #==============================================================================
    # ** Game_Interpreter
    #------------------------------------------------------------------------------
    #  An interpreter for executing event commands. This class is used within the
    # Game_Map, Game_Troop, and Game_Event classes.
    #==============================================================================

    class Game_Interpreter
      
    #--------------------------------------------------------------------------
      # * Alias method: command_108
      #--------------------------------------------------------------------------
      
    alias :command_108_ve_basic_module :command_108
      def command_108
        command_108_ve_basic_module
        comment_call
      end
      
    #--------------------------------------------------------------------------
      # * New method: comment_call
      #--------------------------------------------------------------------------
      
    def comment_call
      end
      
    #--------------------------------------------------------------------------
      # * New method: note
      #--------------------------------------------------------------------------
      
    def note
        
    @comments ? @comments.join("\r\n") : ""
      
    end
    end

    #==============================================================================
    # ** Game_Animation
    #------------------------------------------------------------------------------
    #  Classe that handles Animation data
    #==============================================================================

    class Game_Animation
      
    #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      
    attr_accessor :ox
      attr_accessor 
    :oy
      attr_accessor 
    :rate
      attr_accessor 
    :zoom
      attr_accessor 
    :loop
      attr_accessor 
    :type
      attr_accessor 
    :map_x
      attr_accessor 
    :map_y
      attr_accessor 
    :mirror
      attr_accessor 
    :follow
      attr_accessor 
    :height
      attr_accessor 
    :bitmap1
      attr_accessor 
    :bitmap2
      attr_accessor 
    :sprites
      attr_accessor 
    :duration
      attr_accessor 
    :direction
      attr_accessor 
    :duplicated
      
    #--------------------------------------------------------------------------
      # * New method: initialize
      #--------------------------------------------------------------------------
      
    def initialize(animationmirroruser nil)
        @
    animation animation
        
    @rate      animation.name =~ /<RATE: ([+-]?\d+)>/? [$1.to_i1].max 4
        
    @zoom      animation.name =~ /<ZOOM: (\d+)%?>/i ? $1.to_i / 100.0 : 1.0
        @follow    = animation.name =~ /<FOLLOW>/i ? true : false
        @mirror    = mirror
        @duration  = frame_max * @rate
        @direction = user.anim_direction if user
        @sprites   = []
        bellow     = animation.name =~ /<BELLOW>/i
        above      = animation.name =~ /<ABOVE>/i
        @height    = bellow ? -1 : above ? 300 : 1
      end
      #--------------------------------------------------------------------------
      # * New method: data
      #--------------------------------------------------------------------------  
      def data
        @animation
      end
      #--------------------------------------------------------------------------
      # * New method: id
      #--------------------------------------------------------------------------  
      def id
        @animation.id
      end
      #--------------------------------------------------------------------------
      # * New method: name
      #--------------------------------------------------------------------------  
      def name
        @animation.name
      end
      #--------------------------------------------------------------------------
      # * New method: frame_max
      #--------------------------------------------------------------------------
      def frame_max
        @animation.frame_max
      end
      #--------------------------------------------------------------------------
      # * New method: position
      #--------------------------------------------------------------------------
      def position
        @animation.position
      end
      #--------------------------------------------------------------------------
      # * New method: animation1_name
      #--------------------------------------------------------------------------
      def animation1_name
        @animation.animation1_name
      end
      #--------------------------------------------------------------------------
      # * New method: animation2_name
      #--------------------------------------------------------------------------
      def animation2_name
        @animation.animation2_name
      end
      #--------------------------------------------------------------------------
      # * New method: animation1_hue
      #--------------------------------------------------------------------------
      def animation1_hue
        @animation.animation1_hue
      end
      #--------------------------------------------------------------------------
      # * New method: animation2_hue 
      #--------------------------------------------------------------------------
      def animation2_hue
        @animation.animation2_hue
      end
      #--------------------------------------------------------------------------
      # * New method: frames
      #--------------------------------------------------------------------------
      def frames
        @animation.frames
      end
      #--------------------------------------------------------------------------
      # * New method: timings
      #--------------------------------------------------------------------------
      def timings
        @animation.timings
      end
    end

    #==============================================================================
    # ** Sprite_Character
    #------------------------------------------------------------------------------
    #  This sprite is used to display characters. It observes a instance of the
    # Game_Character class and automatically changes sprite conditions.
    #==============================================================================

    class Sprite_Character < Sprite_Base
      #--------------------------------------------------------------------------
      # * Overwrite method: set_character_bitmap
      #--------------------------------------------------------------------------
      def set_character_bitmap
        update_character_info
        set_bitmap
        set_bitmap_position
      end
      #--------------------------------------------------------------------------
      # * New method: center_y
      #--------------------------------------------------------------------------
      def actor?
        @character.is_a?(Game_Player) || @character.is_a?(Game_Follower)
      end
      #--------------------------------------------------------------------------
      # * New method: center_y
      #--------------------------------------------------------------------------
      def actor
        actor? ? @character.actor : nil
      end
      #--------------------------------------------------------------------------
      # * New method: update_character_info
      #--------------------------------------------------------------------------
      def update_character_info
      end
      #--------------------------------------------------------------------------
      # * New method: hue
      #--------------------------------------------------------------------------
      def hue
        @character.hue
      end
      #--------------------------------------------------------------------------
      # * New method: set_bitmap
      #--------------------------------------------------------------------------
      def set_bitmap
        self.bitmap = Cache.character(set_bitmap_name, hue)
      end
      #--------------------------------------------------------------------------
      # * New method: set_bitmap_name
      #--------------------------------------------------------------------------
      def set_bitmap_name
        @character_name
      end
      #--------------------------------------------------------------------------
      # * New method: set_bitmap_position
      #--------------------------------------------------------------------------
      def set_bitmap_position
        sign = get_sign
        if sign && sign.include?('$')
          @cw = bitmap.width / @character.frames
          @ch = bitmap.height / 4
        else
          @cw = bitmap.width / (@character.frames * 4)
          @ch = bitmap.height / 8
        end
        self.ox = @cw / 2
        self.oy = @ch
      end
      #--------------------------------------------------------------------------
      # * New method: get_sign
      #--------------------------------------------------------------------------
      def get_sign
        @character_name[/^[\!\$]./]
      end
    end

    #==============================================================================
    # ** Sprite_Battler
    #------------------------------------------------------------------------------
    #  This sprite is used to display battlers. It observes a instance of the
    # Game_Battler class and automatically changes sprite conditions.
    #==============================================================================

    class Sprite_Battler < Sprite_Base
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_accessor :dmg_mirror
      #--------------------------------------------------------------------------
      # * New method: center_x
      #--------------------------------------------------------------------------
      def center_x
        self.ox
      end
      #--------------------------------------------------------------------------
      # * New method: center_y
      #--------------------------------------------------------------------------
      def center_y
        self.oy / 2
      end
    end

    #==============================================================================
    # ** Spriteset_Battle
    #------------------------------------------------------------------------------
    #  This class brings together battle screen sprites. It's used within the
    # Scene_Battle class.
    #==============================================================================

    class Spriteset_Battle
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_reader   :viewport1
      #--------------------------------------------------------------------------
      # * New method: sprite
      #--------------------------------------------------------------------------
      def sprite(subject)
        battler_sprites.compact.select {|sprite| sprite.battler == subject }.first
      end
    end

    #==============================================================================
    # ** Window_Base
    #------------------------------------------------------------------------------
    #  This is a superclass of all windows in the game.
    #==============================================================================

    class Window_Base < Window
      #--------------------------------------------------------------------------
      # * Alias method: convert_escape_characters
      #--------------------------------------------------------------------------
      alias :convert_escape_ve_basic_module :convert_escape_characters
      def convert_escape_characters(text)
        result = text.to_s.clone
        result = text_replace(result)
        result = convert_escape_ve_basic_module(text)
        result
      end
      #--------------------------------------------------------------------------
      # * New method: text_replace
      #--------------------------------------------------------------------------
      def text_replace(result)
        result.gsub!(/\r/) { "" }
        result.gsub!(/\\/) { "\e" }
        result
      end
    end

    #==============================================================================
    # ** Scene_Battle
    #------------------------------------------------------------------------------
    #  This class performs battle screen processing.
    #==============================================================================

    class Scene_Battle < Scene_Base
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_reader   :subject
      attr_reader   :spriteset
    end

    #==============================================================================
    # ** Scene_Battle
    #------------------------------------------------------------------------------
    #  This class performs map screen processing.
    #==============================================================================

    class Scene_Map < Scene_Base
      #--------------------------------------------------------------------------
      # * Public Instance Variables
      #--------------------------------------------------------------------------
      attr_reader   :spriteset
    end 

    PHP код:
    #==============================================================================
    # ** Victor Engine - Visual Equip
    #------------------------------------------------------------------------------
    # Author : Victor Sant
    #
    # Version History:
    #  v 1.00 - 2012.01.07 > First release
    #  v 1.01 - 2012.01.09 > Fixed error with comment calls
    #  v 1.02 - 2012.01.14 > Fixed the positive sign on some Regular Expressions
    #  v 1.03 - 2012.01.15 > Fixed the Regular Expressions problem with "" and 灯
    #  v 1.04 - 2012.02.03 > Fixed problem with charsets with '!$' tag
    #  v 1.05 - 2012.02.08 > Compatibility with Animated Battle
    #  v 1.06 - 2012.02.21 > Fixed problem with "clear" and "default" tags
    #  v 1.07 - 2012.07.25 > Fixed Compatibility with Character Control and
    #                      > Diagonal Movement
    #  v 1.08 - 2012.08.02 > Compatibility with Basic Module 1.27
    #------------------------------------------------------------------------------
    #  This script allows to change the graphic of the chacter according to
    # the equips and other conditions. It adds specific bitmaps to the character
    # sprite. It's possible to set custom graphics to actors, classes, weapons
    # armors and events.
    #------------------------------------------------------------------------------
    # Compatibility
    #   Requires the script 'Victor Engine - Basic Module' v 1.27 or higher

    # * Overwrite methods
    #   class Game_Party < Game_Unit
    #     def characters_for_savefile
    #
    #   class Sprite_Character < Sprite_Base
    #     def set_bitmap
    #     def get_sign
    #
    #   class Window_Base < Window
    #     def draw_actor_graphic(actor, x, y)
    #     def draw_character(character_name, character_index, x, y)
    #
    #   class Window_SaveFile < Window_Base
    #     def draw_party_characters(x, y)
    #
    # * Alias methods
    #   class << Cache
    #     def character(filename)
    #
    #   class Game_Actor < Game_Battler
    #     def setup(actor_id)
    #
    #   class Game_Event < Game_Character
    #     def init_private_members
    #     def setup_page_settings
    #
    #   class Game_Interpreter
    #     def comment_call
    #
    #   class Sprite_Character < Sprite_Base
    #     def graphic_changed?
    #     def update_character_info
    #
    #   class Scene_Map
    #     def start
    #
    #------------------------------------------------------------------------------
    # Comment calls note tags:
    #  Tags to be used in events comment box, works like a script call.
    #
    #  <change actor visual>    <change event visual>
    #  settings                 settings
    #  </change actor visual>   </change actor visual>
    #   This comment call will add a new visual part to the actor or event.
    #   Add the following  values to the info. The ID, must be added, other
    #   values are optional.
    #     id: x        : actor or event ID
    #     name: "x"    : equip part filename. ("filename")
    #     index: x     : equip part charset index, if using 8 chars charsets. (0-7)
    #     hue: x       : equip part hue. (0-360)
    #     priority: x  : part display priority. (default = 0, can be negative)
    #
    #  <clear actor visual: i>   <clear event visual: i>
    #   This comment call will remove all event or actor visual parts. On actors
    #   this will not remove parts from equips, only the natural actor/class parts.
    #     id: x : actor or event ID
    #
    #  <default actor visual: i>   <default event visual: i>
    #   This comment call will restore all event or actor visual parts. On actors
    #   this will not change parts from equips, only the natural actor/class parts.
    #     i : actor or event ID
    #
    #  <event clone actor: x, y>
    #   This comment call allows clone the visual equip settings of a actor into
    #   the event, useful for cutscenes.
    #     x : event ID
    #     y : cloned actor id
    #
    #  <event clone party: x, y>
    #   This comment call allows clone the visual equip settings of a party member
    #   into the event, useful for cutscenes.
    #     x : event ID
    #     y : cloned actor index
    #
    #------------------------------------------------------------------------------
    # Comment Boxes note tags:
    #   Tags to be used on Events Comment boxes. The comment boxes are different 
    #   from the comment call, they're called always the event refresh.
    #
    #  <clone actor: x>
    #   This comment tag allows clone the visual equip settings of a actor into
    #   an event, useful for cut scenes.
    #     x : cloned actor ID
    #
    #  <clone party: x>
    #   This comment tag allows clone the visual equip settings of a party member
    #   into the event, useful for cut scenes.
    #     x : cloned actor ID
    #
    #------------------------------------------------------------------------------
    # Actors, Classes, Weapons, Armors and Comment Boxes note tags:
    #   Tags to be used on Actors, Classes, Weapons, Armors note boxes and 
    #   Events Comment boxes. The comment boxes are different from the comment 
    #   call, they're called always the event refresh.
    #
    #  <visual part>
    #  settings
    #  </visual part>
    #   This tag will add a new visual part to the actor or event visual.
    #   Add the following  values to the info. The ID, must be added, other
    #   values are optional.
    #     id: x        : actor or event ID
    #     name: "x"    : equip part filename. ("filename")
    #     index: x     : equip part charset index, if using 8 chars charsets. (0-7)
    #     hue: x       : equip part hue. (0-360)
    #     priority: x  : part display priority. (default = 0, can be negative)
    #
    #------------------------------------------------------------------------------
    # Additional instructions:
    #  
    #  The extra graphics from the visual items are added to the original bitmap.
    #  
    #  The visual item files are independent graphics that are added on the 
    #  character bitmap.
    #
    #  The priority is an arbitrary numeric value set to the visual item to decide
    #  wich graphics will be displayed above the other, the character graphic
    #  have a priority of 0 by default.
    #
    #  It's possible to set more than a single graphic to one equipment, so you
    #  use that to have parts with different properties on the same equip.
    #  This can be used to make things like wings, wich stay behind the char if
    #  facing down, but in front of the char if facing up, and other things.
    #
    #  It's possible to have some equipment graphic to change according to
    #  the character base graphic. Create a file with the character filename + the 
    #  visual item filename. ("character filename" + "visual item filename")
    #  You can use this to make items that have different graphics depending
    #  on the character, like a different armor for males and females
    #  
    #==============================================================================


    #==============================================================================
    # ** Victor Engine
    #------------------------------------------------------------------------------
    #   Setting module for the Victor Engine
    #==============================================================================

    module Victor_Engine
      
    #--------------------------------------------------------------------------
      # * required
      #   This method checks for the existance of the basic module and other
      #   VE scripts required for this script to work, don't edit this
      #--------------------------------------------------------------------------
      
    def self.required(namereqversiontype nil)
        if !
    $imported[:ve_basic_module]
          
    msg "The script '%s' requires the script\n"
          
    msg += "'VE - Basic Module' v%s or higher above it to work properly\n"
          
    msg += "Go to http://victorscripts.wordpress.com/ to download this script."
          
    msgbox(sprintf(msgself.script_name(name), version))
          exit
        else
          
    self.required_script(namereqversiontype)
        
    end
      end
      
    #--------------------------------------------------------------------------
      # * script_name
      #   Get the script name base on the imported value, don't edit this
      #--------------------------------------------------------------------------
      
    def self.script_name(nameext "VE")
        
    name name.to_s.gsub("_"" ").upcase.split
        name
    .collect! {|charchar == ext "#{char} -" char.capitalize }
        
    name.join(" ")
      
    end
    end

    $imported 
    ||= {}
    $imported[:ve_visual_equip] = 1.08
    Victor_Engine
    .required(:ve_visual_equip, :ve_basic_module1.27, :above)
    Victor_Engine.required(:ve_visual_equip, :ve_character_control1.00, :bellow)
    Victor_Engine.required(:ve_visual_equip, :ve_multi_frames1.00, :bellow)

    #==============================================================================
    # ** Cache
    #------------------------------------------------------------------------------
    #  This module loads each of graphics, creates a Bitmap object, and retains it.
    # To speed up load times and conserve memory, this module holds the created
    # Bitmap object in the internal hash, allowing the program to return
    # preexisting objects when the same bitmap is requested again.
    #==============================================================================

    class << Cache
      
    #--------------------------------------------------------------------------
      # * Alias method: character
      #--------------------------------------------------------------------------
      
    alias :character_ve_visual_equip :character
      def character
    (filenamehue 0, list = [], sufix "")
        if !list || list.empty? 
          
    character_ve_visual_equip(filenamehue)
        
    elsif !@cache.include?(list + [sufix]) || @cache[list + [sufix]].disposed?
          
    equip_character(filename, list, sufix)
        else
          @
    cache[list + [sufix]]
        
    end
      end
      
    #--------------------------------------------------------------------------
      # * New method: equip_character
      #--------------------------------------------------------------------------
      
    def equip_character(filename, list, sufix)
        @
    cache ||= {}
        
    bitmap load_character_bitmap(filename, list, sufix)
        
    bitmap bitmap_blt(filename, list, bitmapsufix)
        
    bitmap
      end
      
    #--------------------------------------------------------------------------
      # * New method: load_character_bitmap
      #--------------------------------------------------------------------------
      
    def load_character_bitmap(filename, list, sufix)
        
    bitmap load_bitmap("Graphics/Characters/"filename).clone
        
    bitmap expand_bitmap(bitmap) if filename =~ /^[!]?[$].*/i
        bitmap
    .clear
        bitmap
      end
      
    #--------------------------------------------------------------------------
      # * New method: get_bitmap
      #--------------------------------------------------------------------------
      
    def get_bitmap(filenamepartsufix)
        
    base part[:name] =~ /^[!]?[$](.*)/? $part[:name]
        
    char filename base
        pose 
    part[:name] + sufix
        file 
    filename base sufix
        name 
    character_exist?(char) ? char part[:name]
        
    name character_exist?(pose) ? pose name
        name 
    character_exist?(file) ? file name
        bmp  
    = ["Graphics/Characters/"namepart[:hue]]
        [
    load_bitmap(*bmp).clone, namerescue [empty_bitmapname]
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: expand_bitmap
      #--------------------------------------------------------------------------
      
    def expand_bitmap(bitmap)
        
    old_bmp bitmap.dup
        bitmap  
    Bitmap.new(old_bmp.width 4old_bmp.height 2)
        
    bitmap.blt(00old_bmpold_bmp.rect)
        
    old_bmp.dispose
        bitmap
      end
      
    #--------------------------------------------------------------------------
      # * New method: bitmap_blt
      #--------------------------------------------------------------------------
      
    def bitmap_blt(filename, list, bitmapsufix)
        
    values = []
        list.
    each do |part|
          
    setting equip_bitmap_info(filenamepartsufix)
          
    values += equip_bitmap_settings(*setting)
        
    end
        values
    .sort {|aba[4] <=> b[4]}.each do |value|
          
    bitmap.blt(value[0], value[1], value[2], value[3])
        
    end
        
    @cache[list + [sufix]] = bitmap
        bitmap
      end
      
    #--------------------------------------------------------------------------
      # * New method: equip_bitmap_info
      #--------------------------------------------------------------------------
      
    def equip_bitmap_info(filenamepartsufix)
        
    bmpname get_bitmap(filenamepartsufix)
        
    bmp.width  / (name[/^[!]?[$]./] ? 4)
        
    bmp.height / (name[/^[!]?[$]./] ? 2)
        
    x1 = (part[:index1] % 4) * w
        y1 
    = (part[:index1] / 4) * h
        x2 
    = (part[:index2] % 4) * w
        y2 
    = (part[:index2] / 4) * h
        
    [partbmpx1y1x2y2wh]
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: equip_bitmap_settings
      #--------------------------------------------------------------------------
      
    def equip_bitmap_settings(partbmpx1y1x2y2wh)
        
    values = []
        
    values.push([x2y2bmpRect.new(x1y1wh), part[:priority]])
        
    values
      end
    end

    #==============================================================================
    # ** Game_Actor
    #------------------------------------------------------------------------------
    #  This class handles actors. It's used within the Game_Actors class
    # ($game_actors) and referenced by the Game_Party class ($game_party).
    #==============================================================================

    class Game_Actor Game_Battler
      
    #--------------------------------------------------------------------------
      # * Alias method: setup
      #--------------------------------------------------------------------------
      
    alias :setup_ve_visual_equip :setup
      def setup
    (actor_id)
        
    setup_ve_visual_equip(actor_id)
        @
    actor_parts  = []
        @
    visual_parts = []
        @
    equip_parts  = []
        
    default_visual_parts
      end
      
    #--------------------------------------------------------------------------
      # * New method: default_visual_parts
      #--------------------------------------------------------------------------
      
    def default_visual_parts
        clear_visual_parts
        regexp 
    get_all_values("VISUAL PART")
        
    note.scan(regexp) { set_visual_parts($1) }
        
    self.class.note.scan(regexp) { set_visual_parts($1) }
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: set_visual_parts
      #--------------------------------------------------------------------------
      
    def set_visual_parts(info)
        @
    visual_parts.push(info)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: clear_visual_parts
      #--------------------------------------------------------------------------
      
    def clear_visual_parts
        
    @visual_parts.clear
      end
      
    #--------------------------------------------------------------------------
      # * New method: visual_items
      #--------------------------------------------------------------------------
      
    def visual_items(part nil)
        (
    part ? [part] : [default_part]) + character_items equip_items
      end
      
    #--------------------------------------------------------------------------
      # * New method: default_part
      #--------------------------------------------------------------------------
      
    def default_part
        
    {name: @character_nameindex1: @character_indexindex2: @character_index,
         
    huehuepriority0}
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: character_items
      #--------------------------------------------------------------------------
      
    def character_items
        
    return @actor_parts if @actor_visual == @visual_parts
        
    @actor_visual = @visual_parts.dup
        
    @actor_parts.clear
        
    @visual_parts.each {|part| @actor_parts.push(set_part(part)) }
        @
    actor_parts
      end
      
    #--------------------------------------------------------------------------
      # * New method: equip_items
      #--------------------------------------------------------------------------
      
    def equip_items
        
    return @equip_parts if @actor_equips == equips
        
    @actor_equips equips.dup
        
    @equip_parts.clear
        regexp 
    get_all_values("VISUAL PART")
        
    equips.compact.each {|eqp| @equip_parts += equip_parts(eqp.noteregexp) }
        @
    equip_parts
      end
      
    #--------------------------------------------------------------------------
      # * New method: equip_parts
      #--------------------------------------------------------------------------
      
    def equip_parts(noteregexp)
        
    parts = []
        
    note.scan(regexp) {parts.push(set_part($1)) }
        
    parts
      end
      
    #--------------------------------------------------------------------------
      # * New method: set_part
      #--------------------------------------------------------------------------
      
    def set_part(value)
        
    part = {}
        
    part[:name]     = value =~ /NAME#{get_filename}/i ? $1.to_s : ""
        
    part[:index1]   = value =~ /INDEX: (\d+)/i          ? $1.to_i 0
        part
    [:hue]      = value =~ /HUE: (\d+)/i            ? $1.to_i 0
        part
    [:priority] = value =~ /PRIORITY: ([+-]?\d+)/i  ? $1.to_i 1
        part
    [:index2]   = character_index
        part
      end
    end

    #==============================================================================
    # ** Game_Party
    #------------------------------------------------------------------------------
    #  This class handles the party. It includes information on amount of gold 
    # and items. The instance of this class is referenced by $game_party.
    #==============================================================================

    class Game_Party Game_Unit
      
    #--------------------------------------------------------------------------
      # * Overwrte method: characters_for_savefile
      #--------------------------------------------------------------------------
      
    def characters_for_savefile
        battle_members
    .collect do |actor|
          [
    actor.character_nameactor.character_indexactor.visual_items.dup]
        
    end
      end
    end

    #==============================================================================
    # ** Game_CharacterBase
    #------------------------------------------------------------------------------
    #  This class deals with characters. Common to all characters, stores basic
    # data, such as coordinates and graphics. It's used as a superclass of the
    # Game_Character class.
    #==============================================================================

    class Game_CharacterBase
      
    #--------------------------------------------------------------------------
      # * New method: visual_items
      #--------------------------------------------------------------------------
      
    def visual_items
        
    [default_part]
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: default_part
      #--------------------------------------------------------------------------
      
    def default_part
        
    {name: @character_nameindex1: @character_indexindex2: @character_index,
         
    huehuepriority0}
      
    end
    end

    #==============================================================================
    # ** Game_Event
    #------------------------------------------------------------------------------
    #  This class deals with events. It handles functions including event page 
    # switching via condition determinants, and running parallel process events.
    # It's used within the Game_Map class.
    #==============================================================================

    class Game_Event Game_Character
      
    #--------------------------------------------------------------------------
      # * Alias method: init_private_members
      #--------------------------------------------------------------------------
      
    alias :init_private_members_ve_visual_equip :init_private_members
      def init_private_members
        init_private_members_ve_visual_equip
        
    @visual_parts = []
        @
    event_parts  = []
        
    default_visual_parts
      end
      
    #--------------------------------------------------------------------------
      # * Alias method: setup_page_settings
      #--------------------------------------------------------------------------
      
    alias :setup_page_settings_ve_visual_equip :setup_page_settings
      def setup_page_settings
        setup_page_settings_ve_visual_equip
        default_visual_parts
      end   
      
    #--------------------------------------------------------------------------
      # * New method: default_visual_parts
      #--------------------------------------------------------------------------
      
    def default_visual_parts
        clear_visual_parts
        regexp 
    get_all_values("VISUAL PART")
        
    note.scan(regexp) { set_visual_parts($1) }
        
    default_clone_visual
      end
      
    #--------------------------------------------------------------------------
      # * New method: set_visual_parts
      #--------------------------------------------------------------------------
      
    def set_visual_parts(info)
        @
    visual_parts.push(info)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: default_clone_visual
      #--------------------------------------------------------------------------
      
    def default_clone_visual
        note
    .scan(/<CLONE (ACTOR|PARTY): (\d+)>/i) do
          
    actor $game_actors[$2.to_i]            if $1.upcase == "ACTOR"
          
    actor $game_party.members[$2.to_i 1] if $1.upcase == "PARTY"
          
    set_cloned_visual(actor.clone.visual_items.dup) if actor
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: clear_visual_parts
      #--------------------------------------------------------------------------
      
    def clear_visual_parts
        
    @clone_visual nil
      end
      
    #--------------------------------------------------------------------------
      # * New method: visual_items
      #--------------------------------------------------------------------------
      
    def visual_items
        
    @clone_visual ? @clone_visual : [default_part] + character_items
      end
      
    #--------------------------------------------------------------------------
      # * New method: set_cloned_visual
      #--------------------------------------------------------------------------
      
    def set_cloned_visual(visual)
        @
    clone_visual visual.clone
        @
    clone_visual.each {|visualvisual[:index2] = character_index }
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: character_items
      #--------------------------------------------------------------------------
      
    def character_items
        
    return @event_parts if @event_visual == @visual_parts
        
    @event_visual = @visual_parts.dup
        
    @event_parts.clear
        
    @visual_parts.each {|part| @event_parts.push(set_part(part)) }
        @
    event_parts
      end
      
    #--------------------------------------------------------------------------
      # * New method: set_part
      #--------------------------------------------------------------------------
      
    def set_part(value)
        
    part = {}
        
    part[:name]     = value =~ /NAME#{get_filename}/i ? $1.to_s : ""
        
    part[:index1]   = value =~ /INDEX: (\d+)/i          ? $1.to_i 0
        part
    [:hue]      = value =~ /HUE: (\d+)/i            ? $1.to_i 0
        part
    [:priority] = value =~ /PRIORITY: ([+-]?\d+)/i  ? $1.to_i 1
        part
    [:index2]   = character_index
        part
      end
    end

    #==============================================================================
    # ** Game_Player
    #------------------------------------------------------------------------------
    #  This class handles the player.
    # The instance of this class is referenced by $game_map.
    #==============================================================================

    class Game_Player Game_Character
      
    #--------------------------------------------------------------------------
      # * New method: visual_items
      #--------------------------------------------------------------------------
      
    def visual_items
        actor 
    actor.visual_items(default_part) : super
      end
    end

    #==============================================================================
    # ** Game_Follower
    #------------------------------------------------------------------------------
    #  This class handles the followers. Followers are the actors of the party
    # that follows the leader in a line. It's used within the Game_Followers class.
    #==============================================================================

    class Game_Follower Game_Character
      
    #--------------------------------------------------------------------------
      # * New method: visual_items
      #--------------------------------------------------------------------------
      
    def visual_items
        actor 
    && $game_player.followers.visible 
        
    actor.visual_items(default_part) : super
      end
    end

    #==============================================================================
    # ** Game_Interpreter
    #------------------------------------------------------------------------------
    #  An interpreter for executing event commands. This class is used within the
    # Game_Map, Game_Troop, and Game_Event classes.
    #==============================================================================

    class Game_Interpreter
      
    #--------------------------------------------------------------------------
      # * Alias method: comment_call
      #--------------------------------------------------------------------------
      
    alias :comment_call_ve_visual_equip :comment_call
      def comment_call
        call_visual_changes
        comment_call_ve_visual_equip
      end
      
    #--------------------------------------------------------------------------
      # * New method: call_visual_changes
      #--------------------------------------------------------------------------
      
    def call_visual_changes
        call_clear_visual
    ("ACTOR VISUAL")
        
    call_clear_visual("EVENT VISUAL")
        
    call_change_visual("ACTOR VISUAL")
        
    call_change_visual("EVENT VISUAL")
        
    call_restore_visual("ACTOR VISUAL")
        
    call_restore_visual("EVENT VISUAL")
        
    call_clone_visual
      end
      
    #--------------------------------------------------------------------------
      # * New method: call_change_visual
      #--------------------------------------------------------------------------
      
    def call_change_visual(type)
        
    regexp get_all_values("CHANGE #{type}")
        
    note.scan(regexp) do
          
    value = $1.dup
          id 
    value =~ /ID: (\d+)/? $1.to_i nil
          object 
    $game_map.events[id]  if id && type.upcase == "EVENT VISUAL"
          
    object $game_actors[id]      if id && type.upcase == "ACTOR VISUAL"
          
    object.set_visual_parts(value) if object
          object
    .character_items         if object
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: call_clear_visual
      #--------------------------------------------------------------------------
      
    def call_clear_visual(type)
        
    note.scan(/<CLEAR #{type}: (\d+)>/i) do
          
    id = $1.to_i
          object 
    $game_map.events[id] if id && type.upcase == "ACTOR VISUAL"
          
    object $game_actors[id]     if id && type.upcase == "ACTOR VISUAL"
          
    object.clear_visual_parts if object
          object
    .character_items    if object
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: call_restore_visual
      #--------------------------------------------------------------------------
      
    def call_restore_visual(type)
        
    note.scan(/<DEFAULT #{type}: (\d+)>/i) do
          
    value = $1.dup
          id 
    value =~ /ID: (\d+)/? $1.to_i nil
          object 
    $game_map.events[id] if id && type.upcase == "EVENT VISUAL"
          
    object $game_actors[id]     if id && type.upcase == "ACTOR VISUAL"
          
    object.default_visual_parts if object
          object
    .character_items      if object
        end
      end
      
    #--------------------------------------------------------------------------
      # * New method: call_clone_visual
      #--------------------------------------------------------------------------
      
    def call_clone_visual
        note
    .scan(/<EVENT CLONE (ACTOR|PARTY): (\d+) *, *(\d+)>/i) do |ptevac|
          
    event $game_map.events[ev.to_i]
          
    actor $game_actors[ac.to_i]            if pt.upcase == "ACTOR"
          
    actor $game_party.members[ac.to_i 1] if pt.upcase == "PARTY"
          
    next if !actor || !event
          event
    .set_cloned_visual(actor.clone.visual_items.dup)
        
    end
      end
    end

    #==============================================================================
    # ** Sprite_Character
    #------------------------------------------------------------------------------
    #  This sprite is used to display characters. It observes a instance of the
    # Game_Character class and automatically changes sprite conditions.
    #==============================================================================

    class Sprite_Character Sprite_Base
      
    #--------------------------------------------------------------------------
      # * Overwrte method: set_bitmap
      #--------------------------------------------------------------------------
      
    def set_bitmap
        sufix 
    $imported[:ve_diagonal_move] ? diagonal_sufix ""
        
    sufix = @pose_sufix sufix + @pose_sufix sufix
        self
    .bitmap Cache.character(set_bitmap_namehue, @visual_itemssufix
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: get_sign
      #--------------------------------------------------------------------------
      
    def get_sign
        nil
      end
      
    #--------------------------------------------------------------------------
      # * Alias method: graphic_changed?
      #--------------------------------------------------------------------------
      
    alias :graphic_changed_ve_visual_equip? :graphic_changed?
      
    def graphic_changed?
        
    graphic_changed_ve_visual_equip? || 
        @
    visual_items != @character.visual_items
      end
      
    #--------------------------------------------------------------------------
      # * Alias method: update_character_info
      #--------------------------------------------------------------------------
      
    alias :update_character_info_ve_visual_equip :update_character_info
      def update_character_info
        update_character_info_ve_visual_equip
        
    @visual_items = @character.visual_items.dup
      end
    end

    #==============================================================================
    # ** Window_Base
    #------------------------------------------------------------------------------
    #  This is a superclass of all windows in the game.
    #==============================================================================

    class Window_Base Window
      
    #--------------------------------------------------------------------------
      # * Overwrte method: draw_actor_graphic
      #--------------------------------------------------------------------------
      
    def draw_actor_graphic(actorxy)
        
    parts actor.visual_items
        draw_character
    (actor.character_nameactor.character_indexxyparts)
      
    end
      
    #--------------------------------------------------------------------------
      # * Overwrite method: draw_character
      #--------------------------------------------------------------------------
      
    def draw_character(character_namecharacter_indexxyparts nil)
        return 
    unless character_name
        
    @character_name character_name
        bitmap 
    parts get_parts(parts) : Cache.character(character_name
        
    sign   parts nil character_name[/^[\!\$]./]
        
    multi  $imported[:ve_multi_frames] && character_name[/\[F(\d+)\]/i]
        
    frames multi ? $1.to_i 3
        
    if sign && sign.include?('$')
          
    cw bitmap.width frames
          ch 
    bitmap.height 4
        
    else
          
    cw bitmap.width / (frames 4)
          
    ch bitmap.height 8
        end
        n 
    character_index
        src_rect 
    Rect.new((1) * cw, (4) * chcwch)
        
    contents.blt(cw 2chbitmapsrc_rect)
      
    end
      
    #--------------------------------------------------------------------------
      # * New method: get_parts
      #--------------------------------------------------------------------------
      
    def get_parts(parts)
        
    Cache.character(@character_name0parts)
      
    end
    end

    #==============================================================================
    # ** Window_SaveFile
    #------------------------------------------------------------------------------
    #  This window displays save files on the save and load screens.
    #==============================================================================

    class Window_SaveFile Window_Base
      
    #--------------------------------------------------------------------------
      # * Overwrte method: draw_party_characters
      #--------------------------------------------------------------------------
      
    def draw_party_characters(xy)
        
    header DataManager.load_header(@file_index)
        return 
    unless header
        header
    [:characters].each_with_index do |datai|
          
    draw_character(data[0], data[1], 48ydata[2])
        
    end
      end
    end

    #==============================================================================
    # ** Scene_Map
    #------------------------------------------------------------------------------
    #  This class performs the map screen processing.
    #==============================================================================

    class Scene_Map
      
    #--------------------------------------------------------------------------
      # * Alias method: setup_page_settings
      #--------------------------------------------------------------------------
      
    alias :start_ve_visual_equip :start
      def start
        $game_map
    .events.values.each {|eventevent.default_clone_visual }
        
    start_ve_visual_equip
      end
    end 

  3. #1553

  4. #1554
    Местный Аватар для Narikatel
    Информация о пользователе
    Регистрация
    08.02.2015
    Адрес
    Пенза
    Сообщений
    161
    Записей в дневнике
    1
    Репутация: 4 Добавить или отнять репутацию

    По умолчанию

    Посибо

  5. #1555
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,776
    Записей в дневнике
    34
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Отдельный скрипт для замены графики перса? Разве не проще сделать это через общее событие?
    Лицензионный VX Ace. Спасибо Петр.
    2 года мукеризма в пустую.

  6. #1556
    Местный Аватар для Narikatel
    Информация о пользователе
    Регистрация
    08.02.2015
    Адрес
    Пенза
    Сообщений
    161
    Записей в дневнике
    1
    Репутация: 4 Добавить или отнять репутацию

    По умолчанию

    Нет, тоесть смотри, придёться лепить огромное количество чарсетов, допустим тут он одел просто шлем, тут он одел шлем и бронзовую броню, тут он вообще голый бегает, тут он в горящие доспехи. это адски будет

  7. #1557
    Создатель Аватар для Рольф
    Информация о пользователе
    Регистрация
    14.04.2008
    Адрес
    Южно- Сахалинск/Пенза
    Сообщений
    10,081
    Записей в дневнике
    2
    Репутация: 108 Добавить или отнять репутацию

    По умолчанию

    Отдельный скрипт для замены графики перса? Разве не проще сделать это через общее событие?
    Тогда герой только в определенных местах сможет переодеваться, если повесить на параллельное событие, то может затупить.

  8. #1558
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,776
    Записей в дневнике
    34
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Нет, тоесть смотри, придёться лепить огромное количество чарсетов, допустим тут он одел просто шлем, тут он одел шлем и бронзовую броню, тут он вообще голый бегает, тут он в горящие доспехи. это адски будет
    Как тогда скрипт работает?

    Тогда герой только в определенных местах сможет переодеваться, если повесить на параллельное событие, то может затупить
    Можно прописать к каждой одежке запуск ОС и при экипе идет проверка условия, что именно ты надел, потом смена графики и все. Я бы показал, но кому это нужно.
    Лицензионный VX Ace. Спасибо Петр.
    2 года мукеризма в пустую.

  9. #1559
    Местный Аватар для Narikatel
    Информация о пользователе
    Регистрация
    08.02.2015
    Адрес
    Пенза
    Сообщений
    161
    Записей в дневнике
    1
    Репутация: 4 Добавить или отнять репутацию

    По умолчанию

    Ну вообще мне это нужно))

  10. #1560
    Хранитель Аватар для Paranoid
    Информация о пользователе
    Регистрация
    22.12.2014
    Сообщений
    2,776
    Записей в дневнике
    34
    Репутация: 28 Добавить или отнять репутацию

    По умолчанию

    Цитата Сообщение от Narikatel Посмотреть сообщение
    Ну вообще мне это нужно))
    Ну тебе же вроде не хотелось возится с кучей графики. Но если нужно, могу склепать демку с моим методом.
    Лицензионный VX Ace. Спасибо Петр.
    2 года мукеризма в пустую.

Страница 156 из 190 ПерваяПервая ... 56106146154155156157158166 ... ПоследняяПоследняя

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 31 (пользователей: 0 , гостей: 31)

Метки этой темы

Социальные закладки

Социальные закладки

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •  
Поиск скриптов