Hello, I am having some trouble executing 2 skills in a row on the same target based on a state condition. I do use a custom battle system (LeTBS), and I can normally do this by linking skill (a) to a sequence that then performs skill (b), however as the LeTBS code requires its own tags <LeTBS>, I can not put these tags inside the Yanfly <pre-eval> conditional "if" statement to check whether the user is affected by the state or not.
What would be the best way to do this? This is what I have sofar and was hoping to more or less edit in.
Is there a way I can use the console (f12) to see which syntax to input to trigger my custom battle system's sequence list? I currently use the below code for most skills, which works great for making for instance a followup fire spell on the target after an initial melee attack when using the skill "firestrike", but I do not think there are options for making the sequence state dependent, which means I am unable to create a usable "enchant weapon: fire" skill and state, without linking the sequence through yanfly code, which I do not know how to do.
I have tried Yanfly's "Enfire" script, however it does not display the damage number popup in this battle system. This would be another viable solution but I would rather just learn how to find the code in question with the console, then run it manually. Otherwise a script code to just perform an additional skill on the target will do.
---------
Hate to close my thread before it even starts, but I actually figured out how to do this with some help from the LeTBS thread using the following code:
I am getting Cannot read property 'id' of undefined when using the normal attack in the non-enchanted state, but this isn't causing a crash or anything so I assume I can safely avoid having to debug this for now.
....and properly using { } brackets as well as else if statements got rid of the error. Excellent.
For the default system, something tells me simply deleting TBS from BattleManagerTBS and replacing the values with your own would work.
This thread can be closed and apologies for filling up the help section with something I probably could have figured out myself. At the least I hope this can help someone else in the future attempting to do similar.
What would be the best way to do this? This is what I have sofar and was hoping to more or less edit in.
Code:
<Pre-Damage Eval>
if (a.isStateAffected(170)) b.addState(22);
</Pre-Damage Eval>
Is there a way I can use the console (f12) to see which syntax to input to trigger my custom battle system's sequence list? I currently use the below code for most skills, which works great for making for instance a followup fire spell on the target after an initial melee attack when using the skill "firestrike", but I do not think there are options for making the sequence state dependent, which means I am unable to create a usable "enchant weapon: fire" skill and state, without linking the sequence through yanfly code, which I do not know how to do.
Code:
<letbs>
scope: circle(1)
scope_select: enemies
sequence: firestrike
</letbs>
I have tried Yanfly's "Enfire" script, however it does not display the damage number popup in this battle system. This would be another viable solution but I would rather just learn how to find the code in question with the console, then run it manually. Otherwise a script code to just perform an additional skill on the target will do.
---------
Hate to close my thread before it even starts, but I actually figured out how to do this with some help from the LeTBS thread using the following code:
Code:
<Pre-Damage Eval>
if (a.isStateAffected(170))
var skill = $dataSkills[15];
entity = BattleManagerTBS.activeEntity();
BattleManagerTBS.forceAction(skill, entity);
</Pre-Damage Eval>
I am getting Cannot read property 'id' of undefined when using the normal attack in the non-enchanted state, but this isn't causing a crash or anything so I assume I can safely avoid having to debug this for now.
....and properly using { } brackets as well as else if statements got rid of the error. Excellent.
Code:
<Pre-Damage Eval>
if (a.isStateAffected(170)) {
var skill = $dataSkills[15];
entity = BattleManagerTBS.activeEntity();
BattleManagerTBS.forceAction(skill, entity);
}
else if (a.isStateAffected(171)) {
var skill = $dataSkills[16];
entity = BattleManagerTBS.activeEntity();
BattleManagerTBS.forceAction(skill, entity);
}
</Pre-Damage Eval>
For the default system, something tells me simply deleting TBS from BattleManagerTBS and replacing the values with your own would work.
This thread can be closed and apologies for filling up the help section with something I probably could have figured out myself. At the least I hope this can help someone else in the future attempting to do similar.