Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Enemies that Level Up
#1
This is a locked, single-post thread from Creation Asylum. Archived here to prevent its loss.
No support is given.


There are now 2 different versions of this. Below each type, is a description of each of the formulas to determine their stats.


Type 1
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.

Just Remember to Make your enemies powerful, or they will be pushovers.

Updated:
Now Stats are randomly modified (+ or -) (0 to 15) %. Now every enemy you encounter, will be unique!

Just add this Somewhere above Main.
[codebox]
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
percent = (@str * (( rand(15) + 1 ) / 100.0)).to_i
@str += rand(2) == 0 ? percent : -percent
@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).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).to_i + @b_exp
percent = (@exp * (( rand(15) + 1 ) / 100.0)).to_i
@exp += rand(2) == 0 ? percent : -percent
@gold = (@b_gold * average).to_i + @b_gold
percent = (@gold * (( rand(15) + 1 ) / 100.0)).to_i
@gold += rand(2) == 0 ? percent : -percent
end
end
end
end

#==============================================================================
# Class Scene Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Alias' New Game Method
#--------------------------------------------------------------------------
alias new_game command_new_game
#--------------------------------------------------------------------------
# * Adds Base Stats For Enemies
#--------------------------------------------------------------------------
def command_new_game
for i in 1...$data_enemies.size
$data_enemies[i].set_bases
end
new_game
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
[/codebox]


Type 2
This takes the stats from the database and multiples it by the average level of the members in your party. Then, randomly adds or subtract 0 to 15% of each stat the enemy carries.

Just put somewhere above Main
[codebox]
Code:
#==============================================================================
# Enemies That Level UP (Type 2)
#--------------------------------------------------------------------------
# Created By SephirothSpawn (11.25.05)
# Last Updated: 11.25.05
#==============================================================================

#==============================================================================
# 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
# 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
percent = (@str * (( rand(15) + 1 ) / 100.0)).to_i
@str += rand(2) == 0 ? percent : -percent
@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).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
@exp = (@b_exp * average).to_i
percent = (@exp * (( rand(15) + 1 ) / 100.0)).to_i
@exp += rand(2) == 0 ? percent : -percent
@gold = (@b_gold * average).to_i
percent = (@gold * (( rand(15) + 1 ) / 100.0)).to_i
@gold += rand(2) == 0 ? percent : -percent
end
end
end
end

#==============================================================================
# Class Scene Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# * Alias' New Game Method
#--------------------------------------------------------------------------
alias new_game command_new_game
#--------------------------------------------------------------------------
# * Adds Base Stats For Enemies
#--------------------------------------------------------------------------
def command_new_game
for i in 1...$data_enemies.size
$data_enemies[i].set_bases
end
new_game
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
[/codebox]

Both Version include the Boss Feature:
By Adding (BOSS) into any enemies name in the database, there stats are not effected by these scripts.
}


Possibly Related Threads…
Thread Author Replies Views Last Post
  Evolving Enemies sandsand 0 2,593 10-11-2006, 01:00 PM
Last Post: sandsand
  Atk, PDef, MDef level up PhotonWeapon 0 2,143 07-26-2006, 01:00 PM
Last Post: PhotonWeapon
  Level Up system Jimmie 0 2,290 07-24-2006, 01:00 PM
Last Post: Jimmie
  Gameover based on Level ember2inferno 0 1,948 07-20-2006, 01:00 PM
Last Post: ember2inferno
  Level Up Box and Equipment Skills TsengTsuzaki 0 2,092 05-24-2006, 01:00 PM
Last Post: TsengTsuzaki
  Change Level/Exp/Status name ryujijitei 0 2,040 04-29-2006, 01:00 PM
Last Post: ryujijitei
  Enemies Level UP and Game Difficulty Options Combined DrakoShade 0 2,112 03-27-2006, 01:00 PM
Last Post: DrakoShade



Users browsing this thread: