• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
Voltseon's Trainer Generator

v20.1 Voltseon's Trainer Generator v1.1

This resource pertains to version 20.1 of Pokémon Essentials.
Pokémon Essentials Version
v20 ➖
Voltseon's Trainer Generator
Generate random trainers through script

As the title suggests, this script allows you to generate completely random trainers based on your configuration data. It will automatically generate trainers their teams based on that trainer class its preferred types or species. Everything is configurable in the config file, such as a whitelist / blacklist of species, a whitelist of items.
This could eliminate the need for PBS data, depending on what type of game you are planning on making.

The config file is found as '001_Config.rb' in Plugins/Voltseon's Trainer Generator

The script provides a list of 1.2k male names, 4.2k female names and almost 200 unisex names. When generating a trainer it will grab a random name from these lists.

You can call a random trainer battle with the following command:
vGenerateTrainer(eventID,items,levels,partySize,nameVar,classVar,genderVar,eventVar)

  • Event ID will be the ID of the trainer event, it will automatically set that event's graphic to that of this trainer's
  • Items is a min-max range of the amount of items that trainer will use ([0,0] means no items will be used)
  • Levels is the same as items but for levels, so [10,20] will mean it will have pokemon between the levels 10 and 20
  • Party size is a min-max range for how big their party can be, for completely random size use [1,6]
  • Name Variable is the variable number in which the trainer's name will be stored
  • Class Variable is the same, but it stores the trainer class
  • Gender Variable stores 0 or 1 based on the gender (0 = male, 1 = female)
  • Event Variable stores the actual event of the trainer, it is important to clear this after the battle as it may cause issues
An example of the script in use:



The script comes with an example map, which is similar to the one in the example video above, if you are unsure how to implement the example map to your game, please read the 'Readme.txt' file provided with the download.

Note, the script makes use of a common event that takes place before the trainer battle starts, but after the trainer is generated. Anything that happens in that common event would be your 'animation' between the trainer being generated and the actual battle commencing.
The Common Event that is used can be set in the config file.

If you would like to see the trainer generator working in a game, I recommend taking a look at Pokémon and the Last Wish Part II, where it is used in the post game's 'Endless Tournament'.
Credits
Voltseon
Author
Voltseon
Downloads
823
Views
6,148
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Voltseon

Latest updates

  1. v1.1 - Now updated for Pokémon Essentials v20

    Updated methods for v20
Back
Top