#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆入手経験値&金増加 - KGC_ExpGoldIncrease◆
#_/----------------------------------------------------------------------------
#_/ 戦闘後に獲得する経験値・金を増加する機能を追加します。
#_/ Provides the function which increases gain EXP and Gold of battle result.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ★ カスタマイズ項目 - Customize ★
#==============================================================================
module KGC
# ◆増加ステートの重複を許可
### Permits repetition of gain states.
EXPGLD_INC_PERMIT_DOUBLE = true
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
$imported = {} if $imported == nil
$imported["ExpGoldIncrease"] = true
if $game_special_states == nil
$game_special_states = {}
$data_states = load_data("Data/States.rxdata")
end
# 経験値○%ステート
### <e.g.> GainEXP150%
$game_special_states["inc_exp"] = /(?:(?:경험치)|(?:GainEXP))(d+)(%|%)/
# 入手金○%ステート
### <e.g.> GainGold150%
$game_special_states["inc_gold"] = /(?:(?:입수금)|(?:GainGold))(d+)(%|%)/
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● EXP の変更
# exp : 新しい EXP
#--------------------------------------------------------------------------
def exp=(exp)
rate = calc_exp_increase_rate(KGC::EXPGLD_INC_PERMIT_DOUBLE)
exp = @exp + (exp - @exp) * rate / 100
@exp = [[exp, $imported["LimitBreak"] ?
KGC::LB_ACTOR_EXP_LIMIT : 9999999].min, 0].max
# レベルアップ
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# スキル習得
for j in $data_classes[@class_id].learnings
learn_skill(j.skill_id) if j.level == @level
end
end
# レベルダウン
while @exp < @exp_list[@level]
@level -= 1
end
# 現在の HP と SP が最大値を超えていたら修正
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● 経験値増加率計算
# permit_double : 重複許可
#--------------------------------------------------------------------------
def calc_exp_increase_rate(permit_double)
rate = 100
max_rate = -1
# ステート[経験値○%]判定
self.states.each { |state|
if $data_states[state].name =~ $game_special_states["inc_exp"]
if permit_double
rate = rate * $1.to_i / 100
else
max_rate = [$1.to_i, max_rate].max
end
end
}
unless permit_double
rate = [max_rate, 0].max
end
return rate
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● ゴールドの取得
#--------------------------------------------------------------------------
alias gold_KGC_ExpGoldIncrease gold
def gold
n = gold_KGC_ExpGoldIncrease
rate = calc_gold_increase_rate(KGC::EXPGLD_INC_PERMIT_DOUBLE)
return n * rate / 100
end
#--------------------------------------------------------------------------
# ● ゴールド増加率計算
# permit_double : 重複許可
#--------------------------------------------------------------------------
def calc_gold_increase_rate(permit_double)
rate = 100
max_rate = -1
$game_party.actors.each { |actor|
if actor.exist?
# ステート[入手金○%]判定
actor.states.each { |state|
if $data_states[state].name =~ $game_special_states["inc_gold"]
if permit_double
rate = rate * $1.to_i / 100
else
max_rate = [$1.to_i, max_rate].max
end
end
}
end
}
unless permit_double
rate = [max_rate, 0].max
end
return rate
end
end
#-----------끝
귀찮아서 한글번역은 안했음;;;;;; (퍽)
사용법
스크립트 도입 후, 데이타베이스로 설정을 실시합니다.
우선, 스테이트에 「경험치○%」 「입수금○%」를 만듭니다.( ○은 임의의 자연수)
다음에[ 레이팅] (을)를0 ,[ 저항하지 않는다][ 배틀 종료시에 해제] (을)를 체크.
예를 들면 「경험치 2배」를 만들고 싶은 경우, 스테이트명을 「경험치200 %」로 하면OK 입니다.
출처는 KGC
#_/ ◆入手経験値&金増加 - KGC_ExpGoldIncrease◆
#_/----------------------------------------------------------------------------
#_/ 戦闘後に獲得する経験値・金を増加する機能を追加します。
#_/ Provides the function which increases gain EXP and Gold of battle result.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ★ カスタマイズ項目 - Customize ★
#==============================================================================
module KGC
# ◆増加ステートの重複を許可
### Permits repetition of gain states.
EXPGLD_INC_PERMIT_DOUBLE = true
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
$imported = {} if $imported == nil
$imported["ExpGoldIncrease"] = true
if $game_special_states == nil
$game_special_states = {}
$data_states = load_data("Data/States.rxdata")
end
# 経験値○%ステート
### <e.g.> GainEXP150%
$game_special_states["inc_exp"] = /(?:(?:경험치)|(?:GainEXP))(d+)(%|%)/
# 入手金○%ステート
### <e.g.> GainGold150%
$game_special_states["inc_gold"] = /(?:(?:입수금)|(?:GainGold))(d+)(%|%)/
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● EXP の変更
# exp : 新しい EXP
#--------------------------------------------------------------------------
def exp=(exp)
rate = calc_exp_increase_rate(KGC::EXPGLD_INC_PERMIT_DOUBLE)
exp = @exp + (exp - @exp) * rate / 100
@exp = [[exp, $imported["LimitBreak"] ?
KGC::LB_ACTOR_EXP_LIMIT : 9999999].min, 0].max
# レベルアップ
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# スキル習得
for j in $data_classes[@class_id].learnings
learn_skill(j.skill_id) if j.level == @level
end
end
# レベルダウン
while @exp < @exp_list[@level]
@level -= 1
end
# 現在の HP と SP が最大値を超えていたら修正
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● 経験値増加率計算
# permit_double : 重複許可
#--------------------------------------------------------------------------
def calc_exp_increase_rate(permit_double)
rate = 100
max_rate = -1
# ステート[経験値○%]判定
self.states.each { |state|
if $data_states[state].name =~ $game_special_states["inc_exp"]
if permit_double
rate = rate * $1.to_i / 100
else
max_rate = [$1.to_i, max_rate].max
end
end
}
unless permit_double
rate = [max_rate, 0].max
end
return rate
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● ゴールドの取得
#--------------------------------------------------------------------------
alias gold_KGC_ExpGoldIncrease gold
def gold
n = gold_KGC_ExpGoldIncrease
rate = calc_gold_increase_rate(KGC::EXPGLD_INC_PERMIT_DOUBLE)
return n * rate / 100
end
#--------------------------------------------------------------------------
# ● ゴールド増加率計算
# permit_double : 重複許可
#--------------------------------------------------------------------------
def calc_gold_increase_rate(permit_double)
rate = 100
max_rate = -1
$game_party.actors.each { |actor|
if actor.exist?
# ステート[入手金○%]判定
actor.states.each { |state|
if $data_states[state].name =~ $game_special_states["inc_gold"]
if permit_double
rate = rate * $1.to_i / 100
else
max_rate = [$1.to_i, max_rate].max
end
end
}
end
}
unless permit_double
rate = [max_rate, 0].max
end
return rate
end
end
#-----------끝
귀찮아서 한글번역은 안했음;;;;;; (퍽)
사용법
스크립트 도입 후, 데이타베이스로 설정을 실시합니다.
우선, 스테이트에 「경험치○%」 「입수금○%」를 만듭니다.( ○은 임의의 자연수)
다음에[ 레이팅] (을)를0 ,[ 저항하지 않는다][ 배틀 종료시에 해제] (을)를 체크.
예를 들면 「경험치 2배」를 만들고 싶은 경우, 스테이트명을 「경험치200 %」로 하면OK 입니다.
출처는 KGC