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,356
Reaction score
8,081
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,135
Reaction score
7,327
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,356
Reaction score
8,081
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,135
Reaction score
7,327
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,135
Reaction score
7,327
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

Signed a lease on a new place today. Back into town, closer to shops, family and takeaway - none of those could be a good thing! 10 days to moving date.
let me introduce you to my worlds source of "wool". A pretty simple-minded, easily scared and mostly blind, double-headed big wooly bird thingy :D Children may be able to ride on a trained one, but they don't support the weight of adults, so they aren't suitable for transportation. And herders use the shown tool to give them sound commands
6nwyqEJ.png
This Life is a Dream is in full production! More pics and some free promo assets coming soon!
Dragonfly3116 wrote on Redweaver's profile.
i need to ask do you mind sending me a link to tutorial town an legend of ancients Please My new Email is necroboy1973@gmail.com
I Am A Member On The Site Here As Well If Your Still teaching Let Me Know Thanks Joseph

Forum statistics

Threads
110,531
Messages
1,053,970
Members
143,619
Latest member
SomeoneOnTheWindow
Top