Multi-Hit script activates animation mulitple times per hit

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
285
Reaction score
70
First Language
English
Primarily Uses
RMXP
The default implementation...
Well, you gotta remove any battle related script from the script editor except the multi-hit one. Playtest it and see if you get any other errors. If you're still getting the same error, we'd need the backtrace to see more or less where it did assign a target as array.
Err, you could also check if there are other battle scripts modifying either @target_battlers or a method placed BEFORE make_skill_action_result is called by any script.
 

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
156
Reaction score
6
First Language
English
Primarily Uses
RMXP
all right after a bit of a test run, i found out that the HP Sacrifice Script
is the messing up with the skill_effect array thingy
but i don't want it to remove that script! its for the physical skills!
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
285
Reaction score
70
First Language
English
Primarily Uses
RMXP
o_O Well, where's the link to that script?
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
245
Reaction score
90
First Language
English
Primarily Uses
RMXP
Just upload your scripts.rxdata
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
245
Reaction score
90
First Language
English
Primarily Uses
RMXP
Well now I know why the backtrace script didn't work. You didn't fully copy it...

You were missing the most important part at the end:
Code:
rescue SyntaxError
  $!.message.sub!($!.message, mod_error($!))
  raise
rescue
  $!.message.sub!($!.message, mod_error($!))
  raise
end
 

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
156
Reaction score
6
First Language
English
Primarily Uses
RMXP
@KK20
i re-check the edited Main Script and i forgot that is there...
whoops! :aswt:

EDIT: i added the missing lines of code. playtest. and...
1596947399489.png
OH GOSH
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
245
Reaction score
90
First Language
English
Primarily Uses
RMXP
Can you give a detailed step-by-step on how to reproduce in your demo? I'm not seeing it. Rather, I'm getting completely different, unrelated errors.
 

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
156
Reaction score
6
First Language
English
Primarily Uses
RMXP
@KK20
i don't know how i can reproduce it, but i think it goes...
- go to menu
- add Popplio to your active party (just in case)
- attack enemies
- and finish the battle by killing the last enemy with Double Kick or "Double" Slap.
any other attacks will end the battle normally.
Litten has Double Kick, and Popplio has "Double Kick"
- and i believe that should occurred the error

here is the batch of scripts for my game
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
245
Reaction score
90
First Language
English
Primarily Uses
RMXP
How in the world are you even getting your game to run?? I keep running into other errors.

Immediately starting the game, I get a crash for an incorrect configuration:
Code:
  # Increase of Skills After reaching specific Levels : Level => Increase
  LVLUPMAX = [{ 10 => 1, 20 => 1, 40 => 2 }]
This shouldn't be an array. Remove the square brackets.

Upon opening the party switcher, I'm met with undefined method 'battler_name' for nil. So now I'm going to figure out what is causing that...
 

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
156
Reaction score
6
First Language
English
Primarily Uses
RMXP
just remove the "[]" in the script and you should be fine.
gonna update that...:aswt:
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
285
Reaction score
70
First Language
English
Primarily Uses
RMXP
I never added such brackets in my KSkillMax script. I wonder why you added such a thing to that constant, Mario. Anyway, it's a lesson you'll never forget I think. :D
 

MarioWidjaya123

Veteran
Veteran
Joined
May 16, 2020
Messages
156
Reaction score
6
First Language
English
Primarily Uses
RMXP
I never added such brackets in my KSkillMax script. I wonder why you added such a thing to that constant, Mario. Anyway, it's a lesson you'll never forget I think.
i just thought it might fix the "LVLUPMAX still active even when set to false" problem
 

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
285
Reaction score
70
First Language
English
Primarily Uses
RMXP
Then use empty braces {} instead.
Code:
LVLUPMAX = {}
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
245
Reaction score
90
First Language
English
Primarily Uses
RMXP
Figured out the multi-hit problem. Turns out it was a bug, even with the original script from Tons of Add-ons.

You can replace the corresponding method in the script with this:
Ruby:
  alias update_phase4_step5_multi_hit_later update_phase4_step5
  def update_phase4_step5(battler = nil)
    if battler != nil
      update_phase4_step5_multi_hit_later(battler)
      return
    end
    update_phase4_step5_multi_hit_later
    if @active_battler.current_action.kind == 1
      if BlizzCFG::SKILL_RANDOM.include?(@skill.id)
        if @active_battler.is_a?(Game_Actor)
          @active_battler.current_action.decide_random_target_for_actor
        elsif @active_battler.is_a?(Game_Enemy)
          @active_battler.current_action.decide_random_target_for_enemy
        end
      else
        if @active_battler.is_a?(Game_Actor)
          @active_battler.current_action.decide_last_target_for_actor
        elsif @active_battler.is_a?(Game_Enemy)
          @active_battler.current_action.decide_last_target_for_enemy
        end
      end
    elsif @active_battler.current_action.kind == 2
      if BlizzCFG::ITEM_RANDOM.include?(@item.id)
        if @active_battler.is_a?(Game_Actor)
          @active_battler.current_action.decide_random_target_for_actor
        elsif @active_battler.is_a?(Game_Enemy)
          @active_battler.current_action.decide_random_target_for_enemy
        end
      else
        if @active_battler.is_a?(Game_Actor)
          @active_battler.current_action.decide_last_target_for_actor
        elsif @active_battler.is_a?(Game_Enemy)
          @active_battler.current_action.decide_last_target_for_enemy
        end
      end
    elsif @active_battler.is_a?(Game_Actor)
      if BlizzCFG::WEAPON_RANDOM.include?(@active_battler.weapon_id)
        @active_battler.current_action.decide_random_target_for_actor
      else
        @active_battler.current_action.decide_last_target_for_actor
      end
    elsif @active_battler.is_a?(Game_Enemy)
      if BlizzCFG::ENEMY_RANDOM.include?(@active_battler.id)
        @active_battler.current_action.decide_random_target_for_enemy
      else
        @active_battler.current_action.decide_last_target_for_enemy
      end
    end
    @phase4_step = 2 if @repeat[0] > 1 && @repeat[2] > 0
    @repeat[0] -= 1
  end
Main reason I never saw this error before was because the skill I was testing with was also configured in SKILL_RANDOM. Removing it from there reproduced the issue. The fix I applied makes the active battler target the same enemy as it did at the start of its multi-hit. However, if the enemy dies before all hits are applied, then the attack stops immediately; it does not find a new target to apply the remaining hits to. Let me know if that is okay with you, otherwise I'll have to take a look at it again later.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

I've had some hard times. A co-worker accused me (not going into detail here), and I am trying finish training next week. Still not paid yet, I think next week.
I don't like hard boiled eggs...
it's weird to eat something that crunchy outside soft inside. And after chewing it for a while it started to spill red sauces that taste like iron.
Latest member to OcRam -plugin suite: OcRam_Layers! Optimized parallax layers (for parallax mapping?) + dynamic layers which can be used in title-, battle and map scenes!
People convinced me to use my old graphics for this new project, i guess i can't run away from blender just yet. https://gyazo.com/2a105847c042bb78c6d4919ec1308660

Forum statistics

Threads
102,964
Messages
996,333
Members
134,428
Latest member
productscrack
Top