Variable per enemy killed

Hello!

I can't check the engine right now since I am at work. I could probably figure it out myself.

But I have something that makes the amount of enemies in an encounter depend on party size, difficulty and random chance. And I don't want to use the RTP drop system and so I need to save how many enemies has been killed.

Currently I am adding a variable to each enemy that spawns. This is rather manual and I try to stray from everything manual. Is there anyway to just add an integer to a variable for each kill?

Perhaps I can query the amount of appearing enemies in the battle and set the variable to that amount?

Best regards,
Maybe this plugin by Shaz would work, it is for kill count and assigns kills to a variable.

Besides a plugin, you could probably use event pages in the battle troop to handle the variable increase, which could get tedious; however, Yanfly has a plugin that lets you copy a base troop event (it is part of the free bundle).
When sitting up variables, "Other" contains both Battle Count and Win Count.
@fluffymonster
True, but that option doesn't take into account an individual enemy kill.
@fluffymonster
True, but that option doesn't take into account an individual enemy kill.
True, but I can't see a reason for saving a kill. If you start a battle, then you only get the loot if you win, not escape. So I believe it would work well. With the solution from Fluffymonster, but I do like Shaz' plugins so might work for other things. Say monster level and such. I am a pat reon of Yanfly anyways so I will check it out.

Thanks for the responses, seems we solved it!
Ok cool, I'm glad that works. I guess when you said 'each kill' it threw me off. The easiest way would be @fluffymonster suggestion then if you just need it per battle.
Ok cool, I'm glad that works. I guess when you said 'each kill' it threw me off. The easiest way would be @fluffymonster suggestion then if you just need it per battle.
Seems you were correct, as I now had an opportunity to work with it. Battle count just returns the value of the total amount of battles the player has had. I do indeed need the value of how many enemies appear in a fight. It will roll for loot for each enemy defeated in a fight.

Best regards,

Original thread: https://forums.rpgmakerweb.com/threads/variable-per-enemy-killed.123845/