• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our 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
  • 33
    Posts
    4
    Years
    • Seen Jun 19, 2024
    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.
     
    Sorry for the late response! Thanks so much for this though, I really appreciate the help!
     
    Back
    Top