
self.damage *= elements_correct(skill.element_set)
self.damage /= 100
if (skill.atk_f > 0)
self.damage *= (elements_correct(skill.element_set) + elements_correct(user.element_set))
self.damage /= 200
else
self.damage *= elements_correct(skill.element_set)
self.damage /= 100
end
if (elements_correct(skill.element_set) > 100)
if (skill.atk_f > 0)
self.damage *= (elements_correct(skill.element_set) + elements_correct(user.element_set)) * (user.int + 20) / 20
self.damage /= 200
else
self.damage *= elements_correct(skill.element_set) * (user.int + 20) / 20
self.damage /= 100
end
else
if (skill.atk_f > 0)
self.damage *= (elements_correct(skill.element_set) + elements_correct(user.element_set))
self.damage /= 200
else
self.damage *= elements_correct(skill.element_set)
self.damage /= 100
end
end
effective |= states_plus(skill.plus_state_set)
if (skill.atk_f > 0)
effective |= states_plus(user.plus_state_set)
effective |= states_minus(user.minus_state_set)
end
Hourglass":3lmljsnd said:Thanks Calvin thats a BIG BIG help. it's quite hard getting back in the game after so long.
Few more questions (saves me scowering the forum which isnt easy at the mo with my current sight), Did Fenwick ever get that hookshot script up and running?
Also has there been any advancements with XAS and mode 7 compatability?
Hourglass":1qf0xg3p said:Brillaint PDF (and its OCR so my reading software can read it, which is an added bonus.)
you got skills, well doneI barely know how to script
################################################################################
# CHANGING FACE HUD v 0.4
# for XAS ABS v 3.6
# by (G/A/M/E/F/A(C/E 101
# 10-03-2009
#
#
# v0.4 = Hud now includes actor name.
# v0.3 = Hud fades just as the 3.6 hud
# v0.2 = face graphic by actor name + suffix of graphic name.
# v0.1 = face graphic by button press.
#
################################################################################
module GF
# Fade Position must match super position
GFC_X = 154
# Fade Position must match super position
GFC_Y = 386
# Allow HUD opaque if the hero is on top of the HUD.
GFC_FADE = true
end
##################################################################[WINDOW CLASS]
class Window_Gameface_HUD < Window_Base#-----------------------=[in game window]
def initialize#-------------------------------------------------=[define load]
super (154, 386, 254, 104)#-------------=[x,y window position x,y window size]
self.contents = Bitmap.new(width - 32, height - 32)#-----------------=[keep]
refresh#---------------------------------------------=[call refresh command]
self.opacity = 0#------------------------------------=[window skin opacity]
end#-----------------------------------------------------=[end definition]
########################################################################[UPDATE]
def update#---------------------------------------------------=[define update]
super#------------------------------------------=[update the super window]
if GF::GFC_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 = 80
hud_size_y = 100
oc_range_x = hud_size_x + GF::GFC_X
oc_range_y = hud_size_y + GF::GFC_Y
if x < oc_range_x and x > GF::GFC_X - 5 and
y > GF::GFC_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
refresh#---------------------------------------------=[call refresh command]
end#---------------------------------------------------------=[end definition]
#######################################################################[REFRESH]
def refresh#-------------------------------------------------=[define refresh]
self.contents.clear#-----------------------------------------=[clear bitmap]
# draw_charactor#--------------------------------------=[call to draw_sprite]
draw_gameface#-------------------------------------------=[call to draw_face]
face_frame
hero_name
end#-----------------------------------------------------------=[end definition]
###################################################################[CHAR-ACTOR]
# def draw_charactor#--------------------------------------=[define draw_heart]
# x = 10 #----------------------------------------------=[draw x coordinates]
# y = 40#-----------------------------------------------=[draw y coordinates]
# bitmap = RPG::Cache.character("001-Fighter01",0)
# bitmap = RPG::Cache.picture(actor.character_name) rescue return
#===============================================================[complete heart]
# src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)#----------=[edit v 0.4]
# self.contents.blt(x, y, bitmap, src_rect)#-----------------------=[edit v 0.4]
#===============================================================================
####################################################################[HERO NAME]
def hero_name
self.contents.font.name = "Impact"#---------------------------=[FONT TYPE]
self.contents.font.size = 24#---------------------------------=[FONT SIZE]
self.contents.font.color.set(0, 0, 0)
self.contents.draw_text(30 - 1, 48 - 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.draw_text(30 - 1, 48 + 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.draw_text(30 + 1, 48 - 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.draw_text(30 + 1, 48 + 1, 160, 32, $game_party.actors[0].name, 0)
self.contents.font.color = normal_color
self.contents.draw_text(30, 48, 160, 32, $game_party.actors[0].name, 0)
end
###################################################################[FACE FRAME]
def face_frame#--------------------------------------=[define draw_heart]
x = 0 #----------------------------------------------=[draw x coordinates]
y = 0#-----------------------------------------------=[draw y coordinates]
bitmap = RPG::Cache.picture("FACE FRAME")
# bitmap = RPG::Cache.picture(actor.character_name) rescue return
#===============================================================[complete heart]
src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)#----------=[edit v 0.4]
self.contents.blt(x, y, bitmap, src_rect)#-----------------------=[edit v 0.4]
self.z = 1#-------------------------------------=[place in front
#===============================================================================
end
################################################################################
#def noface
#face = RPG::Cache.picture("")
#end
def draw_gameface
self.z = 9999#-------------------------------------=[place in front
actor = $game_party.actors[0]
x = 16
y = 16
if actor == nil
face = RPG::Cache.picture("")
#[SHOW "ACTION" GRAPHIC WHEN PLAYER ACTS]=--------------------------------------
elsif Input.press?(Input::C)
face = RPG::Cache.picture(actor.name + "_face_act")#
src_rect = Rect.new(0, 0, face.width, face.height)
self.contents.blt(x , y, face, src_rect)
#[SHOW "DEFEND" GRAPHIC WHEN PLAYER DEFEND]=--------------------------------------
elsif Input.press?(Input::A)# and "(shield is eqipped???)"
face = RPG::Cache.picture(actor.name + "_face_defend")
src_rect = Rect.new(0, 0, face.width, face.height)
self.contents.blt(x , y, face, src_rect)
elsif Input.press?(Input::X)
face = RPG::Cache.picture(actor.name + "_face_dash")
src_rect = Rect.new(0, 0, face.width, face.height)
self.contents.blt(x , y, face, src_rect)
elsif Input.press?(Input::Y)
face = RPG::Cache.picture(actor.name + "_face_item")
src_rect = Rect.new(0, 0, face.width, face.height)
self.contents.blt(x , y, face, src_rect)
elsif Input.press?(Input::Z)
face = RPG::Cache.picture(actor.name + "_face_skill")
src_rect = Rect.new(0, 0, face.width, face.height)
self.contents.blt(x , y, face, src_rect)
else
face = RPG::Cache.picture(actor.name + "_face")
src_rect = Rect.new(0, 0, face.width, face.height)
self.contents.blt(x , y, face, src_rect)
end
end
end
###############################################################[SCENE_MAP ALIAS]
class Scene_Map#----------------------------------------=[Map Screen Processing]
alias gf101_charact_hud_main main#---------------------------=[alias gface101]
def main#-----------------------------------------------=[define main process]
@hud_window1 = Window_Gameface_HUD.new#-------------------=[call hud window]
@hud_window1.visible = $game_switches[401]#----------------=[display switch]
gf101_charact_hud_main#-----------------------------------=[call with alias]
@hud_window1.dispose#------------------------------=[gets rid of the window]
end#---------------------------------------------------------=[end definition]
alias gf101_charact_hud_update update#------------------------[aliased update]
def update#---------------------------------------------------=[define update]
@hud_window1.update#------------------------------------------=[call update]
@hud_window1.visible = $game_switches[401]#----------------=[display switch]
gf101_charact_hud_update#---------------------------------=[call with alias]
end#---------------------------------------------------------=[end definition]
end#---------------------------------------------------------------=[end it all]
###########################################
#
# MOG_XAS_OVERDRIVE 2.3cg
# modified by gameface101
# > two button configuration (hold Action "C" then press Dash "X"
# > vertical orientation for Future Editions
# [url=http://gameface101.com]http://gameface101.com[/url]
#
# translated and vertical concept by calvin624
# [url=http://www.xasabs.wordpress.com]http://www.xasabs.wordpress.com[/url]
#
# original script by moghunter
# [url=http://www.atelier-rgss.com]http://www.atelier-rgss.com[/url]
###########################################
#---------------------------------------------------------------------------
# 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
#==============================================================================
# ** Main
#------------------------------------------------------------------------------
# After defining each class, actual processing begins here.
#==============================================================================
begin
# Prepare for transition
Graphics.freeze
$defaultfonttype = $fontface = $fontname = Font.default_name = "Calibri"
$defaultfontsize = $fontsize = Font.default_size = 24
# Make scene object (title screen)
original = $scene = Scene_Title.new
$showm = Win32API.new 'user32', 'keybd_event', %w(l l l l), ' ' # Recognizes keyboard input
$showm.call(18,0,0,0) # ALT down
$showm.call(13,0,0,0) # ENTER down
$showm.call(13,0,2,0) # ENTER up
$showm.call(18,0,2,0) # ALT up
# Call main method as long as $scene is effective
while $scene != nil
$scene.main
end
# Fade out
Graphics.transition(20)
rescue Errno::ENOENT
# Supplement Errno::ENOENT exception
# If unable to open file, display message and end
filename = $!.message.sub("No such file or directory - ", "")
print("Unable to find file #{filename}.")
end