Serpentofshadow
Member
SoS Variety
Version: 1.0
Introduction
A script for VX that allows for random variations of enemy HP, MP, Gold, and EXP. Includes a setup section for turning specific parts on or off, changing the vary amount, and excluding certain enemies (by enemy id #).
Features
Screenshots
None unless they are needed.
Demo
None unless it is needed.
Script
Instructions
Place in the Materials section just like any other script.
Under the module "Serpent_Var" (in the script) are the options. By default all varied stats are activated. To turn a part off, chance the respective option to "false". If you want a specific enemy to not have a stat varied, then put their ID# in the [] for the respective stat. Chance the amounts to the decimal number equivalent of the varying percent. Thus 10% would be 0.1.
FAQ
n/a
Compatibility
Conflicts with any script that modifies the functions "def basehp", "def basemp", "def gold", or "def exp" in Game_Enemy
Credits and Thanks
Sandgolem - I used his scripts for XP as a base
Author's Notes
Considering making an option for varying the other stats of enemies (ATK/DEF/SPI/AGI/Crit).
Terms and Conditions
Free for non-commercial use so long as I get credit. For commercial use, please e-mail me.
Version: 1.0
Introduction
A script for VX that allows for random variations of enemy HP, MP, Gold, and EXP. Includes a setup section for turning specific parts on or off, changing the vary amount, and excluding certain enemies (by enemy id #).
Features
- Can vary the HP, MP, Gold, and EXP from monsters
- Turn off whichever parts you don't want
- Exclude specific monsters
- Easily change the percentage of vary for each stat
Screenshots
None unless they are needed.
Demo
None unless it is needed.
Script
Code:
#==============================================================================
# SoS Varieties
#------------------------------------------------------------------------------
# Description:
#Â Â Â Â Â Â Â Â Allows for random HP/MP/EXP/Gold on enemies
#------------------------------------------------------------------------------
# By: Serpentofshadow
# 11/19/08
# Version 1.0
#
# Credit: Used several scripts by SandGolem as a base
#------------------------------------------------------------------------------
# VERSION HISTORY:
#Â Â 1.0 - Released
#------------------------------------------------------------------------------
# INSTRUCTIONS:
#Â Â Paste this above main and in the Materials section
#Â Â Customize the Serpent_Var module if needed (optional)
#==============================================================================
Â
Â
#==============================================================================
# SETUP
#Â Â Modify the settings below to your liking
#==============================================================================
module Serpent_Var
 #Enemy Hit Points (HP) will vary randomly? true/false
 Varied_HP = true
Â
 #The amount enemy HP varies by 0.01 through 0.99 (default 0.2)
 HP_Amount = 0.2
Â
 #Enemies that will NOT have random HP - place enemy ID in []
 EXCLUDE_HP = []
Â
 #Enemy Mana Points (MP) will vary randomly? true/false
 Varied_MP = true
Â
 #The amount enemy MP varies by 0.01 through 0.99 (default 0.2)
 MP_Amount = 0.2
Â
 #Enemies that will NOT have random MP - place enemy ID in []
 EXCLUDE_MP = []
Â
 #Reward Gold (GP) from enemy will vary randomly? true/false
 Varied_Gold = true
Â
 #The amount enemy Gold varies by 0.01 through 0.99 (default 0.4)
 Gold_Amount = 0.4
Â
 #Enemies that will NOT have random Gold - place enemy ID in []
 EXCLUDE_Gold = []
Â
 #Reward Experiance (EXP) from enemy will vary randomly? true/false
 Varied_Exp = true
Â
 #The amount enemy Exp varies by 0.01 through 0.99 (default 0.2)
 Exp_Amount = 0.2
Â
 #Enemies that will NOT have random Exp - place enemy ID in []
 EXCLUDE_Exp = []
end
#==============================================================================
# Setup is finished!
#==============================================================================
Â
#==============================================================================
# Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
 #aliases
 alias sos_enemyhp_orig base_maxhp
 alias sos_enemymp_orig base_maxmp
 alias sos_enemygold_orig gold
 alias sos_enemyexp_orig exp
Â
 #Hit Points
 def base_maxhp
  if Serpent_Var::EXCLUDE_HP.include?(enemy_id)
   return sos_enemyhp_orig
  end
  if Serpent_Var::Varied_HP == true
   if @sos_enemy_basehp == nil
    sos_temp = sos_enemyhp_orig
    @sos_enemy_basehp = rand(sos_temp * Serpent_Var::HP_Amount)
    @sos_enemy_basehp += sos_temp * 0.9
    @sos_enemy_basehp = @sos_enemy_basehp.to_i
   end
  end
  return @sos_enemy_basehp
 end
Â
 #Mana Points
 def base_maxmp
  if Serpent_Var::EXCLUDE_MP.include?(enemy_id)
   return sos_enemymp_orig
  end
  if Serpent_Var::Varied_MP == true
   if @sos_enemy_basemp == nil
    sos_temp = sos_enemymp_orig
    @sos_enemy_basemp = rand(sos_temp * Serpent_Var::MP_Amount)
    @sos_enemy_basemp += sos_temp * 0.9
    @sos_enemy_basemp = @sos_enemy_basemp.to_i
   end
  end
  return @sos_enemy_basemp
 end
Â
 #Gold
 def gold
  if Serpent_Var::EXCLUDE_Gold.include?(enemy_id)
   return sos_enemygold_orig
  end
  if Serpent_Var::Varied_Gold == true
   if @sos_enemy_gold == nil
    sos_temp = sos_enemygold_orig
    @sos_enemy_gold = rand(sos_temp * Serpent_Var::Gold_Amount)
    @sos_enemy_gold += sos_temp * 0.9
    @sos_enemy_gold = @sos_enemy_gold.to_i
   end
  end
  return @sos_enemy_gold
 end
Â
 #Experiance
 def exp
  if Serpent_Var::EXCLUDE_Exp.include?(enemy_id)
   return sos_enemyexp_orig
  end
  if Serpent_Var::Varied_Exp == true
   if @sos_enemy_exp == nil
    sos_temp = sos_enemyexp_orig
    @sos_enemy_exp = rand(sos_temp * Serpent_Var::Exp_Amount)
    @sos_enemy_exp += sos_temp * 0.9
    @sos_enemy_exp = @sos_enemy_exp.to_i
   end
  end
  return @sos_enemy_exp
 end
end
Instructions
Place in the Materials section just like any other script.
Under the module "Serpent_Var" (in the script) are the options. By default all varied stats are activated. To turn a part off, chance the respective option to "false". If you want a specific enemy to not have a stat varied, then put their ID# in the [] for the respective stat. Chance the amounts to the decimal number equivalent of the varying percent. Thus 10% would be 0.1.
FAQ
n/a
Compatibility
Conflicts with any script that modifies the functions "def basehp", "def basemp", "def gold", or "def exp" in Game_Enemy
Credits and Thanks
Sandgolem - I used his scripts for XP as a base
Author's Notes
Considering making an option for varying the other stats of enemies (ATK/DEF/SPI/AGI/Crit).
Terms and Conditions
Free for non-commercial use so long as I get credit. For commercial use, please e-mail me.