State stacks?

What I need to find if its possible due an script or maybe just modifying the core script is to the same state stacks to apply the same effects the times needed.

I'm aware there's several scripts that stack states, but those script only work for stacking parameters. Not the state itself.

For example: I'm using a state in combination with Yanfly Lunatic State with it own custom formula. If I use the same skill several times over the same actor, it will only do the effect once.

The only solution I could find is to make several states with the same effect but different ID for each instance I want to stack it. So I'm actually 3 different states to do the same for each.
I won't mind doing it this way, but maybe there was a better method or some modification I could do to the main script to avoid doing it this for each skill that add states that should stack.
in this case the problem is most likely NOT the stacking of the state, but the way the lunatic code is handled.

and the only way around that would be for you to change the custom formula to detect how often the state is stacked as per those other scripts and take that into account on the custom formula.

no other change because the custom formula itself cannot be stacked from the outside.
in this case the problem is most likely NOT the stacking of the state, but the way the lunatic code is handled.

and the only way around that would be for you to change the custom formula to detect how often the state is stacked as per those other scripts and take that into account on the custom formula.

no other change because the custom formula itself cannot be stacked from the outside.
Thanks! Would you know by any chance what would be the code to call or "return" the stacks of said state? I assume is "return state(id)..." something, but I don't know all script calls for those cases.
unfortunately that code does not exist in default because the default states do not stack.
you'll have to check the script that you choose to use for stacking states to learn how those states are stored, and then base your code on that.

Original thread: https://forums.rpgmakerweb.com/threads/state-stacks.149287/