Code:
#==============================================================================
# Monster's Adaption Script v. 1.09
# by Caldaron (11.09.2006)
# thanks to Trickster for braining me :D
#==============================================================================
module Adaption
#==============================================================================
#--------------------------------------------------------------------------
# the higher the [...]_mod, the less the exp is given for it
MAXHP_MOD = 100.00
MAXSP_MOD = 100.00
STR_MOD = 20.00
DEX_MOD = 20.00
AGI_MOD = 20.00
INT_MOD = 20.00
ATK_MOD = 30.00
PDEF_MOD = 30.00
MDEF_MOD = 30.00
EVA_MOD = 0.10
GOLD_MIN = 50.00 # minimum gold value, percentage of exp
GOLD_RAND = 100.00 # the higher the value, the greater the variance/formula: (rand(gold_rand)+gold_min)/100.00
GOLD_MULTIPLIER = 1.50 # last gold multiplier, also multiplies GOLD_MIN (sick, but i love it ;D)
ADAPT = true # if u want the Adaption Mode mainly used :true
ADAPTED = [] # insert the Enemy's ID which uses the Adaption Mode (when ADAPT is false)
NOT_ADAPTED = [] # insert the Enemy's ID which uses the Normal Mode (when ADAPT is true)
EXP_CALC = true # if true, exp calculation of not adapted Enemies is enabled
GOLD_CALC = true # if true, gold calculation of not adapted Enemies is enabled
DIFF_EXP = true # if true, the exp is multiplied by $game_system.difficulty
# to change the Difficulty, set:
# $game_system.difficulty = Value
#--------------------------------------------------------------------------
#==============================================================================
end
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
attr_accessor :difficulty
#--------------------------------------------------------------------------
alias adapt_init initialize
def initialize
@difficulty = 100 # multiplies all Attributes with this Percentage
adapt_init
end
#--------------------------------------------------------------------------
end
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
alias adapt_maxhp base_maxhp
def base_maxhp
return Integer(adapt_maxhp * adaption(0) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_maxsp base_maxsp
def base_maxsp
return Integer(adapt_maxsp * adaption(1) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_str base_str
def base_str
return Integer(adapt_str * adaption(2) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_dex base_dex
def base_dex
return Integer(adapt_dex * adaption(3) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_agi base_agi
def base_agi
return Integer(adapt_agi * adaption(4) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_int base_int
def base_int
return Integer(adapt_int * adaption(5) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_atk base_atk
def base_atk
return Integer(adapt_atk * adaption(6) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_pdef base_pdef
def base_pdef
return Integer(adapt_pdef * adaption(7) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_mdef base_mdef
def base_mdef
return Integer(adapt_mdef * adaption(8) * $game_system.difficulty/10000.00)
end
#--------------------------------------------------------------------------
alias adapt_eva base_eva
def base_eva
return Integer(adapt_eva * adaption(9) * $game_system.difficulty/1000.00)
end
#--------------------------------------------------------------------------
alias adapt_exp exp
def exp
return Integer((adapt_exp * adaption(10))/100.00)
end
#--------------------------------------------------------------------------
alias adapt_gold gold
def gold
return Integer((adapt_gold * adaption(11))/100.00)
end
#--------------------------------------------------------------------------
def adaption(type)
if Adaption::ADAPTED.include?(id) or (Adaption::ADAPT and not Adaption::NOT_ADAPTED.include?(id))
adaption = 0
for actor in $game_party.actors
case type
when 0
adaption += actor.maxhp
when 1
adaption += actor.maxsp
when 2
adaption += actor.str
when 3
adaption += actor.dex
when 4
adaption += actor.agi
when 5
adaption += actor.int
when 6
adaption += actor.atk
when 7
adaption += actor.pdef
when 8
adaption += actor.mdef
when 9
adaption += actor.eva
when 10
if Adaption::DIFF_EXP
adaption = (maxhp/Adaption::MAXHP_MOD + maxsp/Adaption::MAXSP_MOD + str/Adaption::STR_MOD + dex/Adaption::DEX_MOD + agi/Adaption::AGI_MOD + int/Adaption::INT_MOD + atk/Adaption::ATK_MOD + pdef/Adaption::PDEF_MOD + mdef/Adaption::MDEF_MOD + eva/Adaption::EVA_MOD) * $game_party.actors.size
else
adaption = (maxhp/Adaption::MAXHP_MOD + maxsp/Adaption::MAXSP_MOD + str/Adaption::STR_MOD + dex/Adaption::DEX_MOD + agi/Adaption::AGI_MOD + int/Adaption::INT_MOD + atk/Adaption::ATK_MOD + pdef/Adaption::PDEF_MOD + mdef/Adaption::MDEF_MOD + eva/Adaption::EVA_MOD) * $game_party.actors.size * (100.00/$game_system.difficulty)
end
when 11
adaption = exp * Adaption::GOLD_MULTIPLIER * ((rand(Adaption::GOLD_RAND)+Adaption::GOLD_MIN)/100.00) * $game_party.actors.size
end
end
return (adaption / $game_party.actors.size)
elsif Adaption::NOT_ADAPTED.include?(id) or (Adaption::ADAPT == false and not Adaption::NOT_ADAPTED.include?(id))
if type == 9
return 10.00
elsif type == 10 and Adaption::EXP_CALC
if Adaption::DIFF_EXP
return (maxhp/Adaption::MAXHP_MOD + maxsp/Adaption::MAXSP_MOD + str/Adaption::STR_MOD + dex/Adaption::DEX_MOD + agi/Adaption::AGI_MOD + int/Adaption::INT_MOD + atk/Adaption::ATK_MOD + pdef/Adaption::PDEF_MOD + mdef/Adaption::MDEF_MOD + eva/Adaption::EVA_MOD)
else
return (maxhp/Adaption::MAXHP_MOD + maxsp/Adaption::MAXSP_MOD + str/Adaption::STR_MOD + dex/Adaption::DEX_MOD + agi/Adaption::AGI_MOD + int/Adaption::INT_MOD + atk/Adaption::ATK_MOD + pdef/Adaption::PDEF_MOD + mdef/Adaption::MDEF_MOD + eva/Adaption::EVA_MOD) *(100.00/$game_system.difficulty)
end
elsif type == 11 and Adaption::GOLD_CALC
return exp * Adaption::GOLD_MULTIPLIER * ((rand(Adaption::GOLD_RAND)+Adaption::GOLD_MIN)/100.00)
else
return 100.00
end
end
end
#--------------------------------------------------------------------------
end
I really want to use this script, but I am unsure about how I can make it work. I'd be very grateful if somebody could explain to me how to set up an enemy that has, for example, 1/2 of the party's average stats.
Thank you very much in advance.