Tsukihime's Enemy Reinforcements Script

Im using Tsukihime's Enemy Reinforcements Script to make an enemy summon other enemies but when the enemy uses the skill, an error message appear saying:

Script 'Game_Interpreter' line 1411: NameError Occurred

undefined local variable or method `Troop_2' for

#<Game_Interpreter:0x8b22480>

Heres a screenshot:

Sanstitre_zps1106078f.png


Thank you to anyone who helps me with this problem.
Please give a link to the script you're using, otherwise we can't help you - not everyone has the time to search for the script.

Without checking the script, just based on the error message alone, I would say that you probably made a typo in the scriptcall to summon those other enemies - please check the correct syntax for the script call as described in the script's comments.

Please provide a screenshot of that skill if you can't find the typo yourself.
Oh sorry. Heres a link to the script: http://himeworks.wordpress.com/2013/03/08/enemy-reinforcements/

For the script call, I erased it and i rewrote it and i tested the game. I still get the error message. I tryed to write the script call in different ways but an error message appeared each time.
you misread the instructions and didn't enter the correct troop_id..

You were told to enter the troop_id, but that troop_id is always a number.

Instead, you entered a string consisting of "Troop_" plus the Troop-ID "2".

The correct usage is displayed in the fourth picture of your link, titled "You can add a whole troop to the battle".
Youre right. I fixed that but now another error message appeared...

Sanstitre_zpsea717a1b.png
Then please post a screenshot of the call you're doing, we cannot help you if you do not show us what you have done.

There was a case once where the user put the script configuration into an event's script call command, instead of changing the script's line in the script editor - it took us two dozen posts and the download of the entire project demo to find that out, because that user also refused to make a screenshot of what he did in the editor...
Im really sorry. Im not "refusing" to make screenshots. I just didnt know that you would need them.

Anyway, heres a screenshot of the common event and the skill that i made:

Sanstitre_zpsbdc093ba.png


Sanstitre2_zps72ee4294.png


If a picture of something else is nessessary, please let me know.

I forgot to mention that im using other scripts. I dont know if it could be useful but would you like a list of the other scripts im using?
I asked for the screenshot of the skill/script call in post #2 above...

It might be a compatibility problem with other scripts, but it could be something else - but links to the other scripts you're using might be helpfull.

I can't see anything directly wrong, but I haven't worked with that reinforcement script myself.

There are four possible sources for that error that I can imagine at the moment, and you'll have to test a few things to check those cases.

1) The current error might be from a different script, having nothing to do with summon monster.

Please install

http://himeworks.wordpress.com/2013/06/09/custom-main-full-error-backtrace/

and check the output for the script name that really caused the error

2) Tsukihime's script might require to be called from the troop event instead of the common events

Just test if the add-command works when you place it in a troop event instead of a common event - all examples on Tsukihime's blog use troop events, and it might be that a specific data access is not possible from the common events (that's just guessing, I'm not that deep into the RGSS engine to know if there is a difference)

3) The problem might be in the enemy or the attack pattern

Please provide a screenshot of the enemy and the attack condition for the use of that summoning skill

4) Compatibility problem with a different script

That's where the list of other scripts would come in handy - if another script replaces troop behaviour, it can conflict with Tsukihime's changes - even if that other script has nothing to do with summoning, but changes troop display or adds battle conditions or whatever.

Test if the skill and script work in a new project where no other script is added - if yes, disable the scripts one after another in a copy of your main project, until you've found the conflicting script.
1. I tryed the script and this is the result:

Sanstitre_zps808a82bb.png


I dont know what the "debug console" is though.

2. If i call the script from the troop event, that wont make a summon skill anymore, right?

I just tryed it anyway and it still gave me the same error.

3. Heres a screenshot for the action pattern:
Sanstitre_zpsbba763de.png


4. Heres a list of the scripts im using:

Heal all on lv up (i dont remember where i found this one so ill copy/paste it here)

class Game_Actor < Game_Battler

  alias heal_on_level_up level_up

  #--------------------------------------------------------------------------

  # * Level Up

  #--------------------------------------------------------------------------

  def level_up

heal_on_level_up

recover_all

  end

end

http://www.rpgmakervxace.net/topic/1751-window-skin-changer/

The enemy reinforcement script

http://forums.rpgmakerweb.com/index.php?/topic/3358-viewed-battle-system/

Mog hunter's Monster book and music box script: http://www.atelier-rgss.com/RGSS/RGSS_VX_ACE.html

http://dl.dropboxusercontent.com/u/49701990/YEA/Ace_Core_Engine.rb (i use this for the font changing option and for some other reasons)

http://yanflychannel.wordpress.com/rmvxa/core-scripts/ace-message-system/

All these: http://forums.rpgmakerweb.com/index.php?/topic/1131-rgss3-unofficial-bugfix-snippets/

Im using alot of dekita's scripts: http://www.rpgmakervxace.net/tags/forums/dekita/

Heres a list:

core script

Statistic Control

Elemental Control

Max TP Control

Atk | Def Levels

Insane SPDS

Equipment Sets

Learn Skill Requirements

Equip Requirements

Dev SLUD

Skill Levels

Proficiency Skills

Damage Tracker

Weapon Attacks

Row Formation

And thats all for Dekita scripts

http://forums.rpgmakerweb.com/index.php?/topic/13640-tales-of-graces-title-system/

http://mrbubblewand.wordpress.com/rgss3/arbitrary-records/

http://forums.rpgmakerweb.com/index.php?/topic/841-syvkals-ring-menu-vxace/

and finally, GDS' parallax script: http://www.rpgmakervxace.net/topic/4021-gds-ultimate-parallax/

If i have to try one after another in a new project, its going to take a while, lol.

But dont worry, ill do it!  😀
Test the enemy reinforcements on a new project. I never tested it with complex action conditions.


For script calls, you will also need to insert this script


http://himeworks.wordpress.com/2013/08/04/script-call-traceback/


The debug console can be opened in the editor by pressing "Game" in the menu and then checking "Show Console"
Sorry for not replying earlier. I had something important to do.

I tested your enemy reinforcement script with the other scripts that i have and looks like the error message was because of Yanfly's core script.

About the call traceback script, i just used it in the new project with yanfly's core script. Nothing Appeared in the show console window...

I tryed to use it in my game and the same thing happened.
. You said to go in the script editor and click on game, correct? But theres alot of "game" options. game_event, game_actors, game_temp, ect ect. I used ctrl+ F on the first 10 options to search for Show console but i didnt get a result. In which one do i have to check?
NOT the script editor, the main editor.

"Game" is the menu option where you find the commands "Playtest", "Launch in Full screen", "show console" and "open game folder" - the second to last menu, after "Tools" and before "Help".
Yes, i found that out. I used the script in both the new project and my game but nothing was written in the console.

Sanstitre_zps8481b026.png
If you're talking about the full error backtrace you need to replace whatever's in the Main script with that.


But basically you've determined that the issue is with yanfly's core engine.


I have updated the script to improve the functionality for drawing new enemies. See if it resolves the problem.
You mean in the "main" section? In your full error backtrace script, its written:

--------------------------------------------------------------------------------

 ** Installation

 

 Place this script below Materials and above Main

 

--------------------------------------------------------------------------------
Im really getting confused.... I tryed replacing the contents of the "main" with the full error backtrace script, but the rpgmaker program shut down right when i tested the game.

Yes. I tested the enemy reinforcement script with other scripts from my game in a new projet and when i tryed with yanfly's core script, an error message poped up.
The full error backtrace script looks like this

Code:
#==============================================================================# ** Main#------------------------------------------------------------------------------#  This processing is executed after module and class definition is finished.#==============================================================================begin  rgss_main do    begin      SceneManager.run    rescue RGSSReset      Graphics.transition(10)      retry    end  endrescue SystemExit  exitrescue Exception => error  scripts_name = load_data('Data/Scripts.rvdata2')  scripts_name.collect! {|script|  script[1]  }  backtrace = []  error.backtrace.each_with_index {|line,i|    if line =~ /{(.*)}(.*)/      backtrace << (scripts_name[$1.to_i] + $2)    elsif line.start_with?(':1:')      break    else      backtrace << line    end  }  error_line = backtrace.first  backtrace[0] = ''  print error_line, ": ", error.message, " (#{error.class})", backtrace.join("\n\tfrom "), "\n"  raise  error.class, "Error ocurred, check the debug console for more information.", [error.backtrace.first]end
Geh... I confused the call traceback script with the full error traceback... Sorry about that. -_-

I tryed with both scripts and with only the full error backtrace script in the new project and in my game.

Still nothing... Its the same thing as in the screenshot i posted in post #13.
Anyways have you tried the updated version of enemy reinforcements? It addresses the error message.
If you mean the version that supports Yanfly's visual battlers, yes, thats the one ive been using. I didnt see a more recent version.
It's the Oct 14 version. I tested it with yanflyl's ace core engine and it works fine for me.

Original thread: https://forums.rpgmakerweb.com/threads/tsukihimes-enemy-reinforcements-script.19045/