Skils display different messages in the battlelog based on conditions.

Hi!

I have a skill in my game, that does different things based on how it is used (mainly, it drains MP of certain enemies, damages others)

The logistics of making this skill can be done in the editor using the damage formula, HOWEVER the message displayed in the battle-log on skill usage is impossible too change without the use of scripts, and no script I could find would let me change it so easily.

Basically, what I'm requesting is a script that if i use skill X will display the message as normal to the battle log as an example, if the skill was normally a damaging skill, the message shown is follows

Eric attacked the enemy!

Slime 4 damage!

where Eric is the actor using the skill, and Slime is the enemy taking damage

but if some condition (preferably user defined) is met (such as the enemy being a specific id) the skill will instead display a different message like for example, if the skill could also drain mp of certain enemies

Eric distracted the enemy!

Demonking had 4 MP drained.

where again, Eric is the name of the actor, and Demonking is the name of the enemy

If anyone could make a script that would allow me to do this, or perhaps point me to another script I might have overlooked which can allow me to do this, it would be greatly appreciated.
After reading your other thread, I think a good start would be instead of relying on the damage formula of this 1 skill to handle both hp damage with one condition, mp with the other, you split it between two skills instead. The main skill does the hp damage, and use a script to switch to the other skill which does the mp drain effect. That 2nd line in the battle log, the hp damage/mp drained is controlled by the skill's damage type which is just above the damage formula in the editor. The following script will allow you to change skills based on a customized condition via a notetag.


http://forums.rpgmakerweb.com/index.php?/topic/18479-skill-change/


It doesn't handle changing the 1st part of the message tho, you will need something else for that.
Thanks bro, that script worked pretty well!

Original thread: https://forums.rpgmakerweb.com/threads/skils-display-different-messages-in-the-battlelog-based-on-conditions.21148/