• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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] Shadow Pokemon Evolve

10
Posts
4
Years
    • Seen Jul 25, 2020
    Is there any way to have a Shadow Pokemon be able to evolve and still retain its Shadow form?

    My idea is that I can run a check on how much experience the said Pokemon has at any given time and then have it evolve when it reaches the same amount of experience that it would have if it weren't a Shadow Pokemon and it was evolving at its normal level. All of my Shadow Pokemon will be color variations like Shadow Lugia, so I assume I will have to have separate forms and have a branch to evolve and keep the Shadow form.

    Can anyone guide me through how to script this and make it happen? Through trial and error, I'm able to figure some scripting out on my own, but I'm definitely not fluent with it. Any help is greatly appreciated.

    Thanks!
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    The point of Shadow Pokémon is that they don't get stronger. They're made strong by becoming Shadow Pokémon, but then they can't grow further either by gaining Exp or evolving.

    If you must, then I believe you primarily only need to look in def pbEvolutionCheck and change some code there. Specifically, you'd want to modify the longest line, which checks whether the Pokémon has changed its level since the start of battle; you'd want to add something like "or, if it's a Shadow Pokémon, do its current Exp plus its stored Exp combined mean it has theoretically changed its level?". You may also need to change a couple of other places to record the "current Exp plus stored Exp" amount for Shadow Pokémon (rather than simply "current Exp" as it does now) to make the comparison easier.

    Shadow Pokémon can already evolve if traded or if an evolution stone is used on them (which is a bug; thanks for drawing my attention to it; I've fixed that for Essentials v18).
     
    10
    Posts
    4
    Years
    • Seen Jul 25, 2020
    The point of Shadow Pokémon is that they don't get stronger. They're made strong by becoming Shadow Pokémon, but then they can't grow further either by gaining Exp or evolving.

    If you must, then I believe you primarily only need to look in def pbEvolutionCheck and change some code there. Specifically, you'd want to modify the longest line, which checks whether the Pokémon has changed its level since the start of battle; you'd want to add something like "or, if it's a Shadow Pokémon, do its current Exp plus its stored Exp combined mean it has theoretically changed its level?". You may also need to change a couple of other places to record the "current Exp plus stored Exp" amount for Shadow Pokémon (rather than simply "current Exp" as it does now) to make the comparison easier.

    Shadow Pokémon can already evolve if traded or if an evolution stone is used on them (which is a bug; thanks for drawing my attention to it; I've fixed that for Essentials v18).

    Thanks for your help! And you're also welcome for inadvertently pointing that bug out for you lol

    The main reason I want to have evolution be possible for Shadow Pokemon is only really for the player's amusement. I plan on having all Pokemon like Shadow Lugia, in that they're a different form altogether, and I thought it would be cool to have the option to keep them that way, and also see what their evolutions would look like in Shadow form. I still don't want them to level up, but only jump to whatever level they're required to be at for evolution, then be stuck at that level too, if that makes sense.

    There's a good chance I won't even be able to pull it off since there may be other places in the script that have to be found and changed, but the changes seem simple enough, so I'll give it a shot.
     
    Back
    Top