sure that sounds good but you shouldn't need a detection spell when the enemy is in LoS of the MC, it's the fact that the player is obstructed by some map elements that concerns me... ultimately it'll come down to how Tinkerer represents the attack and counter attack, if you can see the arrow coming at you from a direction and force the ranged attacker into melee simply by charging that position then all is good, my main concern is that it'll turn into a game of catch the rabbit as the archer keeps fleeing as you approach.
The idea is intended for cluttered maps like the Goblin Forest, where LoS is harder to achieve. Though you could use it in more open areas if you wanted. v3.41 adds enemies deliberately trying to ambush the MC from hiding, an enemy detection ability would be handy. Perhaps you have to remain stationary, if you move the effect goes away. Which would also limit the utility to the part of the map that's onscreen.
EDIT: OOH! Use the spyglass for this! Once you have the spyglass "Spot Enemies" is added to the Main Menu, returns you to the map and all enemies are marked. Once you move the mark on the enemies goes away.
Clutter can be used to you advantage, move to keep trees & stuff between the MC and the ranged attacker.
The MC's dash is faster than any enemy/critter, short of story-dependent situations. You're even faster than birds, though if they start flying you can't reach them to catch. Add a way to select a target so the MC can run them down. (That could be used for any enemy/critter not just ranged attackers. No more clickfest rabbit chases though it could still take a while to actually nab them.)
Or, just have ranged attackers remain stationary. Not the best way to handle it but the game isn't exactly a faithful simulation of real life to begin with.
Cheating in other words
(and yeah I know technically most people consider this an exploit rather than a cheat, but it's just a horse of different colour in my books, and I don't want to play like that.
Everyone has a different play style. I'll keep using the exploits until they get taken out.
(You don't heal up after a tough fight when another enemy is charging you?)
I'm certainly not opposed to a ranged element depending on what options exist
Doggo could be excellent at chasing down Archers for example, or if you could define certain companions as shields who will try block ranged attacks from hitting the party, or your own archers who automatically try to attack enemies that come into range.
Maybe deploy your own goblin army as those kind of specialist roles to defend certain sections of the map (I'd love a chance to make that smithy mean something). Though I suspect that RPGM options might not be more sophisticated than a tower defence setup (like the lightning and fire you have to dodge at the beginning of Erevis storyline)
There's a ton of things that could be done if Tinkerer had a dev team instead of flying solo. I'm trying to keep the ideas simple to implement.