• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

Random Trainers 1.0

Pokémon Essentials Version
Non-applicable
Important: when I say "random Trainers" I mean "randomizing the trainers.txt file," not "procedurally generated whatever during runtime." It's for people like me who don't want to have to manually assign Pokémon to a hundred odd trainers rather than people who want a different experience every single save file.

Also this is just a Javascript script so if you want to change how it works feel free to do so.

How To Use

1. Save the code as random_teams.js or something similar to that. The file name can't contain spaces.

2. If you don't have it already, install NodeJS.

3. Create an input file. It looks a lot like a stripped-down version of trainers.txt, as:

ACETRAINER_M,Bob,0,4
CRUSHGIRL,Sarah,0,3


The arguments go like:

1. Trainer class
2. Trainer name
3. Battle ID
4. Number of Pokémon the trainer has


4. Open up random_trainers.js. You'll see a lot of arrays of Pokémon names (as strings) in a bunch of arrays named more or less after trainer classes. The arrays dictate what Pokémon each Trainer class can have; the ones I provided are from the game jam game I did, but you probably want to change them. For example, in a Kanto-based game birdkeeper would probably contain ["Pidgey", "Spearow"].

The code which actually does stuff is down at the bottom, in the event that you want to play around with that, too. It's commented fairly well, at least on my standards.

5. Open the command prompt. Run this command:

node random_teams.js input.txt output.txt

where random_teams.js is the file you saved, input.txt is the input file you created and output.txt doesn't strictly have to exist as the program should be able to create it for you.

6. Open output.txt. It should be an exactly functional version of trainers.txt, which you can do pretty much whatever with.

7. Enjoy the fact that you just spent ten minutes doing a task that could otherwise have taken two hours.

Note that the script so far generates everybody at Level 1. I may or may not address this in an update.
Credits
Me, I guess, plus whoever invented the trainers.txt file format
Author
Dragonite
Downloads
991
Views
2,264
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from Dragonite

Back
Top