|
  |
Skill Delay VX, Make your skills take longer to work. |
|
|
|
|
May 12 2008, 08:12 PM
|

Level 12

Group: Revolutionary
Posts: 218
Type: Scripter
RM Skill: Skilled

|
 Removed until iEntry's Legal Terms properly spell out Member Rights regarding ownership of submitted content. The terms in use are way too vague for comfort.
__________________________
Up is down, left is right and sideways is straight ahead - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)Clickable links:  (My own forum)
|
|
|
|
|
|
|
|
|
May 12 2008, 09:19 PM
|
Level 31

Group: Revolutionary
Posts: 750
Type: None
RM Skill: Undisclosed

|
Hey, this should be really useful for me. I was planning on doing this for some of the more powerful spells in a game I'm working on.  I get an error with your demo though. "Unable to find file Graphics/Battlers/Ylva."
|
|
|
|
|
|
|
|
|
May 12 2008, 09:21 PM
|

Level 12

Group: Revolutionary
Posts: 218
Type: Scripter
RM Skill: Skilled

|
Oh? Hehehe... that's just me mis-configuring the name of the battlers I used in the 'Actor Battler Graphics' script.
__________________________
Up is down, left is right and sideways is straight ahead - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)Clickable links:  (My own forum)
|
|
|
|
|
|
|
|
|
May 15 2008, 08:32 PM
|

Level 12

Group: Revolutionary
Posts: 218
Type: Scripter
RM Skill: Skilled

|
Oh? Probably just me adding a party member in the TROOPS database. You could do that since RPGMaker 2000. It's an old technique.
__________________________
Up is down, left is right and sideways is straight ahead - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)Clickable links:  (My own forum)
|
|
|
|
|
|
|
|
|
Aug 2 2008, 11:25 PM
|

Group: Member
Posts: 4
Type: Artist
RM Skill: Beginner

|
Is there anyway you could make the actors apear behind the enemy? It's a great script anyway!
__________________________
|
|
|
|
|
|
|
|
|
Aug 3 2008, 06:41 PM
|

Level 12

Group: Revolutionary
Posts: 218
Type: Scripter
RM Skill: Skilled

|
It's not set up in the script, though if you switch the viewports that the Enemy and Actor graphics are set... sure.
__________________________
Up is down, left is right and sideways is straight ahead - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)Clickable links:  (My own forum)
|
|
|
|
|
|
|
|
|
Oct 20 2008, 07:26 AM
|

Group: Member
Posts: 2
Type: Scripter
RM Skill: Skilled

|
Great script, except for that you have to edit the script itself to make a skill a delay skill I changed that, here new version Ow, and I also removed separate charging animations #=============================================================== =============== # ** Skill Casting Delay VX #------------------------------------------------------------------------------ # by DerVVulfman # version 1.2 # 05-20-2008 # RGSS2 # Edited by mizzl #------------------------------------------------------------------------------ # # INTRODUCTION: # # This script is designed to make spells/skills in the default battlesystem # take time to cast/prepare. As a turn-based system, the duration for the de- # lay is ALSO given in turns. It's very simple... if you want a fireball spell # to take two turns to work after casting, you set the skill up in the config # section to spend 2 turns. # # Also added are a few optional niceties: # # 1) A window can show when the hero is casting/prepping a skill. This can be # set up so each skill has it's own descriptive word, or just use a single # 'casting' text for them all. # # 2) Battle Animations can be tagged to a skill. If on, when an actor's turn # comes up and is currently 'casting' a skill, a battle animation can be # shown on the battler. You can use a single default battle animation, or # you can personalize each skill with its own animation. # # Note that 'this' feature requires the 'User Attack Animations' script. # # 3) The casting delay can be interrupted by a successful hit. Yep... if an # actor battler suffers a sucessful attack by an enemy while casting, then # the casting of the skill is interrupted. # # #------------------------------------------------------------------------------ # # EDITS AND MODIFICATIONS: # # This system Aliases the following methods: # * initialize (Game_Battler) # * attack_effect (Game_Battler) # * skill_effect (Game_Battler) # * item_effect (Game_Battler) # * valid? (Game_BattleAction) # * process_battle_start (Scene_Battle) # * start_party_command_selection (Scene_Battle) # * start_actor_command_selection (Scene_Battle) # * prior_actor (Scene_Battle) # * next_actor (Scene_Battle) # * update_actor_command_selection (Scene_Battle) # * update_skill_selection (Scene_Battle) # * process_action (Scene_Battle) # * execute_action (Scene_Battle) # * end_target_enemy_selection (Scene_Battle) # * end_target_actor_selection (Scene_Battle) # * turn_end (Scene_Battle) # # This system adds the following methods: # * interrupted (Game_Battler) # * set_skill_delay (Scene_Battle) # #------------------------------------------------------------------------------ # # NOTE: # # While the default system does not give enemies the ability to use items in # combat, I have included routines in the script to detect whether or not this # has occurred, and can (if used) interrupt the Actor who is casting a spell # or readying a skill. ($sd_item_user, item_effect, make_item_action_result) # # #------------------------------------------------------------------------------ # # TERMS AND CONDITIONS: # # Free to use, even in commercial projects. Just note that I need some form # of due credit... even a mere mention in some end titles. # #==============================================================================
#============================================================================== #============================================================================== # # # **** C O N F I G U R A T I O N S Y S T E M **** # # # #============================================================================== #==============================================================================
#========================================================================== # **** SKILL / DELAY / MESSAGE HASHES **** # #========================================================================== # just type [delay (turns), (message)] in the note box of a skill # message is optional # example: [delay 2] means delayskill for 2 turns with the default "charging" message # [delay 1, casting] means delayskill for 1 turn with "casting" as the charging message # DON'T CHANGE IF YOU DON'T KNOW WHAT YOU'RE DOING REGEXP = /\[delay\s+(\d+)\s*,?\s*(\w+)?\s*\]/ #========================================================================== # **** MESSAGE CONTROLS **** # #========================================================================== # Shows a window like "Basil casting Fireball" DELAYED_HELP_TEXT = true # If true, a window will show if casting. DELAYED_HELP_WAIT = 45 # Duration the window stays (in frames). # Default string if not specified in the # DELAYED_SKILLS hash. #========================================================================== # **** ANIMATION CONTROLS **** # #========================================================================== # Displays a 'battle animation' when the caster is STILL readying a skill. DELAY_ANIMATION = false # If true, the battle animation will run. DELAY_ANIM_ID = 6 # The default animation ID
#========================================================================== # **** INTERRUPTION CONTROL **** # #========================================================================== DELAY_INTERRUPT = false # If true, a successful hit will inter- # rupt the caster, wasting the skill. PARTY_INTERRUPT = false # If true, even Support Spells and Items # from allies can interrupt the caster.
# DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING $sd_item_user = nil class RPG::Skill < RPG::UsableItem def create_delay_skill_cache @__delay_skill_turn = 0 @__delay_skill_msg = ""
self.note.split(/[\r\n]+/).each { |line| case line when REGEXP # 遅延スキル @__delay_skill_turn = $1.to_i if $2.nil? @__delay_skill_msg = "readying" else @__delay_skill_msg = $2 end end } end #-------------------------------------------------------------------------- # ○ 遅延スキルか #-------------------------------------------------------------------------- def delay_skill? create_delay_skill_cache if @__delay_skill_turn == nil return (@__delay_skill_turn > 0) end #-------------------------------------------------------------------------- # ○ 遅延スキル ID #-------------------------------------------------------------------------- def delay_skill_turn create_delay_skill_cache if @__delay_skill_turn == nil return @__delay_skill_turn end #-------------------------------------------------------------------------- # ○ 遅延スキル発動ターン数 #-------------------------------------------------------------------------- def delay_skill_msg create_delay_skill_cache if @__delay_skill_msg == nil return @__delay_skill_msg end end #============================================================================== # ** Game_Battler #------------------------------------------------------------------------------ # This class deals with battlers. It's used as a superclass for the Game_Actor # and Game_Enemy classes. #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # * Public Instance Variables #-------------------------------------------------------------------------- attr_accessor :skill_delay # Skill Delay in turns attr_accessor :skill_select # Skill Battlemenu option flag attr_accessor :sd_casting # Skill Delay casting flag (Battler) attr_accessor :sd_iscasting # Skill Delay casting flag (2nd) attr_accessor :sd_skill # Recorded skill in use for battler attr_accessor :sd_skill_action # How the skill is shown in help txt attr_accessor :sd_target # Recorded target selected in battle attr_accessor :sd_damage # Base damage for casting interrupt attr_accessor :animation_user # For User Attack Animations attr_accessor :abatvx_form_bypass # If the screen_x/y is bypassed #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias sd_init initialize alias sd_attack_effect attack_effect alias sd_skill_effect skill_effect alias sd_item_effect item_effect #-------------------------------------------------------------------------- # * Object Initialization #-------------------------------------------------------------------------- def initialize # Perform the original call sd_init # Additional values @skill_delay = 0 @skill_select = false @sd_casting = false @sd_iscasting = false @sd_skill = 0 @sd_skill_action = "readying" @sd_target = 0 @animation_user = nil @abatvx_form_bypass = false end #-------------------------------------------------------------------------- # * Applying Normal Attack Effects (Edited) # attacker : battler #-------------------------------------------------------------------------- def attack_effect(attacker) # Temporary Interrupt flag sd_trigger = true # Execute the original process result = sd_attack_effect(attacker) # Set the interrupt flag accordingly sd_trigger = false if result == false sd_trigger = false if DELAY_INTERRUPT == false # Turn interrupt flag off if target missed sd_trigger = false if @missed == true # If skill can be interrupted by an attack if sd_trigger == true self.sd_casting = false self.sd_iscasting = false self.skill_delay = 0 self.sd_skill = 0 self.sd_target = 0 end end #-------------------------------------------------------------------------- # * Apply Skill Effects # user : the one using skills (battler) # skill : skill #-------------------------------------------------------------------------- def skill_effect(user, skill) # Execute the original process result = sd_skill_effect(user, skill) # Set Interrupt Flag based on Interruption checker sd_trigger = interrupted(result, user) # If skill can be interrupted by another skill if sd_trigger == true self.sd_casting = false self.sd_iscasting = false self.skill_delay = 0 self.sd_skill = 0 self.sd_target = 0 end end #-------------------------------------------------------------------------- # * Apply Item Effects # user : Item user # item : item #-------------------------------------------------------------------------- def item_effect(user, item) # Execute the original process result = sd_item_effect(user, item) # Set Interrupt Flag based on Interruption checker sd_trigger = interrupted(result, user) # If skill can be interrupted by another skill if sd_trigger == true self.sd_casting = false self.sd_iscasting = false self.skill_delay = 0 self.sd_skill = 0 self.sd_target = 0 end end #-------------------------------------------------------------------------- # * Interruption Checker # result : result of initial skill/item use # user : caster of initial skill/item on target #-------------------------------------------------------------------------- def interrupted(result, user) # Set interrupt flag temp_trigger = true # Set the interrupt flag accordingly temp_trigger = false if result == false if DELAY_INTERRUPT == false temp_trigger = false if user.is_a?(Game_Enemy) end # Turn interrupt flag off if Support Skill Used if PARTY_INTERRUPT temp_trigger = true if user.is_a?(Game_Actor) end # Turn interrupt flag off if missed temp_trigger = false if @missed == true return temp_trigger end end
#============================================================================== # ** Game_BattleAction #------------------------------------------------------------------------------ # This class handles battle actions. This class is used within the # Game_Battler class. #==============================================================================
class Game_BattleAction #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias sd_valid? valid? #-------------------------------------------------------------------------- # * Determination if Action is Valid or Not # Assuming that an event command does not cause [Force Battle Action], # if state limitations or lack of items, etc. make the planned action # impossible, return false. #-------------------------------------------------------------------------- def valid? valid_return = sd_valid? return true if @battler.sd_iscasting return valid_return end end
#============================================================================== # ** Scene_Battle #------------------------------------------------------------------------------ # This class performs battle screen processing. #==============================================================================
class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # * Alias Listings #-------------------------------------------------------------------------- alias sd_process_battle_start process_battle_start alias sd_start_party_command_selection start_party_command_selection alias sd_start_actor_command_selection start_actor_command_selection alias sd_next_actor next_actor alias sd_prior_actor prior_actor alias sd_update_actor_command_selection update_actor_command_selection alias sd_update_skill_selection update_skill_selection alias sd_process_action process_action alias sd_execute_action execute_action alias sd_end_target_enemy_selection end_target_enemy_selection alias sd_end_target_actor_selection end_target_actor_selection alias sd_turn_end turn_end #-------------------------------------------------------------------------- # * Battle Start Processing #-------------------------------------------------------------------------- def process_battle_start # Reset all Skill delay turns for actor in $game_party.members actor.skill_delay = 0 actor.sd_casting = false actor.sd_iscasting = false actor.skill_select = false end # Perform the Original Call sd_process_battle_start end #-------------------------------------------------------------------------- # * Start party command selection #-------------------------------------------------------------------------- def start_party_command_selection # Reset Temp Battler value @temp_battler = nil # Perform the original Call sd_start_party_command_selection end #-------------------------------------------------------------------------- # * Start actor command selection #-------------------------------------------------------------------------- def start_actor_command_selection # Skip actor if already casting next_actor if @active_battler.sd_iscasting # Skip system if no more actors return if @active_battler == nil # Perform the original call sd_start_actor_command_selection end #-------------------------------------------------------------------------- # * Go to Command Input for Next Actor #-------------------------------------------------------------------------- alias sd_next_actor next_actor def next_actor # Only perform AFTER 1st actor select if @active_battler != nil # If targetted with a skill/spell if @active_battler.skill_select # Acquire Skill Delay set_skill_delay end end # Perform the original call sd_next_actor end #-------------------------------------------------------------------------- # * Go to Command Input of Previous Actor #-------------------------------------------------------------------------- def prior_actor # Obtain previous actor @temp_battler = $game_party.members[@actor_index-1] if @temp_battler.sd_iscasting == true return end # Reset/Remove @temp_battler.sd_casting = false @temp_battler.sd_iscasting = false @temp_battler.skill_delay = 0 @temp_battler.sd_skill = 0 @temp_battler.sd_target = 0 # Perform the original call sd_prior_actor end #-------------------------------------------------------------------------- # * Update Actor Command Selection #-------------------------------------------------------------------------- def update_actor_command_selection # Reset skill selection flag to false @active_battler.skill_select = false # Perform the original call sd_update_actor_command_selection end #-------------------------------------------------------------------------- # * Update Skill Selection #-------------------------------------------------------------------------- def update_skill_selection @active_battler.skill_select = true # Perform the original call sd_update_skill_selection end #-------------------------------------------------------------------------- # * Battle Action Processing #-------------------------------------------------------------------------- def process_action # Perform the original call sd_process_action # Only if using an active battler if @active_battler != nil # Reduce the delay turns by 1 if @active_battler.skill_delay > 0 @active_battler.skill_delay -= 1 end end end #-------------------------------------------------------------------------- # * Frame Update (main phase step 2 : start action) #-------------------------------------------------------------------------- def execute_action # If skill delay is over if @active_battler.skill_delay <= 0 # Perform if casting if @active_battler.sd_iscasting # Set to skill routine @active_battler.action.kind = 1 # Retrieve skill id @active_battler.action.skill_id = @active_battler.sd_skill # Retrieve target @active_battler.action.target_index = @active_battler.sd_target # Turn 1st Casting flag off @active_battler.sd_casting = false # Turn 2nd Casting flag off @active_battler.sd_iscasting = false end sd_execute_action else @active_battler.sd_iscasting = true # if the delay help window is active if DELAYED_HELP_TEXT # # Setup help window actor_name = @active_battler.name skill_action = " " + @active_battler.sd_skill_action + " " skill_name = $data_skills[@active_battler.sd_skill].name casting_txt = actor_name + skill_action + skill_name @message_window.add_instant_text(casting_txt) wait(DELAYED_HELP_WAIT) @message_window.clear end # if casting battle animation used if DELAY_ANIMATION # Animation for action performer (if ID is 0, then white flash) sd_animation = DELAY_ANIM_ID if sd_animation == 0 @active_battler.white_flash = true else # Bypass the Formation system @active_battler.abatvx_form_bypass = true @active_battler.animation_user = sd_animation if @active_battler.is_a?(Game_Enemy) display_user_animation(@active_battler, sd_animation, true) else display_user_animation(@active_battler, sd_animation, false) end # Return the set formation @active_battler.abatvx_form_bypass = false end end turn_end end end #-------------------------------------------------------------------------- # * End Enemy Selection #-------------------------------------------------------------------------- def end_target_enemy_selection sd_end_target_enemy_selection # If targetted with a skill/spell if @active_battler.skill_select # Acquire Skill Delay set_skill_delay end end #-------------------------------------------------------------------------- # * End Actor Selection #-------------------------------------------------------------------------- def end_target_actor_selection sd_end_target_actor_selection # If targetted with a skill/spell if @active_battler.skill_select # Acquire Skill Delay set_skill_delay end end #-------------------------------------------------------------------------- # * End Turn #-------------------------------------------------------------------------- def turn_end if @active_battler != nil # If the delay is over, or no delay if @active_battler.skill_delay <= 0 # Perform the Original Call sd_up4s5 end else sd_turn_end end end #-------------------------------------------------------------------------- # * Set the Skill Delay (upon immediate skill selection) #-------------------------------------------------------------------------- def set_skill_delay # Acquire ID of skill tempskill = $data_skills[@active_battler.action.skill_id] # Retrieve and apply the delay in turns @active_battler.skill_delay = tempskill.delay_skill_turn # Retrieve and apply the casting action (text message) @active_battler.sd_skill_action = tempskill.delay_skill_msg # Turn off the skill select switch @active_battler.skill_select = false # Turn on 1st 'Casting' switch @active_battler.sd_casting = true # Set current skill selected @active_battler.sd_skill = tempskill.id # Set current selected target @active_battler.sd_target = @active_battler.action.target_index end end
|
|
|
|
|
|
|
|
|
Oct 20 2008, 09:15 AM
|

Level 4

Group: Member
Posts: 52
Type: Event Designer
RM Skill: Beginner

|
QUOTE (mizzl @ Oct 20 2008, 10:26 AM)  Great script, except for that you have to edit the script itself to make a skill a delay skill Can you explain that part? What I've noticed with this (original) script and KGC's is that skills still execute even when the actor who casted the skill is dead. That doesn't make much sense unless you're lighting a fuse to a bomb or something of the sort. The other part is that the targeted enemy is the one using the skill on itself. There are workaround as far as text and costs goes for that, but it would be nice if the delayed skill moved to a different target if the original target is dead. At least, that's how the design in my mind thought it would work. I've been researching ways to get the above effects to work, but I haven't actually touched that yet since I haven't reached that part of my project queue yet.
__________________________
|
|
|
|
|
|
|
|
|
Oct 20 2008, 09:40 AM
|

Group: Member
Posts: 2
Type: Scripter
RM Skill: Skilled

|
QUOTE (Rukaroa @ Oct 20 2008, 07:15 PM)  QUOTE (mizzl @ Oct 20 2008, 10:26 AM)  Great script, except for that you have to edit the script itself to make a skill a delay skill Can you explain that part? What I've noticed with this (original) script and KGC's is that skills still execute even when the actor who casted the skill is dead. That doesn't make much sense unless you're lighting a fuse to a bomb or something of the sort. The other part is that the targeted enemy is the one using the skill on itself. There are workaround as far as text and costs goes for that, but it would be nice if the delayed skill moved to a different target if the original target is dead. At least, that's how the design in my mind thought it would work. I've been researching ways to get the above effects to work, but I haven't actually touched that yet since I haven't reached that part of my project queue yet. I think the first problem is only because RPG VX is programmed that way, I think. The actions all get ordered by speed and then get executed, not looking if the one who did those actions is still alive. Correct me if I'm wrong. Second of all, have fun trying to fix that one, and post it when you do! I don't know how to change that, and it's not that big of a problem, is it? It's only a perfection, the general idea is right.
|
|
|
|
|
|
|
|
  |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
RPG RPG Revolution is an Privacy
Policy and Legal
|
|