Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Battle : Auto Level Enemies (v3.0)

Battle : Auto Level Enemies
Version: 3.0
By: Kain Nobel

Introduction

This is a script which globally/individually inflates each enemies' base stats by a bonus multipled by the current party's average level. Whats different from the older version, I chose to re-release this because it is coded cleaner and it is generally easier to assign inflation percents individually to enemies now rather than them all have the same exact kind of *boost*.

Features

  • Enemy stats are modified based off game party's average level.
  • Bonus percent can be set individually for any/all enemies' stats
  • Stat influence is adjusted for capped stats so it doesn't accidentally go overboard!

Script

Code:
#===============================================================================

# ** Battle : Auto-Level Enemies

#-------------------------------------------------------------------------------

# * Description :

#

#   This script influences individual/all enemies' stats to be modified by a

#   bonus percent which is based off the active game party's average level.

#-------------------------------------------------------------------------------

# * Syntax :

#

#   To set individual enemy's to have a special bonus percent, you'll do

#   something like this...

#

#     Bonus_<stat> = {enemy_id => bonus, ...}

#

#   ...or...

#

#     Bonus_<stat>[enemy_id] = bonus

#

#   For enemys which aren't individually defined, you must always have a

#   'default' setting because the script looks for it reguardless. To make

#   sure you have a default setting, all of your constants must have a...

#

#     Bonus_<stat>.default = (Numeric) # 0 by default

#-------------------------------------------------------------------------------

# * Formula :

#

#   The default formula used in this script is....

#

#     level = $game_party.average('level')

#     level /= 10.0

#     bonus = eval("Bonus_#{stat}[#{id}]")

#     bonus = bonus.is_a?(Numeric) ? (bonus * level) : 0

#     return Integer(bonus)

#

#   ...If you have a better formula than feel free to change it, but this

#   basically takes the set bonus multiplied by the $game_party's average

#   level (as a percent), then adds it to the enemy's base stat.

#===============================================================================

 

#-------------------------------------------------------------------------------

# * SDK Log

#-------------------------------------------------------------------------------

SDK.log('Battle.AutoLevelEnemies', 'Kain Nobel ©', 3.0, '04.08.2009')

#-------------------------------------------------------------------------------

# * SDK Enabled Test : BEGIN

#-------------------------------------------------------------------------------

if SDK.enabled?('Battle.AutoLevelEnemies')

 

#===============================================================================

# ** Game_Enemy::AutoLevel

#===============================================================================

 

module Game_Enemy::AutoLevel

################################################################################

# ~**                CUSTOMIZABLE CONSTANTS - BEGIN                        **~ #

################################################################################

  #-----------------------------------------------------------------------------

  # * Bonus : MaxHP

  #-----------------------------------------------------------------------------

  Bonus_MaxHP = {}

  Bonus_MaxHP.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : MaxSP

  #-----------------------------------------------------------------------------

  Bonus_MaxSP = {}

  Bonus_MaxSP.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Str

  #-----------------------------------------------------------------------------

  Bonus_Str   = {}

  Bonus_Str.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Dex

  #-----------------------------------------------------------------------------

  Bonus_Dex   = {}

  Bonus_Dex.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Agi

  #-----------------------------------------------------------------------------

  Bonus_Agi   = {}

  Bonus_Agi.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Int

  #-----------------------------------------------------------------------------

  Bonus_Int   = {}

  Bonus_Int.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Atk

  #-----------------------------------------------------------------------------

  Bonus_Atk   = {}

  Bonus_Atk.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : PDef

  #-----------------------------------------------------------------------------

  Bonus_PDef  = {}

  Bonus_PDef.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : MDef

  #-----------------------------------------------------------------------------

  Bonus_MDef  = {}

  Bonus_MDef.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Eva

  #-----------------------------------------------------------------------------

  Bonus_Eva   = {}

  Bonus_Eva.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Gold

  #-----------------------------------------------------------------------------

  Bonus_Gold  = {}

  Bonus_Gold.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Exp

  #-----------------------------------------------------------------------------

  Bonus_Exp   = {}

  Bonus_Exp.default = 0

  #-----------------------------------------------------------------------------

  # * Capped : MaxHP

  #-----------------------------------------------------------------------------

  Capped_MaxHP = {}

  Capped_MaxHP.default = 9999999

  #-----------------------------------------------------------------------------

  # * Capped : MaxSP

  #-----------------------------------------------------------------------------

  Capped_MaxSP = {}

  Capped_MaxSP.default = 9999999

  #-----------------------------------------------------------------------------

  # * Capped : Str

  #-----------------------------------------------------------------------------

  Capped_Str = {}

  Capped_Str.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Dex

  #-----------------------------------------------------------------------------

  Capped_Dex = {}

  Capped_Dex.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Agi

  #-----------------------------------------------------------------------------

  Capped_Agi = {}

  Capped_Agi.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Int

  #-----------------------------------------------------------------------------

  Capped_Int = {}

  Capped_Int.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Atk

  #-----------------------------------------------------------------------------

  Capped_Atk = {}

  Capped_Atk.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : PDef

  #-----------------------------------------------------------------------------

  Capped_PDef = {}

  Capped_PDef.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : MDef

  #-----------------------------------------------------------------------------

  Capped_MDef = {}

  Capped_MDef.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Eva

  #-----------------------------------------------------------------------------

  Capped_Eva = {}

  Capped_Eva.default = 100

  #-----------------------------------------------------------------------------

  # * Capped : Gold

  #-----------------------------------------------------------------------------

  Capped_Gold = {}

  Capped_Gold.default = 9999999

  #-----------------------------------------------------------------------------

  # * Capped : Exp

  #-----------------------------------------------------------------------------

  Capped_Exp = {}

  Capped_Exp.default = 9999999

################################################################################

# ~**                 CUSTOMIZABLE CONSTANTS - END                         **~ #

################################################################################

  #-----------------------------------------------------------------------------

  # * Bonus

  #-----------------------------------------------------------------------------

  def self.bonus(id, stat)

    level = $game_party.average('level')

    level /= 10.0

    bonus = eval("Bonus_#{stat}[#{id}]")

    bonus = bonus.is_a?(Numeric) ? (bonus * level) : 0

    return Integer(bonus)

  end

  #-----------------------------------------------------------------------------

  # * Cap

  #-----------------------------------------------------------------------------

  def self.cap(id, stat)

    cap = eval("Capped_#{stat}[#{id}]")

    return cap

  end

end

 

#===============================================================================

# ** Game_Enemy

#===============================================================================

 

class Game_Enemy < Game_Battler

  #-----------------------------------------------------------------------------

  # * Alias Listings

  #-----------------------------------------------------------------------------

  alias_method :autolevel_gmenemy_basemaxhp,  :base_maxhp

  alias_method :autolevel_gmenemy_basemaxsp,  :base_maxsp

  alias_method :autolevel_gmenemy_basestr,    :base_str

  alias_method :autolevel_gmenemy_basedex,    :base_dex

  alias_method :autolevel_gmenemy_baseagi,    :base_agi

  alias_method :autolevel_gmenemy_baseint,    :base_int

  alias_method :autolevel_gmenemy_baseatk,    :base_atk

  alias_method :autolevel_gmenemy_basepdef,   :base_pdef

  alias_method :autolevel_gmenemy_basemdef,   :base_mdef

  alias_method :autolevel_gmenemy_baseeva,    :base_eva

  alias_method :autolevel_gmenemy_gold,       :gold

  alias_method :autolevel_gmenemy_exp,        :exp

  #-----------------------------------------------------------------------------

  # * Auto Level Bonus

  #-----------------------------------------------------------------------------

  def autolevel_bonus(stat)

    return AutoLevel.bonus(self.id, stat)

  end

  #-----------------------------------------------------------------------------

  # * Auto Level Cap

  #-----------------------------------------------------------------------------

  def autolevel_cap(stat)

    return AutoLevel.cap(self.id, stat)

  end

  #-----------------------------------------------------------------------------

  # * Base MaxHP

  #-----------------------------------------------------------------------------

  def base_maxhp

    n = autolevel_gmenemy_basemaxhp

    n += autolevel_bonus('MaxHP')

    return [[n, 1].max, autolevel_cap('MaxHP')].min

  end

  #-----------------------------------------------------------------------------

  # * Base MaxSP

  #-----------------------------------------------------------------------------

  def base_maxsp

    n = autolevel_gmenemy_basemaxsp

    n += autolevel_bonus('MaxSP')

    return [[n, 0].max, autolevel_cap('MaxSP')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Str

  #-----------------------------------------------------------------------------

  def base_str

    n = autolevel_gmenemy_basestr

    n += autolevel_bonus('Str')

    return [[n, 1].max, autolevel_cap('Str')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Dex

  #-----------------------------------------------------------------------------

  def base_dex

    n = autolevel_gmenemy_basedex

    n += autolevel_bonus('Dex')

    return [[n, 1].max, autolevel_cap('Dex')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Agi

  #-----------------------------------------------------------------------------

  def base_agi

    n = autolevel_gmenemy_baseagi

    n += autolevel_bonus('Agi')

    return [[n, 1].max, autolevel_cap('Agi')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Int

  #-----------------------------------------------------------------------------

  def base_int

    n = autolevel_gmenemy_baseint

    n += autolevel_bonus('Int')

    return [[n, 1].max, autolevel_cap('Int')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Atk

  #-----------------------------------------------------------------------------

  def base_atk

    n = autolevel_gmenemy_baseatk

    n += autolevel_bonus('Atk')

    return [[n, 0].max, autolevel_cap('Atk')].min

  end

  #-----------------------------------------------------------------------------

  # * Base PDef

  #-----------------------------------------------------------------------------

  def base_pdef

    n = autolevel_gmenemy_basepdef

    n += autolevel_bonus('PDef')

    return [[n, 0].max, autolevel_cap('PDef')].min

  end

  #-----------------------------------------------------------------------------

  # * Base MDef

  #-----------------------------------------------------------------------------

  def base_mdef

    n = autolevel_gmenemy_basemdef

    n += autolevel_bonus('MDef')

    return [[n, 0].max, autolevel_cap('MDef')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Eva

  #-----------------------------------------------------------------------------

  def base_eva

    n = autolevel_gmenemy_baseeva

    n += autolevel_bonus('Eva')

    return [[n, -100].max, autolevel_cap('Eva')].min

  end

  #-----------------------------------------------------------------------------

  # * Gold

  #-----------------------------------------------------------------------------

  def gold

    n = autolevel_gmenemy_gold

    n += autolevel_bonus('Gold')

    return [[n, 0].max, autolevel_cap('Gold')].min

  end

  #-----------------------------------------------------------------------------

  # * Exp

  #-----------------------------------------------------------------------------

  def exp

    n = autolevel_gmenemy_exp

    n += autolevel_bonus('Exp')

    return [[n, 0].max, autolevel_cap('Exp')].min

  end

end

 

#===============================================================================

# ** Game_Party

#===============================================================================

 

class Game_Party

  #-----------------------------------------------------------------------------

  # * Name      : Average

  #   Info      : Returns average of party's stats, based on parameter

  #   Author    : Kain Nobel

  #   Call Info : Parameter is a string representing parameter in question

  #-----------------------------------------------------------------------------

  unless self.method_defined?(:average)

    def average(stat)

      return 0 if @actors.size == 0

      avg = 0

      case stat.downcase

      when 'hp'    ; @actors.each {|actor| avg += actor.hp}

      when 'maxhp' ; @actors.each {|actor| avg += actor.maxhp}

      when 'sp'    ; @actors.each {|actor| avg += actor.sp}

      when 'maxsp' ; @actors.each {|actor| avg += actor.maxsp}

      when 'level' ; @actors.each {|actor| avg += actor.level}

      when 'exp'   ; @actors.each {|actor| avg += actor.exp}

      when 'str'   ; @actors.each {|actor| avg += actor.str}

      when 'dex'   ; @actors.each {|actor| avg += actor.dex}

      when 'agi'   ; @actors.each {|actor| avg += actor.agi}

      when 'int'   ; @actors.each {|actor| avg += actor.int}

      when 'atk'   ; @actors.each {|actor| avg += actor.atk}

      when 'pdef'  ; @actors.each {|actor| avg += actor.pdef}

      when 'mdef'  ; @actors.each {|actor| avg += actor.mdef}

      when 'eva'   ; @actors.each {|actor| avg += actor.eva}

      end

      return (avg / @actors.size)

    end

  end

end

 

#-------------------------------------------------------------------------------

# * SDK Enabled Test : END

#-------------------------------------------------------------------------------

end
Code:
#===============================================================================

# ** Battle : Auto-Level Enemies

#-------------------------------------------------------------------------------

# * Description :

#

#   This script influences individual/all enemies' stats to be modified by a

#   bonus percent which is based off the active game party's average level.

#-------------------------------------------------------------------------------

# * Syntax :

#

#   To set individual enemy's to have a special bonus percent, you'll do

#   something like this...

#

#     Bonus_<stat> = {enemy_id => bonus, ...}

#

#   ...or...

#

#     Bonus_<stat>[enemy_id] = bonus

#

#   For enemys which aren't individually defined, you must always have a

#   'default' setting because the script looks for it reguardless. To make

#   sure you have a default setting, all of your constants must have a...

#

#     Bonus_<stat>.default = (Numeric) # 0 by default

#-------------------------------------------------------------------------------

# * Formula :

#

#   The default formula used in this script is....

#

#     level = $game_party.average('level')

#     level /= 10.0

#     bonus = eval("Bonus_#{stat}[#{id}]")

#     bonus = bonus.is_a?(Numeric) ? (bonus * level) : 0

#     return Integer(bonus)

#

#   ...If you have a better formula than feel free to change it, but this

#   basically takes the set bonus multiplied by the $game_party's average

#   level (as a percent), then adds it to the enemy's base stat.

#===============================================================================

 

#===============================================================================

# ** Game_Enemy::AutoLevel

#===============================================================================

 

module Game_Enemy::AutoLevel

################################################################################

# ~**                CUSTOMIZABLE CONSTANTS - BEGIN                        **~ #

################################################################################

  #-----------------------------------------------------------------------------

  # * Bonus : MaxHP

  #-----------------------------------------------------------------------------

  Bonus_MaxHP = {}

  Bonus_MaxHP.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : MaxMP

  #-----------------------------------------------------------------------------

  Bonus_MaxMP = {}

  Bonus_MaxMP.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Atk

  #-----------------------------------------------------------------------------

  Bonus_Atk   = {}

  Bonus_Atk.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Def

  #-----------------------------------------------------------------------------

  Bonus_Def  = {}

  Bonus_Def.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Spi

  #-----------------------------------------------------------------------------

  Bonus_Spi  = {}

  Bonus_Spi.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Agi

  #-----------------------------------------------------------------------------

  Bonus_Agi   = {}

  Bonus_Agi.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Gold

  #-----------------------------------------------------------------------------

  Bonus_Gold  = {}

  Bonus_Gold.default = 0

  #-----------------------------------------------------------------------------

  # * Bonus : Exp

  #-----------------------------------------------------------------------------

  Bonus_Exp   = {}

  Bonus_Exp.default = 0

  #-----------------------------------------------------------------------------

  # * Capped : MaxHP

  #-----------------------------------------------------------------------------

  Capped_MaxHP = {}

  Capped_MaxHP.default = 9999999

  #-----------------------------------------------------------------------------

  # * Capped : MaxMP

  #-----------------------------------------------------------------------------

  Capped_MaxMP = {}

  Capped_MaxMP.default = 9999999

  #-----------------------------------------------------------------------------

  # * Capped : Atk

  #-----------------------------------------------------------------------------

  Capped_Atk = {}

  Capped_Atk.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Def

  #-----------------------------------------------------------------------------

  Capped_Def = {}

  Capped_Def.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Spi

  #-----------------------------------------------------------------------------

  Capped_Spi = {}

  Capped_Spi.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Agi

  #-----------------------------------------------------------------------------

  Capped_Agi = {}

  Capped_Agi.default = 999

  #-----------------------------------------------------------------------------

  # * Capped : Gold

  #-----------------------------------------------------------------------------

  Capped_Gold = {}

  Capped_Gold.default = 9999999

  #-----------------------------------------------------------------------------

  # * Capped : Exp

  #-----------------------------------------------------------------------------

  Capped_Exp = {}

  Capped_Exp.default = 9999999

################################################################################

# ~**                 CUSTOMIZABLE CONSTANTS - END                         **~ #

################################################################################

  #-----------------------------------------------------------------------------

  # * Bonus

  #-----------------------------------------------------------------------------

  def self.bonus(id, stat)

    level = $game_party.average('level')

    level /= 10.0

    bonus = eval("Bonus_#{stat}[#{id}]")

    bonus = bonus.is_a?(Numeric) ? (bonus * level) : 0

    return Integer(bonus)

  end

  #-----------------------------------------------------------------------------

  # * Cap

  #-----------------------------------------------------------------------------

  def self.cap(id, stat)

    cap = eval("Capped_#{stat}[#{id}]")

    return cap

  end

end

 

#===============================================================================

# ** Game_Enemy

#===============================================================================

 

class Game_Enemy < Game_Battler

  #-----------------------------------------------------------------------------

  # * Alias Listings

  #-----------------------------------------------------------------------------

  alias_method :autolevel_gmenemy_basemaxhp,  :base_maxhp

  alias_method :autolevel_gmenemy_basemaxmp,  :base_maxmp

  alias_method :autolevel_gmenemy_baseatk,    :base_atk

  alias_method :autolevel_gmenemy_basedef,    :base_def

  alias_method :autolevel_gmenemy_basespi,    :base_spi

  alias_method :autolevel_gmenemy_baseagi,    :base_agi

  alias_method :autolevel_gmenemy_gold,       :gold

  alias_method :autolevel_gmenemy_exp,        :exp

  #-----------------------------------------------------------------------------

  # * Auto Level Bonus

  #-----------------------------------------------------------------------------

  def autolevel_bonus(stat)

    AutoLevel.bonus(self.id, stat)

  end

  #-----------------------------------------------------------------------------

  # * Auto Level Cap

  #-----------------------------------------------------------------------------

  def autolevel_cap(stat)

    AutoLevel.cap(self.id, stat)

  end

  #-----------------------------------------------------------------------------

  # * Base MaxHP

  #-----------------------------------------------------------------------------

  def base_maxhp

    n = autolevel_gmenemy_basemaxhp

    n += autolevel_bonus('MaxHP')

    [[n, 1].max, autolevel_cap('MaxHP')].min

  end

  #-----------------------------------------------------------------------------

  # * Base MaxMP

  #-----------------------------------------------------------------------------

  def base_maxmp

    n = autolevel_gmenemy_basemaxmp

    n += autolevel_bonus('MaxMP')

    [[n, 0].max, autolevel_cap('MaxMP')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Attack

  #-----------------------------------------------------------------------------

  def base_atk

    n = autolevel_gmenemy_baseatk

    n += autolevel_bonus('Atk')

    [[n, 1].max, autolevel_cap('Atk')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Defense

  #-----------------------------------------------------------------------------

  def base_def

    n = autolevel_gmenemy_basedef

    n += autolevel_bonus('Def')

    [[n, 1].max, autolevel_cap('Def')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Spirit

  #-----------------------------------------------------------------------------

  def base_spi

    n = autolevel_gmenemy_basespi

    n += autolevel_bonus('Spi')

    [[n, 1].max, autolevel_cap('Spi')].min

  end

  #-----------------------------------------------------------------------------

  # * Base Int

  #-----------------------------------------------------------------------------

  def base_agi

    n = autolevel_gmenemy_baseagi

    n += autolevel_bonus('Agi')

    [[n, 1].max, autolevel_cap('Agi')].min

  end

  #-----------------------------------------------------------------------------

  # * Gold

  #-----------------------------------------------------------------------------

  def gold

    n = autolevel_gmenemy_gold

    n += autolevel_bonus('Gold')

    [[n, 0].max, autolevel_cap('Gold')].min

  end

  #-----------------------------------------------------------------------------

  # * Exp

  #-----------------------------------------------------------------------------

  def exp

    n = autolevel_gmenemy_exp

    n += autolevel_bonus('Exp')

    [[n, 0].max, autolevel_cap('Exp')].min

  end

end

 

#===============================================================================

# ** Game_Party

#===============================================================================

 

class Game_Party

  #-----------------------------------------------------------------------------

  # * Name      : Average

  #   Info      : Returns average of party's stats, based on parameter

  #   Author    : Kain Nobel

  #   Call Info : Parameter is a string representing parameter in question

  #-----------------------------------------------------------------------------

  unless self.method_defined?(:average)

    def average(stat)

      return 0 if @actors.size == 0

      avg = 0

      @actors.compact.each {|a|

      next if members[a].nil?

      case stat.downcase

      when 'hp'    then avg += $game_party.members[a].hp

      when 'maxhp' then avg += $game_party.members[a].maxhp

      when 'mp'    then avg += $game_party.members[a].mp

      when 'maxmp' then avg += $game_party.members[a].maxmp

      when 'level' then avg += $game_party.members[a].level

      when 'exp'   then avg += $game_party.members[a].exp

      when 'atk'   then avg += $game_party.members[a].atk

      when 'def'   then avg += $game_party.members[a].def

      when 'spi'   then avg += $game_party.members[a].spi

      when 'agi'   then avg += $game_party.members[a].agi

      end}

      return (avg / @actors.size)

    end

  end

end

 

Instructions

The instructions and the default formula used are documented in the script's header, please if you have any questions just ask and if you want your own special formula and don't know how you can ask me in privately to write you a different formula.

Compatibility

Place this script below anything that directly overwrites any of the Game_Enemy stats or it will not work. This script DOES NOT require SDK to use so if you need to remove the SDK delete the SDK.log, SDK.enabled?() test and the last end in the script.

This script was designed based off the default Battle System so anything outside of that concept, such as an ABS system, don't expect it to work. Things like RTAB and stuff which further enhance the default battle system, it should work on but if not you can request some sort of patch.

Credits and Thanks

Credits and thanks again still go to khmp and whoever else might've helped me on the origional script (which was written a year or two ago when I barely knew what I was doing).

Terms and Conditions

Free to use in commercial/non-commercial games so long as credit is given, please do not redistribute outside of the community without notifying me first.
 
Nice to see an upgraded version of this!

If you don't remember, I posted in your previous version of your Auto-Level enemies script, and it was very useful for my game! This version sounds a lot spiffier, but I have yet to try it. The ability to have it work differently for different enemies sounds great!

I'm posting now because you sounded sad you weren't getting any replies, so I thought I'd cheer you up by replying!
 
Yup, I remember you replying on the older version's topic. Thank you, all I needed is 1 reply so I feel better now :thumb:

BTW slight update, I changed the settings for stat caps and made constants for them. Origionally, I had them set the way the database caps an enemy stat when you edit it but now you can define individually the highest each stat can go for each enemy.

Say, for instance, you don't want a Ghost (enemy id # 1) to have more than 2000 Max HP, then you'd do...

Capped_MaxHP[1] = 2000

...that way you're not fighting a silly Ghost with 9999999 MaxHP when you're level 99 reguardless of your bonus inflation for MaxHP being high. The minimums are automatically adjusted to what the database allows, and the maximums are whatever you set in the settings.

Enjoy people! Don't be shy to leave some comments, questions, suggestions and/or bug reports :smoke:
 

Yaxor

Member

Awesome script Kain Nobel! Really! The cap stats feature is also awesome and easy to use.

Good job! I'm using this in my project and no error so far. It does sound like bug free :thumb:
 
Awesome, glad you guys are liking it! I'm thinking of making a VX version, so if anybody needs a VX version then please tell me so and I'll start one next week since I have VX up and running now.
 
I am working on trying to do an open-world rmvx game and a script like this would work really good with it. If you still are thinking about making a VX version, I would definetly use it! One question though: Is there a way to set it so that certain enemies don't level up (for certain bosses and story fights)
 
The only enemies who gain anything are the ones you define to specifically gain a percent (or all of them if you set a Bonus_XXX.default to something besides 0). So, for instance...

Bonus_Gold = {}
Bonus_Gold[3] = 5
Bonus_Gold.default = 0


...the enemy with ID #3 (in database) will drop gold * 5% when an actor kills it. Everybody else will drop their normal ammount with no inflation based on level. The same steps apply to defining any/all stats for any/all enemies.

Alternatively, you can set the .default to something higher than 0 and every enemy undefined above that will drop X ammount of gold (due to the default value), thats the easy/lazy way to do it for every enemy lol.

I'll post a VX version tomorrow night. Please, if its not up by the 12th (Tuesday), PM because I am forgetful lately :P
 
Yeah, it can be time consuming if you're like me and customize the bonus/caps for every enemy in the database, but thats my fault because I'm picky. So, in other words, its only as time-consuming as you are picky lol!

Okay, VX version has been posted everybody, please visit the opening post to gnab yours! I didn't playtest it or test any settings but I'm fairly confident that it'll work 100% bug free (purely speculation), feel free to let me know if any problems arise I won't be shy to fix them for ya!
 
-Example you have, lets say,a lvl 1 monster in the starting place of the game, but if you come to that place later, with high lvled party members, the monsters will be stronger?

If im right this looks good and i'll try!!



[sorry for my bad english]
 
alright this might be a little necro but all the same i really like the idea of the script and would love to get it to work for me. im using the VX script more or less plug and play, and even on a game with no other scripts i get the following error before the menu even comes up:

"Script ' ' line 160: NameError occurred.
undefined method 'base_maxsp" for class 'Game_Enemy'

so in my tinkering i say ok what happens when i remove all cases of maxsp, and doing so i actually get into the game which will then crash on any encounter giving the error:

"Script ' ' Line 250: NoMethodError occured
undefined method 'level' for 1:Fixnum"

so since i havent been able to figure things out on my own (seeing as my script skills are pretty minor), here i am asking for any help on the matter. sorry for the ramble but this script is certainly worth it, excellent job Kain and thanks in advance for any help anyone can give
 
Necropost? Nah, so long as I still support my own scripts its not :P

Both bugs fixed! They both had two common problems; 1.) I didn't playtest it when I posted it, 2.) I forgot about the small changes from XP to VX's better coding concepts. If you so happened to copy the still-bugged version of the script from up to 10 minutes ago, then please re-copy it again XD

If any other problems arise, please notify me imediately! However, after a thorough trial and error and several post edits, I've squashed both bugs ;)
 
Okay. I opened a new project and put this script in there with the SDK. I open the game but the moment I do I get an error saying this:

---------------------------
Chronicles of Illestia
---------------------------
Script 'Enemy Auto Level' line 2: SyntaxError occurred.
---------------------------
OK
---------------------------
I didn't change anything except the default percents.
 
# ** Battle : Auto-Level Enemies

If not then please post your copy of the script so I can see whats on line 2, or what you did with the setup, because you shouldn't be getting an error on a line which is strictly a comment and doesn't do anything.
 
hi. i'm looking to use this script for my game(credit will be given.) i want to be able to change this through a call script event. say if i want to increase the troop
s maxhp by 15? forgive me for being dim. but i think i might've missed that.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top