MZ Prevent certain actor's resurrection

I want to prevent specific fallen actors(in dead state) to be immune to raise. Basically, if this character's HP becomes 0, he cannot be raised or healed and can only be played next battle.

How should I do this?
Off the top of my head...don't have him actually die.

You'll have a troop event that you copy into each troop in your game (I think VisuStella or someone has a common troop plugin to make this easier).

Turn 0 apply an immortal state to the actor. Then have another troop event with a condition of that actor's HP <= 0%. In that event, play a little animation on him or something then remove him from the party.

Then put an autorun on each map that checks for that actor to be in the party and adds him if he's not, then does Erase Event.

If you had targeting control, it would be much easier, but I don't believe any VisuStella plugins include targeting notetags. Maybe you could see if Yanfly's Selection Control plugin works in MZ via FOSSIL, then you'd just add a notetag to any item or skill that can resurrect.
I don't believe any VisuStella plugins include targeting notetags.
Battle Core has some.

@Fionn23
With Battle Core, a note tag like this could accomplish what you're asking:
Code:
<JS Targets>
 targets = targets.filter(actor => actor != $gameActors.actor(actorId));
</JS Targets>

You'd put that in the note box of any resurrection skills/items.
Thanks for the correction! That is definitely the way to go.
@Fionn23
With Battle Core, a note tag like this could accomplish what you're asking:
Code:
<JS Targets>
 targets = targets.filter(actor => actor != $gameActors.actor(actorId));
</JS Targets>

You'd put that in the note box of any resurrection skills/items.
Just wondering as I'm still not familiar with note tags, is it possible to add/change note tags programmatically? If it does, is it a bad idea?
Just wondering as I'm still not familiar with note tags, is it possible to add/change note tags programmatically? If it does, is it a bad idea?
It's certainly possible, but the method to do it can vary, depending on the type of note tag, and the specific plugin that is using it. Most database objects have a note property, which is a string that contains the contents of that object's corresponding note box. And you could edit that programmatically.

However, that will only have an effect if the plugin parses the note in real time, each time it is used. It's possible that the plugin might parse for note tags once at startup, and then save them somewhere else, for the sake of better real time performance. If that's the case, then you would need to figure out what that plugin does with the note tags, and edit them accordingly.

In this particular case, I have no idea how VisuStella chose to process that note tag, and trying to find out would be annoying, since they obfuscate their code. But I honestly can't imagine any good reason why you would need/want to change note tags at run time anyway. This particular note tag can hold any amount of JavaScript that you want, so you can do whatever programmatic things you wanna do from within the note tag--there's no need to try to get at it externally.
Battle Core has some.

@Fionn23
With Battle Core, a note tag like this could accomplish what you're asking:
Code:
<JS Targets>
 targets = targets.filter(actor => actor != $gameActors.actor(actorId));
</JS Targets>

You'd put that in the note box of any resurrection skills/items.
This is working. Thanks!

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/prevent-certain-actors-resurrection.148858/