Also, if you are using Custom Defeat Effect on a state, you cannot have the state ends when the battle ends, as the state will be removed before the defeat effect kicks in.
I tried it without that clicked as well but it seems the custom defeat doesn’t kick in when the actor dies, so I’m assuming it’s when the whole party wipes. I’m looking for something that occurs when an actor dies. I even tried a plug-in that was made just for that but it does appear to be compatible with the battle system I’m using..