rafaelzimrp

Villager
Member
Joined
Apr 7, 2018
Messages
5
Reaction score
6
First Language
Portuguese
Primarily Uses
RMVXA
Greetings, I'm havind trouble when using the engine. Whenever an actor is removed through an event or through the escape skill tag while in battle, the game crashes with the following error message:

"Script 'Battle Luna line 1194: NoMethodError ocurred.
Error ocurred, check the debug console for more information."

And these are the contents of line 1190-1195.
#--------------------------------------------------------------------------
# faceset_name
#--------------------------------------------------------------------------
def faceset_name
[@battler.face_name, @battler.face_index]
end

This is tested in a Luna Engine Base game.

My project involves actors leaving the party at give moments during battle. Is there a workaround or a way to fix this? Thanks in advance!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,503
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
Can you give us a screenshot of the debug console?
That message sounds as if you installed one of the backtracer scripts to help with bughunting, and then we need to see its complete output. You need to show the console through the menu option before starting the play test.
 

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,167
Reaction score
7,371
First Language
Indonesian
Primarily Uses
RMVXA
I'm not familiar with entire Luna Engine and how it works, but maybe a little silly patch might help?
Code:
class SpriteHUD_Face < Sprite_Base
  def faceset_name
    [@battler.face_name, @battler.face_index] rescue ['', 0]
  end
end
I believe once the battler is removed through event, it makes the @battler variable nil, thus no method error occured
A proper fix should be done though, but in meantime, u can try my patch above, put on a new slot below Battle Luna. Though I won't guarantee if it does not break some functionality since I haven't tested it yet. Anyway, lemme know how it turns out.
 

rafaelzimrp

Villager
Member
Joined
Apr 7, 2018
Messages
5
Reaction score
6
First Language
Portuguese
Primarily Uses
RMVXA
Can you give us a screenshot of the debug console?
That message sounds as if you installed one of the backtracer scripts to help with bughunting, and then we need to see its complete output. You need to show the console through the menu option before starting the play test.

Didnt work, unfortunately. :/

Here's the Debug SS.

Thanks for the help, guys!
 

Attachments

  • Debug1.png
    Debug1.png
    25 KB · Views: 9

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,503
Reaction score
8,144
First Language
German
Primarily Uses
RMMV
Try disabling yanfly's battle engine, then start a new game and test again.
Yanfly's battle scripts have a problem with removing or adding actors during battle as they're not written with that option in mind. If that is the cause, then you'll need a special script or patch to enable summoning with them.
 

rafaelzimrp

Villager
Member
Joined
Apr 7, 2018
Messages
5
Reaction score
6
First Language
Portuguese
Primarily Uses
RMVXA
Try disabling yanfly's battle engine, then start a new game and test again.
Yanfly's battle scripts have a problem with removing or adding actors during battle as they're not written with that option in mind. If that is the cause, then you'll need a special script or patch to enable summoning with them.

Seems like that wasn't it. By the way, it works OK when I add an actor. The problem happens only when they're removed, it seems.
I don't think Yanfly's script has anything to do with it, since it works fine when I remove an actor using that and not using Luna Engine.

Btw, GTG Sleep for now, be back in a few hours!
 
Last edited:

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,167
Reaction score
7,371
First Language
Indonesian
Primarily Uses
RMVXA
To be fair, the error changed once you put my patch, indicating it's "worked". We just need to put some patches on some holes on the script. And it turned out to be more troublesome than I thought. Please be my guest on trying to test the patch.

I've added few more lines on the patch.
Code:
class SpriteHUD_Face < Sprite_Base
  def faceset_name
    [@battler.face_name, @battler.face_index] rescue ['', 0]
  end
end

class Spriteset_HUD
 
  alias patch_luna_screen_x screen_x
  def screen_x
    return 0 unless @battler
    return patch_luna_screen_x
  end

  alias patch_luna_screen_y screen_y
  def screen_y
    return 0 unless @battler
    return patch_luna_screen_y
  end
 
end

class SpriteHUD_Name < Sprite
  alias patch_luna_update update
  def update
    return unless @battler
    return patch_luna_update
  end
end
 

rafaelzimrp

Villager
Member
Joined
Apr 7, 2018
Messages
5
Reaction score
6
First Language
Portuguese
Primarily Uses
RMVXA
To be fair, the error changed once you put my patch, indicating it's "worked". We just need to put some patches on some holes on the script. And it turned out to be more troublesome than I thought. Please be my guest on trying to test the patch.

I've added few more lines on the patch.
Code:
class SpriteHUD_Face < Sprite_Base
  def faceset_name
    [@battler.face_name, @battler.face_index] rescue ['', 0]
  end
end

class Spriteset_HUD
 
  alias patch_luna_screen_x screen_x
  def screen_x
    return 0 unless @battler
    return patch_luna_screen_x
  end

  alias patch_luna_screen_y screen_y
  def screen_y
    return 0 unless @battler
    return patch_luna_screen_y
  end
 
end

class SpriteHUD_Name < Sprite
  alias patch_luna_update update
  def update
    return unless @battler
    return patch_luna_update
  end
end

Yay, looks like that fixed some of it! :)
Should I try repeating the same for all these errors?
 

Attachments

  • Debug2.png
    Debug2.png
    28 KB · Views: 6

TheoAllen

Self-proclaimed jack of all trades
Veteran
Joined
Mar 16, 2012
Messages
6,167
Reaction score
7,371
First Language
Indonesian
Primarily Uses
RMVXA
Yes please. Updated the patch
Code:
class SpriteHUD_Face < Sprite_Base
  def faceset_name
    [@battler.face_name, @battler.face_index] rescue ['', 0]
  end
 
  alias patch_luna_update update
  def update
    return unless @battler
    return patch_luna_name_change?
  end
end

class Spriteset_HUD
 
  alias patch_luna_screen_x screen_x
  def screen_x
    return 0 unless @battler
    return patch_luna_screen_x
  end

  alias patch_luna_screen_y screen_y
  def screen_y
    return 0 unless @battler
    return patch_luna_screen_y
  end
 
end

class SpriteHUD_Name < Sprite
  alias patch_luna_update update
  def update
    return unless @battler
    return patch_luna_name_change?
  end
end
 

rafaelzimrp

Villager
Member
Joined
Apr 7, 2018
Messages
5
Reaction score
6
First Language
Portuguese
Primarily Uses
RMVXA
Yes please. Updated the patch
Code:
class SpriteHUD_Face < Sprite_Base
  def faceset_name
    [@battler.face_name, @battler.face_index] rescue ['', 0]
  end
 
  alias patch_luna_update update
  def update
    return unless @battler
    return patch_luna_name_change?
  end
end

class Spriteset_HUD
 
  alias patch_luna_screen_x screen_x
  def screen_x
    return 0 unless @battler
    return patch_luna_screen_x
  end

  alias patch_luna_screen_y screen_y
  def screen_y
    return 0 unless @battler
    return patch_luna_screen_y
  end
 
end

class SpriteHUD_Name < Sprite
  alias patch_luna_update update
  def update
    return unless @battler
    return patch_luna_name_change?
  end
end

Oh nooo now the battle won't even start xD
Ahhh sorry I'm so lost. :(
 

Attachments

  • Debug3.png
    Debug3.png
    22.8 KB · Views: 3

Latest Threads

Latest Posts

Latest Profile Posts

Alisa: Prophecy of the Falling Stars. Join Alisa, a quiet girl with a heart filled with love and hope, on her journey to prevent a calamity. My next RPG Maker music pack is my largest and most focused pack yet. It's a musical story that focuses on a young heroine named Alisa who has been assigned the ultimate task to prevent a calamity.

SnJj_O.png
Alien Worlds, Minecraft Blocks, Extend Options, Fine Speed Control, Art by Muggu | RPG Maker News #33

Rest in Peace vlog gun...
vloggunsmallface.png
Another unnamed character, and probably last one for now.
She's a dragon girl inspired by fafnir dragon. as always, name suggestion is welcomed.
Dragon_Girl.jpg

Dragon_Girl_1.png

Forum statistics

Threads
111,164
Messages
1,058,883
Members
144,408
Latest member
Bretzel68440
Top