Hi everybody. I've just implemented the above script as one of my characters uses different 'stances' that emphasise different stats and unlock the use of different abilities in combat. I've done this by creating each one as a state, with commands that apply and remove the states as necessary. Each one has an icon to make it clear which stance is active. Without the script there was a huge bug whereby allowing him to be KO'd and then revived removed all stances and unlocked all abilities.
From what I can tell, the script has worked in that death and inns do not remove the states, but for some reason the state icons are not appearing next to the character in the menu whereas they were before I put the script in. Any idea why this may be? Is there something in the script that disables permastate icons? Or is it conflicting with something else in my scripts (I'm using Yanfly's battle engine)?