battle question

Is there a way for the game to detect exactly when you kill an enemy and increment a variable or call an effect based on that? I was thinking of having a skill or item that would give a bonus effect if you used it to get the last hit and kill an enemy; for example a sword where every time you kill an enemy with it it gets more powerful (until the end of the battle, then it resets), or a skill where if you kill an enemy with it you get an immediate free hit against an additional random enemy.
of course - that is what the troop events are for.

There is one quirk that makes this a bit tricky - if the last enemy dies, the battle ends before the troop event is executed for that last enemy, but there is a long-known workaround to that using an immortal state to force the game into the troop events before killing the enemy.
Just search for that options, there are several explanations on it around the forum.
Does that mean you need to copy-paste the events into every battle?
copying the events on each battle is one way.
another way is tapping into the actual death event itself, and collecting the data of the dead enemy.
you'll need some scripting knowledge, but it's a one-time fix that will always work.
You can use yanfly's base troop events,
to make it into one troop event and have it apply to all troops.
Ok so I don't think the normal troop events are going to cut it. It will track when any individual enemy gets to 0 hp, but it doesn't track who killed it, or with what. Specifically I need an event that will activate on the trigger of a specific weapon killing any enemy, or a specific ability/spell.
then you need a plugin - with events you can only track if an enemy was killed, not how.
(theoretically even tracking how might be possible, but that would require a big mess of damage code switches and not be a good solution).

As the original request is very low on details, I don't think moving this topic to plugin requests would help much.

@Hautamaki please make a new topic in plugin requests, giving more details.

At minimum you'll need a list of everything you want to track, and a list of every possible results - because each such option will probably require a different code section added to the plugin.
OK thanks very much. I was hoping there was something simple I was missing but I guess not!

Original thread: https://forums.rpgmakerweb.com/threads/battle-question.78903/