This datapack is adding a function to spawn a random trainer with random pokemon.
The random pokemon are based on the battle tower in sword and shield (not completely, but as far as possible).
You can configure how many pokemon the trainer should have (1-6)
You can configure if the trainer should be able to do special evolutions (dynamxing, mega or none)
And you can configure the encounter mode (once per player, once per day etc.).
Disclaimer: this datapack is currently in Alpha, so use at your own risk. I tested in my single player worlds successfully without any problems.
How to install:
Copy the zip file to you're worlds datapack folder and unzip it.
How to use:
The datapack is adding some functions:
- Spawn a random trainer:
- /function larielsrandomtrainer:randomtrainer
- Set the number of pokemon the random trainer has to 1-6:
- For 1: /scoreboard players set @s larielsEncMode 1
- For 2: /scoreboard players set @s larielsEncMode 2
- etc.
- Set the encounter mode (range 0-4)
- Once: /scoreboard players set @s larielsEncMode 0
- Once per player: /scoreboard players set @s larielsEncMode 1
- Once per MC day: /scoreboard players set @s larielsEncMode 2
- Once per day: /scoreboard players set @s larielsEncMode 3
- Unlimited: /scoreboard players set @s larielsEncMode 4
- Set the special evolution (range 0-3)
- No speciel evolution: /scoreboard players set @s larielsHasMega 0
- Mega Ring: /scoreboard players set @s larielsHasMega 1
- Dynamax: /scoreboard players set @s larielsHasMega 2
- Worldsetting: /scoreboard players set @s larielsHasMega 3