MZ Adding skills to enemies in battle.

Can a state add a skill to enemies? I have a state with the skill trait ADD SKILL TYPE and ADD SKILL. But upon adding the state to an enemy, the function $gameTroop.members()[0].skills() won't show the skill added from the state.

How can I properly do this?
No. Enemy's only use skills as assigned in their Action Pattern - even if you gave them a skill via a state, how would they determine whether to use it or not?

For anything beyond that, you'd have to look at an Enemy AI plugin.
You can give an enemy a hidden status effect, when they're under the condition of that status effect, they're able to use said skill. (does this for their own game)
You can give an enemy a hidden status effect, when they're under the condition of that status effect, they're able to use said skill.
How?

1733113399682.png


The list of actions the enemy can choose from is taken directly from its database entry - this.enemy().actions

Edit: Oh, I think you're saying to include the skill in their Action Pattern with a condition of having the state for its use?
You can give an enemy a hidden status effect, when they're under the condition of that status effect, they're able to use said skill. (does this for their own game)
Does this mean I have to add all the skills to the database manually? The feature I'm working on is several skills for all the enemies of the game, so I want to make this a dynamic add.

But now that you told me this, I'll probably look at modifying the skill of the enemy using action sequences. If I can't, I'll probably just look at Enemy AI plugins as ATT_Turan said.

Original thread: https://forums.rpgmakerweb.com/threads/adding-skills-to-enemies-in-battle.173614/