Guest Access
Administrator
Administrator
Administrator
profile
G@MeF@Ce
profile
in XAS, Overdrive is a power level that you charge when
you successfully hit an enemy.
by default you have to press the ALT key to activate
but with this script you can simply
hold attack (C) then press dash (A)
to unleash the awesome power
(works like a charm with a controller)
you will have to rotate the default graphics as so...
to make it vertical.
enjoy! ^,^
you successfully hit an enemy.
by default you have to press the ALT key to activate
but with this script you can simply
hold attack (C) then press dash (A)
to unleash the awesome power
(works like a charm with a controller)
you will have to rotate the default graphics as so...
to make it vertical.
enjoy! ^,^
- Spoiler:
- Code:
###########################################
#
# MOG_XAS_OVERDRIVE 2.3cg
# modified by gameface101
# > two button configuration (hold Action "C" then press Dash "X"
# > vertical orientation for Future Editions
# http://gameface101.com
#
# translated and vertical concept by calvin624
# http://www.xasabs.wordpress.com
#
# original script by moghunter
# http://www.atelier-rgss.com
###########################################
#---------------------------------------------------------------------------
# System skills (tools) that can only
# be activated when the Overdrive bar is
# complete in 100% or above level 1, you can set
# infinite levels of Overdrive.
# Create an attribute with the name "OVD" and assign
# a skill that matches the ID of the tool.
#_______________________________________________________________________________
# Images necessary.
# - XOVD_Gauge_Back + Sufixo
# - XOVD_Gauge + Sufixo
#_______________________________________________________________________________
# Set the level proportional to the numerical suffix of overdrive.
# EXP
# Overdrive Level 2
# XOVD_Gauge_Back2.png
# XOVD_Gauge2.png
#
# Overdrive Level Level maximo.
#
# XOVD_Gauge_Back_Max.png
# XOVD_Gauge_Max.png
#_______________________________________________________________________________
module MOG
# Definition of the variable that defines the maximum level of Ovedrive.
# That is, through an event set the value of the overdrive
# changing the value of the variable that matches the level
# of overdrive.
OVD_MAX_LEVEL_VAR_ID = 11
# Definition of skill which will be activated in a
# level of the Overdrive.
OVD_LEVEL = {
1=> 44, #Overdrive LV 1 (SKill ID)
2=> 45, #Overdrive LV 2 (SKill ID)
3=> 46, #Overdrive LV 3 (SKill ID)
4=> 47 #Overdrive LV 4 (SKill ID)
}
# Definition specifies the amount of gain in the meter
# overdrive.
# A => B
#
# A = The ID of the tool (Skill ID = ID Tool).
# B = value of gain overdrive.
OVD_GAIN = {
1=>3, #Skill ID 1 (Gain 3pt)
2=>3, #Skill ID 2 (Gain 5pt)
3=>3, #Skill ID 2 (Gain 5pt)
4=>4, #Skill ID 4 (Gain 6pt)
5=>5, #Skill ID 5 (Gain 4pt)
6=>3, #Skill ID 6 (Gain 3pt)
104=>1, #Skill ID 104 (Gain 1pt)
105=>0,
140=>4 #
}
# Setting the default gain of the Overdrive if not specified.
OVD_DEFAULT_GAIN = 2
# Definition of the button to activate Overdrive
#OVD_BUTTON = Input:: ALT
# Animation to be enabled to achieve 100% of Overdrive.
OVDANI = 1
# Text that will appear when you reach 100% of Ovedrive.
OVDTEXT = "Overdrive!"
# Sound when the Overdrive is OFF.
OVDSEOFF = "003-System03"
# Text that will appear when the Ovedriver is OFF.
OVDOFF_TEXT = ""
# ID of the switch that disables the Overdrive.
XAS_OVDVIS = 5
# Position the meter horizontally.
OVD_X = 373
# Upright position of the meter.
OVD_Y = -62
# Display the percentage meter.
OVD_PERCENTAGE = false
# Allow HUD opaque if the hero is on top of the HUD.
OVD_FADE = true
end
#_________________________________________________
$mog_rgss_xas_overdrive = true
################################################################################
# Game_System #
###############
class Game_System
attr_accessor :xasovd_gauge
attr_accessor :xasovd_ani
attr_accessor :xasovd_lv
alias mog_xasovd_initialize initialize
def initialize
mog_xasovd_initialize
@xasovd_gauge = 0
@xasovd_lv = 0
@xasovd_ani = true
end
def xasovd_lv
return @xasovd_lv
end
def xasovd_gauge
if @xasovd_gauge > 100
@xasovd_gauge = 100
elsif @xasovd_gauge < 0
@xasovd_gauge = 0
end
return @xasovd_gauge
end
def xasovd_ani
return @xasovd_ani
end
end
################################################################################
# Game_Battler #
################
class Game_Battler
include MOG
alias mog_xasovd_skill_effect skill_effect
def skill_effect(user, skill)
mog_xasovd_skill_effect(user, skill)
if skill.element_set.include?($data_system.elements.index("OVD")) and self.damage.is_a?(Numeric) and
user.is_a?(Game_Actor) and self.is_a?(Game_Enemy) and not XAS_BA_ENEMY::ITEM_ENEMY.include?(self.id) and
$game_switches[MOG::XAS_OVDVIS] == false
xas_ovd_gain = MOG::OVD_GAIN[skill.id]
ovdmaxlevel = $game_variables[OVD_MAX_LEVEL_VAR_ID]
if xas_ovd_gain != nil and $game_system.xasovd_lv < ovdmaxlevel
$game_system.xasovd_gauge += xas_ovd_gain
else
$game_system.xasovd_gauge += MOG::OVD_DEFAULT_GAIN if $game_system.xasovd_lv < ovdmaxlevel
end
if $game_system.xasovd_gauge >= 100 and $game_system.xasovd_lv < ovdmaxlevel
$game_system.xasovd_lv += 1
$game_system.xasovd_gauge = 0
$game_player.animation_id = MOG::OVDANI
$game_player.battler.damage = MOG::OVDTEXT
$game_player.battler.damage_pop = true
if $mog_rgss_ifw != nil
if $game_system.xasovd_lv == ovdmaxlevel
text = " MAX"
else
text = $game_system.xasovd_lv
end
$game_temp.ifw_text = "OVERDRIVE LVUP - L" + text.to_s
$game_temp.ifw_active = true
end
end
$ovdref = true
end
end
end
################################################################################
# Window_Base #
###############
class Window_Base < Window #=-------------------------------------==[Ruby class]
def draw_xasovd(x,y)#=-----------------------------------------=[define message]
ovdmaxlevel = $game_variables[MOG::OVD_MAX_LEVEL_VAR_ID]#--=[variable for level]
#------------------------------------------------------=[overdrive back graphic]
ovdback = RPG::Cache.picture("XOVD_Gauge_Back" + $game_system.xasovd_lv.to_s.to_s)
cw = ovdback.width
ch = ovdback.height
#src_rect = Rect.new(0, 0, cw, ch)
src_rect = Rect.new(-9, 0, 50, 200) #vertical
#self.contents.blt(x + 15, y - ch, ovdback, src_rect)
self.contents.blt(x + 0, y + 0, ovdback, src_rect)#vertical
######################################################################[if maxed]
if $game_system.xasovd_lv == ovdmaxlevel
ovdgauge = RPG::Cache.picture("XOVD_Gauge_Max")
else ############################################################[or next guage]
ovdgauge = RPG::Cache.picture("XOVD_Gauge" + $game_system.xasovd_lv.to_s.to_s)
end
#################################################################[ test
if $game_system.xasovd_lv < ovdmaxlevel #--------[if level is less than MAX]
#cw = ovdgauge.width * $game_system.xasovd_gauge / 100 #width =
ch = ovdgauge.height * $game_system.xasovd_gauge / 100 #change orientation
else
if ovdmaxlevel == 0
#cw = 1
ch = 1 #=--------------------------------------------------------------vertical
else
#cw = ovdgauge.width
ch = ovdgauge.height#=-------------------------------------------------vertical
end
end
#ch = ovdgauge.height
cw = ovdgauge.width #=-------------------------------------------------vertical
#src_rect = Rect.new(0, 0, cw, ch)
src_rect = Rect.new(0, -55, 50, 200)#keep?
#self.contents.blt(x + 15, y - ch, ovdgauge, src_rect)#location of meter
self.contents.blt(x + cw, y - ch , ovdgauge, src_rect)#=---------------vertical
##########################################################[ for text diplay ]
self.contents.font.name = ""
self.contents.font.size = 14
#self.contents.font.bold = true
if MOG::OVD_PERCENTAGE == true
unless $game_system.xasovd_lv == ovdmaxlevel
if $game_system.xasovd_lv < ovdmaxlevel
self.contents.draw_hemming_text(x + 0, y - 25, 80, 32, $game_system.xasovd_gauge.to_s + " %",1)
else
if ovdmaxlevel == 0
self.contents.draw_hemming_text(x + 0, y - 25, 80, 32, "0 %",1)
else
self.contents.draw_hemming_text(x + 0, y - 25, 80, 32, "100 %",1)
end
end
end
end
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_hemming_text(x, y - 39, 110, 32, "OVERDRIVE",0)
self.contents.font.color = Color.new(55,255,155,255)
self.contents.draw_hemming_text(x - 10, y - 15, 110, 32, "LV " + $game_system.xasovd_lv.to_s + "/" + ovdmaxlevel.to_s ,1)
end
end
################################################################################
# Winxasovd #
#############
class Winxasovd < Window_Base
def initialize
super(0, 0, 50, 142)#window size and position
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0 #=-------------------------------------=[window skin for super]
@old_ovd_level = $game_system.xasovd_lv
@old_ovd = $game_system.xasovd_gauge
refresh
end
def refresh
self.contents.clear
draw_xasovd(0, 55)#
@old_ovd_level = $game_system.xasovd_lv
@old_ovd = $game_system.xasovd_gauge
end
def update
if MOG::OVD_FADE == true
x = ($game_player.real_x - $game_map.display_x) / 4
y = ($game_player.real_y - $game_map.display_y) / 4
hud_size_x = 9
hud_size_y = 55
oc_range_x = hud_size_x + MOG::OVD_X
oc_range_y = hud_size_y + MOG::OVD_Y
if x < oc_range_x and x > MOG::OVD_X - 5 and
y > MOG::OVD_Y - 15 and y < oc_range_y
self.contents_opacity -= 10 if self.contents_opacity > 120
else
self.contents_opacity += 10 if self.contents_opacity < 255
end
end
if @old_ovd_level != $game_system.xasovd_lv or
@old_ovd != $game_system.xasovd_gauge
refresh
end
end
end
################################################################################
# Scene_Map #
#############
class Scene_Map
include MOG
alias mog_xasovd_main main
def main
@actor = $game_party.actors[0]
@Winxasovd = Winxasovd.new
@Winxasovd.x = OVD_X
@Winxasovd.y = OVD_Y
if @actor == nil or
$game_switches[MOG::XAS_OVDVIS] == true
@Winxasovd.visible = false
elsif $game_switches[MOG::XAS_OVDVIS] == false
@Winxasovd.visible = true
end
mog_xasovd_main
@Winxasovd.dispose
end
alias mog_xasovd_update update
def update
mog_xasovd_update
if @actor == nil or
$game_switches[MOG::XAS_OVDVIS] == true
@Winxasovd.visible = false
elsif $game_switches[MOG::XAS_OVDVIS] == false
@Winxasovd.visible = true
end
@Winxasovd.update
end
end
################################################################################
# Game_Player #
###############
class Game_Player < Game_Character
include MOG
alias mog_xasovd_update update
def update
mog_xasovd_update
actor = $game_party.actors[0]
return if actor == nil
if Input.press?(Input::C) and Input.trigger?(Input::X)and $game_system.xasovd_lv != 0 and
#if Input.trigger?(MOG::OVD_BUTTON) and $game_system.xasovd_lv != 0 and
$game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false and
$game_switches[MOG::XAS_OVDVIS] == false and not
$game_temp.cast_time > 0
unless self.action != nil or $game_system.map_interpreter.running? or
$game_temp.message_window_showing or $game_map.starting? or
self.knockbacking?
unless actor.states.include?(XAS::BERSERK_ID) or
actor.states.include?(XAS::MUTE_ID)
if $game_system.xasovd_lv > 0
ovd_level = MOG::OVD_LEVEL[$game_system.xasovd_lv]
if ovd_level != nil
action_id = ovd_level
character_real_name
self.shoot(action_id) if action_id != nil
end
$game_system.xasovd_gauge = 0
$game_system.xasovd_lv = 0
$game_system.xasovd_ani = true
else
Audio.se_play("Audio/SE/" + OVDSEOFF)
$game_player.battler.damage = OVDOFF_TEXT
$game_player.battler.damage_pop = true
end
else
$game_player.battler.damage = XAS::SEALED_TEXT
$game_player.battler.damage_pop = true
$game_system.se_play(XAS::SEALED_SE)
end
end
end
end
end
Administrator
Show Signature
EVENTALIST
EVENTALIST
EVENTALIST
profile
mr_wiggles
profile
It's always nice to just have options to things!
EVENTALIST
Show Signature
EVENTALIST