• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Scripting Question] Egg level range? (v17.2)

Scraps The Man

Crystal Collector
  • 34
    Posts
    5
    Years
    • Seen Jun 19, 2025
    I have a small problem where I would love eggs to have a level range where they could be anywhere from level 10-20, but I am new to coding so I have no idea on how to do this. If anyone knows I would appreciate it, but there is no rush since I can always just make my game without it! Thanks in advance!
     
    Head over to script PField_Daycare , CTRL F the following.

    Code:
    egg = pbNewPkmn(babyspecies,EGG_LEVEL)

    EGG_LEVEL is defined as "5" in earlier script, but changing EGG_LEVEL range there won't achieve the effect you're looking for.

    Instead do something like,

    Code:
    egg = pbNewPkmn(babyspecies, rand(10..20) )

    Where 10 is the lowest lvl an egg can be, and 20 is the highest.

    This is the 'basic' edit. To get everything else working, you'd need to search the script for EGG_LEVEL and see where it may conflict.
     
    Back
    Top