MiddleMang

Villager
Member
Joined
Jan 24, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
Hello! I'm using the STB system and all yanfly plugins. I'm trying to make a passive that, if a token is available, will spend it to interrupt a foe's attack. So enemy picks attack, a check is made if a token is available, enemy charges up and gets wacked first and their turn ends before their attack (ideally).

My original plan was hoping that a stun, applied during the opponents action, would override the action. However it seems that as long as the enemy has selected and is using an attack, it will go through no matter what. I tried a bunch of timings, such as a forced action from the user with a <Custom Select Effect> passive, but it would always go after the enemy attacked, and the best and earliest I could get an attack off was through an <alive foe aura> that has an <action start effect> forced action causing the actor to use a skill to hit the enemy, which feels far more complicated than it has to be. Now even though i would prefer to see the enemy's action show up in text, and then have the user move in and attack them and interrupt their turn, I would have settled with the action start thing, but the attack still goes off even after being stunned/attack sealed, etc. I tried looking through the giant spreadsheet to find out if "user.clearActions();" could be used somewhere, I tried inside of the stun state that gets applied after the interrupt skill, or something involving these, but I couldn't figure it out.

BattleManager.forceAction(subject);
subject.forceAction(skillId, targetIndex);
interpreter.setWaitMode("action");

I also noticed that the substitute extend plugin sort of works at the timing I need this to work, just instead of taking a hit for someone else it would attack before the enemy does and end their action. The reason why I think the counter control plugin can't help for this either is that I'd like this character to be able to disrupt and interrupt attacks that even target allies.
 

SGHarlekin

Orc Jester
Regular
Joined
Jun 29, 2020
Messages
1,378
Reaction score
2,002
First Language
German
Primarily Uses
RMMV
Could just use action sequencing for that. In the sequence check for your token. If token is available, run common event to remove token (assuming it's an item here) and play a sequence where the enemy gets whacked by the target, else attack as normal.
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,150
Reaction score
9,096
First Language
English
Primarily Uses
RMMV
Unless I'm misunderstanding something, this is what Yanfly's Counter Control plugin is for.

It allows you to define what conditions will be used for a skill to counter attack (e.g. having an item) and whether the original attack goes through or is canceled.
 

MiddleMang

Villager
Member
Joined
Jan 24, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
Unless I'm misunderstanding something, this is what Yanfly's Counter Control plugin is for.

It allows you to define what conditions will be used for a skill to counter attack (e.g. having an item) and whether the original attack goes through or is canceled.
I thought it was not possible for enemy A to target Actor B, and have Actor A interrupt enemy A's attack on Actor B with counter control. The one being targeted would have to evade, have it come up as a miss and then attack and stun the enemy, unless every skill the enemies could use would have to have <Ally Counter>, and I'm not sure how that would work with AOE attacks. The point would be to stop the attacker from the source before it goes off.
 

MiddleMang

Villager
Member
Joined
Jan 24, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
Could just use action sequencing for that. In the sequence check for your token. If token is available, run common event to remove token (assuming it's an item here) and play a sequence where the enemy gets whacked by the target, else attack as normal.
The token system I have all down from passive states and state counters. I just do not have a way to cancel an action that is already processing in the battle manager, or interrupt the attack sequence started already by the enemy. Currently the enemy action start begins, my chosen character attacks with a forced action on the enemy first, applies a stun, and then the enemy continues with their attack.
 

MiddleMang

Villager
Member
Joined
Jan 24, 2019
Messages
26
Reaction score
2
First Language
English
Primarily Uses
RMMV
What I currently have, is: A basic state that counts tokens when applied

Code:
<Custom Apply Effect>
user.addStateCounter(679, 1);
user.clampStateCounter(679, 0, 6);
</Custom Apply Effect>

for test purposes an aura origin point state
Code:
  <Alive Foe Aura: 682>

the foe aura state
Code:
  <Custom Action Start Effect>
// Get the skill ID of the skill that will launch once the charging is complete.
var skill = 600;
// The target's index. -1 for random. -2 for last target.
var target = -1;
// Set the forced action for the user.
// Queue the forced action.
BattleManager.queueForceAction($gameActors.actor(38), skill, target);
$gameActors.actor(38).addStateCounter(679, -1);
  </Custom Action Start Effect>

and the skill which adds a stun/seal move state with

target.clearActions();

inside the action sequence (but it doesn't seem to work) and inside the stun state
Code:
<Category: stun>
<Custom Apply Effect>
user.clearActions();
</Custom Apply Effect>

but as I'm learning it seems like once an action is picked it is played out, and restrictions are only checked at some point beforehand.
 

SGHarlekin

Orc Jester
Regular
Joined
Jun 29, 2020
Messages
1,378
Reaction score
2,002
First Language
German
Primarily Uses
RMMV
The token system I have all down from passive states and state counters. I just do not have a way to cancel an action that is already processing in the battle manager, or interrupt the attack sequence started already by the enemy. Currently the enemy action start begins, my chosen character attacks with a forced action on the enemy first, applies a stun, and then the enemy continues with their attack.
I just described how to do that tho
 

ATT_Turan

Forewarner of the Black Wind
Regular
Joined
Jul 2, 2014
Messages
11,150
Reaction score
9,096
First Language
English
Primarily Uses
RMMV
I thought it was not possible for enemy A to target Actor B, and have Actor A interrupt enemy A's attack on Actor B with counter control.
You're right, I missed the last sentence of your original post that said you wanted it to work with someone other than the target.

I think this should be doable with one of the substituting plugins available, but I don't know which ones you've tried.

Outside of that, you can definitely do it with action sequences as @SGHarlekin suggested. You'd just have to include it in the action sequence for every skill that can possibly be interrupted by this.

Just to mention it, we're not supposed to double post, and you have a whopping triple header there! If you need to add something and no one else has responded, you can click the Edit button.
 

Latest Profile Posts

1696004095642.png
...and now he even makes resources, too! xD
OMG Y'all. I found an alternate Google Drive I 100% forgot I had. All my crusty old game files from 2014 (when I signed up) are in there. When I like...maybe actually make a prototype thread it's gonna be so much fun taking everyone down my memory lane.
We are at the finish line!!! Thank you COMMUNITY!!!
GameCompletion.jpg
Well, my cat died. Just had a feeling something was off, and went to check.
Someone abandoned her a while ago when she was pregnant, and she wandered into my yard.
Took her to the vet, and did all the usual stuff, making sure she had all the shots and no one was looking for her.
She had the kittens. I kept 1, and found a home for the rest. (Continued because of the limit)
Most disappointing adult event: buying a house that no one comes to on Halloween.

Most redeeming adult event: having a kid to take out trick-or-treating again.

Forum statistics

Threads
134,902
Messages
1,251,741
Members
177,721
Latest member
binamshelanro
Top