Read on the forums a few times about how to make insta death and it seems as though the only way to make it effective is to put under enemy trait state rate 0% on knockout. That said, I noticed it did not work, for the skill I used on the enemy with 100% knockout automatically kills them. I have yanfly plugins that revolve around stats and buff, along with state categories.
Are those the reason why this happens?
I'm a little confused because you start saying you're TRYING to make insta-death and then make it sound like you want the enemy to be RESISTANT to insta-death. I've responded as if you're trying to make the enemy RESIST insta-death.
If that's the case, you're using the wrong trait; you should be giving the trait "State Resist: Knockout", or you can give them the Immortal State in a battle event at the beginning of the battle (it does the same thing; the benefit of the Immortal approach being that it's easier to remove the Immortal State if you need to).
Theoretically, what you're using SHOULD work, because all the State Rate traits get multiplied together, and multiplied by some other numbers, to determine the chance of the state being applied, and a random number is compared against that. I'm guessing there's a weird rounding error at play here where Javascript isn't returning 0 when it multiplies all the numbers together. (I couldn't find anything in Buffs & States Core or State Categories that would affect this calculation.)
If I give them state resist knockout though they become immortal. State rate for knockout * 0 is not registered or recognized, and nothing shows about an error via console. Hence why I thought to bring concern on the boards and figure out why it isn't working for me, but is able to work for others. Spent half my day figuring out the issue and came across a code, but the problem with the code is that it either kills or does nothing. Damage output isn't an option. This makes the insta kill skill I made broken.
Well the catch is to check whether they are resistant to the attacks additional state or not, hence insta kill. If they are, they take regular damage. If not, it's like you said, insta death.
Earlier today I went lunatic and came up with this formula.
<Damage Formula>
if(!target.isStateAffected(1)){
target.setHp(0);
} else {
value = 8 * a.atk - 1.5 * b.def;
}
//event ends. Create action sequence.
That didn't work though :/
Edit: And my goodness, your idea worked. Wow... to think so technical and not realizing just changing the HP to 0 would work...
Heh heh... 4 hours of my life wasted. Good grief xD thank you though. I'm documenting this formula, and keeping it on the tabs in case I forget. This is a dire important formula!