Random Pokémon

Generate random Pokémon data

Overview

This node generates a list of random Pokémon data. It allows users to specify how many Pokémon to generate and optionally filter the selection by Pokémon type and color. This is useful for scenarios such as creating randomized Pokémon datasets for games, quizzes, or educational tools where you want a varied but controlled sample of Pokémon.

For example, you could use this node to:

  • Generate 10 random Pokémon of any type and color.
  • Generate 5 random Pokémon filtered only to "Fire" and "Water" types.
  • Generate 3 random Pokémon that are specifically "Red" or "Blue" in color.

Properties

Name Meaning
Number of Pokémon How many random Pokémon to generate?
Filter by Type Filter Pokémon by their type. Options include: Unrestricted, Normal, Fire, Water, Electric, Grass, Ice, Fighting, Poison, Ground, Flying, Psychic, Bug, Rock, Ghost, Dragon, Dark, Steel, Fairy. Leave empty for no filter.
Filter by Color Filter Pokémon by their color. Options include: Unrestricted, Black, Blue, Brown, Gray, Green, Orange, Pink, Pinkish, Purple, Red, White, Yellow. Leave empty for no filter.

Output

The output is an array of JSON objects, each representing a Pokémon with its full data fields as defined in the bundled pokemonData.json. The output is sorted by Pokémon ID in ascending order.

Example structure of one item in the output array:

{
  "json": {
    "id": 1,
    "name": "Bulbasaur",
    "type": ["Grass", "Poison"],
    "color": "Green",
    ...
  }
}

No binary data is output by this node.

Dependencies

  • The node relies on a local JSON file containing Pokémon data (pokemonData.json), which must be bundled with the node.
  • No external API calls or services are required.
  • No special environment variables or credentials are needed.

Troubleshooting

  • Empty output: If filters are too restrictive (e.g., filtering by a type and color combination that does not exist), the output may be empty. Try loosening or removing filters.
  • Invalid number input: Ensure the "Number of Pokémon" property is a positive integer. Negative or zero values will result in no output.
  • Filter options: Selecting the "Unrestricted" option (empty string) alongside other filter values may cause unexpected behavior; it is best to either leave the filter empty or select specific values.

Links and References

Discussion