Looking to create a (hopefully) fun but ultimately brief stealth mini-game in my RPG.

Hi all. I'm featuring a side quest where players infiltrate a bandit fortress to break out some townspeople who are inside. I am looking for a way to go about creating a stealth mini-game, where players try to avoid the bandits' lines of sight, including ones who wander around. That's the most challenging part for me to understand, and I'm not the greatest with Javascript or anything technical like that, unfortunately. However, I do understand the menu options, switches, and variables.

When a player is "caught", I want an event to play where they are transferred away from the fortress, presumably kicked out with some HP damage or something to that effect that I'm still brainstorming over.

I figure this is very much possible to do, but I have no clue on how to go about implementing it smartly. I don't want to purchase Yanfly's Event Chase plug-in, for the lone reason that it doesn't quite seem to do everything I think I want, unless it allows you to play an event when you're within a field of vision and it doesn't allow events/bandits to see through boxes and walls. If I am mistaken, then I will happily pay for the plugin.

I've attached a photo to show what I'm gunning for here, if my explanation/description isn't helpful. The red lines indicate where the player would be caught by the moving, wandering guard who marches back and forth in a straight line. The player would be safe when the guard passes along the column of tiles where the player is standing due to the boxes being there.

Stealth Concept.png


I hope I have provided enough information for you in order to get some help. Thanks for reading!
If it's just that section on the screenshot, you could just use step on tiles that activate being in sight on the 3 lines, and then a parallel event (activated only when being in sight is turned on) checking whether the guard is looking in that direction or not. Then, step on tiles adjacent to the lines of sight that deactivate being in sight.
It's not for just that screenshot unfortunately (or fortunately in my case, as that would be a very boring stealth section if it was just for that quick moment ha), as this will be a whole mini-dungeon of sorts, but I am intrigued by your suggestion. How would that work exactly--the turning on the step on tiles that activate and deactivate when the player is in view and not in view, respectively?
You may want to check out this video for Yanfly's stealth plugin as it does cover how to hide behind objects at the end of the video which sounds like it might be what you're after.

You have a line of events on the ground, set to below the player and activate on step. They turn on a switch that activates the parallel event for guard's sight that checks whether the guard is looking in the direction of the player, and then have a conditional branch for a fail state. Then another line of events on the ground on both of sides of the line of sight that turn off the switch for the parallel event.

Original thread: https://forums.rpgmakerweb.com/threads/looking-to-create-a-hopefully-fun-but-ultimately-brief-stealth-mini-game-in-my-rpg.132782/