Hey Starmage!
I read the PM you sent me about how someone in ChaosProject told you how to fix your battlesystem. While it may appear patched, his solution wasn't at the result of a proper diagnosis. It is one thing to find a fix. It is another to find the root cause of your issue. However, his fix is in the proper location.
Your code in the MP Animated Battlers: Scene_Battle code occurs at line 104 on down, resembling this:
Code:
alias mp_abattlers_update_phase4_step2 update_phase4_step2
def update_phase4_step2
mp_abattlers_update_phase4_step2
# Raise damaged flag
for target in @target_battlers
if target.damage.is_a?(Fixnum)
etc....
Your helper in ChaosProject figured out that this page was running while the system thought it was in the first step of phase 2, which is why he suggested:
Code:
return if @phase4_step == 1
Well, it goes much deeper than that. You see, your problem was that the system cycles through your dead members and their targets. The method in Moonpearl's script acts like this:
Code:
mp_abattlers_update_phase4_step2 ... Perform the original code
for target in @target_battlers ... for every target that the battler has in his scope
if target.damage.is_a?(Fixnum) ... if the target has numeric damage (it isn't the word 'Miss!')
... etc.
You would think that the code would work fine. But when you have a dead actor, you have no @target_battlers to cycle through. No @target battlers, and it goes 'BOOM'.
THAT is the actual source of your problem with Moonpearl's system. I ran tests to see what battler(s) were going through the motions, and it was always the DEAD one... the dead one that does not get to target any battlers.
So instead of the code that your guy from ChaosProject suggested (granted, a mere one line), I suggest this... an exerpt from the original method that tests for DEAD guys and skips to the next step.
Code:
alias mp_abattlers_update_phase4_step2 update_phase4_step2
def update_phase4_step2
# Insert Here
# If not forcing action
unless @active_battler.current_action.forcing
# If restriction is [cannot perform action]
if @active_battler.restriction == 4
# Clear battler being forced into action
$game_temp.forcing_battler = nil
# Shift to step 1
@phase4_step = 1
return
end
end
# End of Insert
mp_abattlers_update_phase4_step2
# Raise damaged flag
for target in @target_battlers
if target.damage.is_a?(Fixnum)
etc....
The main facet of this code is that it checks to ensure that a battler who is incapable of performing an action SKIPS to the next battler and next phase. In otherwords, it looks for Luna, sees Luna, then SKIPS Luna before going to the next living battler. After that, it is business as usual.
Ya know? I think I said something in the CMS system request that there were no safeguards. Yup......