Monster's Adaption by Caldaron
Version: 1.10
Oct 9 2006
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given. If you are the owner of the thread, please contact administration.
Introduction
This script makes it easily possible, to adapt the monsters' attributes to the actors' ones!
Features
individual adaption to the party's average attributes
Create ur own exp calculation
Editable random Gold gain based on exp
select ur Enemies adapted or adapt all and normalize the exceptions
Extra Difficulty Level added (adjust the monsters to the player's skills)
Demo
u only need to copy and paste, there's no need for it...
Script
Monster's Adaption
Code:
#==============================================================================
# Monster's Adaption Script v. 1.10
# by Caldaron (29.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 true, insert the not adapted Enemy IDs)
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 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::ADAPT and not Adaption::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::ADAPT == false and not Adaption::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
Instructions
put this script above main
look at the variable descriptions, these should be sufficient
Example for Adaption:
Enemy's Attack is set to 100.
So, the Enemy's attack is set to the party's average attack.
when its attack is 200, the attack is the party's attack doubled.
got it?
Incompatibility
not known...
Credits and Thanks
Credits to me
GREAT Thanks to Trickster for braining me!
Author's Notes
IMPORTANT: when EVA is set to 10 it's 100% (because u can only max 100 input)