Add State on Low MP, Version 1.00 (Beta)
by bgillisp
Introduction
This script adds a state to a battler when their MP drops a certain percent below a preassigned value. Right now you can set the value globally, or on individual actors and enemies, and you can modify the value with states.
Features
Adds a state to the battler when MP is below a fixed integer value. The state will remain on the battler until the state expires, as set in the database.
Screenshots
None - would require video to show the effect.
How to Use
Install the script by pasting in the materials section, but before main. Make sure to paste the script below any scripts that overwrite the Game_Battler and Scene_Battle class, else it may not work.
Demo
Plug and play, just copy and paste.
Script
On pastebin: http://pastebin.com/24yhbi6e
FAQ
Q: The link doesn't work
A: Notify me so I can fix it
Q: The script appears to not work!
A: By default, the script is disabled unless you notetag someone to have this feature. Since that was the way most that used it wanted it to function, I made that the default behavior. Go to the editable region and change the number to avoid that.
Q: I have the global value set to be something that is not 0.0, and an actor is tagged to have the state apply when MP is zero, but nothing happens when the MP hits zero!
A: Sadly, this is a limitation of how the notetags are being read in by the system. Since the system defaults no notetag to be 0, I had to exempt out that value on the notetag, so the global has to be 0.0 for the apply on zero state to work. IF someone can tell me of a fix for this I'd be happy to try to implement it.
Q: I'd like to have a feature like this for HP or TP instead of MP, can you implement it?
A: Sadly, I don't have the time to do that right now, but in theory if you change all my references from MP to HP or TP, it should do just that.
Q: I have this and Yanfly's engine, why does your script not work?
A: Yanfly overwrote the use_item method, which I alias. My script must go below Yanfly's ACE Engine script to work. If you place it above, my script will not work due to Yanfly overwriting the method.
Credit and Thanks
Dekita, for getting me started on this script many light years ago.
ksjp17, for the detailed suggestions to help me modify this script into something that is hopefully more useful than the original script was.
Author's Notes
Free for use in commercial and non-commercial games, with credit given.
I think this is fully functional, but need some other people to see if I missed anything before we call this completed.
by bgillisp
Introduction
This script adds a state to a battler when their MP drops a certain percent below a preassigned value. Right now you can set the value globally, or on individual actors and enemies, and you can modify the value with states.
Features
Adds a state to the battler when MP is below a fixed integer value. The state will remain on the battler until the state expires, as set in the database.
Screenshots
None - would require video to show the effect.
How to Use
Install the script by pasting in the materials section, but before main. Make sure to paste the script below any scripts that overwrite the Game_Battler and Scene_Battle class, else it may not work.
Demo
Plug and play, just copy and paste.
Script
On pastebin: http://pastebin.com/24yhbi6e
FAQ
Q: The link doesn't work
A: Notify me so I can fix it
Q: The script appears to not work!
A: By default, the script is disabled unless you notetag someone to have this feature. Since that was the way most that used it wanted it to function, I made that the default behavior. Go to the editable region and change the number to avoid that.
Q: I have the global value set to be something that is not 0.0, and an actor is tagged to have the state apply when MP is zero, but nothing happens when the MP hits zero!
A: Sadly, this is a limitation of how the notetags are being read in by the system. Since the system defaults no notetag to be 0, I had to exempt out that value on the notetag, so the global has to be 0.0 for the apply on zero state to work. IF someone can tell me of a fix for this I'd be happy to try to implement it.
Q: I'd like to have a feature like this for HP or TP instead of MP, can you implement it?
A: Sadly, I don't have the time to do that right now, but in theory if you change all my references from MP to HP or TP, it should do just that.
Q: I have this and Yanfly's engine, why does your script not work?
A: Yanfly overwrote the use_item method, which I alias. My script must go below Yanfly's ACE Engine script to work. If you place it above, my script will not work due to Yanfly overwriting the method.
Credit and Thanks
Dekita, for getting me started on this script many light years ago.
ksjp17, for the detailed suggestions to help me modify this script into something that is hopefully more useful than the original script was.
Author's Notes
Free for use in commercial and non-commercial games, with credit given.
I think this is fully functional, but need some other people to see if I missed anything before we call this completed.