I'm trying to use Yanfly's Stat Allocation plugin. I want to make my characters have initial AP, because at the beginning the game asks you which character stat do you want to upgrade. Like at the beginning of some games like Shin Megami Tensei. Can you help me?
Help with Stat Allocation
Javascript/Plugin SupportYou can use the following script calls to give actors extra AP to use;
Add Ap to current total:
var actor = $gameActors.actor(actorId);
actor.gainBonusAp(x, classId);
Replace 'actorId' with the ID of the actor you wish to affect.
Replace 'x' with the amount of AP you wish to apply to the actor.
Replace 'classId' with the ID of the class you wish to give AP to.
You can keep 'classId' as 0 to make it affect the actor's current class.
Set Ap to a specific value:
var actor = $gameActors.actor(actorId);
actor.setBonusAp(x, classId);
Replace 'actorId' with the ID of the actor you wish to affect.
Replace 'x' with the amount of AP you wish to set the actor's AP to.
Replace 'classId' with the ID of the class you wish to set the AP to.
You can keep 'classId' as 0 to make it affect the actor's current class.
Plugin Command:
OpenStatAllocate x
This will open up the stat allocation menu for the party member whose
index is equal to x. 0 is the first slot. So,
OpenStatAllocate 0
will open the stat allocate menu for the first actor in the database.
Add Ap to current total:
var actor = $gameActors.actor(actorId);
actor.gainBonusAp(x, classId);
Replace 'actorId' with the ID of the actor you wish to affect.
Replace 'x' with the amount of AP you wish to apply to the actor.
Replace 'classId' with the ID of the class you wish to give AP to.
You can keep 'classId' as 0 to make it affect the actor's current class.
Set Ap to a specific value:
var actor = $gameActors.actor(actorId);
actor.setBonusAp(x, classId);
Replace 'actorId' with the ID of the actor you wish to affect.
Replace 'x' with the amount of AP you wish to set the actor's AP to.
Replace 'classId' with the ID of the class you wish to set the AP to.
You can keep 'classId' as 0 to make it affect the actor's current class.
Plugin Command:
OpenStatAllocate x
This will open up the stat allocation menu for the party member whose
index is equal to x. 0 is the first slot. So,
OpenStatAllocate 0
will open the stat allocate menu for the first actor in the database.
Thank you
Original thread: https://forums.rpgmakerweb.com/threads/help-with-stat-allocation.121483/