Random targeting help

Conceptually this should be super easy to do, but I can't seem to figure it out.

The idea is a state that's actor specific that causes the character to somewhat randomly pick targets from both enemies and allies alike, not to say you can't manipulate the targeting a bit as I have in mind that those inflicted with a certain state are far more likely to get targeted over those who don't have it. But I have no idea how to really do this as either A)I come across self targeting, and I don't want that or B.)Won't target allies (I tried and it refused to attack an ally with the state)

And if your wondering why I have such a state, the character in question has heavy themes in vampirism and I'm using it as a great equaliser to make him a bit more balanced as if you let his MP get too low sure, he dose a crap ton of damage BUT, there's a chance that you could be on the receiving end of it. You can mess with the targeting a bit by inflicting bleed on an enemy to increase the odds of that particular enemy getting hit.
You'll need a plugin to completely rewrite the skill targeting - there is no easy way to do this by default.

Such a plugin is very possible, even if the current alternate target managers don't cater to your specific conditions. You should request one, but that request will require a few more details on the actual way how this should work - for example if you want to use the regular target rate for the random weight or a different system.
the dont want them targeting themself thing can be handled with yanfly selection control.
<Select Conditions>
Not User
</Select Conditions>

and the "more/less likely to be targeted by the AI" thats default engine. EX-param Target Rate
------------------------------------------------------------------------------------------------
so if you get hit by confuse, you randomly target both enemies and allies.
but with the selection control thing on skill ID1 you will never be able target self.

but then if all other allies have a state with target rate *150% (can use yanfly aura effects to have this as an effect of the confuse state) the confused person/and the enemies will be more likely to target those people
Thank you! I knew I was missing something painfully obvious and right in front of my face.

Original thread: https://forums.rpgmakerweb.com/threads/random-targeting-help.131056/