Enemies invisible until close

Is there a way (not seeing it - bad pun) to have enemies with move routes be invisible until a character is a certain distance away... like 7 tiles? Essentially, I would like to use mobile enemy encounters that pop up (gain their image) when you get close.
It's possible, but I don't think you could do it without a plugin – the "obvious" method of switching pages when they get close won't work for multiple reasons. Maaaybe there's some way involving parallel events.

Though there is one other "obvious" method – just make that distance (7 tiles) the size of the screen. But, then you'll have to deal with a 15x15 tile screen (720x720 pixels at the default tile size), which might cause a whole host of other issues.
I don't see a reason why you wouldn't just teleport an encounter event near the player in set or randomized intervals instead of whatever this is supposed to be.

And if you're looking to have these encounters only pop up in specific places, you can do that same thing by just checking if the player is in the area where an encounter is supposed to happen.
You can try to put as a plugin something like this (put an <enemy> notetag on the events:

const _myEdit1_SpriteCharacter_updateOther = Sprite_Character.prototype.updateOther;
Sprite_Character.prototype.updateOther = function() {
_myEdit1_SpriteCharacter_updateOther.call(this);
if (this._character instanceof Game_Event && this._character.event().meta.enemy) {
const distance = $gameMap.distance($gamePlayer.x, $gamePlayer.y, this._character.x, this._character.y);
if (distance > 7) {
this.opacity = 0;
} else {
this.opacity = 255;
}
}
};
That plugin works perfectly! Thanks a million. I might tweak it a bit as I go and see what can be done with it. "As is", it gives incentive to explore slowly and makes the player lose track of the enemy if they run away from it... which is perfect.

At the moment, I'm having enemies shown as rolling colored spheres. The name of the enemy troop appears at a distance of 5. Each color sphere represents a different behavior type. Most detection cones are invisible so the player has to pay attention to the type and its movement direction since they can't see a facing direction. I am hoping this creates a positive challenge.j

Made a sample of what it looks like:

Original thread: https://forums.rpgmakerweb.com/threads/enemies-invisible-until-close.183392/