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.
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.
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.