XP 스크립트

EMO_11일단 이름은Scene_LV으로 하시구요


↓↓↓↓↓↓↓↓↓↓↓↓↓이거를 하면 됍니다~↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

#LV限界突破
#
#最初に断っておきますと、このスクリプトを使うよりも
#自力で改造した方が、色々自由にできるしオススメです。
#なので、参考程度に見てもらえるといいかもしれません。
#(もちろん、これ単体でも動くように作っていますので
#そのまま使って頂いても構いません。)
#
#そのまま使う場合の注意点として、
#今までのスクリプトと違い、元からある処理をいくつか書き換えてます。
#併用とかする場合、なるべく上の方に貼り付ければなんとかなる、かもしれません。
#
#使い方
#まず、データベースのアクター設定でパラメータの設定をします。
#各パラメータは 初期値 + 基本値 * LV で算出されます。
#アクターのLV1の時のパラメータの値が初期値
#LV2の時の値が基本値です。
#仮にHPの初期値が1500、基本値が150としたいならば、
#データベースのアクターのパラメータ設定で
#LV1の時のHPが1500、LV2の時のHPが150となるように設定してください。
#
#パラメータの算出が適当すぎるので、各自修正が必要かと。

BASE_FINAL_LEVEL = 9999 #上限レベル(あんまり大きな値を設定するとハングします)
MAXHP_LIMIT = 99999999 #HP限界値
MAXSP_LIMIT = 99999999 #SP限界値
STR_LIMIT = 999999 #STR限界値
DEX_LIMIT = 999999 #DEX限界値
AGI_LIMIT = 999999 #AGI限界値
INT_LIMIT = 999999 #INT限界値

class Game_Actor < Game_Battler
def new_final_level
lv = BASE_FINAL_LEVEL
#以下上限LV個別指定用
#case self.id
#when 1
# lv = 255
#when 2
# lv = 999
#when 8
# lv = 15600
#end
return lv
end
#--------------------------------------------------------------------------
# ● EXP 計算
#--------------------------------------------------------------------------
def make_exp_list
actor = $data_actors[@actor_id]
@exp_list = Array.new(new_final_level + 2)
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
for i in 2..new_final_level + 1
if i > new_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
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, MAXHP_LIMIT].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, MAXHP_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 基本 MaxHP の取得
#--------------------------------------------------------------------------
def base_maxhp
n = $data_actors[@actor_id].parameters[0, 1]
n += $data_actors[@actor_id].parameters[0, 2] * @level
return n
end
#--------------------------------------------------------------------------
# ● 基本 MaxSP の取得
#--------------------------------------------------------------------------
def base_maxsp
n = $data_actors[@actor_id].parameters[1, 1]
n += $data_actors[@actor_id].parameters[1, 2] * @level
return n
end
#--------------------------------------------------------------------------
# ● 基本腕力の取得
#--------------------------------------------------------------------------
def base_str
n = $data_actors[@actor_id].parameters[2, 1]
n += $data_actors[@actor_id].parameters[2, 2] * @level
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, STR_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 基本器用さの取得
#--------------------------------------------------------------------------
def base_dex
n = $data_actors[@actor_id].parameters[3, 1]
n += $data_actors[@actor_id].parameters[3, 2] * @level
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, DEX_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 基本素早さの取得
#--------------------------------------------------------------------------
def base_agi
n = $data_actors[@actor_id].parameters[4, 1]
n += $data_actors[@actor_id].parameters[4, 2] * @level
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, AGI_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 基本魔力の取得
#--------------------------------------------------------------------------
def base_int
n = $data_actors[@actor_id].parameters[5, 1]
n += $data_actors[@actor_id].parameters[5, 2] * @level
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, INT_LIMIT].min
end
#--------------------------------------------------------------------------
# ● EXP の変更
# exp : 新しい EXP
#--------------------------------------------------------------------------
def exp=(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 と SP が最大値を超えていたら修正
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● レベルの変更
# level : 新しいレベル
#--------------------------------------------------------------------------
def level=(level)
# 上下限チェック
# ★LV上限をnew_final_levelでチェックするように変更
level = [[level, new_final_level].min, 1].max
# EXP を変更
self.exp = @exp_list[level]
end
end


class Game_Battler
#--------------------------------------------------------------------------
# ● MaxSP の取得
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, MAXSP_LIMIT].min
for i in @states
n *= $data_states[i].maxsp_rate / 100.0
end
n = [[Integer(n), 0].max, MAXSP_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 腕力の取得
#--------------------------------------------------------------------------
def str
n = [[base_str + @str_plus, 1].max, STR_LIMIT].min
for i in @states
n *= $data_states[i].str_rate / 100.0
end
n = [[Integer(n), 1].max, STR_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 器用さの取得
#--------------------------------------------------------------------------
def dex
n = [[base_dex + @dex_plus, 1].max, DEX_LIMIT].min
for i in @states
n *= $data_states[i].dex_rate / 100.0
end
n = [[Integer(n), 1].max, DEX_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 素早さの取得
#--------------------------------------------------------------------------
def agi
n = [[base_agi + @agi_plus, 1].max, AGI_LIMIT].min
for i in @states
n *= $data_states[i].agi_rate / 100.0
end
n = [[Integer(n), 1].max, AGI_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 魔力の取得
#--------------------------------------------------------------------------
def int
n = [[base_int + @int_plus, 1].max, INT_LIMIT].min
for i in @states
n *= $data_states[i].int_rate / 100.0
end
n = [[Integer(n), 1].max, INT_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, -STR_LIMIT].max, STR_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 器用さの設定
# dex : 新しい器用さ
#--------------------------------------------------------------------------
def dex=(dex)
@dex_plus += dex - self.dex
@dex_plus = [[@dex_plus, -DEX_LIMIT].max, DEX_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 素早さの設定
# agi : 新しい素早さ
#--------------------------------------------------------------------------
def agi=(agi)
@agi_plus += agi - self.agi
@agi_plus = [[@agi_plus, -AGI_LIMIT].max, AGI_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 魔力の設定
# int : 新しい魔力
#--------------------------------------------------------------------------
def int=(int)
@int_plus += int - self.int
@int_plus = [[@int_plus, -INT_LIMIT].max, INT_LIMIT].min
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr

Comment '4'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6203
214 기타 스크립트 자료 3 file 백호 2009.02.22 905
213 기타 좌표 스크립트 2 백호 2009.02.21 908
212 기타 지정범위안에 들어오면 특정한 움직임을 취한다!! 1 백호 2009.02.21 920
211 기타 KGC 디버거 (최신 올라온 것에 비해 성능은 딸리지만) file 백호 2009.02.22 929
210 기타 Economy System by Nick@Creation Asylum 1 file 백호 2009.02.22 934
209 기타 Text Scroll by Dubealex (Release 3) 2 file 백호 2009.02.22 940
208 기타 [All RGSS] File-Ex file Cheapmunk 2014.12.29 964
207 기타 ATS-Advanced Time System 1 file 백호 2009.02.21 965
206 기타 Tetris Attack by trickster 1 file 백호 2009.02.22 986
205 기타 필드에서 마력을 출력합니다. 백호 2009.02.22 989
204 기타 스크롤되는 파노라마(Autoscrolling Panorama) by RPG Advocate 백호 2009.02.22 993
203 기타 특수효과 ElseEX 스크립트 file 백호 2009.02.21 995
202 기타 Free Window Demo 1 file 백호 2009.02.22 1002
201 기타 프레임 적용 스크립트 1 file 백호 2009.02.21 1007
200 기타 분류 별로 윈도우 스킨 다르게 사용하기 file 백호 2009.02.21 1015
199 기타 강제 종료시키기 1 file 백호 2009.02.22 1015
198 기타 제련시스템 수정본입니다. 3 file 백호 2009.02.21 1021
197 기타 능력치 무한대 스크립트 (따로 넣을필요없음) 2 백호 2009.02.21 1027
196 기타 Random Character Generator by SephirothSpawn (SDK호환) 1 백호 2009.02.22 1041
195 기타 기본설정 강화ㄴ 1 백호 2009.02.21 1047
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13