Hey everyone,
Is there a formula of sorts where I can check whether an actor's stat is higher than the target's to determine if another attack can follow up?
You should be able to do it using the notetag code in Yanfly's Action Sequences.
Do you think you can give me some pointers before I go in blindly?
I've never used it, but there's an entire thread for making action sequences in the plugins forum. I know I saw sequences there to make people attack twice if they're dual wielding, so you should be able to find it and change the conditional check from dual wielding to their stats being at a certain value.
Do you mean if an actor has higher Speed you will be able to attack twice? (because in fire emblem speed determines if you double attack or not, fix me if im wrong about this)
You might need a plugin for that, because i don't really think it is possible to make FE styled double attack without plugins.
Have you tried using the If...End Statement? Example:
[insert your normal attack sequence]
if (user.agi >= (target.agi *1.5))
[insert your normal attack sequence again]
end
Getting close Riff. But, I think I'll need an else since even the slow character will attack again, only at a distance (they move up with a melee weapon.)
Update: I removed the unnecessary movement.
I don't know about the plugins. But you can add a common event to a spell. Put:
v[1]=a.atk; v[2]=b.def;
Before the damage formula.
Put a conditional branch in the common event to see if the ATK of A (user) is higher than DEF of B (target). If so, add a finisher skill.
Make sure your second skill does not have a possible follow up, or you might create a loop, which never ends.
Replace v[1] and v[2] with the variables you want to use.
Replace ATK and DEF with the stat you want to compare.
I bet it is prettier with the sequence pack, but I find this a lot easier.
Edit: In addition, you can add a 3rd variable for Users luck to the formula. In the common event, you can set a random var, that will be set between 10 and 40 (depending on what is normal luck stats for yourgame). Add a new conditional branche to the common event, that compared Luck to the random number. If luck is higher, only than he attacks.
This way, if A.ATK is higher than B.DEF, he has a chance on a second attack. And the chance increases when luck increases.