Professional Documents
Culture Documents
==================
# Script: Instance Equip Leveling by Exp Ver. 1.03
# Author: Selchar
# Credit: Tsukihime
# Required: Tsukihime's Item Instance
# Required: Selchar's Weapon Leveling Base
#=============================================================
==================
=begin
This script, when paired with the Weapon Leveing Base, allows select equipment to
gain exp and level up after battle.
#------------------------------------------------------------------------------# Weapon/Armor Notetag
#------------------------------------------------------------------------------<exp curve: x>
<exp curve>
x
</exp curve>
Where x in either notetag is a formula that'll be used to determine an equip's
exp curve.
=end
module TH_Instance
module Equip
#Set this to what you want the default exp curve to be.
#Default_Exp_Curve = '(level+1)*1 + level'
#Regex
Exp_Curve_Regex = /<exp[-_ ]?curve:\s*(.*)\s*>/i
Ext_Exp_Curve_Regex = /<exp[-_ ]?curve>(.*)<\/exp[-_ ]?curve>/im
end
end
#=============================================================
==================
# Rest of the Script
#=============================================================
==================
$imported = {} if $imported.nil?
$imported[:Sel_Equip_Exp_Leveling] = true
unless $imported["TH_InstanceItems"]
msgbox("Tsukihime's Instance Items not detected,
exiting")
exit
end
unless $imported[:Sel_Equip_Leveling_Base]
msgbox("Selchar's Equip Leveling Base not detected,
Exiting")
exit
end
$game_message.add(message)
end
end
#=============================================================
==================
# Instance Manager: setup_instance
#=============================================================
==================
module InstanceManager
class << self
alias :instance_equip_exp_level_setup :setup_equip_instance
end
def self.setup_equip_instance(obj)
obj.exp = 0 if obj.can_level
instance_equip_exp_level_setup(obj)
end
end
#=============================================================
==================
# End of File
#=============================================================
==================