VX 스크립트

KGC파라미터배분2 스크립트입니다.

2009년7월19일 최종갱신.

 

사용법은 기존 파라미터 배분과 동일한것 같군요.

 Untitled-1 copy.jpg

 

 

 

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ◆ 파라미터 배분 2 - KGC_DistributeParameter2 ◆ VX ◆
#_/    ◇ Last update : 2009/07/18 ◇
#_/----------------------------------------------------------------------------
#_/  파라미터 배분 기능을 작성합니다.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ 커스터마이즈 항목 - Customize ★
#==============================================================================

module KGC
module DistributeParameter
  # ◆ 파라미터 배분 개소
  #  배분 개소 및 증가량을
  #   {
  #     :key        => 키,
  #     :name       => "명칭",
  #     :limit      => 회수 상한,
  #     :cost       => [소비 RP, 소비 RP 보정],
  #     :파라미터 => [상승량, 상승량 보정],
  #     # 이후, 파라미터를 필요한 만큼 기술
  #   },
  #  그렇다고 하는 서식에서 추가.
  #  배분 화면에서는, 추가한 순서에 표시.
  #  「키」에는, 다른 개소로 입지 않는 명칭을 지정.
  #  (내부에서 배분 개소를 특정하기 위해서 사용.수치, 문자열등 뭐든지OK)
  #  「회수 상한」이외는 소수에서도OK.
  #  「회수 상한」을 0 (으)로 하면 회수 무제한.
  #  「소비 RP 보정」과「상승량 보정」은 생략가능.생략시는 0.
  GAIN_PARAMETER = [
    {
      :key   => :health,
      :name  => "체력",
      :limit => 30,
      :cost  => [ 1, 0.4],
      :maxhp => [30, 2],
      :def   => [ 1, 0.25],
    },
    {
      :key   => :magic,
      :name  => "마력",
      :limit => 30,
      :cost  => [1, 0.4],
      :maxmp => [5, 0.5],
      :spi   => [2, 0.5],
    },
    {
      :key   => :pow,
      :name  => "힘",
      :limit => 30,
      :cost  => [1, 0.4],
      :atk   => [2, 0.5],
      :def   => [1, 0.25],
    },
    {
      :key   => :dex,
      :name  => "민첩함",
      :limit => 30,
      :cost  => [1, 0.4],
      :agi   => [2, 0.5],
      :hit   => [0.5],
      :eva   => [0.5],
    },
    {
      :key   => :hit,
      :name  => "명중율",
      :limit => 20,
      :cost  => [1, 0.5],
      :hit   => [1],
    },
    {
      :key   => :eva,
      :name  => "회피율",
      :limit => 20,
      :cost  => [1, 0.5],
      :eva   => [1],
    },
    {
      :key   => :crt,
      :name  => "위기",
      :limit => 20,
      :cost  => [1, 0.7],
      :cri   => [1],
    },
    {
      :key         => :chant,
      :name        => "영창 속도",
      :limit       => 0,
      :cost        => [1, 0.5],
      :skill_speed => [1],
    },
    {
      :key        => :item,
      :name       => "아이템 속도",
      :limit      => 0,
      :cost       => [1, 0.5],
      :item_speed => [1],
    },
    {
      :key   => :odds,
      :name  => "표적이 되기 쉬움",
      :limit => 5,
      :cost  => [1],
      :odds  => [1],
    }
  ]  # ← 이 ] (은)는 지우지 않는 것!

  # ◆ 액터 고유의 파라미터 증가량
  PERSONAL_GAIN_PARAMETER = []
  #  여기에서 아래로, 액터마다의 배분시의 증가량을
  #   PERSONAL_GAIN_PARAMETER[액터 ID] = [ 배분 개소 ]
  #  그렇다고 하는 서식에서 지정.
  #  「배분 개소」는 GAIN_PARAMETER (와)과 같은 서식.
  #  키가 GAIN_PARAMETER (와)과 같은 경우,GAIN_PARAMETER 에 덧쓰기.
  #  지정하지 않았던 파라미터/액터는 GAIN_PARAMETER (을)를 사용.
  #
  # <례> 액터 1의 "체력" (을)를 개별적으로 지정.
  PERSONAL_GAIN_PARAMETER[1] = [
    {
      :key   => :health,
      :name  => "체력",
      :limit => 30,
      :cost  => [ 1, 0.4],
      :maxhp => [50, 3],
      :def   => [ 1, 0.3],
    },
  ]

  # ◆ 직업 고유의 파라미터 증가량
  CLASS_GAIN_PARAMETER = []
  #  여기에서 아래로, 직업마다의 배분시의 증가량을
  #   CLASS_GAIN_PARAMETER[직업 ID] = [ 배분 개소 ]
  #  그렇다고 하는 서식에서 지정.
  #  그 외는 액터 고유의 설정과 같이.
  #  (우선도는  직업 > 액터 > 디폴트)

  # ◆ RP (Reinforce Point) 의 명칭
  VOCAB_RP   = "RP"
  # ◆ RP 의 명칭 (략)
  VOCAB_RP_A = "R"

  # ◆ MaxRP 계산식
  #   level .. 레벨
  #  결과가 소수가 되어도OK(자동으로 정수에 변환).
  MAXRP_EXP = "(level ** 0.25 + 2.0) * level"

  # ◆ 파라미터명
  #  ≪확장 장비 화면≫ (와)과 병용 했을 경우, 아래에 도입한 (분)편을 우선.
  VOCAB_PARAM = {
    :hit         => "명중율",        # 명중율
    :eva         => "회피율",        # 회피율
    :cri         => "위기",  # 위기율
    :skill_speed => "영창 속도",      # 스킬 속도 보정
    :item_speed  => "아이템 속도",  # 아이템 속도 보정
    :odds        => "표적이 되기 쉬움",  # 표적이 되기 쉬움
  }  # ← 이 } (은)는 지우지 않는 것!

  # ◆ 배분 회수가 무제한 때는 /--- (상한 표기) (을)를 숨긴다
  #  true  : 회수만 표시
  #  false : 회수/--- (와)과 표시
  HIDE_MAX_COUNT_INFINITE  = false

  # ◆ 배분 게이지의 개시색
  #  수치  : C[n] (와)과 같은 색.
  #  Color : 지정한 색. ( Color.new(255, 128, 128) 등 )
  GAUGE_START_COLOR = 28
  # ◆ 배분 게이지의 종료색
  GAUGE_END_COLOR   = 29

  # ◆ 배분 종료시의 확인 커멘드
  CONFIRM_COMMANDS = [
    "확정",  # 배분 확정
    "중지",  # 배분 중지
    "돌아온다",  # 배분을 계속한다
  ]  # ← 이 ] (은)는 지우지 않는 것!

  # ◆ 확인 커멘드의 헬프
  CONFIRM_COMMAND_HELP = [
    "배분 조작을 확정합니다.",        # 배분 확정
    "이번 배분 조작을 파기합니다.",  # 배분 중지
    "배분을 계속합니다.",              # 배분을 계속한다
  ]  # ← 이 ] (은)는 지우지 않는 것!

  # ◆ 배분 종료시의 확인 커멘드의 폭
  CONFIRM_WIDTH = 96

  # ◆ 메뉴 화면에 「파라미터 배분해」커멘드를 추가한다
  #  추가하는 장소는, 메뉴 커멘드의 최하부입니다.
  #  다른 부분에 추가하고 싶으면,≪커스텀 메뉴 커멘드≫ (을)를 이용하십시오.
  USE_MENU_DISTRIBUTE_PARAMETER_COMMAND = true
  # ◆ 메뉴 화면의 「파라미터 배분해」커멘드의 명칭
  VOCAB_MENU_DISTRIBUTE_PARAMETER       = "파라미터 배분"

  # ◆ 배분 해제를 허가
  #  true  : 배분 확정 후도 파라미터를 내려RP (을)를 되찾을 수 있다.
  #  false : 한 번 확정하면 내릴 수 없다.
  ENABLE_REVERSE_DISTRIBUTE = true
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

$imported = {} if $imported == nil
$imported["DistributeParameter"] = true


module KGC::DistributeParameter
  # 배분 대상 파라미터
  PARAMS = [:maxhp, :maxmp, :atk, :def, :spi, :agi, :hit, :eva, :cri,
    :skill_speed, :item_speed, :odds]

  # 파라미터 증가량 구조체
  GainInfo  = Struct.new(:key, :name, :limit, :cost, :cost_rev, :params)
  ParamInfo = Struct.new(:value, :value_rev)

  # 배분 정보 구조체
  DistInfo = Struct.new(:count, :hp, :mp)

  #--------------------------------------------------------------------------
  # ○ 파라미터 증가량을 구조체화
  #--------------------------------------------------------------------------
  def self.create_gain_param_structs(target)
    result = []
    target.each { |v|
      info = GainInfo.new
      info.key      = v[:key]
      info.name     = v[:name]
      info.limit    = v[:limit]
      info.cost     = v[:cost][0]
      info.cost_rev = (v[:cost][1] == nil ? 0 : v[:cost][1])
      info.params   = {}

      PARAMS.each { |param|
        next unless v.has_key?(param)
        pinfo = ParamInfo.new
        pinfo.value     = v[param][0]
        pinfo.value_rev = (v[param][1] == nil ? 0 : v[param][1])
        info.params[param] = pinfo
      }
      result << info
    }
    return result
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 증가량을 구조체화 (고유 증가량용)
  #--------------------------------------------------------------------------
  def self.create_gain_param_structs_for_personal(target)
    result = []
    target.each { |list|
      next if list == nil
      result << create_gain_param_structs(list)
    }
    return result
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 증가량을 병합
  #--------------------------------------------------------------------------
  def self.merge(list1, list2)
    result = list1.clone
    list2.each { |info2|
      overwrite = false
      list1.each_with_index { |info1, i|
        if info1.key == info2.key
          result[i] = info2
          overwrite = true
          break
        end
      }
      result << info2 unless overwrite
    }
    return result
  end

  # 파라미터 증가량을 구조체화
  GAIN_PARAMS = create_gain_param_structs(GAIN_PARAMETER)
  PERSONAL_GAIN_PARAMS =
    create_gain_param_structs_for_personal(PERSONAL_GAIN_PARAMETER)
  CLASS_GAIN_PARAMS =
    create_gain_param_structs_for_personal(CLASS_GAIN_PARAMETER)
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

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

module Vocab
  # 명중율
  def self.hit
    return KGC::DistributeParameter::VOCAB_PARAM[:hit]
  end

  # 회피율
  def self.eva
    return KGC::DistributeParameter::VOCAB_PARAM[:eva]
  end

  # 위기율
  def self.cri
    return KGC::DistributeParameter::VOCAB_PARAM[:cri]
  end

  # 스킬 속도 보정
  def self.skill_speed
    return KGC::DistributeParameter::VOCAB_PARAM[:skill_speed]
  end

  # 아이템 속도 보정
  def self.item_speed
    return KGC::DistributeParameter::VOCAB_PARAM[:item_speed]
  end

  # 표적이 되기 쉬움
  def self.odds
    return KGC::DistributeParameter::VOCAB_PARAM[:odds]
  end

  # RP
  def self.rp
    return KGC::DistributeParameter::VOCAB_RP
  end

  # RP (략)
  def self.rp_a
    return KGC::DistributeParameter::VOCAB_RP_A
  end

  # 파라미터 배분
  def self.distribute_parameter
    return KGC::DistributeParameter::VOCAB_MENU_DISTRIBUTE_PARAMETER
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ KGC::Commands
#==============================================================================

module KGC
module Commands
  module_function
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분해에 관한 값을 체크
  #--------------------------------------------------------------------------
  def check_distribution_values
    (1...$data_actors.size).each { |i|
      actor = $game_actors[i]
      actor.check_distribution_values
      actor.restore_distribution_values
    }
  end
  #--------------------------------------------------------------------------
  # ○ RP 의 증감
  #     actor_id : 액터 ID
  #     value    : 증감량
  #--------------------------------------------------------------------------
  def gain_rp(actor_id, value)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.gain_rp(value)
  end
  #--------------------------------------------------------------------------
  # ○ 배분 회수를 리셋트
  #     actor_id : 액터 ID
  #--------------------------------------------------------------------------
  def reset_distributed_count(actor_id)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.clear_distribution_values
    actor.restore_distribution_values
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분 화면의 호출
  #     actor_index : 액터 인덱스
  #--------------------------------------------------------------------------
  def call_distribute_parameter(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :distribute_parameter
    $game_temp.next_scene_actor_index = actor_index
  end
end
end

class Game_Interpreter
  include KGC::Commands
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Battler
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ● 능력치에 가산하는 값을 클리어
  #--------------------------------------------------------------------------
  alias clear_extra_values_KGC_DistributeParameter clear_extra_values
  def clear_extra_values
    clear_extra_values_KGC_DistributeParameter

    clear_distribution_values
    calc_distribution_values
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분해에 관한 값을 클리어
  #--------------------------------------------------------------------------
  def clear_distribution_values
    @distributed_count = {}
    KGC::DistributeParameter::PARAMS.each { |param|
      @distributed_count[param] = 0
    }
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분해에 관한 값을 체크
  #--------------------------------------------------------------------------
  def check_distribution_values
    last_distributed_count = @distributed_count

    clear_distribution_values

    @distributed_count = last_distributed_count if last_distributed_count != nil
  end
  #--------------------------------------------------------------------------
  # ○ 각종 수정치를 계산
  #--------------------------------------------------------------------------
  def calc_distribution_values
    # 계승처에서 정의
  end
  #--------------------------------------------------------------------------
  # ○ 배분에 의한 상승치를 취득
  #     param : 파라미터의 Symbol
  #--------------------------------------------------------------------------
  def distributed_param(param)
    return 0
  end
  #--------------------------------------------------------------------------
  # ○ 배분해에 관한 정보를 취득
  #--------------------------------------------------------------------------
  def distribution_info
    info = KGC::DistributeParameter::DistInfo.new
    info.count = @distributed_count.clone
    info.hp    = self.hp
    info.mp    = self.mp
    return info
  end
  #--------------------------------------------------------------------------
  # ○ 배분해에 관한 정보를 설정
  #--------------------------------------------------------------------------
  def set_distribution_info(info)
    return unless info.is_a?(KGC::DistributeParameter::DistInfo)

    @distributed_count = info.count
    calc_distribution_values
    self.hp = info.hp
    self.mp = info.mp
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_BattleAction
#==============================================================================

class Game_BattleAction
  #--------------------------------------------------------------------------
  # ● 행동 스피드의 결정
  #--------------------------------------------------------------------------
  alias make_speed_KGC_DistributeParameter make_speed
  def make_speed
    make_speed_KGC_DistributeParameter

    if skill?
      n = [battler.distributed_param(:skill_speed), skill.speed].min
      @speed -= n
    end
    if item?
      n = [battler.distributed_param(:item_speed), item.speed].min
      @speed -= n
    end
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

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

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ○ 클래스 변수
  #--------------------------------------------------------------------------
  @@__distribute_gain_params = {}
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #     actor_id : 액터 ID
  #--------------------------------------------------------------------------
  alias initialize_KGC_DistributeParameter initialize
  def initialize(actor_id)
    @actor_id = actor_id
    @class_id = $data_actors[actor_id].class_id

    initialize_KGC_DistributeParameter(actor_id)
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 증가량 일람을 취득
  #--------------------------------------------------------------------------
  def gain_parameter_list
    key = "#{self.id}_#{self.class_id}"
    unless @@__distribute_gain_params.has_key?(key)
      result = KGC::DistributeParameter::GAIN_PARAMS
      # 액터 고유
      list = KGC::DistributeParameter::PERSONAL_GAIN_PARAMS[self.id]
      result = KGC::DistributeParameter.merge(result, list) if list != nil
      # 직업 고유
      list = KGC::DistributeParameter::CLASS_GAIN_PARAMS[self.class_id]
      result = KGC::DistributeParameter.merge(result, list) if list != nil

      @@__distribute_gain_params[key] = result
    end

    return @@__distribute_gain_params[key]
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 증가량을 취득
  #     key : 배분 키
  #--------------------------------------------------------------------------
  def gain_parameter(key)
    return gain_parameter_list.find { |v| v.key == key }
  end
  #--------------------------------------------------------------------------
  # ○ 각종 수정치를 계산
  #--------------------------------------------------------------------------
  def calc_distribution_values
    @rp_cost = 0
    @distributed_param = {}
    KGC::DistributeParameter::PARAMS.each { |param|
      @distributed_param[param] = 0
    }

    gain_parameter_list.each { |gain|
      next if gain == nil
      cost = 0
      distributed_count(gain.key).times { |i|
        cost += Integer(gain.cost + gain.cost_rev * i)
        gain.params.each { |param, v|
          @distributed_param[param] += v.value + v.value_rev * i
        }
      }
      @rp_cost += [cost, 0].max
    }

    KGC::DistributeParameter::PARAMS.each { |param|
      @distributed_param[param] = Integer(@distributed_param[param])
    }
  end
  #--------------------------------------------------------------------------
  # ○ 각종 수정치를 수복
  #--------------------------------------------------------------------------
  def restore_distribution_values
    calc_distribution_values
    self.hp = self.hp
    self.mp = self.mp
  end
  #--------------------------------------------------------------------------
  # ○ 배분에 의한 상승치를 취득
  #     param : 파라미터의 Symbol
  #--------------------------------------------------------------------------
  def distributed_param(param)
    return 0 if @distributed_param == nil
    return 0 if @distributed_param[param] == nil
    return @distributed_param[param]
  end
  #--------------------------------------------------------------------------
  # ● 기본 MaxHP 의 취득
  #--------------------------------------------------------------------------
  alias base_maxhp_KGC_DistributeParameter base_maxhp
  def base_maxhp
    n = base_maxhp_KGC_DistributeParameter + distributed_param(:maxhp)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 MaxMP 의 취득
  #--------------------------------------------------------------------------
  alias base_maxmp_KGC_DistributeParameter base_maxmp
  def base_maxmp
    n = base_maxmp_KGC_DistributeParameter + distributed_param(:maxmp)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 공격력의 취득
  #--------------------------------------------------------------------------
  alias base_atk_KGC_DistributeParameter base_atk
  def base_atk
    n = base_atk_KGC_DistributeParameter + distributed_param(:atk)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 방어력의 취득
  #--------------------------------------------------------------------------
  alias base_def_KGC_DistributeParameter base_def
  def base_def
    n = base_def_KGC_DistributeParameter + distributed_param(:def)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 정신력의 취득
  #--------------------------------------------------------------------------
  alias base_spi_KGC_DistributeParameter base_spi
  def base_spi
    n = base_spi_KGC_DistributeParameter + distributed_param(:spi)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 기본 민첩성의 취득
  #--------------------------------------------------------------------------
  alias base_agi_KGC_DistributeParameter base_agi
  def base_agi
    n = base_agi_KGC_DistributeParameter + distributed_param(:agi)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 명중율의 취득
  #--------------------------------------------------------------------------
  alias hit_KGC_DistributeParameter hit
  def hit
    n = hit_KGC_DistributeParameter + distributed_param(:hit)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 회피율의 취득
  #--------------------------------------------------------------------------
  alias eva_KGC_DistributeParameter eva
  def eva
    n = eva_KGC_DistributeParameter + distributed_param(:eva)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 위기율의 취득
  #--------------------------------------------------------------------------
  alias cri_KGC_DistributeParameter cri
  def cri
    n = cri_KGC_DistributeParameter + distributed_param(:cri)
    return n
  end
  #--------------------------------------------------------------------------
  # ● 표적이 되기 쉬움의 취득
  #--------------------------------------------------------------------------
  alias odds_KGC_DistributeParameter odds
  def odds
    n = odds_KGC_DistributeParameter + distributed_param(:odds)
    return n
  end
  #--------------------------------------------------------------------------
  # ○ MaxRP 의 취득
  #--------------------------------------------------------------------------
  def maxrp
    n = Integer(eval(KGC::DistributeParameter::MAXRP_EXP))
    return [n + maxrp_plus, 0].max
  end
  #--------------------------------------------------------------------------
  # ○ MaxRP 보정치의 취득
  #--------------------------------------------------------------------------
  def maxrp_plus
    @maxrp_plus = 0 if @maxrp_plus == nil
    return @maxrp_plus
  end
  #--------------------------------------------------------------------------
  # ○ RP 의 취득
  #--------------------------------------------------------------------------
  def rp
    return [maxrp - @rp_cost, 0].max
  end
  #--------------------------------------------------------------------------
  # ○ 배분 회수의 취득
  #     param : 배분처 파라미터 (키)
  #--------------------------------------------------------------------------
  def distributed_count(param)
    clear_distribution_values     if @distributed_count == nil
    @distributed_count[param] = 0 if @distributed_count[param] == nil
    return @distributed_count[param]
  end
  #--------------------------------------------------------------------------
  # ○ RP 의 증감
  #     value : 증감량
  #--------------------------------------------------------------------------
  def gain_rp(value)
    @maxrp_plus = maxrp_plus + value
  end
  #--------------------------------------------------------------------------
  # ○ 배분 회수의 증감
  #     param : 배분처 파라미터 (키)
  #     value : 증감량
  #--------------------------------------------------------------------------
  def gain_distributed_count(param, value = 1)
    n = distributed_count(param)
    @distributed_count[param] += value if n.is_a?(Integer)
  end
  #--------------------------------------------------------------------------
  # ○ RP 배분에 의한 성장 효과 적용
  #     param   : 배분처 파라미터 (키)
  #     reverse : 역가산 때는 true
  #--------------------------------------------------------------------------
  def rp_growth_effect(param, reverse = false)
    gain = gain_parameter(param)
    return if gain == nil  # 무효인 파라미터

    if reverse
      return if distributed_count(param) == 0  # 역가산 불가
    else
      return unless can_distribute?(param)
    end

    gain_distributed_count(param, reverse ? -1 : 1)
    restore_distribution_values
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분 가부 판정
  #     param : 배분처 파라미터 (키)
  #--------------------------------------------------------------------------
  def can_distribute?(param)
    gain = gain_parameter(param)
    return false if gain == nil                        # 무효인 파라미터
    return false if self.rp < distribute_cost(param)   # RP 부족
    if gain.limit > 0
      return false if gain.limit <= distributed_count(param)  # 회수 상한
    end

    return true
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분 코스트 계산
  #     param : 배분처 파라미터 (키)
  #--------------------------------------------------------------------------
  def distribute_cost(param)
    gain = gain_parameter(param)
    return 0 if gain == nil  # 무효인 파라미터

    n = gain.cost
    count = distributed_count(param)
    count = [count, gain.limit - 1].min if gain.limit > 0
    n += gain.cost_rev * count
    return [Integer(n), 0].max
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분 후의 증가량 계산
  #     param : 배분처 파라미터 (키)
  #     amt   : 배분수
  #--------------------------------------------------------------------------
  def distribute_gain(param, amt = 1)
    gain = gain_parameter(param)
    # 무효인 파라미터
    return 0 if gain == nil
    # 배분 불가
    if amt > 0
      return 0 if gain.limit > 0 && gain.limit == distributed_count(param)
    else
      return 0 if distributed_count(param) + amt < 0
    end

    last_hp = self.hp
    last_mp = self.mp
    result  = {}
    KGC::DistributeParameter::PARAMS.each { |par|
      result[par] = distributed_param(par)
    }
    last_count = distributed_count(param)
    rp_growth_effect(param)
    KGC::DistributeParameter::PARAMS.each { |par|
      result[par] = distributed_param(par) if gain.params.include?(par)
    }
    rp_growth_effect(param, true) if last_count < distributed_count(param)
    self.hp = last_hp
    self.mp = last_mp
    return result
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_Base
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ○ RP 의 문자색을 취득
  #     actor : 액터
  #--------------------------------------------------------------------------
  def rp_color(actor)
    return (actor.rp == 0 ? knockout_color : normal_color)
  end
  #--------------------------------------------------------------------------
  # ○ 배분 게이지의 색 1 의 취득
  #--------------------------------------------------------------------------
  def distribute_gauge_color1
    color = KGC::DistributeParameter::GAUGE_START_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ○ 배분 게이지의 색 2 의 취득
  #--------------------------------------------------------------------------
  def distribute_gauge_color2
    color = KGC::DistributeParameter::GAUGE_END_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ○ RP 의 묘화
  #     actor : 액터
  #     x     : 묘화처 X 좌표
  #     y     : 묘화처 Y 좌표
  #     width : 폭
  #--------------------------------------------------------------------------
  def draw_actor_rp(actor, x, y, width = 120)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 40, WLH, Vocab::rp_a)
    self.contents.font.color = rp_color(actor)
    xr = x + width
    if width < 120
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.rp, 2)
    else
      self.contents.draw_text(xr - 90, y, 40, WLH, actor.rp, 2)
      self.contents.font.color = normal_color
      self.contents.draw_text(xr - 50, y, 10, WLH, "/", 2)
      self.contents.draw_text(xr - 40, y, 40, WLH, actor.maxrp, 2)
    end
    self.contents.font.color = normal_color
  end
  #--------------------------------------------------------------------------
  # ○ 배분 게이지의 묘화
  #     actor : 액터
  #     param : 파라미터
  #     x     : 묘화처 X 좌표
  #     y     : 묘화처 Y 좌표
  #     width : 폭
  #--------------------------------------------------------------------------
  def draw_actor_distribute_gauge(actor, param, x, y, width = 120)
    gain = actor.gain_parameter(param)
    return if gain == nil || gain.limit <= 0
    gw = width * actor.distributed_count(param) / gain.limit
    gc1 = distribute_gauge_color1
    gc2 = distribute_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Window_Command
#==============================================================================

class Window_Command < Window_Selectable
  unless method_defined?(:add_command)
  #--------------------------------------------------------------------------
  # ○ 커멘드를 추가
  #    추가한 위치를 돌려준다
  #--------------------------------------------------------------------------
  def add_command(command)
    @commands << command
    @item_max = @commands.size
    item_index = @item_max - 1
    refresh_command
    draw_item(item_index)
    return item_index
  end
  #--------------------------------------------------------------------------
  # ○ 커멘드를 리프레쉬
  #--------------------------------------------------------------------------
  def refresh_command
    buf = self.contents.clone
    self.height = [self.height, row_max * WLH + 32].max
    create_contents
    self.contents.blt(0, 0, buf, buf.rect)
    buf.dispose
  end
  #--------------------------------------------------------------------------
  # ○ 커멘드를 삽입
  #--------------------------------------------------------------------------
  def insert_command(index, command)
    @commands.insert(index, command)
    @item_max = @commands.size
    refresh_command
    refresh
  end
  #--------------------------------------------------------------------------
  # ○ 커멘드를 삭제
  #--------------------------------------------------------------------------
  def remove_command(command)
    @commands.delete(command)
    @item_max = @commands.size
    refresh
  end
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Window_DistributeParameterActor
#------------------------------------------------------------------------------
#   배분 화면에서, 액터의 정보를 표시하는 윈도우입니다.
#==============================================================================

class Window_DistributeParameterActor < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #     x     : 윈도우의 X 좌표
  #     y     : 윈도우의 Y 좌표
  #     actor : 액터
  #--------------------------------------------------------------------------
  def initialize(x, y, actor)
    super(x, y, Graphics.width, WLH + 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_level(@actor, 140, 0)
    draw_actor_rp(@actor, 240, 0)
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Window_DistributeParameterList
#------------------------------------------------------------------------------
#   배분 화면에서, 성장시키는 파라미터를 선택하는 윈도우입니다.
#==============================================================================

class Window_DistributeParameterList < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #     actor : 액터
  #--------------------------------------------------------------------------
  def initialize(actor)
    off_h = WLH + 32
    super(0, off_h, 286, Graphics.height - off_h)
    @actor = actor
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ○ 선택중의 파라미터의 Symbol (을)를 취득
  #--------------------------------------------------------------------------
  def parameter_key
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ● 1 페이지에 표시할 수 있는 행수의 취득
  #--------------------------------------------------------------------------
  def page_row_max
    return super - 1
  end
  #--------------------------------------------------------------------------
  # ● 항목을 묘화 하는 구형의 취득
  #     index : 항목 번호
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = super(index)
    rect.y += WLH
    return rect
  end
  #--------------------------------------------------------------------------
  # ● 커서를 1 페이지 뒤로 이동
  #--------------------------------------------------------------------------
  def cursor_pagedown
    return if Input.repeat?(Input::R)
    super
  end
  #--------------------------------------------------------------------------
  # ● 커서를 1 페이지전에 이동
  #--------------------------------------------------------------------------
  def cursor_pageup
    return if Input.repeat?(Input::L)
    super
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh
    @gain_list = @actor.gain_parameter_list
    @data = []
    @gain_list.each { |gain| @data << gain.key }
    @item_max = @data.size + 1
    create_contents
    @item_max -= 1
    draw_caption
    @item_max.times { |i| draw_item(i, @actor.can_distribute?(@data[i])) }
  end
  #--------------------------------------------------------------------------
  # ○ 표제의 묘화
  #--------------------------------------------------------------------------
  def draw_caption
    self.contents.font.color = system_color
    self.contents.draw_text(  4, 0, 96, WLH, "파라미터")
    self.contents.draw_text(120, 0, 40, WLH, Vocab.rp, 2)
    self.contents.draw_text(170, 0, 80, WLH, "회수", 2)
    self.contents.font.color = normal_color
  end
  #--------------------------------------------------------------------------
  # ○ 항목의 묘화
  #     index   : 항목 번호
  #     enabled : 유효 플래그
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    item = @data[index]
    if item != nil
      draw_parameter(rect.x, rect.y, @data[index], enabled)
    end
  end
  #--------------------------------------------------------------------------
  # ○ 능력치의 묘화
  #     x       : 묘화처 X 좌표
  #     y       : 묘화처 Y 좌표
  #     param   : 배분처
  #     enabled : 유효 플래그
  #--------------------------------------------------------------------------
  def draw_parameter(x, y, param, enabled)
    gain = @gain_list.find { |v| v.key == param }
    return if gain == nil

    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(x + 4, y, 96, WLH, gain.name)

    value = @actor.distribute_cost(param)
    self.contents.draw_text(x + 120, y, 40, WLH, value, 2)
    if gain.limit > 0
      value = sprintf("%3d/%3d", @actor.distributed_count(param), gain.limit)
    else
      value = sprintf("%3d%s", @actor.distributed_count(param),
        KGC::DistributeParameter::HIDE_MAX_COUNT_INFINITE ? "" : "/---")
    end
    draw_actor_distribute_gauge(@actor, param, x + 170, y, 80)
    self.contents.draw_text(x + 170, y, 80, WLH, value, 2)
    self.contents.font.color = normal_color
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Window_DistributeParameterStatus
#------------------------------------------------------------------------------
#   배분 화면에서, 액터의 스테이터스를 표시하는 윈도우입니다.
#==============================================================================

class Window_DistributeParameterStatus < Window_Base
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #     actor : 액터
  #--------------------------------------------------------------------------
  def initialize(actor)
    dx = 286
    off_h = WLH + 32
    super(dx, off_h, Graphics.width - dx, Graphics.height - off_h)
    @actor = actor
    refresh(actor.gain_parameter_list[0].key)
  end
  #--------------------------------------------------------------------------
  # ● 리프레쉬
  #--------------------------------------------------------------------------
  def refresh(param = nil)
    @parameter_key = param

    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, width - 32, WLH, "파라미터 변화", 1)
    self.contents.font.color = normal_color
    dy = WLH
    KGC::DistributeParameter::PARAMS.each { |param|
      draw_parameter(0, dy, param)
      dy += WLH
    }
  end
  #--------------------------------------------------------------------------
  # ○ 능력치의 묘화
  #     x    : 묘화처 X 좌표
  #     y    : 묘화처 Y 좌표
  #     type : 능력치의 종류
  #--------------------------------------------------------------------------
  def draw_parameter(x, y, type)
    case type
    when :maxhp
      name  = Vocab.hp
      value = @actor.maxhp
    when :maxmp
      name  = Vocab.mp
      value = @actor.maxmp
    when :atk
      name  = Vocab.atk
      value = @actor.atk
    when :def
      name  = Vocab.def
      value = @actor.def
    when :spi
      name  = Vocab.spi
      value = @actor.spi
    when :agi
      name  = Vocab.agi
      value = @actor.agi
    when :hit
      name  = Vocab.hit
      value = @actor.hit
    when :eva
      name  = Vocab.eva
      value = @actor.eva
    when :cri
      name  = Vocab.cri
      value = @actor.cri
    when :skill_speed
      name  = Vocab.skill_speed
      value = @actor.distributed_param(type)
    when :item_speed
      name  = Vocab.item_speed
      value = @actor.distributed_param(type)
    when :odds
      name  = Vocab.odds
      value = @actor.odds
    else
      return
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x + 4, y, 96, WLH, name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 106, y, 48, WLH, value, 2)
   
    return if @parameter_key == nil

    self.contents.draw_text(x + 154, y, 16, WLH, "→", 1)

    last = @actor.distributed_param(type)
    gain = @actor.distribute_gain(@parameter_key)[type]
    self.contents.font.color = (gain > last ? text_color(3) :
      gain < last ? text_color(2) : normal_color)
    self.contents.draw_text(x + 174, y, 48, WLH, value + (gain - last), 2)

    self.contents.font.color = normal_color
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Map
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # ● 화면 변환의 실행
  #--------------------------------------------------------------------------
  alias update_scene_change_KGC_DistributeParameter update_scene_change
  def update_scene_change
    return if $game_player.moving?    # 플레이어의 이동중?

    if $game_temp.next_scene == :distribute_parameter
      call_distribute_parameter
      return
    end

    update_scene_change_KGC_DistributeParameter
  end
  #--------------------------------------------------------------------------
  # ○ 파라미터 배분 화면에의 변환
  #--------------------------------------------------------------------------
  def call_distribute_parameter
    $game_temp.next_scene = nil
    $scene = Scene_DistributeParameter.new(
      $game_temp.next_scene_actor_index,
      0,
      Scene_DistributeParameter::HOST_MAP)
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Scene_Menu
#==============================================================================

class Scene_Menu < Scene_Base
  if KGC::DistributeParameter::USE_MENU_DISTRIBUTE_PARAMETER_COMMAND
  #--------------------------------------------------------------------------
  # ● 커멘드 윈도우의 작성
  #--------------------------------------------------------------------------
  alias create_command_window_KGC_DistributeParameter create_command_window
  def create_command_window
    create_command_window_KGC_DistributeParameter

    return if $imported["CustomMenuCommand"]

    @__command_distribute_parameter_index =
      @command_window.add_command(Vocab.distribute_parameter)
    if @command_window.oy > 0
      @command_window.oy -= Window_Base::WLH
    end
    @command_window.index = @menu_index
  end
  end
  #--------------------------------------------------------------------------
  # ● 커멘드 선택의 갱신
  #--------------------------------------------------------------------------
  alias update_command_selection_KGC_DistributeParameter update_command_selection
  def update_command_selection
    call_distribute_parameter_flag = false
    if Input.trigger?(Input::C)
      case @command_window.index
      when @__command_distribute_parameter_index  # 파라미터 배분
        call_distribute_parameter_flag = true
      end
    end

    # 파라미터 배분 화면에 이행
    if call_distribute_parameter_flag
      if $game_party.members.size == 0
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      start_actor_selection
      return
    end

    update_command_selection_KGC_DistributeParameter
  end
  #--------------------------------------------------------------------------
  # ● 액터 선택의 갱신
  #--------------------------------------------------------------------------
  alias update_actor_selection_KGC_DistributeParameter update_actor_selection
  def update_actor_selection
    if Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when @__command_distribute_parameter_index  # 파라미터 배분
        $scene = Scene_DistributeParameter.new(
          @status_window.index,
          @__command_distribute_parameter_index,
          Scene_DistributeParameter::HOST_MENU)
        return
      end
    end

    update_actor_selection_KGC_DistributeParameter
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# □ Scene_DistributeParameter
#------------------------------------------------------------------------------
#   파라미터 배분 화면의 처리를 실시하는 클래스입니다.
#==============================================================================

class Scene_DistributeParameter < Scene_Base
  #--------------------------------------------------------------------------
  # ○ 정수
  #--------------------------------------------------------------------------
  HOST_MENU   = 0  # 호출원 : 메뉴
  HOST_MAP    = 1  # 호출원 : 맵
  #--------------------------------------------------------------------------
  # ● 오브젝트 초기화
  #     actor_index : 액터 인덱스
  #     menu_index  : 커멘드의 커서 초기 위치
  #     host_scene  : 호출원 (0..메뉴  1..맵)
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, menu_index = 0, host_scene = HOST_MENU)
    @actor_index = actor_index
    @menu_index  = menu_index
    @host_scene  = host_scene
  end
  #--------------------------------------------------------------------------
  # ● 개시 처리
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background

    @actor     = $game_party.members[@actor_index]
    @prev_info = @actor.distribution_info
    create_windows
  end
  #--------------------------------------------------------------------------
  # ○ 윈도우 작성
  #--------------------------------------------------------------------------
  def create_windows
    @actor_window     = Window_DistributeParameterActor.new(0, 0, @actor)
    @parameter_window = Window_DistributeParameterList.new(@actor)
    @status_window    = Window_DistributeParameterStatus.new(@actor)

    @confirm_help_window   = Window_Help.new
    @confirm_help_window.z = @status_window.z + 100
    @confirm_help_window.openness = 0

    @confirm_window = Window_Command.new(
      KGC::DistributeParameter::CONFIRM_WIDTH,
      KGC::DistributeParameter::CONFIRM_COMMANDS)
    @confirm_window.x = (Graphics.width  - @confirm_window.width)  / 2
    @confirm_window.y = (Graphics.height - @confirm_window.height) / 2
    @confirm_window.z = @confirm_help_window.z
    @confirm_window.active   = false
    @confirm_window.openness = 0
  end
  #--------------------------------------------------------------------------
  # ● 종료 처리
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @actor_window.dispose
    @parameter_window.dispose
    @status_window.dispose
    @confirm_help_window.dispose
    @confirm_window.dispose
  end
  #--------------------------------------------------------------------------
  # ○ 원래의 화면에 돌아온다
  #--------------------------------------------------------------------------
  def return_scene
    case @host_scene
    when HOST_MENU
      $scene = Scene_Menu.new(@menu_index)
    when HOST_MAP
      $scene = Scene_Map.new
    end
  end
  #--------------------------------------------------------------------------
  # ● 프레임 갱신
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    update_window
    if @parameter_window.active
      update_parameter_list
    elsif @confirm_window.active
      update_confirm_command
    end
  end
  #--------------------------------------------------------------------------
  # ○ 윈도우 갱신
  #--------------------------------------------------------------------------
  def update_window
    @actor_window.update
    @parameter_window.update
    @status_window.update
    @confirm_help_window.update
    @confirm_window.update
  end
  #--------------------------------------------------------------------------
  # ○ 윈도우재묘화
  #--------------------------------------------------------------------------
  def refresh_window
    @actor_window.refresh
    @parameter_window.refresh
    @status_window.refresh(@parameter_window.parameter_key)
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # ○ 다음의 액터의 화면으로 전환해
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_DistributeParameter.new(@actor_index,
      @menu_index, @host_scene)
  end
  #--------------------------------------------------------------------------
  # ○ 전의 액터의 화면으로 전환해
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_DistributeParameter.new(@actor_index,
      @menu_index, @host_scene)
  end
  #--------------------------------------------------------------------------
  # ○ 프레임 갱신 (파라미터 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_parameter_list
    if @last_index != @parameter_window.index
      @status_window.refresh(@parameter_window.parameter_key)
      @last_index = @parameter_window.index
    end

    if Input.trigger?(Input::B)
      Sound.play_cancel
      activate_confirm_window
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      activate_confirm_window
    elsif Input.repeat?(Input::RIGHT)
      # 가산
      param = @parameter_window.parameter_key
      unless @actor.can_distribute?(param)
        Sound.play_buzzer
        return
      end
      Sound.play_cursor
      @actor.rp_growth_effect(param)
      refresh_window
    elsif Input.repeat?(Input::LEFT)
      # 감산
      param = @parameter_window.parameter_key
      unless reversible?(param)
        Sound.play_buzzer
        return
      end
      Sound.play_cursor
      @actor.rp_growth_effect(param, true)
      refresh_window
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
  end
  #--------------------------------------------------------------------------
  # ○ 감산 가부 판정
  #     param : 대상 파라미터
  #--------------------------------------------------------------------------
  def reversible?(param)
    return false if @actor.distributed_count(param) == 0
    return true  if KGC::DistributeParameter::ENABLE_REVERSE_DISTRIBUTE

    base = @prev_info.count[param]
    return ( base < @actor.distributed_count(param) )
  end
  #--------------------------------------------------------------------------
  # ○ 확인 윈도우로 전환해
  #--------------------------------------------------------------------------
  def activate_confirm_window
    @last_index = -1
    @status_window.refresh
    @confirm_window.index  = 0
    @confirm_window.active = true
    @confirm_window.open
    @confirm_help_window.open
    @parameter_window.active = false
    @last_confirm_index = -1
  end
  #--------------------------------------------------------------------------
  # ○ 프레임 갱신 (확인 윈도우가 액티브의 경우)
  #--------------------------------------------------------------------------
  def update_confirm_command
    if @last_confirm_index != @confirm_window.index
      @confirm_help_window.set_text(
        KGC::DistributeParameter::CONFIRM_COMMAND_HELP[@confirm_window.index])
      @last_confirm_index = @confirm_window.index
    end

    if Input.trigger?(Input::B)
      Sound.play_cancel
      # 파라미터 윈도우로 전환해
      @confirm_window.active = false
      @confirm_window.close
      @confirm_help_window.close
      @parameter_window.active = true
    elsif Input.trigger?(Input::C)
      Sound.play_decision
      case @confirm_window.index
      when 0  # 확정
        return_scene
      when 1  # 중지
        @actor.set_distribution_info(@prev_info)
        return_scene
      when 2  # 캔슬
        # 파라미터 윈도우로 전환해
        @confirm_window.active = false
        @confirm_window.close
        @confirm_help_window.close
        @parameter_window.active = true
      end
    end
  end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

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

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # ● 세이브 데이터의 읽기
  #     file : 읽기용 파일 오브젝트 (오픈이 끝난 상태)
  #--------------------------------------------------------------------------
  alias read_save_data_KGC_DistributeParameter read_save_data
  def read_save_data(file)
    read_save_data_KGC_DistributeParameter(file)

    KGC::Commands.check_distribution_values
    Graphics.frame_reset
  end
end

Who's 카르와푸딩의아틀리에

profile

엘카르디아 제작자 (현재 MV로 리메이크중)

유튜브

https://www.youtube.com/channel/UCMwirNTR-pOEzJNB0jL3y_g

트위터

https://twitter.com/karsis98

블로그

https://blog.naver.com/karsis98

Comment '20'
  • ?
    칼리아 2009.07.21 19:08
    잘써요.^^
  • ?
    은빛바람 2009.09.08 20:01

    스텟배분 확정누르면 아무것도 안되는데...

    어떻하죠?

  • ?
    리프네버 2009.12.27 14:39

    스텟포인트? 그거 주는 량을 어떻게 바꾸는지 모르겠네요..

  • ?
    Berylll 2009.12.28 12:24

    아;; 혹시나 싶었더니.. 몬스터 도감있으니까 눌러도 반응을 안했던거군...

    잘쓰겟습니다 ~~ ㅎㅎ

  • ?
    Berylll 2009.12.28 12:41

    ㄱ-;;; 스텟 찍어도 파라미터 안올라가는 이유가 뭐지...

  • ?
    fwnekf 2009.12.28 18:08

    파라미터?,,, 머징?? 잘모르겠음,, ㅜㅜ

  • ?
    1000℃ 복숭아 2009.12.29 20:41

    안돼요;

  • profile
    비극ㆍ 2010.01.10 18:20

    감사합니다! 잘대요 ㅎ

  • profile
    새장속새 2010.01.12 16:19

    감사합니다~

  • ?
    카미 2010.01.21 05:00

    스텟을 올리고 확정후에 다시 들어가면 또 스텟을 내릴수가 있네;; 뭐징;

  • ?
    낙서 2010.01.30 18:40

     

  • ?
    크런키맛아듀크림 2010.02.06 23:26

    감사감사

  • ?
    베벤 2010.02.16 20:57

    감사합니다 ㅎ

  • ?
    서울냥이 2010.03.14 14:54

    잘쓰겟습니다.

  • ?
    봉시기 2010.07.30 03:49

    잘쓸께여~

  • ?
    아힝흥엥 2010.12.10 19:34

    게임을 하잖아요?
    그러면 파라미터가 눌러지는데..

    화면이 안바뀌고 파라미터 창이 안뜨네요..

    버그 수정좀..

  • ?
    mymy 2011.01.20 20:46

    33~105줄까지 파라미터를 배분할때 올려주는 능력치의 이름, 증가량,얼마를 소비, 얼마가  최대치 등을 설정할 수 있고요

    162줄은 무한 배분이 가능 할 경우 올린 횟수만 표시, 혹은 "올린 횟수/--"로 표시

    167,169줄은 파라미터 배분 창 색 바꾸는 것 같은데 전 패스ㅋ

    173~175줄은 파라미터 배분 창에서 나갈 때 뜨는 알림창 수정

    180~182줄은 파라미터 배분 창에서 나갈 때 알림창 누르면 나오는 말 수정(이건 저도 좀 헷갈림;;)

    186줄은 파라미터 배분 창에서 나갈 때 뜨는 알림창 폭 조절

    193줄은 "파라미터 배분"을 바꿀 수 있음 ex)스탯포인트 배분

    198줄은 배분 확정하고 다시 들어가도 파라미터를 다시 배분하게 할수 있게 하는것

    까지만 알려드리겠습니다.

    어쨋든 잘써요ㅎㅎ 유즈미짱님 홧팅ㅋ

  • ?
    듀란테 2015.07.25 15:29
    이거 메뉴창에서 종료밑에있어서 거슬리는대, 위로 못올리나요?
  • ?
    듀란테 2015.07.25 15:34
    그리고, 스텟 제한치를 레벨에 비례하여 하는방법은 없나요?
    level * 3 까지 찍을수 있다던지 그런식으로요.
  • ?
    듀란테 2015.08.03 11:27
    이거 오류가 하나 있는듯한대,
    액터별 직업별 파라미터 설정을 해놔도
    무조건 기본것으로 설정되는대요.

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
357 온라인 net VX[ RPGVX 온라인 스크립트 ] 19 file 제로스S2 2009.08.03 6389
356 기타 경험치, HP, MP 백분율계산 (실시간) 8 file 허걱 2009.08.01 3540
355 장비 Rei(레이)의 Paperdoll(비쥬얼 장비)스크립트 20 file 루시페르 2009.07.29 4467
354 기타 vx 보안 시스템 19 file 허걱 2009.07.29 3966
» 기타 KGC파라미터배분 2 (VX전용) 20 file 카르와푸딩의아틀리에 2009.07.21 3268
352 기타 커맨드 시스템 7 file 허걱 2009.07.21 2856
351 변수/스위치 다른 이벤트 셀프스위치 조작 - xp, vx 사용가능 3 허걱 2009.07.18 2387
350 이동 및 탈것 화면의 부드러운 스크롤 스크립트 32 카르와푸딩의아틀리에 2009.07.17 3817
349 이름입력 글자조합 (이름생성용) - 수정 12 file 허걱 2009.07.17 3636
348 이동 및 탈것 스위치 on일때 못 움직이게...(이동고정) 6 허걱 2009.07.14 2322
347 기타 이벤트 뿌리기 + 범위지정 8 file 허걱 2009.07.13 2698
346 메시지 메시지 오른쪽 정렬되어 나오는 스크립트 3 file 아방스 2009.07.12 3237
345 기타 로딩중 스크립트 24 file NO.0 2009.07.11 4461
344 스킬 무기성장 랭크 시스템. 20 file 카르와푸딩의아틀리에 2009.07.08 4820
343 기타 [요청자료] 유즈미짱 님께서 요청한 그림표시 입니다. 5 file 허걱 2009.07.08 2976
342 메뉴 전투결과 상세 표시 스크립트 24 file 카르와푸딩의아틀리에 2009.07.07 4143
341 타이틀/게임오버 까만화면으로 시작하기 27 file 허걱 2009.07.04 4528
340 맵/타일 레이 월드맵 스크립트 14 file 카르와푸딩의아틀리에 2009.07.04 4813
339 HUD X 와 Y 좌표 표시 해주는 스크립트 9 아방스 2009.07.03 2760
338 기타 『주석을 활용한 이벤트 커맨드 확장』스크립트 1 rukan 2009.07.02 1600
Board Pagination Prev 1 ... 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 ... 32 Next
/ 32