MZ How to store the troop ID of a given battle in a variable?

Any clues?
when and where do you want to use that?

Because the simplest solution is probably not what you want, make a troop event with a different control variable to set the number into every troop...
But in other cases the solution depends on what and how the battle is called and so on...
I Googled "RPG Maker MV current troop id" and got: $gameVariables.setValue(X, $gameTroop._troopId); where X is the variable you want to store it in.
Thanks!

@Andar I need it to apply a certain effect to a given group of troops (imagine ones with ID > 50 for instance).

Original thread: https://forums.rpgmakerweb.com/threads/how-to-store-the-troop-id-of-a-given-battle-in-a-variable.137368/