I am running blizzards Tons-of-addons for RMXP
and when i activate the passive skills one I keep getting this error after a battle
on this addon (line 3513)
and when i activate the passive skills one I keep getting this error after a battle
on this addon (line 3513)
Code:
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Passive Skills Database
#
# Use following template to configure your database below:
#
# when ID then return [HP, SP, STR, DEX, AGI, INT, ATK, PD, MD, EVA, G, EXP]
#
# ID - ID of the skill
# HP - change of max HP (added)
# SP - change of max SP (added)
# STR - change of STR (added)
# DEX - change of DEX (added)
# AGI - change of AGI (added)
# INT - change of INT (added)
# ATK - change of ATK (added)
# PD - change of PDEF (added)
# MD - change of MDEF (added)
# EVA - change of EVA (added)
# G - change of gold (multiplied)
# EXP - change of EXP (multiplied)
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
when 3 then return [0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 1.0, 1.0]
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Passive Skills
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end
return [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0, 1.0]
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor
alias base_maxhp_passkl_later base_maxhp
def base_maxhp
result = base_maxhp_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[0]}
end
return result
end
alias base_maxsp_passkl_later base_maxsp
def base_maxsp
result = base_maxsp_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[1]}
end
return result
end
alias base_str_passkl_later base_str
def base_str
result = base_str_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[2]}
end
return result
end
alias base_dex_passkl_later base_dex
def base_dex
result = base_dex_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[3]}
end
return result
end
alias base_agi_passkl_later base_agi
def base_agi
result = base_agi_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[4]}
end
return result
end
alias base_int_passkl_later base_int
def base_int
result = base_int_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[5]}
end
return result
end
alias base_atk_passkl_later base_atk
def base_atk
result = base_atk_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[6]}
end
return result
end
alias base_pdef_passkl_later base_pdef
def base_pdef
result = base_pdef_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[7]}
end
return result
end
alias base_mdef_passkl_later base_mdef
def base_mdef
result = base_mdef_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[8]}
end
return result
end
alias base_eva_passkl_later base_eva
def base_eva
result = base_eva_passkl_later
if $game_system.PASSIVE_SKILLS &&
(!BlizzCFG::BATTLE_ONLY || $game_temp.in_battle)
@skills.each {|id| result += BlizzCFG.passkl_database(id)[9]}
end
return result
end
def gold_rate
return 1 if BlizzCFG::BATTLE_ONLY && !$game_temp.in_battle
result = 1.0
@skills.each {|id| result *= BlizzCFG.passkl_database(id)[10]}
return result
end
def exp_rate
return 1 if BlizzCFG::BATTLE_ONLY && !$game_temp.in_battle
result = 1.0
@skills.each {|id| result *= BlizzCFG.passkl_database(id)[11]}
return result
end
end
#==============================================================================
# Window_BattleResult
#==============================================================================
class Window_BattleResult
attr_accessor :gold
attr_accessor :exp
end
#==============================================================================
# Window_BattleStatus
#==============================================================================
class Window_BattleStatus
attr_accessor :level_up_flags
end
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle
alias start_phase5_passkl_later start_phase5
def start_phase5
unless $game_system.PASSIVE_SKILLS
start_phase5_passkl_later
return
end
old_gold, old_exp, old_levels = $game_party.gold, [], []
$game_party.actors.each {|actor|
old_exp.push(actor.exp)
old_level.push(actor.level)}
start_phase5_passkl_later
new_gold = $game_party.gold - old_gold
$game_party.lose_gold(new_gold)
gold_rate = 100
$game_party.actors.each {|actor| gold_rate *= actor.gold_rate}
@result_window.gold = (new_gold * gold_rate / 100).to_i
$game_party.gain_gold(@result_window.gold)
new_exp = 0
$game_party.actors.each_index {|i|
if $game_party.actors[i].exp - old_exp[i] > 0
new_exp = $game_party.actors[i].exp - old_exp[i]
end
$game_party.actors[i].exp = old_exp[i]}
exp_rate = 100
$game_party.actors.each {|actor| exp_rate *= actor.exp_rate}
@result_window.exp = (new_exp * exp_rate / 100).to_i
@result_window.refresh
$game_party.actors.each_index {|i|
@status_window.level_up_flags[i] = false
unless $game_party.actors[i].cant_get_exp?
$game_party.actors[i].exp += @result_window.exp
@status_window.level_up(i) if $game_party.actors[i].level > old_level[i]
end}
end
end