Multi-Hit script activates animation mulitple times per hit

kyonides

Reforged is laughable
Veteran
Joined
Nov 17, 2019
Messages
287
Reaction score
71
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
170
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
287
Reaction score
71
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
263
Reaction score
95
First Language
English
Primarily Uses
RMXP
Just upload your scripts.rxdata
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
263
Reaction score
95
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
170
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
263
Reaction score
95
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
170
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
263
Reaction score
95
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
170
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
287
Reaction score
71
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
170
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
287
Reaction score
71
First Language
English
Primarily Uses
RMXP
Then use empty braces {} instead.
Code:
LVLUPMAX = {}
 

KK20

Just some XP Scripter
Veteran
Joined
Oct 11, 2018
Messages
263
Reaction score
95
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

Dad's watching a WWII documentary while I work on some cool assets for my games. I just love RPG Maker!
Also Happy Halloween! Dad's friend won't be coming unfortunately, but Dad will still be taking me to Boxi Park to have some fun tonight! I'll be posting a video on my YouTube channel of the show, and I'll be sure to post a link here.
"Nightmares exist outside of logic and there's little fun to be had in explanations. They're antithetical to the poetry of fear. In a horror story the victim keeps asking why, but there can be no explanation and there shouldn't be one..." - Stephen King
I feel people seek explanation and demand it sometimes in games, but in the horror genre, well, maybe you shouldn't have one. Silent Hill 1 comes to mind...
Managed to implement QSprite.

Always double check your plugin order.


Finally! I've been puzzling over why it wasn't working for two days now. Turns out all of my calculations were correct, I just forgot to give some events hitboxes. :kaoswt: Now my randomly generated maps check for collision errors, and move stuff around in real time if they finds any. :LZSexcite:
Ami
--- OP Candy ---

Kids: Trick Or Treat!
Hero: Alright,here's the Candies (Give A Bunch Of Candy).
Kids: Thank you,Mister! (Running)
Hero: How cute they are…
F.Archer: Did you give them a OP Candy,accidently?
Hero: Huh?

Forum statistics

Threads
104,682
Messages
1,008,067
Members
136,171
Latest member
emcautley1
Top