- 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:
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.
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.
Paste in a new script section above main:
Ruby:
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.
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!