How Would I Go About Creating These States Plus Fixing Turn Counter?

I have a few unique states or traits I would like to create and I'm not sure how to go about them. I have attempted a few of them but failed many times so I'm back at square one with all of these. Anyway, here are the unique states/traits I'm trying to create.

Also, when a state is applied to an actor and the turn ends, the counter goes down by 2(3 to 1) instead of 1(3 to 2). Anyone know what the problem could be?

Also also, if I want more states to be inflicted on an actor without causing the game to get an error what can I do to make that happen? I assume I may need a plugin for this one. If so, which one and how do I use it?

States:
1. Perish State - If you've played Pokemon then you are familiar with the move Perish Song. I would like to have a move that inflicts an actor with a turn countdown and when the turn countdown ends, the actor is knocked out.

2. Curse State - For this one, I would like to gradually decrease HP and MP as well as every other stat the longer this effect is on. The HP and MP, of course, like they should but I would like Atk, Def, M.Atk, M.Def, Agi, and Luck to decrease every turn as well. Once Curse is removed or wears off, those stats will return to normal. I feel I might need multiple states for this one but would I get it to automatically progress to the next state.

3. Webbed to Cocooned State - For this, I need the webbed state to become cocooned state whenever the actor gets hit by another or same attack that originally induced webbed state. Example if a spider used web shot, actor is webbed but if spider uses web shot again, actor is cocooned.

4. Defrost from Frozen State - On this, I would like to an actor to escape from frozen immediately when hit by a fire attack or have a 15% chance of escaping if hit in general.

These are the states I can think at the moment that I have trouble getting my game to execute properly. I will add more below as I remember stuff. Thanks to everyone in advance that helps me with these problems.
Also, when a state is applied to an actor and the turn ends, the counter goes down by 2(3 to 1) instead of 1(3 to 2). Anyone know what the problem could be?
That can only happen if a plugin has messed up the engine. You'll have to check there.
(or it could be dependent on how you determine that turn counter as the default engine has no such thing)
Also also, if I want more states to be inflicted on an actor without causing the game to get an error what can I do to make that happen?
again, the default allows anynumber of different states applied to an actor and never throws an error message when it does - if you get an error then it has to be caused by something you changed in the engine

So I strongly suggest to check which of your plugins has damaged your engine and repair that before trying to make any of the other states a reality - they might fail if you still have those other errors.

As for your states:
1) follow-up states. you'll need a plugin that allows you to define follow-up-states, which means that if one state ends another one is automatically applied. Then the first state is your counter state that does nothing, and the second state is the death state that automatically follows.

2) again follow up plugin for the series of states

3) it's called either conditional states or placeholder states depending on the plugin writer

4) just add the state removal with the chance as an additional effect to the skills.
Doesn't need a plugin as that is a basic function of skills.
I'm not sure if you still need help with these, but they're all easily done with Yanfly's Buff and States core plugin.

Yanfly has a pretty solid Perish Song/Doom state on his Tips and Tricks section so I'll just link that

For curse, throw this into your Curse state's notebox
Spoiler: Curse Notebox
Code:
<Custom Turn End Effect>
console.log(user);
for(var i = 2; i < 7; i++){
user.addDebuff(i, 10);
}
  var text = '<CENTER>\\c[6]' + user.name() + '\\c[0] was weakened by the curse!';
  var wait = 90;
  BattleManager.addText(text, wait);
</Custom Turn End Effect>
If you want it to work differently(clearing the debuffs when healed, or whatever), let me know and I'll change it accordingly.

This should work for Web + Cocoon. Put it in the Web state's notebox
Spoiler: Web State
Code:
<Custom React Effect>
var skillIdsApply = [];
//Put the skill ID's of your web shot state
skillIdsApply.push(1,5,6);
if(skillIdsApply.contains(this.item().id){
var text = '<CENTER>\\c[6]' + target.name() + '\\c[0] was cocooned by\\c[6] ' + user.name() + '\\c[0]!';
var wait = 90;
BattleManager.addText(text, wait);
//Change 139 to your cocooned state ID
target.addState(139);
target.removeState(stateId);
}
</Custom React Effect>

And for the last one, this should work
Spoiler: Freeze State
Code:
<Custom React Effect>
//Change 1 to your fire element ID if it's different
if(this.item().damage.elementId == 1){
var text = '<CENTER>\\c[6]' + target.name() + '\\c[0] defrosted!\\c[0]';
var wait = 90;
BattleManager.addText(text, wait);
target.removeState(stateId);
} else if(Math.round(Math.random() * 100) <= 15){
var text = '<CENTER>\\c[6]' + target.name() + '\\c[0] broke out of the ice!\\c[4]';
var wait = 90;
BattleManager.addText(text, wait);
target.removeState(stateId);
}
</Custom React Effect>

If any of these don't work or you want to change or add some stuff just let me know.

Original thread: https://forums.rpgmakerweb.com/threads/how-would-i-go-about-creating-these-states-plus-fixing-turn-counter.121421/