Call Damage Formula on Map

Okay, so new to RPGMaker Mz, I've mainly put off working with MZ due to lack of plugins vs. the previous version. So long story short, I'm trying to create my own action-battle-system of sorts using common events. I'm no pro at scripting but if I need to use it I'll learn what I can.

Here's the issue:
Since I'm not using the built-in battle system, I cannot calculate damage in the regular way. Meaning I need a script or plugin to do it for me. Forcing an action does nothing since I'm not using the combat system and everything is done directly on the map.

I've been wracking my brain trying to figure out how to get this to work. The only thing I can think of scripting this entirely by hand.

My question is this:

How does one create a script that calculates damage and then applies that to the character's HP, MP, etc?
(Outside of battle, of course. I understand I'll have to use a lot of variable to make this work.)
Welcome!

So...as far as just producing a value using a formula, I don't see why you need code for that. Pretty much anything you need to do in terms of manipulating numbers via variables can be done using the event commands, so you should be able to achieve that in the common events. There's random numbers, mathematical operators, the whole shebang.

As far as taking it to JavaScript and doing it yourself...not to be discouraging, but here's the thing. If you aren't familiar enough with coding to be able to figure this out, this is most likely going to be a very daunting task for you.

Is there a reason you aren't using one of the various ABS plugins that have already been written? It seems like you'd save yourself a frustrating amount of work by just doing that.

If there's some reason you specifically need to learn about number manipulation using JavaScript, you can check out the tutorials on damage formulae. There won't be any such thing as the "a" and "b" variables available to you, but any of the JavaScript functions and operators will work inside a Script command.

Original thread: https://forums.rpgmakerweb.com/threads/call-damage-formula-on-map.152919/