• 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.
  • There is an important update regarding account security and 2FA. Please click here for more information.
  • Our Witching Week events are now on! If you'd like to participate in some fun activities with the community, check out the list of events!
  • 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.
  • Imgur has blocked certain regions from viewing any images uploaded to their site. If you use Imgur, please consider replacing any image links/embeds you may have on PokéCommunity so everyone can see your images. Click here to learn more.

[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