Actor ID in battle

I'm trying to delete default battle commands (attack or guard or item) from specific classes. E.g. Barbarian does not have Guard, and Priest does not have Attack.


Actually, I can disable them via class Trait - Seal Skill, but that would be rather rough, as these options will appear although grey-outed.


So, I am trying to add an if-condition into the function Window_ActorCommand.prototype.makeCommandList. E.g., if ($gameActors.actor(actorId).currentClass().id = 1)


...and I add any of 4 commands (attack, skill, guard, item) in any sequence.


However, I am stuck with how to define/alias actorID whom a player will be issuing a command in battle screen.


Kindly please advise.
I think you may want to use BattleManager.actor() instead 🙂
Or you can use YANFLY Weapon Unleash and add the notetag in che actor or class to replace  the attack and the guard with one skill...like heal for priest or a berserk like sel buff for barbarian.


Or maybe use Bobstah's battle commands customization
I think you may want to use BattleManager.actor() instead

Oh my god! I completely forgot about rpg_scenes.js!!!!


if (BattleManager.actor().currentClass().id == 1)


this solved everything!


Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/actor-id-in-battle.65960/