=begin #============================================================================== ** Variable Max Level Author: Hime Date: Oct 3, 2012 ------------------------------------------------------------------------------ ** Change log Oct 3, 2012 - initial release ------------------------------------------------------------------------------ ** Terms of Use * Free to use in non-commercial projects * Contact me for commercial use * No real support. The script is provided as-is * Will do bug fixes, but no compatibility patches * Features may be requested but no guarantees, especially if it is non-trivial * Preserve this header ------------------------------------------------------------------------------ This script allows you to assign the max level based on variable values. Each actor's max level can be assigned to a different variable. #============================================================================== =end $imported = {} if $imported.nil? $imported["Tsuki_VariableMaxLevel"] = true #============================================================================== # ** Configuration #============================================================================== module Tsuki module Var_Max_Level # Which actor is assigned to which variable # Format: # actor ID => variable ID Level_Vars = { 1 => 1, # actor 1 assigned to variable 1 2 => 1, # actor 2 also assigned to variable 1 3 => 2, # actor 3 assigned to variable 2 } end end #============================================================================== # ** Rest of the script #============================================================================== class Game_Actor < Game_Battler alias :th_var_max_level_max :max_level def max_level val = $game_variables[Tsuki::Var_Max_Level::Level_Vars[@actor_id]] return val if val return th_var_max_level_max end end