Can the hit rate be based on a variable?

Update: While it might not be possible to edit the hit rate formula, so it can include a variable, what you CAN do is create an common event, put in the value your variable holds and increase or decrease the evasion rate of the characters.



Is there a way to include variables in the hit rate formula (so the hit rate can change during battle, if one variable changes)?

My goal is to include a variable during battles (which are fought with long range weapons), that determines the distance between player and enemy. The higher the distance, the lower the chance for a hit.
Not without a script I'm afraid, as the to hit system is hard coded and has to be overwritten.

I've moved this thread to Moving to Script Requests. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/can-the-hit-rate-be-based-on-a-variable.82635/