RPG Maker Forums

I am using DoubleX Reflect State Script along with the Compatibility Fix for Battle Symphony for a Final Fantasy style reflect mechanic. It works great but I am having just a few problems with it and would appreciate some help.

Scripts in question:

Battle Engine Symphony

DoubleX RMVXA Reflect State

DoubleX RMVXA Reflect State Compatibility Fix

  • I would like for reflect to use the caster's stats (a.mat) vs. the target's stats (b.mdf) when an ability is reflected. (Sort of solved)
I have changed 'Reflect State Compatibility Fix' to use the caster's stats rather than the target's stats when an ability is reflected. This solution works great (as far as I can tell) for reflected abilities that target only one.

  • I would like multi-target abilities that are reflected to continue playing their animation and dealing damage after the caster has been killed by its own reflected ability. Discontinuing the ability after death would also work, as if the caster has to be alive for its magic to continue.

Problems begin to occur when an ability that targets all is used. If the caster kills itself with the reflected ability before the reflect cycle ends then this error occurs.



If there are no more targets for a reflected ability (all targets are dead before each reflected hit is successful) then this error occurs.



I have played around with it a bit and have come up with somewhat of a solution *cough cough* but even stranger things occur then.

LIST OF EVENTS LEADING UP TO PROBLEMS:

  • Entire actor party and enemy troop have reflect status.
  • Enemy caster uses a multi-target ability on actor party.
  • Ability is reflected properly (a random target on opposite side) until stopped when the caster dies.
  • Actor caster uses a multi-target ability on enemy troop.
  • The first hit occasionally ignores reflect and inflicts damage.
  • The ability then seems to reflect properly.
  • Occasionally when the battle is won, after the victory aftermath, damage from the ability is dealt back to actor caster.

ORIGINAL SCRIPT SEGMENT:

#----------------------------------------------------------------------------| # Rewrite method: invoke_reflect_state | #----------------------------------------------------------------------------| def invoke_reflect_state(target, item) @log_window.display_reflection(target, item) # This part is rewritten by this script to fix compatibility issues with Yami Engine Symphony - Battle Symphony last_subject = @subject @reflect_subject = target @subject = target @subject.backup_actions @subject.make_actions if item.is_a?(RPG::Skill); @subject.current_action.set_skill(item.id) else; @subject.current_action.set_item(item.id); end actions_list = SYMPHONY::DEFAULT_ACTIONS::REFLECT_ACTION if last_subject.opposite?(target) if DoubleX_RMVXA::Reflect_State::REFLECT_TO_ENEMY_CASTER reflect_subject = last_subject else reflect_subject = last_subject.friends_unit.random_target end else reflect_subject = last_subject.opponents_unit.random_target end perform_actions_list(actions_list, [reflect_subject]) @subject.clear_actions @subject = last_subject @reflect_subject.restore_actions @reflect_subject = nil @log_window.display_action_results(reflect_subject, item) refresh_status perform_collapse_check(reflect_subject) perform_collapse_check(target) # end # invoke_reflect_stateALTERED SCRIPT SEGMENT OF 'Reflect State Compatibility Fix' (works good with single target abilities):

#----------------------------------------------------------------------------| # Rewrite method: invoke_reflect_state | #----------------------------------------------------------------------------| def invoke_reflect_state(target, item) if @subject.opposite?(target) reflect_subject = @subject.friends_unit.random_target else reflect_subject = @subject.opponents_unit.random_target end actions_list = SYMPHONY::DEFAULT_ACTIONS::REFLECT_ACTION perform_actions_list(actions_list, [reflect_subject]) refresh_status perform_collapse_check(reflect_subject) perform_collapse_check(target) end # invoke_reflect_stateEVEN MORE ALTERED SCRIPT SEGMENT OF 'Reflect State Compatibility Fix' (I've attempted to force the cycle to end but this creates more problems):
('$game_switches[442]' is always false in this situation)
('all_dead?' is redefined to accept other states for defeat)
('enemies_dead?' is the same as the original 'all_dead?')

Code:
  #----------------------------------------------------------------------------|  #  Rewrite method: invoke_reflect_state                                          |  #----------------------------------------------------------------------------|  def invoke_reflect_state(target, item)    if $game_party.all_dead?      BattleManager.process_defeat    elsif $game_troop.enemies_dead? && $game_switches[442] == false      BattleManager.process_victory    else      if @subject.alive?        if @subject.opposite?(target)          reflect_subject = @subject.friends_unit.random_target        else          reflect_subject = @subject.opponents_unit.random_target        end        actions_list = SYMPHONY::DEFAULT_ACTIONS::REFLECT_ACTION        perform_actions_list(actions_list, [reflect_subject])        refresh_status        perform_collapse_check(reflect_subject)        perform_collapse_check(target)      end    end  end # invoke_reflect_state

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,837
Latest member
Dabi
Top