Lengthy damage formula

@Rinobi Whether the battle takes place on an area with region 40 or without it, I get 'Null' damage, and I cannot for the life of me see why.

@Another Fen Your notebox tag, however, does the trick. I think I shall go with this. I assume that as long as I put the correct skill ID in the damage formula box, I can play around with what goes into the notebox e.g. having region 42 instead of 40, a different debuff, that sort of thing?
You could get null damage if you do not have a script which gives enemies levels (null for enemies only).
It could also be that there's another method a script list by the same name (custom_formula is pretty common).
Could be that the method was renamed, but not the method call within formula text box or vice versa.
Works during testing on my end.

Running the formula via notetag is a good ideal, though I couldn't recommend using eval this way.
Long as it's used sparingly it should be fine.
@Rinobi I changed custom_formula to a unique name so that there wouldn't be a clash, and no, I don't have a script which gives enemies levels - the 4 * level in the damage formula is for the actor, not the enemy. I ran it with the formula in the notebox, but without using eval at all.

@Rinobi @King Vectra and @Another Fen Thank you all very much for your help. Not only do I now have a solution, but the discussion here has helped me understand things a bit better, so double win for me.

Moderator note: Closing, as solved.

Original thread: https://forums.rpgmakerweb.com/threads/lengthy-damage-formula.79942/