MAX Level Limitation SystemVersion 1.1
by Woratana
Release Date: 30/01/2008
IntroductionI've read the tutorial about how to make the EXP limitation system, so it inspired me to script this.
This script will recover the Max Level system that missing in RPG Maker VX.
You can set Max Level for specific character or you can set for all the characters.
FeaturesVersion 1.1- Use alias to make the script shorter. Thanks Modern Algebra for suggestion.
Version 1.0- Set Default Max Level for Actor that doesn't need Specific Max Level
- Allow to Set Specific Max Level for Specific Character
ScriptPlace it above main.
if you have problem with codebox, you can download script in text file here:
Version 1.1
maxlvsys11.txt ( 2.38K )
Number of downloads: 791Version 1.0
maxlvsystem10.txt ( 2.92K )
Number of downloads: 103CODE
#======================================================================
========
# ¦ [RMVX Script] +MAX Level Limitation System+ Version 1.1
#------------------------------------------------------------------------------
# by Woratana [woratana@hotmail.com]
# Release Date: 30/01/2008
#
# Features in Version 1.1
# - Use alias to make the script shorter. Thanks Modern Algebra for suggestion.
# Features in Version 1.0
# - Set Default Max Level for Actor that doesn't need Specific Max Level
# - Allow to Set Specific Max Level for Specific Character
#
# How to Set Max Level
# - For all the Actors that don't need specific max level,
# set their Max Level in DEFAULT_LV_MAX = ...
# For example, DEFAULT_LV_MAX = 20
# This will make all the characters that you didn't set their specific max level
# have their max level at 20.
#
# - For the Actors that need specific max level,
# set their Max Level by:
# CHAR[actor's id from database] = ...
# For example, CHAR[7] = 10
# This will make character no.7 in database has max level at 10.
#==============================================================================
module Wormaxlv
CHAR = Array.new
#------------------------------------
# SETUP MAX Level HERE
#------------------------------------
DEFAULT_LV_MAX = 99 # Set Default Max Level
CHAR[1] = 5 # This make Character No.1 has max level at 5
end
class Scene_Battle < Scene_Base
def display_level_up
exp = $game_troop.exp_total
for actor in $game_party.existing_members
last_level = actor.level
last_skills = actor.skills
actor.gain_exp(exp, true)
end
wait_for_message
end
end
class Game_Actor < Game_Battler
attr_accessor :max_lv
alias wor_actor_setup setup
def setup(actor_id)
wor_actor_setup(actor_id)
if Wormaxlv::CHAR[actor_id] == nil
@max_lv = Wormaxlv::DEFAULT_LV_MAX
else
@max_lv = Wormaxlv::CHAR[actor_id]
end
end
def change_exp(exp, show)
last_level = @level
last_skills = skills
@exp = [[exp, 9999999].min, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0 and @level <= (@max_lv - 1)
level_up
end
while @exp < @exp_list[@level]
level_down
end
@hp = [@hp, maxhp].min
@mp = [@mp, maxmp].min
if show and @level > last_level
display_level_up(skills - last_skills)
end
end
end
InstructionFind these lines:
CODE
#------------------------------------
# SETUP MAX Level HERE
#------------------------------------
Below them, you will see this 2 lines (if you just setup the script)
CODE
DEFAULT_LV_MAX = 99 # Set Default Max Level
CHAR[1] = 5 # This make Character No.1 has max level at 5
QUOTE
DEFAULT_LV_MAX = value
^ The characters that you didn't set their specific max level will use this value as their max level
QUOTE
CHAR[actor_id from database] = value
^ You can set specific max level for character by using this template.
For example:CODE
CHAR[2] = 20
CHAR[4] = 10
This will make Actor No.2 in database has max level at 20.
and Actor No.4 will has max level at 10.
QUOTE
* You can set specific max level for specific character as much as you want, but set DEFAULT_LV_MAX only one time
** The Line CHAR[1] = 5 in original script is just for show how it works, you can delete/edit it
Author's NotesFree for use in your non-commercial work if credit included. If your project is commercial, please contact me.
Please do not redistribute this script without permission. If you want to post it on any forum, please link to this topic.
Special ThanksSoulofsin: For tutorial that inspired me to script this~^^