Element Dependant Knockout Messages

MGGEDev

Veteran
Veteran
Joined
Mar 22, 2014
Messages
31
Reaction score
4
First Language
English
Primarily Uses
RMMZ
Apologies if this exists but I am looking for a way to change the knockout effect depending on the element that killed the actor/enemy.

For example, if they were killed by the "ice" element it would say "ActorA froze to death".
Fire "ActorA burnt to a crisp".

Is there a way to do this or would it require a plugin?
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,178
Reaction score
1,878
First Language
English
Primarily Uses
RMMV
You'd need a plugin, the engine doesn't support this by default. Specifically, as far as I know, you'd need to request/commission a new plugin.

Edit: I was insufficiently creative. You could do this without a plugin, I'd just recommend using one if you have any respect for your own time :wink:
 
Last edited:

MGGEDev

Veteran
Veteran
Joined
Mar 22, 2014
Messages
31
Reaction score
4
First Language
English
Primarily Uses
RMMZ
You'd need a plugin, the engine doesn't support this by default. Specifically, as far as I know, you'd need to request/commission a new plugin.
Thanks for your response, when I'm allowed to post a commission ad, I'll try to get one made in that case!
 

coyotecraft

Veteran
Veteran
Joined
Mar 13, 2012
Messages
191
Reaction score
118
First Language
English
Primarily Uses
I believe it can be done with a Battle Event or maybe a Common Event.
State messages can use "\V[]" to display variable values, so it's just a matter of changing the value to a string "was burnt to a crisp!" whenever a fire skill is used.

MZ has "last used data" that could make this easier. If last skill Id is "fire" "fire2" "Nova Flare" blah blah...set the killed message variable to "burnt to a crisp!"
...else, set to the default message "has fallen!"
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
3,178
Reaction score
1,878
First Language
English
Primarily Uses
RMMV
State messages can use "\V[]" to display variable values, so it's just a matter of changing the value to a string "was burnt to a crisp!" whenever a fire skill is used.
This is kind of at odds with your next suggestion. If you're doing this every time a skill is used, you wouldn't need/want to be doing troop events that check the last skill ID.
MZ has "last used data" that could make this easier. If last skill Id is "fire" "fire2" "Nova Flare" blah blah...set the killed message variable to "burnt to a crisp!"
...else, set to the default message "has fallen!"
That...could work. You'd need to set up several troop events for every troop in your game (I don't know if someone has written a "common troop event" plugin for MZ to make this easier) that set all the enemies immortal, then check for any of them to die, do conditionals to see what the last skill ID was, and set the variable string that the Knockout state uses before removing the immortal.

The trick is that if you have any reasonable number of skills in your game, it can get to be extremely unwieldy. If you're going the first route (for example, making every skill set that variable to a string in the damage formula), that's obviously tedious to add to every skill in the game.

If you're going the second route, using the troop event, then you'll have this huge, unwieldy event filled with potentially hundreds of conditionals to check the last skill ID and set the string in the event. (I think the damage formula is the less obnoxious of the two)

In order to get around that, you'd start using at least some script calls, and then it becomes one of those things that becomes way simpler to implement via plugin (write one function with a switch statement that displays the appropriate message if your skill has the <FireDeath> notetag, for example).

But you could do it in-engine.
 
Last edited:

MGGEDev

Veteran
Veteran
Joined
Mar 22, 2014
Messages
31
Reaction score
4
First Language
English
Primarily Uses
RMMZ
Thanks for the tips! I'll have a try to see if I can make something work in-engine, otherwise if it is too much of a headache I'll try to get a plugin commissioned :)
 

Latest Threads

Latest Posts

Latest Profile Posts

Awright ya marshmallows! :kaopride: Here's a peek of what Alice's 8-bit Gothic gonna be like! EXPECT IT! (...in 2025?) :kaoswt:

alice_gothictiles.png
SF_People3_4 added!
index.php

Finds notes for an old side project... Oh, that's right, the two tracks that sounded really cool and gave inspiration for the big bad in that game... Spends day working on cutscene from old notes, looks okay, now lets slot in the first track... um... I did have those tracks??? It was a year or so ago but I did buy them didn't I?
CA9mtHJ.gif

Everything is really confusing for me

Forum statistics

Threads
118,588
Messages
1,117,151
Members
155,655
Latest member
Pepperboi
Top