Creating an ability point item and event (no plugin if possible)

I'm trying to add an extra "currency" similar to the JP (job points) that you get in Octopath Traveler. (You get a certain amount of jp after each battle, based on the enemy(s) encountered. In my game i plan on calling it AP, and you won't start to actually
collect it until you get the item for it, currently named the AP Card (I wanted to base the item off of the Coin Case you can
receive in Pokemon Gen 1-4)

The way I want to calculate AP collection is similar to how I've set up the EXP and Gold you receive from enemies:
EXP= (Base EXP x LV)/7

(Base EXP comes from the same stat in pokemon, though if I find an enemy in a different rpg whose stat spread I'd like I use that.)

I calculate gold based on the exp you're supposed to get from the monster you fight, rounded down: Gold=EXP/2 (so for enemies that drop, say 173 exp, I round down to 86.)

So the way I want to implement my calculations for AP theoretically could draw from that, either EXP/4, or Gold/2.
But I don't know how to event that on enemy death. Could I get some pointers on how to set up the event to draw up the variables, or should I take the easy way out and find a plugin?
You would have to make a troop event for every enemy in every troop. They'd all have to start with immortal states on, then when their HP hits 0% you add your amount then remove the state so they can die.

On the up side, you don't need to worry about a formula because you have to make this event for every enemy so you can simply type in how many points you want that enemy to give.

On the down side, you have to make this for every enemy in every troop in the game.

So I have no clue why you'd want to go through all that instead of just dropping in a plugin where you set the formula as a parameter and it just works 😉
ok, got any suggestions?

Original thread: https://forums.rpgmakerweb.com/threads/creating-an-ability-point-item-and-event-no-plugin-if-possible.165144/