MV YEP_RegionRestrictions bug, maybe?

So I have a little bug appearing in my game that's a little annoying since the workaround makes the game harder [difficulty-wise]. So the region restrictions I'm using is Event Restrict. I'm using it to keep the roaming on-map enemies from entering certain story-important areas.

Works great for that.

What the problem happens is that the Event Restrict also stops my followers... As if they're events as well. This is annoying and messes up my CSs.

Could this be a bug? Or is it a conflict with another plugin?

I do have a plugin for controlling my followers independently from the player for CSs... Could that be it?

This is my Plugin list:

Console error_Plugin list.png


ExHydra_FollowerControl is the plugin I think is causing a conflict... So I was wondering if there is a way to fix this. Make so it doesn't happen.

I believe this is the code that RegionRestrictions uses to restrict the events:
JavaScript:
Game_CharacterBase.prototype.isEventRegionForbid = function(x, y, d) {
    if (this.isPlayer()) return false;
    if (this.isThrough()) return false;
    var regionId = this.getRegionId(x, y, d);
    if (regionId === 0) return false;
    if ($gameMap.restrictEventRegions().contains(regionId)) return true;
    return false;
};

Can that be modified to allow the follower to be counted as a player as well?
In order not to manipulate an existing plugin, you could create a new plugin with any name below this one and insert:

Code:
Game_Follower.prototype.isEventRegionForbid = function(x, y, d) {
    const regionId = this.getRegionId(x, y, d);
    if (regionId === 0) return false;
    if ($gameMap.restrictEventRegions().contains(regionId)) return true;
    return false;
}
In order not to manipulate an existing plugin, you could create a new plugin with any name below this one and insert:

Code:
Game_Follower.prototype.isEventRegionForbid = function(x, y, d) {
    const regionId = this.getRegionId(x, y, d);
    if (regionId === 0) return false;
    if ($gameMap.restrictEventRegions().contains(regionId)) return true;
    return false;
}
Thanks for trying, but it didn't work. I might not have implemented it right, but it didn't do anything. The region still restricts the followers like before.
Holy mother of Macrel, that is a lot of Plugins.

Well, I would recommend turning them all off and throwing it out the window.

Joking aside, yeah Turn all of them off and leave The Region Restrict on and others if the Plugin requires them to work.

If by chance it doesn't work with all other plugins off then yeah it's probes the region plugin if does work then, you can either turn them on one by one, which will take a while. Or do 5 at a Time and see if anyone of those 5's are causing an issue.
Holy mother of Macrel, that is a lot of Plugins.

Well, I would recommend turning them all off and throwing it out the window.

Joking aside, yeah Turn all of them off and leave The Region Restrict on and others if the Plugin requires them to work.

If by chance it doesn't work with all other plugins off then yeah it's probes the region plugin if does work then, you can either turn them on one by one, which will take a while. Or do 5 at a Time and see if anyone of those 5's are causing an issue.
Yes, they are quite numerous... Would believe that I use all of them for one thing or another in my game? In some cases I only the plugin for one feature it offers and for a small or minor part of the story. Some of them I don't even remember what I have them for but I'm too scared to remove them for fear of breaking the balance I have with them at the moment.

But on to the issue at hand... I turned off all the plugins [a few at a time] and the issue was there even after turning off all the plugins but that one. The issue appears to be in the plugin...
You could try
Code:
Game_CharacterBase.prototype.isEventRegionForbid = function(x, y, d) {
    if (this.isPlayer()) return false;
    if (this instanceof Game_Follower) return false;
    if (this.isThrough()) return false;
    var regionId = this.getRegionId(x, y, d);
    if (regionId === 0) return false;
    if ($gameMap.restrictEventRegions().contains(regionId)) return true;
    return false;
};
You could try
Code:
Game_CharacterBase.prototype.isEventRegionForbid = function(x, y, d) {
    if (this.isPlayer()) return false;
    if (this instanceof Game_Follower) return false;
    if (this.isThrough()) return false;
    var regionId = this.getRegionId(x, y, d);
    if (regionId === 0) return false;
    if ($gameMap.restrictEventRegions().contains(regionId)) return true;
    return false;
};
Nope... Sorry this didn't work either. Would a variation of this code work:
JavaScript:
Game_CharacterBase.prototype.isPlayer = function() {
    return false;
};
Something like:
JavaScript:
Game_CharacterBase.prototype.isFollower = function() {
    return false;
};

Maybe?
Are your followers actually events? Could you go to the console log and type in $gameMap.events() and see if they show up?
Are your followers actually events? Could you go to the console log and type in $gameMap.events() and see if they show up?
Not sure what I'm looking for but here is the console:
Console.png

There are 16 events in the console and there are 16 events on the map... That doesn't appear to include the follower.

EDIT: SO.... I tried doing a fresh project and it works fine.... So, I tried starting a new game with all my plugins on... it also works..... Now I have no idea what happened and why it wasn't working for me. Maybe it was a glitch or something.
Well, just because Aqua and I implemented a new rule to the followers, does not mean that the follower's programming code reacts to it. I think that followers don't have any pathfinding or collision logic at all.

Unfortunately, combining those plugins just became more difficult than I expected before :/
Have you tried putting the follower control plugin above region restrictions? Another option would be to try a different follower control plugin. Tyruswoo has one.

Original thread: https://forums.rpgmakerweb.com/threads/yep_regionrestrictions-bug-maybe.170345/