Add "poison"-like state in combat, when MP reaches 0?

I've set up a warmth system in my game, replacing the MP with "Warmth". The player is in a constant "Cold" state of losing Warmth (MP), and once it reaches 0, they go into a "Freezing" state, that starts draining HP. 

I managed to get it working outside of combat, and while the initial "Cold" state drains MP in combat, when it reaches 0, it doesn't activate the "Freezing" state. 

Is there any way to do this without custom scripts?

On a secondary note, is there a way to change the color of the MP bar in the stats menu?
The colour of the MP bar is based on the Windowskin image. Export the image (from the RTP Graphics/System folder and save it into your project's own folders) and replace it with the colour you'd prefer to use.


Not sure about the states - would have to see how you've implemented it outside of combat. If it's a parallel process common event, common events don't run in battle unless you call them with a Call Common Event command in a troop event page. Tsukihime has written a script that will allow parallel/autorun common events to run in battle.
Thank ye kindly! 

You are correct, I am using a parallel process common event. This is how I have it set up right now:

freezing2.png
You could do a battle event that would look on actor(s) MP and add state, when his/her/their MP is 0.

But that way you would have to put that event is every single troop.

If you are interested in that solution, then I can provide more info.
You could do a battle event that would look on actor(s) MP and add state, when his/her/their MP is 0.

But that way you would have to put that event is every single troop.

If you are interested in that solution, then I can provide more info.
I created something like that for a Stamina system. I made an event page that calls the appropriate common event each round in battle. Once the event itself was written I don't think it took more than a minute or two to copy it to all the troops and I haven't noticed any kind of slowdown during testing.
Yeah, I'm not saying it's bad nor it'll take forever to do that, I just told that he'd need to paste that in every troop. =P
Yeah, I'm not saying it's bad nor it'll take forever to do that, I just told that he'd need to paste that in every troop. =P
https://yanflychannel.wordpress.com/rmvxa/utility-scripts/base-troop-events/
Or not... XD

Hmm... That's very clever!
Or not... XD

Hmm... That's very clever!
Ya, that scripts saved my life a few times.
I won't mind a little copy/paste to each troop. I'll tinker with it in the meantime.
Anyway, the troop event should look like this:

Spoiler
1st step -> bind actor's MP to a variable.

CkSUfJG.png


kJq0y1T.png


sn2dChR.png


2nd step -> use that variable in conditional branch:

C9lRxQF.png


3rd step -> Put that event to each troop or use the script, that Jackus suggested.

NOTE: remember, that you need to wait until the end of the turn to see that working. (saying just in case, because there are scripts that modifies turn duration and it may seem like not working, when the turn duration is long as balls - true story)

THE END
And in this script you can change MP bar colors as well as many other things.

Or simply use this snippet: (put below materials; above main blah blah blah)

class Window_Base < Windowdef mp_gauge_color1; text_color(22); end; # MP gauge 1def mp_gauge_color2; text_color(23); end; # MP gauge 2endand change numbers in text_colors.
It's working now, thank you very much!
Glad could help! =)
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/add-poison-like-state-in-combat-when-mp-reaches-0.42652/