How to create an enemy with random skills?

Hi I was wondering if anyone knew of any plugins or another way to make one enemy have access to my entire database of
skills?

What I'm actually after is one enemy who when he is encountered has 5 random skills from the entire database of skills. So you could encounter this enemy over and over and he would always have different skills.

Does anyone know of anything that might help with this?

Thank you.
Try with troop event:
This should work.

Code:
var x = Math.floor(Math.random() * $dataSkills.length);
$gameTroop.members()[y].forceAction(x,-1);
BattleManager.forceAction($gameTroop.members()[y]);

-1 is random target
y - is number of battler in group
So just copy past this whole code into a troop event with like a script call?
Yes. Just like that

In my example enemy will use random skill from database every second turn:
1st turn - nothing
2nd turn - nothing
3rd turn - bang! Random Skill
4th turn - nothing
5th turn - nothing
6th turn - bang! Random Skill

etc
Oh I see, because you created the condition. So it does it every 2nd turn.

This is just about there, and I hate to bother you with you feeling dizzy and all......

....but the last thing I need from this is for it to assign only 4 skills from the database, and not the ability to use any skill each turn it triggers.

IE. When the enemy spawns it grabs 4 skills (possibly excluding a few from the list).

I thank you so much for your help as this is exactly what I'm looking for.

EDIT: Do not feel the need to take that upon yourself now if you're dizzy. I've got nothing but time! 😛
Hmm, pick only four random skills from database? If so then:
Code:
var x = Math.floor(Math.random() * $dataSkills.length);
var z = [x,x,x,x];
$gameTroop.members()[y].forceAction(z[Math.floor(Math.random() * z.lengh], -1);
BattleManager.forceAction($gameTroop.members()[y]);

But in troop event this code will always pick four random skills, so:
in first occurrence, your enemy can have for example:
- Fire Blast
- Sleep Dust
- Nova Frost
- Spirit Walk

and in next occurence your enemy will have much different skills (e.g)
- Last Will
- Lightning Strike
- Explosion
- Supreme Blade Dance

To avoid this flaw I would recommend on start of battle store skills in game variable and call them from that variable, so instead of reffering to z variable, you could reference to $gameVariables.value(varId)[IndexId]

Then this code would split into two parts:
Part 1
Part 2
Z variable will work just fine for what I'm trying to do. I'm going to put this in and give it a try.

You've been extremely helpful, thank you very much. I will post again after I've tested this all out.

EDIT: Oh wait, you mean on each turn it will refresh. Oh okay, I will try to store skills in a variable on battle start.
I edited my prev post with fix for that problem.
So I have a question......do you have paypal and how would you like to do like $20 worth of work on this problem for me? I'll pay you before you start. But I need a slightly more complex system than this which I will outline for you if you'd like to take on the task. I know you're not feeling well so I'm totally willing to pay you. 😛
@SesameChicken
I'm not feeling well because of my real job. Night shift is killing me (in last month they took me twice to hospital from my job), literally. Kinda I have pay-pal and I think I connected it with my game on Itch.io (My Game) and you can donate me through there if you are registered user on
itch.io then gladly I make you one. Foundations for that are already make 🙂

Original thread: https://forums.rpgmakerweb.com/threads/how-to-create-an-enemy-with-random-skills.115645/