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
861 기타 엔딩후 캐릭터 이어서 새로운 게임시작 스크립트 1 file 백호 2009.02.21 1263
860 메뉴 개별 메뉴 호출 단축키 스크립트 5 file 백호 2009.02.21 1965
859 전투 사이드뷰 전투(보행그래픽) 15 file 백호 2009.02.21 4244
858 전투 액티브 타임 배틀(보행그래픽) file 백호 2009.02.21 2104
857 전투 마법검 스크립트 file 백호 2009.02.21 1118
856 전투 마법반사 스크립트 1 file 백호 2009.02.21 1217
855 장비 장비 착용 효과 스크립트 14 file 백호 2009.02.21 2323
854 기타 상점 변동시세 적용 스크립트 3 file 백호 2009.02.21 1163
853 이동 및 탈것 데쉬 기능 스크립트 8 file 백호 2009.02.21 1508
852 전투 배틀 스테이터스·클리어 디자인 13 file 백호 2009.02.21 2468
851 전투 레벨 상승 화면 개조 스크립트 4 file 백호 2009.02.21 1884
850 메뉴 FF7형식의 메뉴로 변경하는 스크립트 1 file 백호 2009.02.21 1463
849 전투 렙업했을때 포인트 주고 스탯 올리기 7 file 백호 2009.02.21 1685
848 상태/속성 순간 적으로 무적상태되는 스크립트 백호 2009.02.21 1161
847 기타 모험 일기 스크립트 2 file 백호 2009.02.21 1434
846 기타 요리 시스템 스크립트 12 file 백호 2009.02.21 2023
845 이동 및 탈것 기차스크립트 6 백호 2009.02.21 1757
844 메뉴 링메뉴 스크립트 file 백호 2009.02.21 1392
843 상점 상점 직접 장비 스크립트 1 file 백호 2009.02.21 1771
842 전투 전투 특수효과 ActionEX 스크립트 1 file 백호 2009.02.21 1660
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52