• 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.
Random Pokémon selector

v20.1 Random Pokémon selector 1.0.1

This resource pertains to version 20.1 of Pokémon Essentials.
Pokémon Essentials Version
v20.1 ➖
Another small, yet fun, script from me. This time, a means of giving the player a random Pokémon, mainly created with the starter selection event in mind, but it can work whenever the player is given a gift Pokémon. I thought it might be fun for the player to have a fourth, random option when picking their starter!

Features
  • As customisable as you want to make it.
  • Specify "white list" of Pokémon from which to choose.
  • Specify "black list" of Pokémon to be excluded. I've included an option for a default black list that contains all legendary/mythical Pokémon.
  • Option to select only unevolved Pokémon.
  • Choose which generation from which a Pokémon is drawn.

Installation (v20/20.1)
1. Download the .zip file from the MediaFire link by clicking on "Go to download" in the top right of this page.
2. Once downloaded, open the .zip file.
3. Drag the folder you see into your project's main folder (where you have Game.exe), allowing it to merge with your existing Plugins folder. And that's it!

Here's the v19/19.1 compatible version if anyone wants it.

How to use
The most basic way to use this script is to simply call pbChooseRandomPokemon, for example:
Ruby:
Expand Collapse Copy
pkmn = pbChooseRandomPokemon
pbAddPokemon(pkmn, 5)
The first line returns the symbolic name of a randomly selected unevolved Pokémon from generations 1-8 (including legendary/mythical Pokémon). The second line gives the player this Pokémon at level 5.

The first line in the block of code above is equivalent to the block of code pasted below.
Ruby:
Expand Collapse Copy
pkmn = pbChooseRandomPokemon(
whiteList=nil,
blackList=nil,
addList=nil,
base_only=true,
use_gen=nil)
Each option is explained as follows:
  • whiteList should be nil or an array of species names, for example [:BULBASAUR,:CHARMANDER,:SQUIRTLE]. This option allows you to restrict what species can be selected. If nil, all species not on the black list are fair game.
  • blackList should be nil, "suggested" or an array of species names. This option allows you to exclude certain species from the random selection. If nil, nothing is excluded. If "suggested", all legendary/mythical Pokémon will be excluded. Note: the black list trumps the white list.
  • addList is a second black list and mainly exists for when you want blackList="suggested" AND you want other species to be excluded. This option should be nil or an array of species names, as above.
  • base_only should be true or false. This option allows you to restrict the random selection to unevolved Pokémon (true) or any Pokémon (false). If this option is true and you have evolved Pokémon in your whiteList option, they will be ignored.
  • use_gen should be nil or an array of numbers from 1 to 8 (inclusive). This option restricts the random selection to species from the corresponding generations. If nil, Pokémon from all generations are included. Important! Even if you only want Pokémon from a single generation, you should still set this option as an array, for example use_gen=[5] to draw from Unovan Pokémon. You would do use_gen=[1,2] if you want Pokémon from Kanto and Johto, as another example. Note: whiteList trumps this option.

I appreciate that that wall of text might only make sense to me, so please do ask questions in the Discussion section or contact me via Discord (ThatWelshOne_#3324). I'm always happy to help where I can.

I'm also happy to receive feedback and suggestions if you have any.

As always, thanks for reading!
Credits
Feel free to credit ThatWelshOne_ if used.
Author
ThatWelshOne_
Downloads
937
Views
7,282
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from ThatWelshOne_

Latest updates

  1. Updated for v20/20.1 compatibility

    This one already worked in v20/20.1 but updating for fun!
Back
Top