• 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!
Random Egg Generator

v19 Random Egg Generator N/A

This resource pertains to version 19 of Pokémon Essentials.
Pokémon Essentials Version
v19.1 ➖
Quick, simple script that generates an egg that can hatch into any species in the PokeDex. (If you're needing the Galar mons, check out the Gen 8 Project)

Paste in a new script section above main:
Ruby:
Expand Collapse Copy
RANDOMSTEPS = 10000

def pbGenerateRandEgg(text = "")
  return false if $Trainer.party_full?
  pool = []
  GameData::Species.each { |species| pool.push(species.id) if species.form == 0 }
  pkmn = pool[rand(0,pool.length)]
  pkmn = Pokemon.new(pkmn, Settings::EGG_LEVEL) if !pkmn.is_a?(Pokemon)
  # Set egg's details
  pkmn.name           = _INTL("Egg")
  pkmn.steps_to_hatch = RANDOMSTEPS
  pkmn.obtain_text    = text
  pkmn.calc_stats
  # Add egg to party
  $Trainer.party[$Trainer.party.length] = pkmn
  return true
end

The value RANDOMSTEPS at the top sets the number of steps for the egg to hatch. (It's 10,000 steps here, but you can easily change it to whatever you'd like)

Just like when giving a regular egg, you'll use it in a conditional branch to add it to the player's party. The only change is that now you only set the text, rather than setting the species.
1629324741438.png



FAQ

Q: It's not as fun to hatch a bunch of Pokemon instead of exploring new locations to find them!

A: But you get to obtain all the Pokemon. Isn't that more important than fun gameplay?

Q: There's no lore or anything to the legendaries, they're just handed to me by an NPC!

A: But you get to obtain all the Pokemon. Isn't that more important than story and lore?

Q: It's so tedious to hatch these eggs, and it'll take forever to get the Pokemon I want if it's randomized like this!

A: But you can obtain all Pokemon. Isn't that the most important thing about Pokemon games?



For a more genuine resource like this, check out ThatWelshOne_'s Random Pokemon Selector or Luka SJ's Randomizer X.
Credits
Code is adapted from Luka SJ's Randomizer, so credit goes to him!
Author
TechSkylander1518
Views
3,225
First release
Last update

Ratings

0.00 star(s) 0 ratings

More resources from TechSkylander1518

Back
Top