You actually cant just call MEV=something to change the value of MEV because the value of MEV is a collection or sum of all features that add the MEV param. So to modify it, you'd actually need to add/remove features which isnt as simple. The only params that are actually doable via a simple param=value would be hp and mp afaik
I mean you would put current MEV into a variable outside of battle, then call that variable into the formula via v[ ], and continue to control it via the variable when you are back outside the game.
When I say use the formula.box to "roll for hit" I mean something like
if (random===1){do damage};
Ah, OK Crystal clear now.
So what's interesting here is, it seems, you could then keep track of your own "range to hit" / "range evade" stats, set with variables outside the battler - and call those into the damage formula box for calculations with something like - a.RangedHit * (1 - b.Ranged Evasion) = HitChance : If (random >= Hit Chance){do damage}
Pretty cool idea actually, and if seemingly too impractical for this application we're kicking around, surely this approach lends itself to some other cool little tricks. I like.
Would a "certain hit" work with this as well? The certain hit takes you to the damage formula where you then do your own to hit roll calcs?
Yes, it can call functions inside external JS files (in essence, the default js files are also "external"), as long as they are included in the plugins list (afaik this step is needed so the game recognizes your js file)
OK, well then this may be another disconnect of mine. When people occasionally (read as every 3 seconds) answer with "Plugin, followed by plugin and then plugin" I assumed this meant a third party pre-created mod with an accessible menu with author determined parameters for consumer manipulation, etc, etc. While I am constantly thinking, huh? I'd rather "code a script" for it that overrides the base code. I think you are saying that both, albeit completely different approaches on many levels from a RM user perspective, are accessed by the game in the exact same way. They both end up being a "plugin".
PS: If you really need a nicely working solution, I'd suggest really just getting a plugin that changes the hit calculations and optionally, a plugin for defining custom parameters.
As you know by now I would rather dip my toe in the water by coding something like this myself. However I thought I was just going to be writing some functions on my own .js file and having the game reference that. Besides this fact what I wasn't grasping is in order to do that, I have to make it a plugin, albeit my own.
(However, I still swear I watched a couple of separate tutorials where the guy was overriding/manipulating the game with a js file in the js folder and did not put any of the "plugin" protocols at the top. It was clearly him coding his own thing, not prepping something for mass consumption. But I may have been drunk.)
Im merely suggesting the other way coz its a nice brain exercise
Too say the least! And not to mention exactly what OP had asked/dreamed for.
But seriously... There is no straight forward way in editor for a magic user to increase their ability "to hit" with magic? Let that sink in for a sec...
I've mentioned this before, and my conviction grows stronger everyday, I feel like the creators of RM must have considered damage the criterion for a good shot... as opposed to actually being good at the shooting. It's just not something I've come across in my gaming/game design experience.