'Force Action' from within the Damage Formula Box

I was wondering if and how it is possible to include a command to Force Action (such as using a skill or attacking again) from the Damage Formula box?

Is there a RGSS3 command to do the "force action" event command, and a way to specify the action and the target in battle?

Any takers?
You should explain what you're trying to accomplish. Then people can suggest alternative methods that aren't weird/complicated.
Okay.  Editing original post, too, but...

Is there a RGSS3 command to do the "force action" event command, and a way to specify the action and the target in battle?
Force action should not be done in damage formulas.
Okay.  Editing original post, too, but...

Is there a RGSS3 command to do the "force action" event command, and a way to specify the action and the target in battle?
Please tell us why do you want to use force action in the damage formula. That is not the correct place for such commands - why can't you just use that command in a event and tailor that event to the needs of the skill?
Because I'm not sure if eventing can pull off what I'm trying to do.  I'm writing my formulas so that I have absolute control over evasion, adding states, and criticals.  At least I'm trying, anyway.  Still working on the critical hits.  I'm trying to base it on the mechanics of D&D3.5/D20/Pathfinder.

The 'force action' was an idea I had last night to try and solve the multiple hits (vs just one set-in-stone target) problem.

If anyone has a better idea, I'm all ears because I'm not as knowledgeable.
yes, you should try the script command of eventing...

The problem is that while the damage formula allows ruby functions to be processed, it's more limited in it's length and options (single line compared to several lines of a script command) and needs the last command a value.

But the best option would probably be to use a script to replace the entire battle mechanism of Ace.

Those mechanics are very different from the one used in Ace, and trying to replace them from within the regular battle engine will be one hell of a problem, with no guarantees that you will ever succeed - for example the HIT-Value is always an absolute percentage and will ignore the enemy armor (which has the function to reduce damage in default Ace, not reduce HIT like in the D&D-Family of games).
Well, so far, this formula has worked:

((a.xstat.atk + (base attack bonus, determined by level)) + (rand(19) + 1)) > b.xstat.def ? ((damage dice, depends on the weapon) + a.xstat.atk) : miss

This establishes both damage and evasion using the D&D-Family (good term) mechanics, and it does so entirely without the default RM percentage-based mechanics.  I'm not particularly fond of them because I can't control them as easily as I can with these custom stats.  I used CrytalNoel's Custom Stat script, which I highly recommend.

What I haven't been able to figure out how to do is use this to establish critical hits from the random number being 19 (a 'Natural Twenty') or misses from the random number being 0 (a 'Natural One'), and I've also been unable to figure out how to do multiple hits, whose accuracy is defined by their own base attack bonus (seen in the above formula, and it only determines the accuracy of the first hit).

In theory (since I don't know better), a script that allows the use of the Notetag box could allow me to write very long attack formulas that incorporate criticals, damage reduction, evasion, and the addition of states vs saving throws (also determined by custom stats), if I can figure out how to approximate those mechanics.

EDIT:

Although I haven't had a chance to try it, I'm thinking I should substitute "level" with "a.level" if possible
Not exactly, you're missing a few points here. There is a post with a graphic of the original attack flowchart (what the engine checks and how it triggers evasion, critical, and so on), but I don't have the link at the moment. Search for it in the forum, it'll help you understand what's going on in the engine.

First, the engine will check HIT and EVA before it ever processes the damage formula. Yes, you can circumvent that by making all skills "certain hit" and delete the EVA-Feature from all actors. But that means a lot of coding stripped and you need to replace that in the limited place of the damage formula.

Second, Scripts use notetags to get data from the developer for those parts that are difficult to place into scripts - but mechanics should better be written into the scripts instead of being interpreted from notetags.

Believe me, it's a lot easier to replace the core script for the battle mechanics with one using the original values for other mechanics than to place the same code into the database and block the original mechanics by tricks like certain hit on all skills. I looked into that a while ago, because I plan to do the same when I find time to work on my own game project. I don't plan to use the D&D-Type mechanics, but some that are similiar in parts.
Hm...  All I see when I look at scripts are non-sequiturs and Matrix raining code.  And nobody's going to code these mechanics because I have "perfectly good mechanics to work with already." 

So, I'm screwed.
Hm...  All I see when I look at scripts are non-sequiturs and Matrix raining code.  And nobody's going to code these mechanics because I have "perfectly good mechanics to work with already." 

So, I'm screwed.
I don't think so - but you need to do a bit more than simply requesting a script, that is true.

You need to give the scripter a good description of the mechanics you want to implement - simply "like D&D" won't do. Some of them probably never played D&D and don't know how that is done. A flowchart showing the mechanics would probably be a good start - that would be easy to convert into code, and the scripter would not have to waste his own time doing that.

There are a few scripters around here that might see it as a challenge if it helps others as well - perhaps using D&D as an example but allowing other mechanics as optionals would help others as well. As I said, I plan to make or use something similiar for my games (those will use two rolls for attack/defence, scoring damage only when the defence fails against the attack).

If still no one answers your request, then you can try to offer something in return - I don't know if you have the money to make it a paid commission, but sometimes it helps offering other work (like doing some art or a map or some eventing to help in a game made by the scripter).

Absolutely no one can do everything in a game by himself (unless he stays at mediocre levels), so if you have some skills in another area of ace, something can usually be worked out..
Well, if there's one thing I am, it's a D&D lawyer.  And a sex god.  And awesome.  And a colossal ham.  I will begin working on a flowchart and formal request for the script immediately.

Mods?  Lock this thread, please.
Closed.

Please be sure your next topic is clear and detailed.

Original thread: https://forums.rpgmakerweb.com/threads/force-action-from-within-the-damage-formula-box.16677/