Creating a self-destruct attack for enemies using VisuStella BattleCore?

Hi. So, I've recently added the VisuStella BattleCore plugin to my game, which has a Self-Destruct skill enemies would use that relied on Force Action to work properly. Due to the way the plugin changes the way Force Action functions - and not seeing any way to change it back without turning off the plugin completely - The Self-Destruct skill no longer works. Turning off the plugin does make it work again so I know it's that one that is causing the issue.

The way it worked was it was split into two skills, the first one putting a state on the user, and then also running a common event, which used Force Action to do the second skill, actually dealing the damage, and then putting the dead state on the user. A screenshot is linked showing the common event.

Is there a better way to make a skill like this? Or is there a way to replicate this effect with this plugin turned on?
Maybe I'm not seeing it, but it seems difficult to make a skill do one effect on the user, and then doing a different effect on a target. Thanks.
What is the trigger for this self-destruct skill? Why do you have a self-destruct state first?

I don't know the solution to your problem but if you're using VS Battle Core... and if it's just an ordinary skill that the enemy can use during battle, I would do it with action sequences instead. This way you will not need to branch to cycle through each enemy (like in the screenshot that you showed) and you also don't need a "self-destruct" state.

It's admittedly a little hard to get into, but once you understand Action Sequences it makes things a lot more streamlined.
There are 2 skills, when the first one is used it triggers the second one. The first one adds the state to the monster that used it and triggers the common event. The common event checks which monster has the state, Force Action uses the 2nd skill, dealing damage to a random target on the player side, and then kills the index of the monster that has the state.

Figured Action Sequences would probably make it work again, though I don't understand them well yet.
Hey, there's a specific VS plugin for this sort of situation. It's paid, but cheap.

I don't see any reason to have this split into two skills.

What is the trigger for this self-destruct skill? Why do you have a self-destruct state first?
The first one adds the state to the monster that used it and triggers the common event. The common event checks which monster has the state, Force Action uses the 2nd skill, dealing damage to a random target on the player side, and then kills the index of the monster that has the state.
This doesn't answer the question. Why is there a second skill you're using Force Action for?

Please post a screenshot of the self destruct skill (the one that's getting forced). There's going to be a simple way to blow up the user within that skill without getting so convoluted.
Sorry if I'm not being clear. Thank you all for taking the time to reply.

The reason I need 2 skills is because of the lack of choices in the "scope" section of the skill editor...I think? I'd hope too that there would be an easier way to make the skill function this way.

The choices for scope are The user, enemy, ally, or enemy+ally. None of these being selected would have the right effect, unless I have two different effects with two different scopes selected.

I think in Action Sequences you can set a skill to have an HP cost. Is it possible to use a percentage instead of a number? And if that percentage was at 100%, would it still work if the user was missing any health? Anyway, here are the screenshots of the two skills.
Still not entirely convinced that you indeed need a "self destruct" state... having trouble following what's being done here.

BUT!

Let's forget about this because yes you can do this all in Action sequences!

1. Have some fancy motion like an expanding enemy sprite (MOVE: Scale/Grow/Shrink) followed by explosion animation
2. MECH: Action Effect with Targets: "all targets"
3. MECH: HP, MP, TP set to something like:
1690515125617.png


Hope it works.
Maybe I didn't need a self destruct state, yeah. I think I had problems because it didn't work if the user was already dead. I could've probably had the common event run in the first line, doing the 2nd skill, and just adding dead state in the 2nd line of the skill effects so that it activated before they died. Would've been a much simpler common event.

Well, I tried your suggestion and it didn't seem to work, unfortunately... am I supposed to put the plugin command into a common event, and have the skill run the common event? Or did I need something else too?

Here's a screenshot of the common event, and the skill with the common event triggered by it.
Also I did change the skill used by the enemy to this one, so that shouldn't be the problem. In the common event, I also tried those two lines in reverse order and it didn't work either. Thanks again for the help.
This works fine for me.
Well, I tried your suggestion and it didn't seem to work, unfortunately...
I think a little more context would be nice in order to properly help you, but looking at your screenshots I think you missed putting the following tag in the notes of the skill:

Code:
<Custom Action Sequence>

The skill needs to call the common event, yes. In addition, for ALL Action Sequences, start with the setup (flagged as javascript for ease of reading):

JavaScript:
◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Setup Action Set
:              :Display Action = true
:              :Immortal: On = true
:              :Battle Step = false
:              :Wait For Movement = true
:              :Cast Animation = false
:              :Wait For Animation = true

Then do your fancy animation and motion

Followed by the damage dealing (example is as current target, please mix and match and trial and error to your heart's content!):
JavaScript:
◆Plugin Command:VisuMZ_1_BattleCore, MECH: Action Effect
:              :Targets = ["current target"]

Next prepare the user to die:
JavaScript:
◆Plugin Command:VisuMZ_1_BattleCore, MECH: HP, MP, TP
:              :Targets = ["user"]
:              :HP =
:              :HP Rate = -100
:              :HP Flat = +0
:              :MP =
:              :MP Rate = +0.00
:              :MP Flat = +0
:              :TP =
:              :TP Rate = +0.00
:              :TP Flat = +0
:              :Damage Popup? = false

Closeout the action and let the user formally die:
JavaScript:
◆Plugin Command:VisuMZ_1_BattleCore, ACSET: Finish Action
:              :Immortal: Off = true
:              :Wait For New Line = true
:              :Wait For Effects = true
:              :Clear Battle Log = true
:              :Home Reset = true
:              :Wait For Movement = true

Hope it works... please do digest the documentation that comes with Battle Core. I fully understand that it's quite heavy on the stomach, but there's so much you can do... you would miss out on A LOT if you just follow my instructions. The IMMORTAL going from ON to OFF is not necessary per se (I think), but I do it anyway so as to prevent surprises.
I'd hope too that there would be an easier way to make the skill function this way.
There is.

I'm not going to get into reading through what others have suggested with action sequences, because they function differently from MV and I haven't used them.

And, honestly, I don't see what there is to gain from doing it through an action sequence...what you want to do is pretty simple.

So here's a very simple, straightforward way to implement this.

Have your Self-Destruct skill the way it's written, targeting All Enemies and doing the damage in the formula.

Then use the VisuStella Battle Core notetag:
Code:
<JS Post-Damage as User>
user.gainHp(-user.hp);
user.performCollapse();
</JS Post-Damage as User>
Thanks werzaque, that worked perfectly. And I will look into learning more about Action Sequences, they seem very useful.

ATT_Turan, I tried your code and it didn't seem to work. I pasted it into the notes section of the skill page. Maybe I messed up? Thank you for the help regardless.

And thanks to everyone else who replied.
It's just Post-Damage, not as User. Right in the documentation of the Battle Core.

Original thread: https://forums.rpgmakerweb.com/threads/creating-a-self-destruct-attack-for-enemies-using-visustella-battlecore.159740/