Advertiser Content

Scripting Question Shadow Pokemon Evolve

Started by mrbrandino October 30th, 2019 11:10 PM
  • 910 views
  • 2 replies
Seen 4 Weeks Ago
Posted 4 Weeks Ago
6 posts
182 Days
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

England
Seen 4 Days Ago
Posted 4 Days Ago
5,199 posts
11.9 Years
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).
Go to the Essentials Docs Wiki

Essentials Docs Wiki

Follow me on Twitter: @maruno42


Seen 4 Weeks Ago
Posted 4 Weeks Ago
6 posts
182 Days
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.
Advertiser Content