[RM2K3] SKILL TAKES HP RATHER THAN MP.
Posts
Sorry for disappearing. I decided it was easier to just make the project myself rather than try to explain all the components. However, upon doing so I found out that rm2k3's battle system sucks more than anticipated and so even though my event code is perfect, the "use HP instead of MP" isn't.
It almost works, but has some issues when using items or conditions. If you don't mind I could share the project with you so you could see what I did. A full explanation of the issue follows.
rm2k3 generally allows you to run scripts before or after an action from either enemies or heroes. This means that if your "use HP instead of MP" character casts a spell using MP, I can run an event script after the action that checks for how much MP was used and subtract that amount from HP. I can also do things to ensure the %HP spells work too, if desired. However, this "after turn" script doesn't trigger when using items. So if you heal the character, for example, they may still be unable to cast spells because the game hasn't been able to update the MP values yet. Note that the "before action" event is after the player has given a command but before it has executed. This is why "after action" is essential.
Now I knew about the issues with items, but it's something you can work around. The bigger problem, and the one I didn't realize, is with conditions. There are three things that lag rm2k3 like crazy: changing equipment, changing class, and changing condition. I suspect it is due to the fact that each one of these can change the graphics of the character. Generally speaking it's bad practice to include any of these options in a complicated custom event script because the lag can actually make rm2k3 skip steps and not execute commands properly. That said, having monsters cast spells that inflict conditions has always worked for me.
Not this time, though. When I tested multiple monsters all acting at the same time, if the first one used a spell that inflicted a condition, the "after action" events wouldn't trigger for the subsequent monsters. Thus I couldn't adjust the character's MP to reflect their reduced HP (from taking damage). This would mean that they could cast spells despite having insufficient HP to do so. There is no workaround for this outside of never having duplicate monsters in a monster group or not allowing monsters to inflict conditions.
So that killed the idea. Sorry about that. I thought it was a brilliant work around for you, but you'll have to do the clumsy methods instead.
It almost works, but has some issues when using items or conditions. If you don't mind I could share the project with you so you could see what I did. A full explanation of the issue follows.
rm2k3 generally allows you to run scripts before or after an action from either enemies or heroes. This means that if your "use HP instead of MP" character casts a spell using MP, I can run an event script after the action that checks for how much MP was used and subtract that amount from HP. I can also do things to ensure the %HP spells work too, if desired. However, this "after turn" script doesn't trigger when using items. So if you heal the character, for example, they may still be unable to cast spells because the game hasn't been able to update the MP values yet. Note that the "before action" event is after the player has given a command but before it has executed. This is why "after action" is essential.
Now I knew about the issues with items, but it's something you can work around. The bigger problem, and the one I didn't realize, is with conditions. There are three things that lag rm2k3 like crazy: changing equipment, changing class, and changing condition. I suspect it is due to the fact that each one of these can change the graphics of the character. Generally speaking it's bad practice to include any of these options in a complicated custom event script because the lag can actually make rm2k3 skip steps and not execute commands properly. That said, having monsters cast spells that inflict conditions has always worked for me.
Not this time, though. When I tested multiple monsters all acting at the same time, if the first one used a spell that inflicted a condition, the "after action" events wouldn't trigger for the subsequent monsters. Thus I couldn't adjust the character's MP to reflect their reduced HP (from taking damage). This would mean that they could cast spells despite having insufficient HP to do so. There is no workaround for this outside of never having duplicate monsters in a monster group or not allowing monsters to inflict conditions.
So that killed the idea. Sorry about that. I thought it was a brilliant work around for you, but you'll have to do the clumsy methods instead.














