- Pokémon Essentials Version
- v21.1 ✅
This is a simple plugin that starts a battle against a team that was randomly picked from a list of pre-defined Pokémon.
The opponent name, class and other properties are hardcoded but it can easily be replaced by parameters as well to make it more dynamic.
How to use:
In your event commands simply call this script "pbRandomTeamGenerator(3)" -> 3 being the opponent team size.
It will pick 3 unique Pokémon from the list defined in the plugin and start a battle against it.
Right now it's possible to change some properties of the Pokémon such as level, ability, moves, held item and nature, but it should be possible to change other properties following the same logic.
In Inritum we are using this plugin to power an EV/XP training feature, to generate different battles every time we use it instead of just beating the crap out of audinos.
If you don't want to use plugins, it's a single method that can be added elsewhere in your code.
The opponent name, class and other properties are hardcoded but it can easily be replaced by parameters as well to make it more dynamic.
How to use:
In your event commands simply call this script "pbRandomTeamGenerator(3)" -> 3 being the opponent team size.
It will pick 3 unique Pokémon from the list defined in the plugin and start a battle against it.
Right now it's possible to change some properties of the Pokémon such as level, ability, moves, held item and nature, but it should be possible to change other properties following the same logic.
In Inritum we are using this plugin to power an EV/XP training feature, to generate different battles every time we use it instead of just beating the crap out of audinos.
If you don't want to use plugins, it's a single method that can be added elsewhere in your code.
- Credits
- Robonox for the idea where to use this mechanism
Lunardoof from Thundaga's server for helping me how to create a trainer programatically.