Random encounters not working

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
I need some help figuring out why my random encounters are not working.
I tried a new game with the same plugins I used in that game and random encounters still worked,
so I think my plugins aren't at fault but I still added a screenshot of the ones I am using.

I watched videos and tutorials but it was always just added trops to the map you want the encounters to be in, but its not working.
I even added an event that anables encounters for that map but it still doesn't work..

I don't know what to do anymore.
If anyone knows the roblem I would gladly accept the help.
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,016
Reaction score
7,490
First Language
German
Primarily Uses
RMMV
Your plugins are in the wrong order. please correct that. Yanfly's plugins HAVT TE BE in exactly the order of the main list on his website, or strange things can happen.

how many steps are you walking on that map (without any transfer!!) to determine that the encounters are not working?
how are you using the regions on that map?

You need to keep in mind that the steps you set in the map properties are the average, it can be upt to 60 steps between two encounters if you set the steps to 30. And the enemies set to certain regions can only appear while you move on tiles with that region code.
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
Hay, thanks for the help I didn't know they were in the wrong order, I fixed that now.
Sadly it didn't fix the problem..

And the map is 45x30 and I walked around the whole map once..
and I only used the regions for footstep sounds so the whole area is covered in region 1 and only a small path is region 2 with another sound.

I even tried putting the steps on 15 or even just 2 to see if random encounters appear but it still didn't work out.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,016
Reaction score
7,490
First Language
German
Primarily Uses
RMMV
That sounds as if either the engine is broken or the encounters are disabled.

Please make the following test:
make a new map, the default that is completely empty and only grass without any regions. Give it a few encounters for the entire map with a low step count (10 or so). Absolutely no events on it.
Place the starting point on that map and then start a new playtest with the player appearing there.

Does that give encounters?
if no, then something in the engine or the plugins is broken.
if yes, then it is a setting or an event that blocks the encounters
 
Last edited:

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
I did the test and the encounters worked on that map.

But I don't know which setting or event would block it.
I even put an event on the map to enable encounters but it didn't work.
 

ScorchedGround

Blizzards most disappointed fan
Veteran
Joined
Apr 12, 2020
Messages
296
Reaction score
440
First Language
German
Primarily Uses
RMMV
Looking at your plugin list, you do have YEP_RegionEvents
Maybe that fumbled something up.

Or rather, do you utilize that plugin on the map where the problem occurs?

Edit: Ah I see Andar already investigated that issue. I know this probably does not help, but maybe try deleting the first encounter (on regions 1,2,3) just to make sure that is not the problem.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,016
Reaction score
7,490
First Language
German
Primarily Uses
RMMV
I even put an event on the map to enable encounters but it didn't work.
show us a screenshot of that event - either it didn't work for some reasons, or you have a parallel process turning encounters off again and again.
If the turn encounter on event is OK you'll have to check every map event and every common event to find the parallel process.
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
Looking at your plugin list, you do have YEP_RegionEvents
Maybe that fumbled something up.

Or rather, do you utilize that plugin on the map where the problem occurs?

Edit: Ah I see Andar already investigated that issue. I know this probably does not help, but maybe try deleting the first encounter (on regions 1,2,3) just to make sure that is not the problem.
I did use the Region Plugin on that map for footstep sounds.
And i did change the the first encount to the whole map again, that was just a test for me to see if the region plugin might be the problem.

show us a screenshot of that event - either it didn't work for some reasons, or you have a parallel process turning encounters off again and again.
If the turn encounter on event is OK you'll have to check every map event and every common event to find the parallel process.
Here is a screenshot even if it might not be of much help because it is in german but it is just a parallel event saying to turn encounters on. I will check from the first til the last map every event to see if I ever turned encounters off and maybe forgot about it.
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
There is no event turning encounteres off...

And here the screenshot, I don't know why it wasn't attached to the last reply.
 

Attachments

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,968
Reaction score
1,412
First Language
EN
Primarily Uses
RMMZ
That event will re-enable encounters and re-initialise the encounter step count every frame. Since encounters are enabled by default, I'd suggest removing that event. :kaoswt2:

Alternatively you can make it run once per visit to the map:
Code:
◆Change Encounter:Enable
◆Erase Event
...or once per playthrough:
  • Page 1: no conditions, Parallel trigger, commands:
    Code:
    ◆Change Encounter:Enable
    ◆Control Self Switch:A = ON
  • Page 2: condition self-switch A is on, Action Button trigger, no commands.
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
I did the first code with erasing the event afterwards but it still didn't work qwq
I will try both versions though to see if something changes.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,016
Reaction score
7,490
First Language
German
Primarily Uses
RMMV
somewhere you have a parallel process with the change encounter command that is either constantly setting the step counter for the encounters to zero, or deactivating the encounters.

I suggest making the activation event an action button and giving it a sprite, so that you can move to it and activate once without resetting the step count at various times during testing.

If that does not help, then start checking the other map events and the common events for parallel processes with that command. And the fact that you do not remember using it elsewhere does not change the fact that it IS used somewhere - the test with the empty map had proven that.
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
somewhere you have a parallel process with the change encounter command that is either constantly setting the step counter for the encounters to zero, or deactivating the encounters.

I suggest making the activation event an action button and giving it a sprite, so that you can move to it and activate once without resetting the step count at various times during testing.

If that does not help, then start checking the other map events and the common events for parallel processes with that command. And the fact that you do not remember using it elsewhere does not change the fact that it IS used somewhere - the test with the empty map had proven that.
I checked ALL my events and there is no event deactivating the encounters, the only common events I have are the foot step sounds and a clock event, they all don't change the encounters..

I suggest making the activation event an action button and giving it a sprite, so that you can move to it and activate once without resetting the step count at various times during testing.
And sorry, I don't understand this part. What exactly do you mean?




That event will re-enable encounters and re-initialise the encounter step count every frame. Since encounters are enabled by default, I'd suggest removing that event. :kaoswt2:

Alternatively you can make it run once per visit to the map:
Code:
◆Change Encounter:Enable
◆Erase Event
...or once per playthrough:
  • Page 1: no conditions, Parallel trigger, commands:
    Code:
    ◆Change Encounter:Enable
    ◆Control Self Switch:A = ON
  • Page 2: condition self-switch A is on, Action Button trigger, no commands.
And I tried both of those events but it still didn't work..

I am sorry for all the trouble q.q
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,016
Reaction score
7,490
First Language
German
Primarily Uses
RMMV
And sorry, I don't understand this part. What exactly do you mean?
basically you must not have any parallel process with the encounter command - no matter if it activates or deactivates. Because if it activates it also resets the encounters, and doing that sixty times per second will prevent you from ever getting to the first encounter.

so the first step is to change the trigger setting away from parallel to action button, so that you as the player can control it.
and because you have to be able to find the event while playing to trigger it, give it any sprite to make it visible on the map.
 

Quexp

Lifelong Learner
Veteran
Joined
Jun 18, 2018
Messages
138
Reaction score
265
First Language
English
Primarily Uses
RMMV
I ran into this once. For me, the problem was a region setting on that map. I wasn't using regions but I somehow added it by mistake. The chance of you having trouble for the same reason is small but I thought I'd share in case it helps.

Good luck in your project!
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
Okay the problem somehow was literally just the regions on the map...
I had the whole map covered with region 2 for a grass sound and after removing the region from the map the encounters worked...
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,016
Reaction score
7,490
First Language
German
Primarily Uses
RMMV
I had the whole map covered with region 2 for a grass sound and after removing the region from the map the encounters worked...
that means that the region event plugin is bugged, because it should not affect the encounters that way.
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
Well, I don't know where or why it is bugged but i will just have to live without grass footstep sounds on that map then.

Thanks a lot for all your help everyone!
 

caethyril

^_^
Veteran
Joined
Feb 21, 2018
Messages
1,968
Reaction score
1,412
First Language
EN
Primarily Uses
RMMZ
Just for info: it's a bug in that you wouldn't expect that behaviour, but strangely enough it's default RPG Maker behaviour for the encounter count to not update if player movement triggers an event:
JavaScript:
// called each frame that the player isn't moving between tiles
Game_Player.prototype.updateNonmoving = function(wasMoving) {
    if (!$gameMap.isEventRunning()) {
        if (wasMoving) {
            $gameParty.onPlayerWalk();
            this.checkEventTriggerHere([1,2]);
            if ($gameMap.setupStartingEvent()) {
                return;  // stop here if below player touch trigger
            }
        }
        if (this.triggerAction()) {
            return;  // stop here if action button or collide trigger
        }
        if (wasMoving) {
            this.updateEncounterCount();  // update random encounter
        } else {
            $gameTemp.clearDestination();
        }
    }
};
So yes, the region event plugin could probably be coded better, but ultimately the behaviour is rooted in the engine. I assume it's to stop an event starting on the same frame as a random battle, though I'm not sure why that would be a problem...maybe it interrupts the battle transition or something. :kaoslp:

For footstep sounds I'd suggest a different plugin, or a Parallel event that checks the player's location, etc.
 

ChibiCreator

Villager
Member
Joined
Sep 30, 2020
Messages
10
Reaction score
1
First Language
German
Primarily Uses
RMMV
Ahhh, okay. Good to know why it does not work at least.
Thanks again!
I will see if I maybe can find another plugin sometime for footstep sounds.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Nyeh heh heh


Goblins like spooktober
Welp, ended up at the hospital with the oldest so mebbe might make the game jam's deadline. Maybe not. Regardless, really digging MZ.
I had lots of fun! Kids loved me, and some took pictures. Unfortunately, the videos didn't send... but you'll see Chica in action when I do a trailer for Fandom Scouts!
Dama wrote on akoniti's profile.
Hi
Thanks for your review.
I was checking the trailer for details and as the woman shut the door at the exact moment the song I was hearing said "you slim the door" and I couldn't resist to add it there. :D And I used this idea one more time on another scene.

Forum statistics

Threads
104,693
Messages
1,008,186
Members
136,189
Latest member
MalaacSoran
Top