MV Yanfly Stat Allocation (YEP 173): How do you grant AP?

This might be a basic question, but I am having trouble figuring it out even after watching the Yanfly Youtube video on Stat Allocation and reading through the documentation.
How do you grant AP to the player to use in the first place?

For instance, under Enemy Settings, after an enemy is defeated you can grant Rewards (Experience and Gold) and you can Drop Items for the player. Am I able to to run a plugin command or script to allocate a specific amount of AP to the player in the same way that I am rewarding them Exp and Gold after they destroy an enemy? If so, could someone tell me how to do this exactly? Such as what the script or plugin command should look like, and where I am supposed to implement it?

Example: After the player defeats a bat, I want to grant him 10 XP, 10 Gold, and 10 AP. How would I grant the 10 AP?

From reading the documentation, I understand that there is the following script:

var actor = $gameActors.actor(actorId);
actor.gainBonusAp(x, classId);

But I am not sure where exactly this is supposed to be placed, and my understanding is that it is mostly about giving bonus AP. My main question though, is how do I grant specific amounts of AP to the player in the first place?
Bump
Try going to the troops tab in the database, and set up an event command to run the script?
Note that the 'gainbonusap' function doesn't actually work - it instead SETS your AP to the given value.

Here's the bugfix I put into FOSSIL.
Code:
		var fixStatAllocationGainBonusAp=Game_Actor.prototype.gainBonusAp ;
		//default the classId to be 0 (ie: current class) if not specified.
		Game_Actor.prototype.gainBonusAp = function(value, classId=0) {
			classId == 0? arguments[0]+=this.bonusAp() : arguments[0] +=this._bonusAllocationPoints[classId];
			fixStatAllocationGainBonusAp.apply(this,arguments);
		};

As for the intended way for actors to get AP, by default they get it as a consequence of level. See the "AP Formula" parameter, the default is (level-1)*5, so a level 2 character would have 5 AP, level 11 would have 50, etc.

Perhaps the easiest way to grant fixed AP per monster would be to have a 'hidden' item dropped by monsters which represents 1 AP, and set your AP formula to count how many of that hidden item the player has in inventory.

You'll obviously need to increase inventory size if you want more than 99 AP possible, but that's an easy plugin tweak, and using items in your formula allows for some other options as well (like making it so you can only get AP from the first time you defeat a given monster species, or something like that)

Original thread: https://forums.rpgmakerweb.com/threads/yanfly-stat-allocation-yep-173-how-do-you-grant-ap.136116/