Change enemy EXP through troop events?

Is there anyway to dynamically change the EXP that a troop gives you? I’m thinking about an event with a goblin mage that you can challenge again and again, becoming stronger with each challenge. The “becoming stronger” part is facilitated by simply adding a value to the base stats at the start of the battle, in the troop events.

The bonus I’m currently doing outside the battle (the EXP bonus being goblin “level” squared), but it feels disjointed…
The “becoming stronger” part is facilitated by simply adding a value to the base stats at the start of the battle, in the troop events.
Well, you could similarly modify the enemy's database entry for exp in the same event.
Code:
$dataEnemies[ID].exp=whatever
You'll just need to be using a game variable or something to track how many times you've met because the game won't save your changes to the database.
Thanks for the help, I'll try that!

If you happen to know... For the stats, I am planning on using $gameTroop.members()[0].addParam(bla) at turn 0, because I did not want to affect "all" goblins, just this one "golbin sensei". Is my understanding correct that if you tweak $dataEnemies[] that you will affect all future instances of the enemy in question?

It's easy enough to make a copy of the goblin just for this particular event, but I was just wondering about the mechanics.

EDIT: tested it and works like a charm! Thanks a lot. And apologies, I was only looking at the "MZ Script Calls" sheet and had not noticed there exists a separate "MZ Script Call Reference" that contains the info that I needed.
For the stats, I am planning on using $gameTroop.members()[0].addParam(bla) at turn 0, because I did not want to affect "all" goblins, just this one "golbin sensei". Is my understanding correct that if you tweak $dataEnemies[] that you will affect all future instances of the enemy in question?
Correct, $dataEnemies is the database that stats are referenced from, where anything in the $gameTroop is a Game_Enemy object that has specific instances.

However, as exp is not intended to be mutable, it's always referenced in the code from the $dataEnemies array.

So you would either use some troop events every place that your goblin spawns to determine whether it's the "goblin sensei" and modify its experience back and forth;

Or just make a second copy of the enemy for its own troop and you know that enemy ID is always your sensei;

Or rewrite the engine's code to copy the experience from the database entry into a member variable on the Game_Enemy object, then reference that when generating battle rewards.

I think 2 is probably the easiest, just make a second version of the goblin and you know you can mess with it without interfering with other goblins.

Original thread: https://forums.rpgmakerweb.com/threads/change-enemy-exp-through-troop-events.158387/