I'm sorry to open a new topic for that but I didn't found this request anywhere else.
I want make the maximum level to be 100 and not 99, i think this should do a little edit in the
game_actor but dunno^^ I would really apreciate your help
Lol, you saw that I added that in my game from my game topic, didn't you? :P
It's not really complicated to add that stuff, but you won't have any stats defined for those levels since the stat generation code of RMXP isn't really known. (I do know it because I reverse engineered it.)
No i didn't see that in your topic, i saw the whole break scripts by game_guy, so i searched for a lvl break but didn't find it. I think the thing with the states could be done within the script, so that you can define if actor 1 reaches lvl 100, add 4 str, 3 dex, 6 agi and so on, so only for the last lvl you can define the stats to gain in the script.
I was actually thinking about releasing either full script for that or at least put up the code to generate the values beyond level 99 so somebody else can make a script. It's not like it's a problem to make that script.
I got a great script for that by albertfish
You can change levels stats and all of that maxes of the player.
warning : long spoiler
#==============================================================================
# Unlimit Levels v1 by: cybersam
# date: 14.09.06
#
# Fixed by: albertfish
# Date: September 16, 2009
#
# What albertfish fixed:
# - Removed the use of global variables
# - Fixed the initial stat and growth problems
# - Initial stats used to be too high
# - Stats used to grow too fast
# - Stats now follow the curve created in the data base
# - After level 99 the stats increase by the same amount as they did
# between level 98 and level 99
#------------------------------------------------------------------------------
# here is a full working scripts for you to this... (i think there is
# already one like this somewhere in the in the community...
# i did one back then when i started in RPG Maker XP
# some other guys did a few other script like this
#==============================================================================
# Must go ABOVE leveling with points to work
#----------------------------------------------------------------------------
# here you can set the max hp,sp,,str,dex,agi and int
#----------------------------------------------------------------------------
module UL_af_config
FINAL_LVL = 10000
MAX_HP = 10000
MAX_SP = 10000
MAX_STR = 5000
MAX_DEX = 5000
MAX_AGI = 5000
MAX_INT = 5000
end
class Game_Actor
#include UL_af_config
#--------------------------------------------------------------------------
# setting the levels...
#--------------------------------------------------------------------------
def final_level
# here you can set the max level for your characters based on their ID's...
# i set it so that 3 characters have different levels and the rest
# have max lvl of 9999
#
# this settings is only to show you how to change the max setting for your
# characters... same thing is for the parameters -> hp,sp,str,dex.agi,int
case self.id
when 1
level = 100
when 2
level = 50
when 3
level = 50
when 4
level = 50
when 5
level = 50
when 6
level = 100
else
level = FINAL_LVL
end
return level
end
#--------------------------------------------------------------------------
# setting max hp...
#--------------------------------------------------------------------------
def max_hp
case self.id
when 1
hp = 10000
when 2
hp = 9999
when 8
hp = 6540
else
hp = MAX_HP
end
return hp
end
#--------------------------------------------------------------------------
# setting max sp...
#--------------------------------------------------------------------------
def max_sp
case self.id
when 1
sp = 999
when 2
sp = 9999
when 8
sp = 6540
else
sp = MAX_SP
end
return sp
end
#--------------------------------------------------------------------------
# setting max str...
#--------------------------------------------------------------------------
def max_str
case self.id
when 1
str = 999
when 2
str = 2560
when 8
str = 1800
else
str = MAX_STR
end
return str
end
#--------------------------------------------------------------------------
# setting max dex...
#--------------------------------------------------------------------------
def max_dex
case self.id
when 1
dex = 999
when 2
dex = 2560
when 8
dex = 1800
else
dex = MAX_DEX
end
return dex
end
#--------------------------------------------------------------------------
# setting max agi...
#--------------------------------------------------------------------------
def max_agi
case self.id
when 1
agi = 999
when 2
agi = 2560
when 8
agi = 1800
else
agi = MAX_AGI
end
return agi
end
#--------------------------------------------------------------------------
# setting max int...
#--------------------------------------------------------------------------
def max_int
case self.id
when 1
int = 999
when 2
int = 2560
when 8
int = 1800
else
int = MAX_INT
end
return int
end
#--------------------------------------------------------------------------
# Creating the new EXP list
# dont change anything from here on... (only if you know what you're doing)
#--------------------------------------------------------------------------
def make_exp_list
actor = $data_actors[@actor_id]
@exp_list = Array.new(final_level + 2)
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 1000.0
for i in 2..final_level + 1
if i > final_level
@exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list[i] = @exp_list[i-1] + Integer(n)
end
end
end
#--------------------------------------------------------------------------
# setting parameters like hp, sp, str, dex, agi and int
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, max_hp].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, max_hp].min
return n
end
def base_maxhp
af = $data_actors[@actor_id].parameters[0, @level] if @level <= 98
af = $data_actors[@actor_id].parameters[0, 98] unless @level <= 98
maxhp = af
maxhp += ($data_actors[@actor_id].parameters[0, 99] - af) * (@level - 98) unless @level <= 98
return maxhp
end
def base_maxsp
af = $data_actors[@actor_id].parameters[1, @level] if @level <= 98
af = $data_actors[@actor_id].parameters[1, 98] unless @level <= 98
maxsp = af
maxsp += ($data_actors[@actor_id].parameters[1, 99] - af) * (@level - 98) unless @level <= 98
return maxsp
end
def base_str
af = $data_actors[@actor_id].parameters[2, @level] if @level <= 98
af = $data_actors[@actor_id].parameters[2, 98] unless @level <= 98
n = af
n += ($data_actors[@actor_id].parameters[2, 99] - af) * (@level - 98) unless @level <= 98
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.str_plus : 0
n += armor1 != nil ? armor1.str_plus : 0
n += armor2 != nil ? armor2.str_plus : 0
n += armor3 != nil ? armor3.str_plus : 0
n += armor4 != nil ? armor4.str_plus : 0
return [[n, 1].max, max_str].min
end
def base_dex
af = $data_actors[@actor_id].parameters[3, @level] if @level <= 98
af = $data_actors[@actor_id].parameters[3, 98] unless @level <= 98
n = af
n += ($data_actors[@actor_id].parameters[3, 99] - af) * (@level - 98) unless @level <= 98
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.dex_plus : 0
n += armor1 != nil ? armor1.dex_plus : 0
n += armor2 != nil ? armor2.dex_plus : 0
n += armor3 != nil ? armor3.dex_plus : 0
n += armor4 != nil ? armor4.dex_plus : 0
return [[n, 1].max, max_dex].min
end
def base_agi
af = $data_actors[@actor_id].parameters[4, @level] if @level <= 98
af = $data_actors[@actor_id].parameters[4, 98] unless @level <= 98
n = af
n += ($data_actors[@actor_id].parameters[4, 99] - af) * (@level - 98) unless @level <= 98
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.agi_plus : 0
n += armor1 != nil ? armor1.agi_plus : 0
n += armor2 != nil ? armor2.agi_plus : 0
n += armor3 != nil ? armor3.agi_plus : 0
n += armor4 != nil ? armor4.agi_plus : 0
return [[n, 1].max, max_agi].min
end
def base_int
af = $data_actors[@actor_id].parameters[5, @level] if @level <= 98
af = $data_actors[@actor_id].parameters[5, 98] unless @level <= 98
n = af
n += ($data_actors[@actor_id].parameters[5, 99] - af) * (@level - 98) unless @level <= 98
weapon = $data_weapons[@weapon_id]
armor1 = $data_armors[@armor1_id]
armor2 = $data_armors[@armor2_id]
armor3 = $data_armors[@armor3_id]
armor4 = $data_armors[@armor4_id]
n += weapon != nil ? weapon.int_plus : 0
n += armor1 != nil ? armor1.int_plus : 0
n += armor2 != nil ? armor2.int_plus : 0
n += armor3 != nil ? armor3.int_plus : 0
n += armor4 != nil ? armor4.int_plus : 0
return [[n, 1].max, max_int].min
end
def exp=(exp)
@exp = [exp, 0].max
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
while @exp < @exp_list[@level]
@level -= 1
end
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
def level=(level)
level = [[level, final_level].min, 1].max
self.exp = @exp_list[level]
end
end
#==============================================================================
# ** Game_Battler
#==============================================================================
class Game_Battler
include UL_af_config
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, MAX_HP].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, MAX_HP].min
return n
end
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, MAX_SP].min
for i in @states
n *= $data_states[i].maxsp_rate / 100.0
end
n = [[Integer(n), 0].max, MAX_SP].min
return n
end
def str
n = [[base_str + @str_plus, 1].max, MAX_STR].min
for i in @states
n *= $data_states[i].str_rate / 100.0
end
n = [[Integer(n), 1].max, MAX_STR].min
return n
end
def dex
n = [[base_dex + @dex_plus, 1].max, MAX_DEX].min
for i in @states
n *= $data_states[i].dex_rate / 100.0
end
n = [[Integer(n), 1].max, MAX_DEX].min
return n
end
def agi
n = [[base_agi + @agi_plus, 1].max, MAX_AGI].min
for i in @states
n *= $data_states[i].agi_rate / 100.0
end
n = [[Integer(n), 1].max, MAX_AGI].min
return n
end
def int
n = [[base_int + @int_plus, 1].max, MAX_INT].min
for i in @states
n *= $data_states[i].int_rate / 100.0
end
n = [[Integer(n), 1].max, MAX_INT].min
return n
end
def maxhp=(maxhp)
@maxhp_plus += maxhp - self.maxhp
@maxhp_plus = [[@maxhp_plus, - MAX_HP].max, MAX_HP].min
@hp = [@hp, self.maxhp].min
end
def maxsp=(maxsp)
@maxsp_plus += maxsp - self.maxsp
@maxsp_plus = [[@maxsp_plus, - MAX_SP].max, MAX_SP].min
@sp = [@sp, self.maxsp].min
end
def str=(str)
@str_plus += str - self.str
@str_plus = [[@str_plus, - MAX_STR].max, MAX_STR].min
end
def dex=(dex)
@dex_plus += dex - self.dex
@dex_plus = [[@dex_plus, - MAX_DEX].max, MAX_DEX].min
end
def agi=(agi)
@agi_plus += agi - self.agi
@agi_plus = [[@agi_plus, - MAX_AGI].max, MAX_AGI].min
end
def int=(int)
@int_plus += int - self.int
@int_plus = [[@int_plus, - MAX_INT].max, MAX_INT].min
end
end
ok sounds cool but it looks like there is something missing. If i start a new game, there is an error in line 196, that says undefined method 'maxhp_rate'
ty
Lol, did you accidentally hit SUB instead of CODE tags? xD
Copy the script now, I fixed his post.
Also, that script is horrible. Manually setting up the values? It'll take days, maybe even weeks to set up the values for just a few characters that can go up to level 1000. :/ I think I should really put my code together into an actual script.
Quote from: Blizzard on January 03, 2010, 10:45:03 am
Also, that script is horrible. Manually setting up the values? It'll take days, maybe even weeks to set up the values for just a few characters that can go up to level 1000.
Yes right, but I just need one level :D but there is still a problem. as soon as i switch to the menu screen and a person is lvl 99 there is an error with my game_actor. and if this actor is at an lower level it messes up with the slanted bars script by sephirothspawn... i think i keep using the 99 lvl limit, even if it looks not good for me xD yeah i know it sounds weird but i think it is so^^
but ty both, lvl up^^
Maybe you should really wait a few days for my script. xD
Yes I do xD ty^^
If you let my I will also like to use your script blizz
I also just want my char to be max lv 100 nothing more.
Sure thing. I'll release it as public script for everybody to use.
Oi, well, not sure if its OK to drop other peoples scripts here, but this script works rather well for me. I tested it with the BlizzABS and everything :D
[Credits to KGC] :ninja:
Skip to line 45 or so to modify the maximum level and cap for stats etc.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ 限界突破 - KGC_LimitBreak ◆
#_/ ◇ Last update : 2008/01/10 ◇
#_/----------------------------------------------------------------------------
#_/ 各種設定値の上限を変更します。
#_/============================================================================
#_/ なるべく [Scene_Debug] のすぐ下に導入してください。
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================
module KGC
module LimitBreak
# ◆能力値算出方式
# 0..データベース通り。
# (100以降は計算式として ACTOR_LV100_CALC を使用)
#
# 1..データベースを用いた2次関数。
# a:レベル1の値 b:レベル2の値 c:レベル3の値 x:現レベル
# として、
# ax^2 + bx + c
# を用いて能力値を算出。
#
# 2..データベースを用いた1次関数。
# b:レベル2の値 c:レベル3の値 x:現レベル
# として、
# bx + c
# を用いて能力値を算出。
# (レベル2,3の値を使うのは、2次関数方式との使い分けを楽にするため)
CALC_PARAMETER_METHOD = 0
# ◆レベル 100 以降の能力値計算式
# (CALC_PARAMETER_METHOD が 0 のときに使用)
# 【lv..現レベル p[x]..レベル x の能力値】
# この計算結果をレベル 99 の能力値に加算。
ACTOR_LV100_CALC = "(p[99] - p[98]) * (lv - 99)"
# ◆アクターのレベル上限
# アクターID順に配列に格納(最初は nil)
ACTOR_LV_LIMIT = [nil]
# ◆上限未指定アクターのレベル上限
# THIS IS WHAT YOU CHANGE TO CHANGE THE MAXIMUM LEVEL
ACTOR_LV_LIMIT_DEFAULT = 1000
# ◆アクターの経験値上限
ACTOR_EXP_LIMIT = 999999999999999999
# ◆アクターのHP上限
ACTOR_HP_LIMIT = 9999999
# ◆アクターのSP上限
ACTOR_SP_LIMIT = 9999999
# ◆アクターの「腕力, 器用さ, 素早さ, 魔力」上限
ACTOR_ETC_LIMIT = 9999999
# ◆敵のHP上限
ENEMY_HP_LIMIT = 9999999
# ◆敵のSP上限
ENEMY_SP_LIMIT = 9999999
# ◆敵の「腕力, 器用さ, 素早さ, 魔力」上限
ENEMY_ETC_LIMIT = 9999999
# ◆アクター能力値修正値(百分率)
# アクターの能力値がデータベースの設定値の○%になる。
# (上限値が高い場合に使用。データベースの値を使う場合は 100)
ACTOR_MAXHP_REVISE = 100 # MAXHP
ACTOR_MAXSP_REVISE = 100 # MAXSP
ACTOR_STR_REVISE = 100 # 腕力
ACTOR_DEX_REVISE = 100 # 器用さ
ACTOR_AGI_REVISE = 100 # 素早さ
ACTOR_INT_REVISE = 100 # 魔力
# ◆敵能力値修正値(百分率)
# 敵の能力値がデータベースの設定値の○%になる。
ENEMY_MAXHP_REVISE = 100 # MAXHP
ENEMY_MAXSP_REVISE = 100 # MAXSP
ENEMY_STR_REVISE = 100 # 腕力
ENEMY_DEX_REVISE = 100 # 器用さ
ENEMY_AGI_REVISE = 100 # 素早さ
ENEMY_INT_REVISE = 100 # 魔力
ENEMY_ATK_REVISE = 100 # 攻撃力
ENEMY_PDEF_REVISE = 100 # 物理防御
ENEMY_MDEF_REVISE = 100 # 魔法防御
# ◆所持金上限
GOLD_LIMIT = 99999999
# ◆アイテム所持数上限
ITEM_LIMIT = [] # ← これは消さないこと!
# この下に、アイテム所持数の上限を
# ITEM_LIMIT[アイテムID] = 所持数上限
# という書式で設定。
# <例> アイテム 1 は 99 個所持可能
ITEM_LIMIT[1] = 99
# ◆武器所持数上限
# 指定方法はアイテムと同じ。
WEAPON_LIMIT = [] # ← これは消さないこと!
# ◆防具所持数上限
# 指定方法はアイテムと同じ。
ARMOR_LIMIT = [] # ← これは消さないこと!
# ◆アイテム所持数上限 (デフォルト)
# 上限を指定しなかったアイテム、武器、防具はこの値を上限として使用。
ITEM_LIMIT_DEFAULT = 1000
module_function
#--------------------------------------------------------------------------
# ○ 敵能力値直接指定
# ここで、敵の最大HPなどを直接指定することができます。
# データベースに入りきらない数値を指定する場合に使用してください。
#--------------------------------------------------------------------------
def set_enemy_status
# <例> ID:10 の敵のHPを 2000000 にする場合
# $data_enemies[10].maxhp = 2000000
# <例> ID:16 の敵の攻撃力を 5000 にする場合
# $data_enemies[16].atk = 5000
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
$imported = {} if $imported == nil
$imported["LimitBreak"] = true
if $game_special_elements == nil
$game_special_elements = {}
$data_system = load_data("Data/System.rxdata")
end
module KGC::LimitBreak
module_function
#--------------------------------------------------------------------------
# ● 敵の能力補正を適用
#--------------------------------------------------------------------------
def revise_enemy_parameters
(1...$data_enemies.size).each { |i|
enemy = $data_enemies[i]
enemy.maxhp = enemy.maxhp * ENEMY_MAXHP_REVISE / 100
enemy.maxsp = enemy.maxsp * ENEMY_MAXSP_REVISE / 100
enemy.str = enemy.str * ENEMY_STR_REVISE / 100
enemy.dex = enemy.dex * ENEMY_DEX_REVISE / 100
enemy.agi = enemy.agi * ENEMY_AGI_REVISE / 100
enemy.int = enemy.int * ENEMY_INT_REVISE / 100
enemy.atk = enemy.atk * ENEMY_ATK_REVISE / 100
enemy.pdef = enemy.pdef * ENEMY_PDEF_REVISE / 100
enemy.mdef = enemy.mdef * ENEMY_MDEF_REVISE / 100
}
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ RPG::Item
#==============================================================================
class RPG::Item
#--------------------------------------------------------------------------
# ● 所持数上限
#--------------------------------------------------------------------------
def number_limit
if KGC::LimitBreak::ITEM_LIMIT[self.id] != nil
return KGC::LimitBreak::ITEM_LIMIT[self.id]
else
return KGC::LimitBreak::ITEM_LIMIT_DEFAULT
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ RPG::Weapon
#==============================================================================
class RPG::Weapon
#--------------------------------------------------------------------------
# ● 所持数上限
#--------------------------------------------------------------------------
def number_limit
if KGC::LimitBreak::WEAPON_LIMIT[self.id] != nil
return KGC::LimitBreak::WEAPON_LIMIT[self.id]
else
return KGC::LimitBreak::ITEM_LIMIT_DEFAULT
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ RPG::Armor
#==============================================================================
class RPG::Armor
#--------------------------------------------------------------------------
# ● 所持数上限
#--------------------------------------------------------------------------
def number_limit
if KGC::LimitBreak::ARMOR_LIMIT[self.id] != nil
return KGC::LimitBreak::ARMOR_LIMIT[self.id]
else
return KGC::LimitBreak::ITEM_LIMIT_DEFAULT
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Battler (分割定義 1)
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [base_maxhp + @maxhp_plus, 1].max
@states.each { |i| n *= $data_states[i].maxhp_rate / 100.0 }
n = [[Integer(n), 1].max, maxhp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● MaxSP の取得
#--------------------------------------------------------------------------
def maxsp
n = [base_maxsp + @maxsp_plus, 0].max
@states.each { |i| n *= $data_states[i].maxsp_rate / 100.0 }
n = [[Integer(n), 0].max, maxsp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 腕力の取得
#--------------------------------------------------------------------------
def str
n = [base_str + @str_plus, 1].max
@states.each { |i| n *= $data_states[i].str_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 器用さの取得
#--------------------------------------------------------------------------
def dex
n = [base_dex + @dex_plus, 1].max
@states.each { |i| n *= $data_states[i].dex_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 素早さの取得
#--------------------------------------------------------------------------
def agi
n = [base_agi + @agi_plus, 1].max
@states.each { |i| n *= $data_states[i].agi_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 魔力の取得
#--------------------------------------------------------------------------
def int
n = [base_int + @int_plus, 1].max
@states.each { |i| n *= $data_states[i].int_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● MaxHP の設定
# maxhp : 新しい MaxHP
#--------------------------------------------------------------------------
def maxhp=(maxhp)
@maxhp_plus += maxhp - self.maxhp
@maxhp_plus = [[@maxhp_plus, -maxhp_limit].max, maxhp_limit].min
@hp = [@hp, self.maxhp].min
end
#--------------------------------------------------------------------------
# ● MaxSP の設定
# maxsp : 新しい MaxSP
#--------------------------------------------------------------------------
def maxsp=(maxsp)
@maxsp_plus += maxsp - self.maxsp
@maxsp_plus = [[@maxsp_plus, -maxsp_limit].max, maxsp_limit].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● 腕力の設定
# str : 新しい腕力
#--------------------------------------------------------------------------
def str=(str)
@str_plus += str - self.str
@str_plus = [[@str_plus, -parameter_limit].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 器用さの設定
# dex : 新しい器用さ
#--------------------------------------------------------------------------
def dex=(dex)
@dex_plus += dex - self.dex
@dex_plus = [[@dex_plus, -parameter_limit].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 素早さの設定
# agi : 新しい素早さ
#--------------------------------------------------------------------------
def agi=(agi)
@agi_plus += agi - self.agi
@agi_plus = [[@agi_plus, -parameter_limit].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 魔力の設定
# int : 新しい魔力
#--------------------------------------------------------------------------
def int=(int)
@int_plus += int - self.int
@int_plus = [[@int_plus, -parameter_limit].max, parameter_limit].min
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● EXP 計算
#--------------------------------------------------------------------------
def make_exp_list
actor = $data_actors[@actor_id]
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
(2..(self.final_level + 1)).each { |i|
if i > self.final_level
@exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list[i] = @exp_list[i-1] + Integer(n)
end
}
end
#--------------------------------------------------------------------------
# ● EXP の変更
# exp : 新しい EXP
#--------------------------------------------------------------------------
def exp=(exp)
if $imported["ExpGoldIncrease"]
rate = calc_exp_increase_rate(KGC::EXPGLD_INC_PERMIT_DOUBLE)
exp = @exp + (exp - @exp) * rate / 100
end
@exp = [[exp, KGC::LimitBreak::ACTOR_EXP_LIMIT].min, 0].max
# レベルアップ
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# スキル習得
$data_classes[@class_id].learnings.each { |j|
if j.level == @level
learn_skill(j.skill_id)
end
}
end
# レベルダウン
while @exp < @exp_list[@level]
@level -= 1
end
# 現在の HP と SP が最大値を超えていたら修正
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ○ パラメータの取得
#--------------------------------------------------------------------------
if KGC::LimitBreak::CALC_PARAMETER_METHOD == 0
def parameter(type)
if @level >= 100
calc_text = KGC::LimitBreak::ACTOR_LV100_CALC.dup
calc_text.gsub!(/lv/i) { "@level" }
calc_text.gsub!(/p\[(\d+)\]/i) {
"$data_actors[@actor_id].parameters[type, #{$1.to_i}]"
}
return $data_actors[@actor_id].parameters[type, 99] + eval(calc_text)
else
return $data_actors[@actor_id].parameters[type, @level]
end
end
elsif KGC::LimitBreak::CALC_PARAMETER_METHOD == 1
def parameter(type)
a = $data_actors[@actor_id].parameters[type, 1]
b = $data_actors[@actor_id].parameters[type, 2]
c = $data_actors[@actor_id].parameters[type, 3]
return a * @level * @level + b * @level + c
end
elsif KGC::LimitBreak::CALC_PARAMETER_METHOD == 2
def parameter(type)
b = $data_actors[@actor_id].parameters[type, 2]
c = $data_actors[@actor_id].parameters[type, 3]
return b * @level + c
end
end
#--------------------------------------------------------------------------
# ● 基本 MaxHP の取得
#--------------------------------------------------------------------------
def base_maxhp
n = self.parameter(0)
return n * KGC::LimitBreak::ACTOR_MAXHP_REVISE / 100
end
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [base_maxhp + @maxhp_plus, 1].max
@states.each { |i| n *= $data_states[i].maxhp_rate / 100.0 }
n = [[Integer(n), 1].max, maxhp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 基本 MaxSP の取得
#--------------------------------------------------------------------------
def base_maxsp
n = self.parameter(1)
return n * KGC::LimitBreak::ACTOR_MAXSP_REVISE / 100
end
#--------------------------------------------------------------------------
# ● MaxSP の取得
#--------------------------------------------------------------------------
def maxsp
n = [base_maxsp + @maxsp_plus, 0].max
@states.each { |i| n *= $data_states[i].maxsp_rate / 100.0 }
n = [[Integer(n), 0].max, maxsp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 基本腕力の取得
#--------------------------------------------------------------------------
def base_str
n = self.parameter(2)
if $imported["EquipExtension"]
n += equipment_parameter(2)
else
equip_item_list.each { |item| n += (item != nil ? item.str_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_STR_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 基本器用さの取得
#--------------------------------------------------------------------------
def base_dex
n = self.parameter(3)
if $imported["EquipExtension"]
n += equipment_parameter(3)
else
equip_item_list.each { |item| n += (item != nil ? item.dex_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_DEX_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 基本素早さの取得
#--------------------------------------------------------------------------
def base_agi
n = self.parameter(4)
if $imported["EquipExtension"]
n += equipment_parameter(4)
else
equip_item_list.each { |item| n += (item != nil ? item.agi_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_AGI_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 基本魔力の取得
#--------------------------------------------------------------------------
def base_int
n = self.parameter(5)
if $imported["EquipExtension"]
n += equipment_parameter(5)
else
equip_item_list.each { |item| n += (item != nil ? item.int_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_INT_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● レベルの変更
# level : 新しいレベル
#--------------------------------------------------------------------------
def level=(level)
# 上下限チェック
level = [[level, self.final_level].min, 1].max
# EXP を変更
self.exp = @exp_list[level]
end
#--------------------------------------------------------------------------
# ● 最終レベルの取得
#--------------------------------------------------------------------------
def final_level
return (KGC::LimitBreak::ACTOR_LV_LIMIT[@actor_id] != nil ?
KGC::LimitBreak::ACTOR_LV_LIMIT[@actor_id] : KGC::LimitBreak::ACTOR_LV_LIMIT_DEFAULT)
end
#--------------------------------------------------------------------------
# ○ MaxHP 限界値の取得
#--------------------------------------------------------------------------
def maxhp_limit
return KGC::LimitBreak::ACTOR_HP_LIMIT
end
#--------------------------------------------------------------------------
# ○ MaxSP 限界値の取得
#--------------------------------------------------------------------------
def maxsp_limit
return KGC::LimitBreak::ACTOR_SP_LIMIT
end
#--------------------------------------------------------------------------
# ○ パラメータ限界値の取得
#--------------------------------------------------------------------------
def parameter_limit
return KGC::LimitBreak::ACTOR_ETC_LIMIT
end
#--------------------------------------------------------------------------
# ○ 装備武器リストの取得
#--------------------------------------------------------------------------
def equip_weapon_list
result = [$data_weapons[@weapon_id]]
return result.compact
end
#--------------------------------------------------------------------------
# ○ 装備防具リストの取得
#--------------------------------------------------------------------------
def equip_armor_list
result = []
(1..4).each { |i| result << $data_armors[eval("@armor#{i}_id")] }
return result.compact
end
#--------------------------------------------------------------------------
# ○ 装備品リストの取得
#--------------------------------------------------------------------------
def equip_item_list
return equip_weapon_list + equip_armor_list
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ○ MaxHP 限界値の取得
#--------------------------------------------------------------------------
def maxhp_limit
return KGC::LimitBreak::ENEMY_HP_LIMIT
end
#--------------------------------------------------------------------------
# ○ MaxSP 限界値の取得
#--------------------------------------------------------------------------
def maxsp_limit
return KGC::LimitBreak::ENEMY_SP_LIMIT
end
#--------------------------------------------------------------------------
# ○ パラメータ限界値の取得
#--------------------------------------------------------------------------
def parameter_limit
return KGC::LimitBreak::ENEMY_ETC_LIMIT
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Party
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# ● ゴールドの増加 (減少)
# n : 金額
#--------------------------------------------------------------------------
def gain_gold(n)
# 所持金の限界値変更
@gold = [[@gold + n, 0].max, KGC::LimitBreak::GOLD_LIMIT].min
end
#--------------------------------------------------------------------------
# ● アイテムの増加 (減少)
# item_id : アイテム ID
# n : 個数
#--------------------------------------------------------------------------
def gain_item(item_id, n)
# ハッシュの個数データを更新
if item_id > 0
limit = $data_items[item_id].number_limit
@items[item_id] = [[item_number(item_id) + n, 0].max, limit].min
end
end
#--------------------------------------------------------------------------
# ● 武器の増加 (減少)
# weapon_id : 武器 ID
# n : 個数
#--------------------------------------------------------------------------
def gain_weapon(weapon_id, n)
# ハッシュの個数データを更新
if weapon_id > 0
limit = $data_weapons[weapon_id].number_limit
@weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, limit].min
end
end
#--------------------------------------------------------------------------
# ● 防具の増加 (減少)
# armor_id : 防具 ID
# n : 個数
#--------------------------------------------------------------------------
def gain_armor(armor_id, n)
# ハッシュの個数データを更新
if armor_id > 0
limit = $data_armors[armor_id].number_limit
@armors[armor_id] = [[armor_number(armor_id) + n, 0].max, limit].min
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Window_ShopBuy
#==============================================================================
class Window_ShopBuy < Window_Selectable
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
# アイテムの所持数を取得
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
# 価格が所持金以下、かつ所持数が上限でなければ通常文字色に、
# そうでなければ無効文字色に設定
if item.price <= $game_party.gold && number < item.number_limit
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4
y = index * 32
rect = Rect.new(x, y, self.width - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 88, 32, item.price.to_s, 2)
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Scene_Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# ● コマンド : ニューゲーム
#--------------------------------------------------------------------------
alias command_new_game_KGC_LimitBreak command_new_game
def command_new_game
command_new_game_KGC_LimitBreak
KGC::LimitBreak.revise_enemy_parameters
KGC::LimitBreak.set_enemy_status
end
#--------------------------------------------------------------------------
# ● コマンド : コンティニュー
#--------------------------------------------------------------------------
alias command_continue_KGC_LimitBreak command_continue
def command_continue
command_continue_KGC_LimitBreak
KGC::LimitBreak.revise_enemy_parameters
KGC::LimitBreak.set_enemy_status
end
#--------------------------------------------------------------------------
# ● 戦闘テスト
#--------------------------------------------------------------------------
alias battle_test_KGC_LimitBreak battle_test
def battle_test
battle_test_KGC_LimitBreak
KGC::LimitBreak.revise_enemy_parameters
KGC::LimitBreak.set_enemy_status
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Scene_Shop
#==============================================================================
class Scene_Shop
#--------------------------------------------------------------------------
# ● フレーム更新 (購入ウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_buy
# ステータスウィンドウのアイテムを設定
@status_window.item = @buy_window.item
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# ウィンドウの状態を初期モードへ
@command_window.active = true
@dummy_window.visible = true
@buy_window.active = false
@buy_window.visible = false
@status_window.visible = false
@status_window.item = nil
# ヘルプテキストを消去
@help_window.set_text("")
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# アイテムを取得
@item = @buy_window.item
# アイテムが無効の場合、または価格が所持金より上の場合
if @item == nil or @item.price > $game_party.gold
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# アイテムの所持数を取得
case @item
when RPG::Item
number = $game_party.item_number(@item.id)
when RPG::Weapon
number = $game_party.weapon_number(@item.id)
when RPG::Armor
number = $game_party.armor_number(@item.id)
end
# すでに上限まで個所持している場合
limit = @item.number_limit
if number >= limit
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# 最大購入可能個数を計算
max = (@item.price == 0 ? limit : $game_party.gold / @item.price)
max = [max, limit - number].min
# ウィンドウの状態を個数入力モードへ
@buy_window.active = false
@buy_window.visible = false
@number_window.set(@item, max, @item.price)
@number_window.active = true
@number_window.visible = true
end
end
end
I don't think there's anything wrong with that. Also, I added Code Tags to your post.
Didn't game_guy make a few scripts that broke some of the limits? They're in the Database, I'm sure of it...
Oh btw, StarrodKirby, I just want you to know that yu get +1 levels just because your avatar thingie represents all that is heavenly and divine here on this earth.
G_G didn't make a level breaker.
Though I know Blizzard is working on a public release of his level limit breaker, I thought I'd take the time to translate the comments/instructions in that KGC script. It handles a bit more than just levels when it comes to limit breaking. It's not a perfect translation and some sentences I couldn't figure out at all, but I figure it should be enough to work with it.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ◆ 限界突破 - KGC_LimitBreak ◆
#_/ ◇ Last update : 2008/01/10 ◇
#_/----------------------------------------------------------------------------
#_/ Allows you to break the limit on all kinds of database values
#_/============================================================================
#_/ Place below Scene_Debug.
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ★ CONFIG ★
#==============================================================================
module KGC
module LimitBreak
# ◆Parameter formula
# 0 Database Values
# Uses Database defines Parameter values for Levels 1-99
# Uses ACTOR_LV100_CALC for levels past 99
#
# 1 Quadratic Formula
# Uses ax^2 + bx + c where,
# a = Value at Level 1 b = Value at Level 2 c = Value at Level 3 x = Actor's Current Level
#
#
# 2 Linear Formula
# Uses bx + c where,
# b = Value at Level 2 c = Value at Level 3 x = Actor's Current Level
#
# (レベル2,3の値を使うのは、2次関数方式との使い分けを楽にするため)
# ^No idea about this one. I'm leaving it in with a quick warning that
# something MIGHT go wrong. Though I doubt it.
CALC_PARAMETER_METHOD = 0
# ◆Level 100+ Parameter Formula
# (Only used when CALC_PARAMETER METHOD is 0)
# 【lv = Actor's Current Level p[X] = Parameter value at Level X】
# THE RESULT WILL BE ADDED TO THE VALUE AT LEVEL 99.
ACTOR_LV100_CALC = "(p[99] - p[98]) * (lv - 99)"
# ◆Actor Level Limit
# アクターID順に配列に格納(最初は nil)
# ^Another stumper, but I think it means that only Actors listed in the array, in order
# will be affected by the Level limit change, and that a value of nil (default) will cover them all.
ACTOR_LV_LIMIT = [nil]
# ◆Maximum Level
ACTOR_LV_LIMIT_DEFAULT = 1000
# ◆Maximum EXP (Make sure that it's big enough to reach your max level)
ACTOR_EXP_LIMIT = 999999999999999999
# ◆Maximum Possible Actor HP
ACTOR_HP_LIMIT = 9999999
# ◆Maximum Possible Actor SP
ACTOR_SP_LIMIT = 9999999
# ◆Maximum Possible Actor Parameters
ACTOR_ETC_LIMIT = 9999999
# ◆Maximum Possible Enemy HP
ENEMY_HP_LIMIT = 9999999
# ◆Maximum Possible Enemy SP
ENEMY_SP_LIMIT = 9999999
# ◆Maximum Possible Enemy Parameters
ENEMY_ETC_LIMIT = 9999999
# ◆Actor parameter Revision (Percentage)
# Actor Parameters will be multiplied by the percentage values below.
ACTOR_MAXHP_REVISE = 100 # MAXHP
ACTOR_MAXSP_REVISE = 100 # MAXSP
ACTOR_STR_REVISE = 100 # STR
ACTOR_DEX_REVISE = 100 # DEX
ACTOR_AGI_REVISE = 100 # AGI
ACTOR_INT_REVISE = 100 # INT
# ◆Enemy Parameter Revision (Percentage)
# Same as above, but for enemies
ENEMY_MAXHP_REVISE = 100 # MAXHP
ENEMY_MAXSP_REVISE = 100 # MAXSP
ENEMY_STR_REVISE = 100 # STR
ENEMY_DEX_REVISE = 100 # DEX
ENEMY_AGI_REVISE = 100 # AGI
ENEMY_INT_REVISE = 100 # INT
ENEMY_ATK_REVISE = 100 # ATK
ENEMY_PDEF_REVISE = 100 # PDEF
ENEMY_MDEF_REVISE = 100 # MDEF
# ◆Maximum Money
GOLD_LIMIT = 99999999
# ◆Maximum Identical Items
ITEM_LIMIT = [] # ← DO NOT TOUCH THIS LINE!!
# Use:
# ITEM_LIMIT[item id] = maximum
# For example, ITEM_LIMIT[1] = 200 would let you carry 200 Potions
# Add as many lines as needed
ITEM_LIMIT[1] = 99
# ◆Maximum identical weapons
# Same as above, except for weapons
WEAPON_LIMIT = [] # ← DO NOT TOUCH THIS LINE!!
# ◆Maximum identical armors
# Same as above, except for armor
ARMOR_LIMIT = [] # ← DO NOT TOUCH THIS LINE!!
# ◆Default item/weapon/armor limit
# Any items/weapons/armor not defined above will use this value as their maximum
ITEM_LIMIT_DEFAULT = 1000
module_function
#--------------------------------------------------------------------------
# ○ Enemy Parameter Override
# Allows you to replace Enemy Parameters in the Database
# Only use this if the value doesn't fit in the Database
#--------------------------------------------------------------------------
def set_enemy_status
# Syntax: $data_enemies[ENEMY_ID].STAT = VALUE
# Where ENEMY_ID is the ID of the enemy in the Database
# STAT one of maxhp, maxsp, str, dex, agi, int, atk, pdef, or mdef
# and VALUE is the new value of the parameter.
# Examples:
# $data_enemies[10].maxhp = 2000000
# $data_enemies[16].atk = 5000
end
end
end
# DO NOT EDIT PAST THIS LINE
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
$imported = {} if $imported == nil
$imported["LimitBreak"] = true
if $game_special_elements == nil
$game_special_elements = {}
$data_system = load_data("Data/System.rxdata")
end
module KGC::LimitBreak
module_function
#--------------------------------------------------------------------------
# ● 敵の能力補正を適用
#--------------------------------------------------------------------------
def revise_enemy_parameters
(1...$data_enemies.size).each { |i|
enemy = $data_enemies[i]
enemy.maxhp = enemy.maxhp * ENEMY_MAXHP_REVISE / 100
enemy.maxsp = enemy.maxsp * ENEMY_MAXSP_REVISE / 100
enemy.str = enemy.str * ENEMY_STR_REVISE / 100
enemy.dex = enemy.dex * ENEMY_DEX_REVISE / 100
enemy.agi = enemy.agi * ENEMY_AGI_REVISE / 100
enemy.int = enemy.int * ENEMY_INT_REVISE / 100
enemy.atk = enemy.atk * ENEMY_ATK_REVISE / 100
enemy.pdef = enemy.pdef * ENEMY_PDEF_REVISE / 100
enemy.mdef = enemy.mdef * ENEMY_MDEF_REVISE / 100
}
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ RPG::Item
#==============================================================================
class RPG::Item
#--------------------------------------------------------------------------
# ● 所持数上限
#--------------------------------------------------------------------------
def number_limit
if KGC::LimitBreak::ITEM_LIMIT[self.id] != nil
return KGC::LimitBreak::ITEM_LIMIT[self.id]
else
return KGC::LimitBreak::ITEM_LIMIT_DEFAULT
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ RPG::Weapon
#==============================================================================
class RPG::Weapon
#--------------------------------------------------------------------------
# ● 所持数上限
#--------------------------------------------------------------------------
def number_limit
if KGC::LimitBreak::WEAPON_LIMIT[self.id] != nil
return KGC::LimitBreak::WEAPON_LIMIT[self.id]
else
return KGC::LimitBreak::ITEM_LIMIT_DEFAULT
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ RPG::Armor
#==============================================================================
class RPG::Armor
#--------------------------------------------------------------------------
# ● 所持数上限
#--------------------------------------------------------------------------
def number_limit
if KGC::LimitBreak::ARMOR_LIMIT[self.id] != nil
return KGC::LimitBreak::ARMOR_LIMIT[self.id]
else
return KGC::LimitBreak::ITEM_LIMIT_DEFAULT
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Battler (分割定義 1)
#==============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [base_maxhp + @maxhp_plus, 1].max
@states.each { |i| n *= $data_states[i].maxhp_rate / 100.0 }
n = [[Integer(n), 1].max, maxhp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● MaxSP の取得
#--------------------------------------------------------------------------
def maxsp
n = [base_maxsp + @maxsp_plus, 0].max
@states.each { |i| n *= $data_states[i].maxsp_rate / 100.0 }
n = [[Integer(n), 0].max, maxsp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 腕力の取得
#--------------------------------------------------------------------------
def str
n = [base_str + @str_plus, 1].max
@states.each { |i| n *= $data_states[i].str_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 器用さの取得
#--------------------------------------------------------------------------
def dex
n = [base_dex + @dex_plus, 1].max
@states.each { |i| n *= $data_states[i].dex_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 素早さの取得
#--------------------------------------------------------------------------
def agi
n = [base_agi + @agi_plus, 1].max
@states.each { |i| n *= $data_states[i].agi_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 魔力の取得
#--------------------------------------------------------------------------
def int
n = [base_int + @int_plus, 1].max
@states.each { |i| n *= $data_states[i].int_rate / 100.0 }
n = [[Integer(n), 1].max, parameter_limit].min
return n
end
#--------------------------------------------------------------------------
# ● MaxHP の設定
# maxhp : 新しい MaxHP
#--------------------------------------------------------------------------
def maxhp=(maxhp)
@maxhp_plus += maxhp - self.maxhp
@maxhp_plus = [[@maxhp_plus, -maxhp_limit].max, maxhp_limit].min
@hp = [@hp, self.maxhp].min
end
#--------------------------------------------------------------------------
# ● MaxSP の設定
# maxsp : 新しい MaxSP
#--------------------------------------------------------------------------
def maxsp=(maxsp)
@maxsp_plus += maxsp - self.maxsp
@maxsp_plus = [[@maxsp_plus, -maxsp_limit].max, maxsp_limit].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● 腕力の設定
# str : 新しい腕力
#--------------------------------------------------------------------------
def str=(str)
@str_plus += str - self.str
@str_plus = [[@str_plus, -parameter_limit].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 器用さの設定
# dex : 新しい器用さ
#--------------------------------------------------------------------------
def dex=(dex)
@dex_plus += dex - self.dex
@dex_plus = [[@dex_plus, -parameter_limit].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 素早さの設定
# agi : 新しい素早さ
#--------------------------------------------------------------------------
def agi=(agi)
@agi_plus += agi - self.agi
@agi_plus = [[@agi_plus, -parameter_limit].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 魔力の設定
# int : 新しい魔力
#--------------------------------------------------------------------------
def int=(int)
@int_plus += int - self.int
@int_plus = [[@int_plus, -parameter_limit].max, parameter_limit].min
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● EXP 計算
#--------------------------------------------------------------------------
def make_exp_list
actor = $data_actors[@actor_id]
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
(2..(self.final_level + 1)).each { |i|
if i > self.final_level
@exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list[i] = @exp_list[i-1] + Integer(n)
end
}
end
#--------------------------------------------------------------------------
# ● EXP の変更
# exp : 新しい EXP
#--------------------------------------------------------------------------
def exp=(exp)
if $imported["ExpGoldIncrease"]
rate = calc_exp_increase_rate(KGC::EXPGLD_INC_PERMIT_DOUBLE)
exp = @exp + (exp - @exp) * rate / 100
end
@exp = [[exp, KGC::LimitBreak::ACTOR_EXP_LIMIT].min, 0].max
# レベルアップ
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# スキル習得
$data_classes[@class_id].learnings.each { |j|
if j.level == @level
learn_skill(j.skill_id)
end
}
end
# レベルダウン
while @exp < @exp_list[@level]
@level -= 1
end
# 現在の HP と SP が最大値を超えていたら修正
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ○ パラメータの取得
#--------------------------------------------------------------------------
if KGC::LimitBreak::CALC_PARAMETER_METHOD == 0
def parameter(type)
if @level >= 100
calc_text = KGC::LimitBreak::ACTOR_LV100_CALC.dup
calc_text.gsub!(/lv/i) { "@level" }
calc_text.gsub!(/p\[(\d+)\]/i) {
"$data_actors[@actor_id].parameters[type, #{$1.to_i}]"
}
return $data_actors[@actor_id].parameters[type, 99] + eval(calc_text)
else
return $data_actors[@actor_id].parameters[type, @level]
end
end
elsif KGC::LimitBreak::CALC_PARAMETER_METHOD == 1
def parameter(type)
a = $data_actors[@actor_id].parameters[type, 1]
b = $data_actors[@actor_id].parameters[type, 2]
c = $data_actors[@actor_id].parameters[type, 3]
return a * @level * @level + b * @level + c
end
elsif KGC::LimitBreak::CALC_PARAMETER_METHOD == 2
def parameter(type)
b = $data_actors[@actor_id].parameters[type, 2]
c = $data_actors[@actor_id].parameters[type, 3]
return b * @level + c
end
end
#--------------------------------------------------------------------------
# ● 基本 MaxHP の取得
#--------------------------------------------------------------------------
def base_maxhp
n = self.parameter(0)
return n * KGC::LimitBreak::ACTOR_MAXHP_REVISE / 100
end
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [base_maxhp + @maxhp_plus, 1].max
@states.each { |i| n *= $data_states[i].maxhp_rate / 100.0 }
n = [[Integer(n), 1].max, maxhp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 基本 MaxSP の取得
#--------------------------------------------------------------------------
def base_maxsp
n = self.parameter(1)
return n * KGC::LimitBreak::ACTOR_MAXSP_REVISE / 100
end
#--------------------------------------------------------------------------
# ● MaxSP の取得
#--------------------------------------------------------------------------
def maxsp
n = [base_maxsp + @maxsp_plus, 0].max
@states.each { |i| n *= $data_states[i].maxsp_rate / 100.0 }
n = [[Integer(n), 0].max, maxsp_limit].min
return n
end
#--------------------------------------------------------------------------
# ● 基本腕力の取得
#--------------------------------------------------------------------------
def base_str
n = self.parameter(2)
if $imported["EquipExtension"]
n += equipment_parameter(2)
else
equip_item_list.each { |item| n += (item != nil ? item.str_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_STR_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 基本器用さの取得
#--------------------------------------------------------------------------
def base_dex
n = self.parameter(3)
if $imported["EquipExtension"]
n += equipment_parameter(3)
else
equip_item_list.each { |item| n += (item != nil ? item.dex_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_DEX_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 基本素早さの取得
#--------------------------------------------------------------------------
def base_agi
n = self.parameter(4)
if $imported["EquipExtension"]
n += equipment_parameter(4)
else
equip_item_list.each { |item| n += (item != nil ? item.agi_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_AGI_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● 基本魔力の取得
#--------------------------------------------------------------------------
def base_int
n = self.parameter(5)
if $imported["EquipExtension"]
n += equipment_parameter(5)
else
equip_item_list.each { |item| n += (item != nil ? item.int_plus : 0) }
end
return [[n * KGC::LimitBreak::ACTOR_INT_REVISE / 100, 1].max, parameter_limit].min
end
#--------------------------------------------------------------------------
# ● レベルの変更
# level : 新しいレベル
#--------------------------------------------------------------------------
def level=(level)
# 上下限チェック
level = [[level, self.final_level].min, 1].max
# EXP を変更
self.exp = @exp_list[level]
end
#--------------------------------------------------------------------------
# ● 最終レベルの取得
#--------------------------------------------------------------------------
def final_level
return (KGC::LimitBreak::ACTOR_LV_LIMIT[@actor_id] != nil ?
KGC::LimitBreak::ACTOR_LV_LIMIT[@actor_id] : KGC::LimitBreak::ACTOR_LV_LIMIT_DEFAULT)
end
#--------------------------------------------------------------------------
# ○ MaxHP 限界値の取得
#--------------------------------------------------------------------------
def maxhp_limit
return KGC::LimitBreak::ACTOR_HP_LIMIT
end
#--------------------------------------------------------------------------
# ○ MaxSP 限界値の取得
#--------------------------------------------------------------------------
def maxsp_limit
return KGC::LimitBreak::ACTOR_SP_LIMIT
end
#--------------------------------------------------------------------------
# ○ パラメータ限界値の取得
#--------------------------------------------------------------------------
def parameter_limit
return KGC::LimitBreak::ACTOR_ETC_LIMIT
end
#--------------------------------------------------------------------------
# ○ 装備武器リストの取得
#--------------------------------------------------------------------------
def equip_weapon_list
result = [$data_weapons[@weapon_id]]
return result.compact
end
#--------------------------------------------------------------------------
# ○ 装備防具リストの取得
#--------------------------------------------------------------------------
def equip_armor_list
result = []
(1..4).each { |i| result << $data_armors[eval("@armor#{i}_id")] }
return result.compact
end
#--------------------------------------------------------------------------
# ○ 装備品リストの取得
#--------------------------------------------------------------------------
def equip_item_list
return equip_weapon_list + equip_armor_list
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ○ MaxHP 限界値の取得
#--------------------------------------------------------------------------
def maxhp_limit
return KGC::LimitBreak::ENEMY_HP_LIMIT
end
#--------------------------------------------------------------------------
# ○ MaxSP 限界値の取得
#--------------------------------------------------------------------------
def maxsp_limit
return KGC::LimitBreak::ENEMY_SP_LIMIT
end
#--------------------------------------------------------------------------
# ○ パラメータ限界値の取得
#--------------------------------------------------------------------------
def parameter_limit
return KGC::LimitBreak::ENEMY_ETC_LIMIT
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Party
#==============================================================================
class Game_Party
#--------------------------------------------------------------------------
# ● ゴールドの増加 (減少)
# n : 金額
#--------------------------------------------------------------------------
def gain_gold(n)
# 所持金の限界値変更
@gold = [[@gold + n, 0].max, KGC::LimitBreak::GOLD_LIMIT].min
end
#--------------------------------------------------------------------------
# ● アイテムの増加 (減少)
# item_id : アイテム ID
# n : 個数
#--------------------------------------------------------------------------
def gain_item(item_id, n)
# ハッシュの個数データを更新
if item_id > 0
limit = $data_items[item_id].number_limit
@items[item_id] = [[item_number(item_id) + n, 0].max, limit].min
end
end
#--------------------------------------------------------------------------
# ● 武器の増加 (減少)
# weapon_id : 武器 ID
# n : 個数
#--------------------------------------------------------------------------
def gain_weapon(weapon_id, n)
# ハッシュの個数データを更新
if weapon_id > 0
limit = $data_weapons[weapon_id].number_limit
@weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, limit].min
end
end
#--------------------------------------------------------------------------
# ● 防具の増加 (減少)
# armor_id : 防具 ID
# n : 個数
#--------------------------------------------------------------------------
def gain_armor(armor_id, n)
# ハッシュの個数データを更新
if armor_id > 0
limit = $data_armors[armor_id].number_limit
@armors[armor_id] = [[armor_number(armor_id) + n, 0].max, limit].min
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Window_ShopBuy
#==============================================================================
class Window_ShopBuy < Window_Selectable
#--------------------------------------------------------------------------
# ● 項目の描画
# index : 項目番号
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
# アイテムの所持数を取得
case item
when RPG::Item
number = $game_party.item_number(item.id)
when RPG::Weapon
number = $game_party.weapon_number(item.id)
when RPG::Armor
number = $game_party.armor_number(item.id)
end
# 価格が所持金以下、かつ所持数が上限でなければ通常文字色に、
# そうでなければ無効文字色に設定
if item.price <= $game_party.gold && number < item.number_limit
self.contents.font.color = normal_color
else
self.contents.font.color = disabled_color
end
x = 4
y = index * 32
rect = Rect.new(x, y, self.width - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
bitmap = RPG::Cache.icon(item.icon_name)
opacity = self.contents.font.color == normal_color ? 255 : 128
self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
self.contents.draw_text(x + 240, y, 88, 32, item.price.to_s, 2)
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Scene_Title
#==============================================================================
class Scene_Title
#--------------------------------------------------------------------------
# ● コマンド : ニューゲーム
#--------------------------------------------------------------------------
alias command_new_game_KGC_LimitBreak command_new_game
def command_new_game
command_new_game_KGC_LimitBreak
KGC::LimitBreak.revise_enemy_parameters
KGC::LimitBreak.set_enemy_status
end
#--------------------------------------------------------------------------
# ● コマンド : コンティニュー
#--------------------------------------------------------------------------
alias command_continue_KGC_LimitBreak command_continue
def command_continue
command_continue_KGC_LimitBreak
KGC::LimitBreak.revise_enemy_parameters
KGC::LimitBreak.set_enemy_status
end
#--------------------------------------------------------------------------
# ● 戦闘テスト
#--------------------------------------------------------------------------
alias battle_test_KGC_LimitBreak battle_test
def battle_test
battle_test_KGC_LimitBreak
KGC::LimitBreak.revise_enemy_parameters
KGC::LimitBreak.set_enemy_status
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Scene_Shop
#==============================================================================
class Scene_Shop
#--------------------------------------------------------------------------
# ● フレーム更新 (購入ウィンドウがアクティブの場合)
#--------------------------------------------------------------------------
def update_buy
# ステータスウィンドウのアイテムを設定
@status_window.item = @buy_window.item
# B ボタンが押された場合
if Input.trigger?(Input::B)
# キャンセル SE を演奏
$game_system.se_play($data_system.cancel_se)
# ウィンドウの状態を初期モードへ
@command_window.active = true
@dummy_window.visible = true
@buy_window.active = false
@buy_window.visible = false
@status_window.visible = false
@status_window.item = nil
# ヘルプテキストを消去
@help_window.set_text("")
return
end
# C ボタンが押された場合
if Input.trigger?(Input::C)
# アイテムを取得
@item = @buy_window.item
# アイテムが無効の場合、または価格が所持金より上の場合
if @item == nil or @item.price > $game_party.gold
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# アイテムの所持数を取得
case @item
when RPG::Item
number = $game_party.item_number(@item.id)
when RPG::Weapon
number = $game_party.weapon_number(@item.id)
when RPG::Armor
number = $game_party.armor_number(@item.id)
end
# すでに上限まで個所持している場合
limit = @item.number_limit
if number >= limit
# ブザー SE を演奏
$game_system.se_play($data_system.buzzer_se)
return
end
# 決定 SE を演奏
$game_system.se_play($data_system.decision_se)
# 最大購入可能個数を計算
max = (@item.price == 0 ? limit : $game_party.gold / @item.price)
max = [max, limit - number].min
# ウィンドウの状態を個数入力モードへ
@buy_window.active = false
@buy_window.visible = false
@number_window.set(@item, max, @item.price)
@number_window.active = true
@number_window.visible = true
end
end
end
I'll release it next week when I'm done with exams.
thx for the kgc script but my exp bars are messing up with it. so first I wait for yours Blizz
blizz, sounds cool, but what if I got ambitious and wanted a sick level cap (for a god of war-ish game maybe?), would that be possible too...?
Sure. It'll work for any level.
great, cant wait :^_^':
So, uh when can we except this to be out? Because it seems like a great idea...
Probably this week. I just need to sit down for half an hour and put the code into a script together with instructions.
Great :)