#==============================================================================
#
# ▼ Yanfly Engine Ace - Active Chain Skills v1.01
# -- Last Updated: 2011.12.22
# -- Level: Hard
# -- Requires: n/a
#
#==============================================================================
$imported = {} if $imported.nil?
$imported["YEA-ActiveChainSkills"] = true
#==============================================================================
# ▼ Updates
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# 2011.12.22 - Better updating speed for window.
# 2011.12.18 - Started Script and Finished.
#
#==============================================================================
# ▼ Introduction
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script enables the usage of Active Chain Skills. When a skill with any
# potential chain skill occurs, potentially chainable skills will be listed on
# the side of the screen and if the player presses the right button to trigger
# that chain skill, the battler's next action will lead into the next chain
# skill. Chain skills can only be used by actors and can be endlessly chained
# until either the actor runs out of skill cost resources or until the actor
# performs a chained skill without any skills to chain off of.
#
#==============================================================================
# ▼ Instructions
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Skill Notetags - These notetags go in the skill notebox in the database.
# -----------------------------------------------------------------------------
#
#
#
#
#
# Makes the skill with these notetags to become potentially chainable. Replace
# x with the ID of the skill you want the button to cause the skill to chain.
# Note that if the actor has not learned the chain skill, the chain skill will
# not be listed. If the actor has learned the chain skill but lacks resources
# to use it, it will be greyed out.
#
#
# This makes the skill usable only if it's used in a chain. This effect does
# not affect monsters. Chain only skills can still be unusable if the user does
# not meet the skill's other requirements. This means that the skill will be
# disabled in the skill window when you try to actively use it from the window.
#
#==============================================================================
# ▼ Compatibility
# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
# it will run with RPG Maker VX without adjusting.
#
# While this script doesn't interfere with Input Combo Skills, it will most
# likely be unable to used in conjunction with Input Combo Skills. I will not
# provide support for any errors that may occur from this, nor will I be
# responsible for any damage doing this may cause your game.
#
#==============================================================================
module YEA
module ACTIVE_CHAIN
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Chain Skill Settings -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Adjust general settings here. These settings adjust the sound effect
# played when an active skill is selected and what the minimum time window
# is for an active chain skill.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This will be the sound effect played whenever an active chain skill has
# been selected for chaining.
ACTIVE_SKILL_SOUND = RPG::SE.new("Skill2", 80, 100)
# How many frames minimum for chain allowance. Sometimes the battlelog
# window will move too fast for the player to be able to chain. This sets
# a minimum timer for how long the chain window will stay open.
MINIMUM_TIME = 120
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# - Chain Skill Text -
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# This section adjusts the text that appears for the chain skills. Adjust
# the text to appear as you see fit. Note that the vocab other than the
# title can use text codes.
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
CHAIN_TITLE = "Active Chain Skills"
TITLE_SIZE = 20
L_SKILL_ON = "\eC[17]Q\eC[0]Chain: "
L_SKILL_OFF = "\eC[7]QChain: "
L_SKILL_ACT = "\eC[17]QChain: "
R_SKILL_ON = "\eC[17]W\eC[0]Chain: "
R_SKILL_OFF = "\eC[7]WChain: "
R_SKILL_ACT = "\eC[17]WChain: "
X_SKILL_ON = "\eC[17]A\eC[0]ttack: "
X_SKILL_OFF = "\eC[7]Attack: "
X_SKILL_ACT = "\eC[17]Attack: "
Y_SKILL_ON = "\eC[17]S\eC[0]trike: "
Y_SKILL_OFF = "\eC[7]Strike: "
Y_SKILL_ACT = "\eC[17]Strike: "
Z_SKILL_ON = "\eC[17]D\eC[0]efend: "
Z_SKILL_OFF = "\eC[7]Defend: "
Z_SKILL_ACT = "\eC[17]Defend: "
end # ACTIVE_CHAIN
end # YEA
#==============================================================================
# ▼ Editting anything past this point may potentially result in causing
# computer damage, incontinence, explosion of user's head, coma, death, and/or
# halitosis so edit at your own risk.
#==============================================================================
module YEA
module REGEXP
module SKILL
CHAIN_ONLY = //i
CHAIN_SKILL = //i
end # SKILL
end # REGEXP
end # YEA
#==============================================================================
# ■ DataManager
#==============================================================================
module DataManager
#--------------------------------------------------------------------------
# alias method: load_database
#--------------------------------------------------------------------------
class < 0
if Input.press?(:L)
check_active_chain_skill(:L)
elsif Input.press?(:R)
check_active_chain_skill(:R)
elsif Input.press?(:X)
check_active_chain_skill(:X)
elsif Input.press?(:Y)
check_active_chain_skill(:Y)
elsif Input.press?(:Z)
check_active_chain_skill(:Z)
end
end
#--------------------------------------------------------------------------
# new method: check_active_chain_skill
#--------------------------------------------------------------------------
def check_active_chain_skill(button)
skill_id = @current_chain_skill.chain_skill[button]
return if skill_id.nil?
return if $data_skills[skill_id].nil?
chain_skill = $data_skills[skill_id]
return unless @subject.usable?(chain_skill)
return unless @subject.skills.include?(chain_skill)
@active_chain_skill_counter = 12
@active_chain_skill = skill_id
@active_chain_skill_window.button = button
YEA::ACTIVE_CHAIN::ACTIVE_SKILL_SOUND.play
@subject.add_active_skill_chain(skill_id)
end
end # Scene_Battle
#==============================================================================
#
# ▼ End of File
#
#==============================================================================