Hi. I'm hoping someone can covert this wonderful script by SephirothSpawn from XP to VX or create something similar. I tried but as I know next to nothing about scripting I got nowhere fast :sad:
Thanks to anyone who can help! :smile:
Thanks to anyone who can help! :smile:
What this does is Finds the average level of your party members, adds one, divides that by 100 (Turns it into a percent, level 99 being 100%), and assigns enemies stats based off whatever you assigned them in the database.
Meaning, In the database, make your monsters more powerful. Whatever you assign their stats to be in the database, is what their stats will be when your party is at level 99.
Code:
#==========================================================================
# Enemies That Level UP (Type 1)
#--------------------------------------------------------------------------
# Created By SephirothSpawn (11.17.05)
# Last Updated: 11.25.05
# Updated: Can Make Enemies Bosses (They Do Not Level Up) 11.18.05
# Updated: Stats Now Randomized += 15 %
#==========================================================================
#==========================================================================
# Module RPG
#==========================================================================
module RPG
#=========================================================================
# Class Enemy
#=========================================================================
class Enemy
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
# Base Statistics
attr_accessor :b_maxhp, :b_maxsp, :b_str, :b_dex, :b_agi, :b_int
attr_accessor :b_atk, :b_pdef, :b_mdef, :b_eva, :b_exp, :b_gold
# Boss Check
attr_accessor :boss
#--------------------------------------------------------------------------
# * Set Bases
#--------------------------------------------------------------------------
def set_bases
@b_maxhp, @b_maxsp = @maxhp, @maxsp
@b_str, @b_dex, @b_agi, @b_int = @str, @dex, @agi, @int
@b_atk, @b_pdef, @b_mdef, @b_eva = @atk, @pdef, @mdef, @eva
@b_exp, @b_gold = @exp, @gold
# Checks to See if there's a boss
if @name.include?("(BOSS)")
@boss = true
@name.slice!("(BOSS)")
else
@boss = false
end
end
#--------------------------------------------------------------------------
# * Update Level
#--------------------------------------------------------------------------
def update_level
unless @boss
# Calulates Average Level of Party
average = 0
for actor in $game_party.actors
average += actor.level
end
average /= $game_party.actors.size
# Adds 1 (So when you're at level 99, 100% of the Stats are used)
average += 1
# Set to a percent
average /= 100.000
# Update Stats
@maxhp = (@b_maxhp * average).to_i
percent = (@maxhp * (( rand(15) + 1 ) / 100.0)).to_i
@maxhp += rand(2) == 0 ? percent : -percent
@maxsp = (@b_maxsp * average).to_i
percent = (@maxsp * (( rand(15) + 1 ) / 100.0)).to_i
@maxsp += rand(2) == 0 ? percent : -percent
@str = (@b_str * average).to_i
@dex = (@b_dex * average).to_i
percent = (@dex * (( rand(15) + 1 ) / 100.0)).to_i
@dex += rand(2) == 0 ? percent : -percent
@agi = (@b_agi * average).to_i
percent = (@agi * (( rand(15) + 1 ) / 100.0)).to_i
@agi += rand(2) == 0 ? percent : -percent
@int = (@b_int * average).to_i
percent = (@int * (( rand(15) + 1 ) / 100.0)).to_i
@int += rand(2) == 0 ? percent : -percent
@atk = (@b_atk * average + 15 ).to_i
percent = (@atk * (( rand(15) + 1 ) / 100.0)).to_i
@atk += rand(2) == 0 ? percent : -percent
@pdef = (@b_pdef * average).to_i
percent = (@pdef * (( rand(15) + 1 ) / 100.0)).to_i
@pdef += rand(2) == 0 ? percent : -percent
@mdef = (@b_mdef * average).to_i
percent = (@mdef * (( rand(15) + 1 ) / 100.0)).to_i
@mdef += rand(2) == 0 ? percent : -percent
@eva = (@b_eva * average).to_i
percent = (@eva * (( rand(15) + 1 ) / 100.0)).to_i
@eva += rand(2) == 0 ? percent : -percent
@exp = (@b_exp * average - 3).to_i
@gold = (@b_gold * average).to_i
percent = (@b_gold * (( rand(15) + 1 ) / 100.0)).to_i
@b_gold += rand(2) == 0 ? percent : -percent
end
end
end
end
#==========================================================================
# Class Scene Title
#==========================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Alias' New Game Method
#--------------------------------------------------------------------------
alias seph_enemieslevel_scenetitle_main main
#--------------------------------------------------------------------------
# * Adds Base Stats For Enemies
#--------------------------------------------------------------------------
def main
seph_enemieslevel_scenetitle_main
for i in 1...$data_enemies.size
$data_enemies[i].set_bases
end
end
end
#==========================================================================
# Class Scene Battle
#==========================================================================
class Scene_Battle
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
for i in 1...$data_enemies.size
$data_enemies[i].update_level
end
end
end