• 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!
Modifying Egg Generation

Tutorial Modifying Egg Generation N/A

TechSkylander1518 submitted a new resource:

Modifying Egg Generation - Spice up the Day Care a bit by adding new possibilities for eggs!

The daycare is useful for competitive breeding- but all the Pokemon are almost always identical to the mother! How boring! Let's come up with some ways to let players get creative with breeding!




This tutorial is currently for v19, but I'll get around to showing how this works in v18! (It's very similar, though, just some calls being changed)

First things first, let's take a look at what's already there in Essentials!

Ruby:
Expand Collapse Copy
  # Determine the egg's species...

Read more about this resource...
 

sapphirechuu

Rookie
Member
Joined
Mar 13, 2023
Posts
8
I know this is super old now but I want the generated egg to always be a random decision between the two parents (except in the case of Ditto). How would that have to be coded? I don't know if I'm just missing something or overcomplicating but I can not figure it out. 😅
 
Looks like this line in Overworld_DayCare determines which parent gets picked for the baby species -
Ruby:
Expand Collapse Copy
      # Determine which parent the egg's species is based from
      species_parent = (mother_data[1]) ? father : mother

So you could just make that sample an array instead -
Ruby:
Expand Collapse Copy
      # Determine which parent the egg's species is based from
      species_parent = [father,mother].sample

It'll still pass species_parent to determine_egg_species, so it'll go through the checks of items (for incense), variable offspring, etc.
 

sapphirechuu

Rookie
Member
Joined
Mar 13, 2023
Posts
8
Looks like this line in Overworld_DayCare determines which parent gets picked for the baby species -
Ruby:
Expand Collapse Copy
      # Determine which parent the egg's species is based from
      species_parent = (mother_data[1]) ? father : mother

So you could just make that sample an array instead -
Ruby:
Expand Collapse Copy
      # Determine which parent the egg's species is based from
      species_parent = [father,mother].sample

It'll still pass species_parent to determine_egg_species, so it'll go through the checks of items (for incense), variable offspring, etc.
Suuuuuuuuuuper late but I was finally able to check this and it works like a charm, thank you so much <3
 
Back
Top