RMXP - Moonpearl's animated battler script HELP!! Errors and bugs!! X((

Started by Starmage, May 18, 2016, 09:43:10 am

Previous topic - Next topic

Starmage

Hi all!! I know that I am new in this site, but I really do plan to be a part of this site now that I've discovered it! a kind soul referred me here saying that there are many talented scripters and programmers here who might be able to help me in this problem and issues I have with moonpearl's scripts on RMXP! x(( (By the way, I'm quite newb to how scripts work and RPG making in general)..

there's currently an error in my project with MP's Animated battler system script when fighting with only 1 surviving party member (all other characters are dead).


I am also curretly contacting Moonpearl herself (the maker of the animated battler script I used) for help regarding this, hopefully I will get a response soon. but it seems she is indeed quite inactive nowadays! x(

Also, there's another error when dying while a character is under a state (confuse/venom/silence etc.):


I am really looking for help from RMXP Script experts out there or those who are very experienced with the RGSS!! x((

There is also a known issue with enemy's names in the battle-system that aren't showing correctly when you point the cursor on them..

Alot of the issues have something to do with Moonpearl's animated battler script.

You can DL my project's script file here:
http://www.mediafire.com/download/gauahjb7nc2a5as/Scripts.rxdata

Also, MP's scripts can be found here for more info:
http://moonpearl-gm.blogspot.fr/

Thanks so much to anyone who can help!! it will mean so much to me and I will be sure to credit you for helping me!! as it will be the most life-saving task ever! :)

KK20

For the first one, if you go to the line in the script that the error points to (after closing the error window and opening your scripts, it should have the cursor pointing there already), try adding this one line:
return if @phase4_step == 1


in this location:

mp_abattlers_update_phase4_step2
return if @phase4_step == 1 #<------------- Right in between here
# Raise damaged flag


I cannot understand how the second one works without physically seeing it for myself. My suggestion would be to do this for now:

if battler.damaged && !@active_battler.b_anim.nil? #<------------------ Add this here
  battler.knockback_v(@active_battler.b_anim.knockback_v)
  battler.knockback_h(@active_battler.b_anim.knockback_h * (@active_battler.real_x > battler.real_x ? 1 : -1) )
end

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Starmage

Wow!! OMG!! I was on the right place to ask for help after all!! I've tested the problems after putting those codes you wrote on the lines of my scripts and it worked!! there weren't any more errors on site!!

Wow!! thankyou so much KK20, you're indeed a life-saver!! I will come back an report whatever else issue I face with the project!

And another one is: There seems to be a problem in the battle where when the enemy's name aren't shown correctly as I point the cursor on them.. example, I click attack then the first target is "Slime". so it shows Slime.. but when I change target to "Frog".. the name "Slime" is still the one that shows up for every enemy.. (Always the first enemy's name).

For now, Thankyou so so much for this fix KK20!! You don't know how happy I am to have this solved!! I will be sure to credit you in my project for being the one who've helped me solve one of the main problems I'm facing with the project for days now!! :D

KK20

For the script 'Scene_Battle' (the one under MP Animated Battlers), locate around line 44 and replace the two methods with these:

  alias mp_abattlers_start_enemy_select start_enemy_select
  def start_enemy_select
    mp_abattlers_start_enemy_select
    @enemy_arrow.dispose
    @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport2)
    @enemy_arrow.help_window = @help_window
  end

  alias mp_abattlers_start_actor_select start_actor_select
  def start_actor_select
    mp_abattlers_start_actor_select
    @actor_arrow.dispose
    @actor_arrow = Arrow_Actor.new(@spriteset.viewport2)
    @actor_arrow.help_window = @help_window
  end

Moonpearl forgot to associate the selection arrows to the help window so that it can update.

Glad to help :)

EDIT: I tried using the demo to see if I could reproduce the "dying under a state" bug, but everything seemed fine on my end. What did you do in particular?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Starmage

Wow!! thanks so much once again KK20!! it worked as always!! xD :D Thankyou for all your help and effort in finding the solution for all these!! xDD I'm really happy all these were solved now!! xD :D

Oh!! and I believe that the battle system errors were because I combined many of Moonpearl's scripts in my game.. but I honestly didn't edit anything within the scripts themselves.. so it makes me wonder too! x((

Once again, thankyou so much for this!! you've helped me alot!! :D

KK20

I'm pretty confident in saying that Moonpearl's other scripts cannot possibly be the cause. It seems like a configuration error more than anything, which is weird if you claim you didn't touch the scripts.

If you're capable of reproducing the error in the battle system demo, please share your results. While my fix might have been the solution, I can't confirm if it affects anything else negatively.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Starmage

Hi Kk20! Oh! and It is actually quite strange because I have tried the demo but none of the errors occured.. I am quite puzzled with all these actually! x((

Oh! and DerVVulfman also provided a code that can help regarding this which is here:


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....


And he mentioned that there are deeper causes of the problem!! but both your patches seem to work fine now! and hopefully, I won't encounter any negative effects with it!! x((

My only concerns now with MP's script is the CMS.. I want to lock the first character from being switched in the party switching menu, but I don't know how! x((

Also:


is there any way in the script so that the HP/Mana will be covered by the skill window? instead of them overlapping together like in the screeenshot?

Thanks so much once again KK20!! your help is really appreciated with all these! :)

KK20

I read his feedback regarding my fix. While it may be the safer route to essentially copy the if-statement in "update_phase4_step2", it still results in the same outcome.
Reason: ShowHide

This is what part of the default RMXP method looks like. I'll point out the lines you should look for.

  def update_phase4_step2
    # If not a forcing action
    unless @active_battler.current_action.forcing #<-----------
      # If restriction is [normal attack enemy] or [normal attack ally]
      if @active_battler.restriction == 2 or @active_battler.restriction == 3
        # Set attack as an action
        @active_battler.current_action.kind = 0
        @active_battler.current_action.basic = 0
      end
      # 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
    # Clear target battlers
    @target_battlers = []


And notice how his fix is

  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 


It's the same repeated code being unnecessarily called twice. The reason why the script was erroring out in the first place was because of this line right here:

@target_battlers = []

This variable needs to be initialized in order for MP's script to work. The question is why is it not reaching this line in the first place?

Because of this 'return' statement here:

        # Shift to step 1
        @phase4_step = 1
        return

Oh hey, look. There's @phase4_step being set to a value of 1. Why don't we just check if @phase4_step is equal to one? And so I did.

Dervvulfman is just repeating code that has already been ran through, which isn't necessarily bad, but when there's an elegant solution, why not use it?

I'm defending myself here because his explanation makes it sound like I didn't account for something that I am already well aware of. If he can give me a step-by-step scenario of why my fix doesn't work, he needs to prove it.

As for your other errors, I'm going to need a demo since the Scripts file can only provide me with so much to work with.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

*points out that "Deals" is misspelled in the screenshot* xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

KK20

Bro...
Spoiler: ShowHide


I might have figured out the Skill window issue. Just raise its z-axis. In Window_ACMS_Skill, do this for initialize

  def initialize(actor)
    super(16, 144, 288, 320)
    @actor = actor
    @column_max = 1
    refresh
    self.index = 0
    self.z = 9999 #<------ Or any large number really, it doesn't matter for this scenario
  end


EDIT:
And...thank god the mandatory party member thing is already present in the system, that makes this easy. The script call for your event is this

$game_party.mandatory[ACTOR_ID] = true

where ACTOR_ID is replaced with the actor's database index. Aluxes is 1, Basil is 2, etc.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Starmage

Hi KK20 and Blizzard (yeah, I just noticed the mispelling error in the database just now!! xDD)

Oh! and regarding the script patch you gave, they all really worked KK20, so I don't have complaints about that on my side! :) Anything that gives stability for the MP script battle system, then I am thankful for them!! xDD Ahh I understand now, so that's how you made the script work! hmm, it seems scripters really do differ in their ways in getting the codes done! interesting!! :)

Also, your codes with regards to the skill window WORKED perfectly!!! xDD :D Thanks so much!! many issues have now been resolved for my project! and the credit I gave you on it is very much well-deserved!! so thankyou so much for all your help once again! now that the overlapping issue with the skill menu was fixed.. my only problem now is the party member mandatory one. x(

I tried using the code you gave through a script call event, it was like this:
$game_party.mandatory[1] = true


But it seems that I can still remove the first actor from the party in the party switching menu! x(( hmm, maybe I did something wrong with the code?

Anyway, Thankyou so much once again KK20, I really appreciate your big help in all of my Script issues with MP's scripts!! And you don't know how much you've already contributed to my project because of this! ;)

KK20


$game_party.mandatory[0] = true

Try that instead. I think I vaguely recall the script subtracting the ID by one. Hate it when people do that.

So what you had before probably made Basil mandatory in the party.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Starmage

Wow!! it really worked KK20!! thanks so much for this!! This will be very useful!! xDD :D ! xDD :D

Thankyou for all your help KK20!! xDD

Starmage

Umm one more thing!! umm sorry so much for this disturbance once again! but is it possible if I let the party-switching in the menu disallow putting every member to the substitute? (because there's a glitch when you put all members to the substitute and no chars on active, it will game over when entering a battle)..

Cause I have a change of plans for my game.. like I will still allow the first character to be replaced.. BUT, the CMS will not allow putting every character into the substitute, which means.. if there's only one char left at the active on the party switching.. it will buzz out if you try to put the last char on the substitute too! thanks so much!! xDD

KK20

Locate this line in Scene_Party

if $game_party.mandatory[@party[@index].actor_id - 1]

and add this bit to it

if $game_party.mandatory[@party[@index].actor_id - 1] || $game_party.actors.size == 1

The only problem with this is that you can make the party just be a dead actor, so going into battle will trigger a game over as well. In that case, adding this would be good too.

if $game_party.mandatory[@party[@index].actor_id - 1] || !($game_party.actors - [@party[@index]]).any?{|a| a.hp > 0}

This will ensure that there is at least one live actor in the party. It's pretty ugly, but then again, MP's scripts were never pretty to read :P Just pretty to look at

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Starmage

Wow, as always KK20!! it worked!!! xDD Thankyou so much!!! It seems there are no longer any notable issues I'm encountering with MP's scripts right now after all the fixes and patches I got from you KK20! (and hopefully there won't be anymore in the future!) xDD

So thanks so much once again KK20!!, you've really been a big help to all of these!! :) xDD and it means so much to me and my project's progression!! :) xDD I cannot thank you enough!! :D

Starmage

Sorry for the disturbances once again, KK20!! but is there any way in MP's Animated battler script that I can minimize the wait time? The wait time when the battlers vibrate upon being struck is too long.. Umm, I was just wondering if there's a way that I can make the battles more faster by reducing the wait-time within MP's animated battler script??  Thanks so much!! xDD

KK20

The quickest fix I could find was in Game_Battler under the MP Animated Battlers. Line 142 for me:
		@wait_count = 20

You can change that to a zero.

As for damage pop-up or animations, that's going to require modifications to RPG::Sprite, which has its own set of problems.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

Starmage

Wow! thanks alot KK20!! it is much faster now! though the short vibration period still persisted! But this works for me!! Thanks so much once again for all your help KK20! xDD :D I really do appreciate it! :)