Auto Substitute Specific Party Member?

Hello all, it's been a while!

I recently made the transition from VX Ace to MV and began making a sort of 'practice project' as something short and sweet for my friends to play. However despite finding the new plugins system miles better than VX Ace's scripts, I can't seem to quite find what I'm looking for in this particular case.

Early on in the game, the players take in an orphan, who one of the party members then takes under their wing and eventually (unofficially) adopts and begins to train to defend themselves. To show their bond, I would like that party member to always substitute for the orphan whenever they're low on health, like a parent instinctively protecting their child.

Essentially I would like a plugin that allows me to make a specific character auto-substitute for another specific character when they are low on HP, or if it's easier; a unique State that functions the same as Substitute but only substitutes for a specific actor. The state would automatically be applied to the parental figure at the start of each turn to ensure they're always protecting their adopted child if they get low on HP.

I imagine there's already a script for this kind of thing and I simply missed it but I posted it in requests just in case this is a new thing. It's not a major thing and I can simply leave it out of the game if need be, I just thought it was a nice touch to include and thought I'd look into it.

Much appreciated if anyone can solve this x
If your alright with it only being flavor wise (like a state stating each turn the charecter is protected) you could use an auto-state plugin, and have it put an auto-state on the child that makes there target rate 0% (enemies won't target the charecter) when its hp is low. It's not a perfect solution, but its a start. here is an auto state plugin ive found

https://victorenginescripts.wordpress.com/rpg-maker-mv/passive-states/

Edit: If your ok with the flavor of everyone protecting the orphan, this could work. I'll keep looking though

Edit: I just realized, you could also make the state reduce all damage to prevent spread attacks too
Thanks for the response ^_^ Unfortunately for me I'd really rather it was a legitimate substitute (with the actor moving to block the other member, etc.)

I found this: https://raw.githubusercontent.com/triacontane/RPGMakerMV/master/SubstituteExtend.js which seems to allow what I want, though I haven't managed to get it working yet since even with the translation it's a little hazy. Quitting for the day but hopefully I can work it out tomorrow.

In the meantime if anyone has any other suggestions in case the above doesn't work then those would be welcome too ^_^

EDIT: Nope, I can't get this plugin to work at all... I thought it did at first because the actor protected the child but then he also protected another party member too.

Based on what I could understand from the translated plugin, I'm using these notetags in an otherwise regular substitute state:
Code:
<SE_TargetRestriction: 17>
<SE_Substitution target limitation: 17>
<SE_Target HP Rate: 40>
Which SHOULD mean that ONLY actor 17 is protected by the state when their HP is below 40%. I think I'm only supposed to use one of those first two tags but since neither worked on their own, I tossed 'em both in to basically be like "Hey, plugin, get the f*ckin message, THIS ACTOR ONLY" lol.

This might technically class as Plugin Support now but I'm still looking for alternate methods to achieve this same goal if it's easier than messing around with this one for much longer 'cause this is wasting a lot of valuable time for me right now.

Original thread: https://forums.rpgmakerweb.com/threads/auto-substitute-specific-party-member.113416/