Battle Processing: Same as Random Encounter Test

When I attempt to test the event - Battle Processing: Same as Random Encounter - I get the error message Cannot read property 'forEach' of undefined. I have setup the Random Encounter region '1' to have a slime and a bat as enemies.


TypeError: Cannot read property 'forEach' of undefined
    at Game_Player.makeEncounterTroopId (rpg_objects.js:7543)
    at Game_Interpreter.command301 (rpg_objects.js:10085)
    at Game_Interpreter.executeCommand (rpg_objects.js:8897)
    at Game_Interpreter.update (rpg_objects.js:8805)
    at Game_Map.updateInterpreter (rpg_objects.js:6082)
    at Game_Map.update (rpg_objects.js:5989)
    at Scene_Map.updateMain (rpg_scenes.js:417)
    at Scene_Map.updateMainMultiply (rpg_scenes.js:409)
    at Scene_Map.update (rpg_scenes.js:398)
    at Function.SceneManager.updateScene (rpg_managers.js:1788)rpg_managers.js:1722 SceneManager.catchException


I'm not sure what I'm doing wrong. Also I have no plugins running.

Capture.PNG

Capture2.PNG

Capture3.PNG

Capture4.PNG
Weird. Check your Troops menu. Maybe you accidentally deleted a Troop? Or maybe enemies in a Troop? 
Troops member looks normal. This is a new game with no changes made. The only thing I can think of is Steam had an update last night and maybe something got broken there?
Is the player on region 1 when you activate the event?  Also, do you have any plugins installed that affect how random battles are processed?
Is the player on region 1 when you activate the event?  Also, do you have any plugins installed that affect how random battles are processed?

I mentioned it in my original post but I have no plugins installed at all. This is from start a new project fresh. 


1)Make a new event


2)Set the event contents to Battle Processing: Same as Random Encounter


3)Place a random encounter tile on the same tile as the event


4)Set the random encounter in the Map Properties


5)Select the Battle processing line in the event and choose test. 


I haven't changed any of the default enemies or troops around. 
I made a new project soon after the update, and I'm not getting the same problem. Have you tried random encounters without the event? And event encounters without the region?
Very weird. I'm able to get this to occur 100% of the time. But I know it was working before I got the Steam update.


Random encounters seem to work fine when I'm not testing them in the event editor. And the Event Editor can start combat with designated troops just fine. It only pops up when I try to test a Battle Process in the editor when it's set to use the Random Encounter.
Do you have any troop events in place?
I'm not sure what you mean by troop events.
Events in the troops page of the database.
Just make another test to see if that is involved:


Make the battle event test on a map where you DON'T restrict the encounters to regions, but allow them to be everywhere on the map.


Perhaps the coding of the event command requires non-limited random encounters and ignores the region the event/player is in.
Just make another test to see if that is involved:


Make the battle event test on a map where you DON'T restrict the encounters to regions, but allow them to be everywhere on the map.


Perhaps the coding of the event command requires non-limited random encounters and ignores the region the event/player is in.



That sounds very likely. In other words, the event is only looking for normal Random Encounters and found none. Region-locked encounters don't count.
That sounds very likely. In other words, the event is only looking for normal Random Encounters and found none. Region-locked encounters don't count.

I use that same event command in my current project and have had no problems with region locked encounters.  Since there are no plugins enabled on this project and no troop events, the error is most likely caused by something else.
I tried it by setting up random encounters to happen anywhere on the map and the issue is still occurring. So it doesn't appear region locked vs. non-region locked makes a difference. 
I know this post is kinda older and my question is a bit off-topic but maybe someone can help me out.


I use Yanfly Region Event to call a common event when walking over those tiles. It seems that random encounters don't work anymore because the game engine will be interrupted by calling the common event which is binded to the region. I wanted to solve that by creating a random number in that event and give the player a certain "chance" to start a battle process. This works fine so far, but does the "weight"-parameter of map-encounters count when choosing "Battle Processing: Same as Random Encounter " ?


Regards


Chris


PS: @DmNerd could you solve the problem above yet?
@BehemothRPG, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Please make a new topic for your specific problem, we prefer one topic = one prolem as there are often differences between projects and the solutions should not be mixed up.


Closing

Original thread: https://forums.rpgmakerweb.com/threads/battle-processing-same-as-random-encounter-test.58224/