Help with a Detection and "Stealth" enemies spot and chase you.

Im using the plugins Frog TalentCore and Yanfly Event Encounter. Im wondering if its possible to have on map enemies check each step against your stealth, if you fail they turn around (by turning and spotting players they instantly chase them).

The issue im having is I have enemies patrol mainly random patterns and I dont know how to set it up so that if your within X radius you need to make a hidden stealth check to avoid the enemy turning and noticing you.

My ideal vision for this is to have enemies on map, if you touch their back you get a surprise attack, this currently works great in game. I would like to add a way for each specific enemy have a radius and stealth roll unique to the enemy type, ex: wolves and dogs are harder to stealth past.
This way with skills, items and luck you can sneak up on enemies for the surprise battle.
I remember doing something similar some time ago using QSight, a they had a big range for sight, a smaller one for sound and a larger sound one for when you were running, I think I used Hime's page conditions for that last one so you could make their line of sight smaller depending on the player's stealth?
I remember doing something similar some time ago using QSight, a they had a big range for sight, a smaller one for sound and a larger sound one for when you were running, I think I used Hime's page conditions for that last one so you could make their line of sight smaller depending on the player's stealth?
I'm new to frog core so I'm unsure how to go about that.
I was planning to do a check each time you move and if you failed the enemy would force turn to you which would trigger it chasing.
Problem is I have to create events on pretty much the whole map and different for multiple enemies it's just too much and too insane.
Is there an easy way?
I'm not sure I understood what you meant?
I don't use frog core yet.

I have this in my game. You need MOG Event Sensor and Yanfly Event Chase.

Once you have these you should beable to sort it out! If you need further assistance ask again.
maybe not exactly what your trying to achieve but close
I'm not sure I understood what you meant?
I don't use frog core yet.

Frog core adds talents like DnD in the menu.
In this example stealth can be given points by level up, class or training. Then it rolls a 1-20 number plus adds your stealth score to get a result.
EX: If im trying to sneak up on a guard doing patrols, he will spot me if I have a score under 10. If my stealth is 5 and it generates a 10, I have 15 stealth and I will not be spotted.

Im trying to combine this mechanic with YF event chase. If I fail I want the guard to chase me, if I succeed then nothing happens. Each step re-checks if I will be spotted. So you can sneak up to the guard and get an advantage in combat.

I don't know how to go about checking for this stealth stat each step while having the guard walk around on patrol.
maybe not exactly what your trying to achieve but close

Yeah not exactly, im not sure how to use this in the way im going for. Since I want a check to be happening each step. Right now if I attach a stealth check to enemies, it always auto battles if I come within proximity.
Im having a really tough time trying to figure this out.
I have ENEMY 1:
-With event touch to trigger a battle.
-Also moves at random (patrol), if spots player will run towards player (YF Event Chase Plugin)

I added another event ENEMY 1 CHECK:
-Parallel Process
-Proximity event that covers a 4x4 cube set to player touch.
-The event is set to invisible and "through" and using YF movement core, the movement is set to MOVE TO: ENEMY 1 (So its always on top of enemy 1)
-Finally the process runs a check every time you move within the 4x4 against your stealth stat, EX: stealth 10, rolls 1-20, 10 and greater nothing happens, 1-9 you alert the enemy.
-If you roll 1-9 and fail check the "SET MOVEMENT ROUTE" to have ENEMY 1, turn towards player and move 1 step towards player (usually it will cause ENEMY 1 using EVENT CHASE to begin running towards player)

Because im using 2 events it makes things very complicated and the problems im having is, turning off ENEMY 1 CHECK, because it will keep doing a check even if caught, it would be simple if all this can be done on 1 event page. Same if enemies respawn I have to reactive this event.

Summary: Looking to create a detection system that alerts enemies if you get close.
try this plugin to check if event is in range or in sight, there is a demo on it,
so you can see how it works and if its something you need.
try this plugin to check if event is in range or in sight, there is a demo on it,
so you can see how it works and if its something you need.

OMG this works fantastic! Thank you so much.

I made a parallel event for my map and it checks if player is in range of each event/enemy,
then in the background performs a stealth check. If succeed nothing happens,
if failure enemy turns towards player,
self switch A is on,
on second page parallel with self switch A turns off after wait "120".

Not sure if this is optimal way but it really steps it up for the moment!

Original thread: https://forums.rpgmakerweb.com/threads/help-with-a-detection-and-stealth-enemies-spot-and-chase-you.124249/