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,556
Reaction score
8,159
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,175
Reaction score
7,399
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,556
Reaction score
8,159
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,175
Reaction score
7,399
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,175
Reaction score
7,399
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

A side story is almost getting into the next stage. Almost everything in this game has real-life references.
unfinishedbuildingwip1.jpg
Everyday life is full of absurdity. This is just a reflection.
TFW you discover how the script batching works in VNMaker... after you've had the program for almost 3 years.
hAx6iQ3.gif

Writes that the characters have to climb a mountain.

Realized that I have to draw six sets of models where characters are climbing.

At least I know how to draw something. :)
I'm currently scratching my head on how to design plains. What do I even put in plains? Some trees (but not too many or it turns into a forest)? Grass? A few bushes? That's a bit dull.
I'm looking for tutorials but Google didn't seem to find much (or maybe I have the wrong keywords). I don't know how to map plains and I don't know how to learn.

Forum statistics

Threads
111,406
Messages
1,060,899
Members
144,760
Latest member
Belphegor
Top