• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
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