VX 스크립트

Elemental Level
Version
VX 1.1
Original Author Moghunter
VX version Author 332211 (aka uresk)
Release Date 22 of September 2008
Last Update 23 of September 2008


Introduction
Skill damage is changed with the elemental level.
A skill base damage is changed according to the formula: base damage *( 1 + (elemental level - 1)/ 5)
Version 1.1 it handles correctly the damage multiplication when using more than one element. (Does the average)
Version 1.2 add the possibility to make the user receive less damage from a certain element, based on his elemental level.
Version 1.3 allows for skill to be learnt and forgotten based on the elemental level.
Features
So far it only changes the skill's base power.
Can reduce damage based on the elemental level too.
Can handle any number of elements, although I advise to use only up to 10, otherwise the bars will start to overlap.
여기서 부터
#_________________________________________________
# MOG_Element LV System VX 1.3
#_________________________________________________
# By Moghunter
# http://www.atelier-rgss.com
#_________________________________________________
# Adapted to VX by uresk/332211
#_________________________________________________
#
# START CONFIGURATION
#_________________________________________________
Vocab::ForgetSkill = "%s was forgotten!"
module MOG
#Element max level
MAXELLV = 99
# Exp gain mode
# 0 = Experience = Actor level - element level
# 1 = Always wins EL_EXP
# 2 => (level * level)/ 5 - level * 5 + 25 (line 183)
EXP_TYPE = 1
# Exp gain when EXP_TYPE = 1
EL_EXP = 333
# Element names. Must be in the database
Element_Names = ["Fire","Ice","Thunder","Water","Earth","Wind","Light","Darkness"]
# Level up sound
ELE_LVSE = "Magic"
# Level up animation
EL_LVANIME = 63
# Reduce damage based on the elemental level?
EL_RESIST = true
# Resist formula: damage * multiplier
# multiplier = 1/4 + (level+1)/(4*level)
# Change it in the line 200, Damage formula at line 175

# List of skills that should be learnt
LEARN_EL_SKILLS = { "Fire" => { 3 => [60,61]}, #Element name => { element_level => skill id(s)...
"Ice" => { 2 => 40}
}

# List of skills that should be forgotten
FORGET_EL_SKILLS = {"Fire" => { 3 => 59 , 4 => 51}
} #Element name => { element_level => skill id(s)}...
end
#_________________________________________________
#
# END CONFIGURATION
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["elementlv"] = true
##############
# Game_Actor #
##############
class Game_Actor < Game_Battler
attr_accessor :element_exp
attr_accessor :element_level
alias mog30_setup setup
def setup(actor_id)
@element_exp = []
@element_level = []
for i in 0...MOG::Element_Names.size
@element_exp[i] = 0
@element_level[i] = 1
end
mog30_setup(actor_id)
end
end
###############
# Window_Base #
###############
class Window_Base < Window
def draw_elementlv(actor, x, y,type)
exp = actor.element_exp[type]
self.contents.font.color = normal_color
back = Cache.picture("ELV_Back")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 77, y - ch , back, src_rect)
meter = Cache.picture("ELV_Meter")
ch = meter.height
cw = meter.width * exp
cw /= 100
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 80, y - ch - 8, meter, src_rect)
self.contents.font.name = "Georgia"
self.contents.font.color = Color.new(0,0,0,255)
pexp = sprintf("%s %", exp)
self.contents.draw_text(x + 161, y - 34, 50, 32, pexp ,1)
self.contents.draw_text(x + 331, y - 34, 32, 32, actor.element_level[type])
self.contents.draw_text(x + 301, y - 34, 32, 32, "Lv")
self.contents.draw_text(x + 1, y - 34, 75, 32, MOG::Element_Names[type])
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 160, y - 35, 50, 32, pexp,1)
self.contents.draw_text(x + 330, y - 35, 32, 32, actor.element_level[type])
self.contents.draw_text(x + 300, y - 35, 32, 32, "Lv")
self.contents.draw_text(x , y - 35, 75, 32, MOG::Element_Names[type])
end
end
########################
# Window_Element_Level #
########################
class Window_Element_Level < Window_Base
def initialize(actor)
super(100, 0, 444, 416)
self.contents = Bitmap.new(width - 32, height - 32)
self.z = 9999
@actor = actor
refresh
end
def refresh
self.contents.clear
self.contents.font.name = "Georgia"
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 50, y - 5 , 200, 50, "ELEMENT DATA")
self.contents.draw_text(x + 50, y + 411 , 200, 50, "Press C to Status")
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 51, y - 4 , 200, 50, "ELEMENT DATA")
self.contents.draw_text(x + 51, y + 410 , 200, 50, "Press C to Status")
for i in 0...MOG::Element_Names.size
draw_elementlv(@actor, 40, 70 + (346/MOG::Element_Names.size) * i, i)
end
end
end
#################
# Window_Status #
#################
class Window_Status < Window_Base
alias mog30_refresh refresh
def refresh
mog30_refresh
self.contents.font.name = "Georgia"
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 200, y + 416 , 250, 50, "Press C to Elemental Data")
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 201, y + 415 , 250, 50, "Press C to Elemental Data")
end
end
################
# Scene_Status #
################
class Scene_Status
alias mog30_main main
def main
@actor = $game_party.members[@actor_index]
@element_window = Window_Element_Level.new(@actor)
@element_window.y = -550
@element_window.visible = false
mog30_main
@element_window.dispose
end
alias mog30_update update
def update
mog30_update
if @element_window.y < 0
@element_window.y += 20
elsif @element_window.y >= 0
@element_window.y = 0
@element_window.contents_opacity = 255
end
if @element_window.visible == true
if Input.trigger?(Input::B) or Input.trigger?(Input::L) or Input.trigger?(Input::R)
for i in 1..30
@element_window.y -= 25
Graphics.update
end
end
end
if Input.trigger?(Input::C) and @element_window.visible == true
Sound.play_decision
@element_window.visible = false
elsif Input.trigger?(Input::C) and @element_window.visible == false
Sound.play_decision
@element_window.visible = true
@element_window.y = -550
end
end
end
################
# Game_Battler #
################
class Game_Battler
include MOG
alias mog30_make_obj_damage_value make_obj_damage_value
def make_obj_damage_value(user, obj)
multiplier = 0; divisor = 0
for id in obj.element_set
if Element_Names.include?($data_system.elements[id]) and user.is_a?(Game_Actor)
index = Element_Names.index($data_system.elements[id])
level = user.element_level[index]
multiplier += (4 + level)/5
divisor += 1
if EXP_TYPE == 0
valor = user.level - level
user.element_exp[index] += 1 + valor
elsif EXP_TYPE == 1
user.element_exp[index] += EL_EXP
elsif EXP_TYPE == 2
user.element_exp[index] += (level ** 2)/ 5 - level * 5 + 25
end
user.element_exp[index] = 100 if level == MAXELLV
elsif Element_Names.include?($data_system.elements[id]) and self.is_a?(Game_Actor) and EL_RESIST == true
index = Element_Names.index($data_system.elements[id])
level = self.element_level[index]
multiplier += 1/4 + ((level+2)/(4*level))
divisor += 1
end
end
obj.base_damage *= multiplier unless multiplier == 0
obj.base_damage /= divisor unless divisor == 0
obj.base_damage = obj.base_damage.round
mog30_make_obj_damage_value(user, obj)
end
end
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle < Scene_Base
# Include MOG module
include MOG
# aliasing definition
alias el_skills_display_action_effects display_action_effects
#--------------------------------------------------------------------------
# * Show Action Results
# target : Target
# obj : Skill or item
#--------------------------------------------------------------------------
def display_action_effects(target, obj = nil)
el_skills_display_action_effects(target, obj = nil)
user = @active_battler
if user.is_a?(Game_Actor)
for index in 0...MOG::Element_Names.size
while user.element_exp[index] > 99 and user.element_level[index] < MOG::MAXELLV
user.element_exp[index] -= 100
user.element_exp[index] = 0 if user.element_exp[index] < 0
user.element_level[index] += 1
check_for_elemental_skills(user,index,user.element_level[index])
Audio.se_play("Audio/SE/" + ELE_LVSE)
user.animation_id = EL_LVANIME
$game_player.animation_id = EL_LVANIME
end
end
end
end
#--------------------------------------------------------------------------
# * Show Action Results
# user : Actor (active battler)
# index: Element type index
# level: Elemental level
#--------------------------------------------------------------------------
def check_for_elemental_skills(user,index,level)
element = Element_Names[index]
@message_window.clear
#Learn skills
skill_learn = LEARN_EL_SKILLS[element][level] unless LEARN_EL_SKILLS[element].nil?
if skill_learn.is_a?(Array)
for skill_id in skill_learn
user.learn_skill(skill_id)
text = sprintf(Vocab::ObtainSkill, $data_skills[skill_id].name)
@message_window.add_instant_text(text)
wait(40)
end
elsif !skill_learn.nil?
user.learn_skill(skill_learn)
text = sprintf(Vocab::ObtainSkill, $data_skills[skill_learn].name)
@message_window.add_instant_text(text)
wait(40)
end
#Forget skills
skill_forget = FORGET_EL_SKILLS[element][level] unless FORGET_EL_SKILLS[element].nil?
if skill_forget.is_a?(Array)
for skill_id in skill_forget
next if !user.skill_learn?($data_skills[skill_id])
user.forget_skill(skill_id)
text = sprintf(Vocab::ForgetSkill, $data_skills[skill_id].name)
@message_window.add_instant_text(text)
wait(40)
end
elsif !skill_forget.nil?
user.forget_skill(skill_forget)
text = sprintf(Vocab::ForgetSkill, $data_skills[skill_forget].name)
@message_window.add_instant_text(text)
wait(40)
end
end
end
Comment '2'
  • ?
    KSG 2008.11.01 15:57
    엘리멘탈 레벨올리면(아마도 커스터마이징 후) 스킬 공격력이

    상향되거나 하는 스크립트 인가요.
  • ?
    Aakerse 2009.01.12 18:07
    예제 파일 좀 올려주세요..

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 3 습작 2012.12.24 5398
37 전투 2003식 사이드뷰 적들도 가까이와서 공격함 ㅇㅇ 51 배군 2008.05.02 6750
36 전투 사이드뷰 애드온 7 비극ㆍ 2010.08.21 6758
35 전투 파이널 판타지 XIII 배틀 시스템 [출처:RRR포럼] 56 file WolV 2010.02.03 6795
34 전투 Spin Battle System [완성버젼] 38 file 할렘 2009.11.14 6835
33 HUD 심플한 맵 이름 띄우기 53 file RPGbooster 2008.10.08 6862
32 메뉴 모그메뉴 스킨입니다. 1 file 아부리 2009.02.16 6866
31 메뉴 몬스터도감 심플버전! 52 file 카르와푸딩의아틀리에 2009.06.30 6907
30 전투 전투배경을 자신이 원하는 형태로 45 file 아방스 2008.01.23 7137
29 미니맵 미니맵 띠우는 스크립트 ^^ 37 file 아방스 2008.06.02 7247
28 전투 ORBS_v1[1].06 전투시스템. 22 file 할렘 2009.02.06 7407
27 전투 VX SRPG 한글번역 (최종수정) 26 file 에틴 2010.08.25 7418
26 전투 사이드 뷰 시스템 [시트르산님 제공] 56 아방스 2010.11.29 7499
25 타이틀/게임오버 타이틀 메뉴 스크립트 50 아방스 2009.01.20 7503
24 배틀할때 몬스터의 HP표시 !! 5 file 미카엘 2008.08.17 7517
23 전투 Requiem SBABS (Requiem Squad Based Battle System) 14 vk 2009.02.07 7542
22 이동 및 탈것 8 방향 이동스크립트 + 스프라이트 효과 12 file 레오 2009.02.06 7557
21 이동 및 탈것 2D 횡스크롤 스크립트 56 file 사람이라면? 2010.08.15 7570
20 전투 PRABS 2.0 액션배틀시스템 58 file RPGbooster 2008.10.08 7575
19 메뉴 메뉴변경 스크립트 34 아방스 2008.01.24 7937
18 맵/타일 RPG 만들기 VX 로 구현한 3D~ 42 아방스 2008.09.02 8405
Board Pagination Prev 1 ... 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Next
/ 32