- Pokémon Essentials Version
- v19.1 ➖
NPC TRADE EVOLUTION
Hi everyone! IKazart here!
You know those pokemons which evolve only by trading? Such as Kadabra, Haunter, Magmar, Gurdurr, etc.
Well, if you are making a Single Player Pokemon Game, you must watchout for that.
Luckly, you already found the solution! The NPC Trade Evolution Script!
This script creates a function called TradeEvolution(). When you call this function it you ask for a Pokemon to be evolved. If that Pokemon has the correct item to evolve, it will.
This lets you create a NPC that evolves your Pokemon! No need to trade!
INSTALLATION:
- Open the Script Editor on your RPG Maker
- Create another script class above Main (just to keep it organized, you don't have to)
- Copy the script that follows
- Paste it on the new class you've created (or in Main)
USAGE:
Just call the TradeEvolution() function on the Script when creating an event.
COMPATIBILITY:
Pokemon Essentials v19.1
SCRIPT:
Ruby:
# =============================================================================
# IKazart's NPC Trade Evolution
# Version 1.0 - Compatibility: Pokemon Essentials v19.1
# Contact: Send me a message on Discord: IKazart#6758
# =============================================================================
if !PluginManager.installed?("NPC Trade Evolution")
PluginManager.register({
:name => "NPC Trade Evolution",
:version => "1.0",
:link => "https://reliccastle.com/resources/845/",
:credits => "IKazart"
})
end
def TradeEvolution()
if $Trainer.pokemon_count == 0
pbMessage(_INTL("There is no Pokémon."))
return 0
end
annot = []
for pkmn in $Trainer.party
elig = pkmn.check_evolution_on_trade(self)
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
end
pbFadeOutIn {
scene = PokemonParty_Scene.new
screen = PokemonPartyScreen.new(scene,$Trainer.party)
screen.pbStartScene(_INTL("Select a Pokemon."),false,annot)
loop do
chosen = screen.pbChoosePokemon
if chosen<0
screen.pbEndScene
break
end
pkmn = $Trainer.party[chosen]
newspecies = pkmn.check_evolution_on_trade(self)
if newspecies
screen.pbEndScene
pbFadeOutInWithMusic {
evo = PokemonEvolutionScene.new
evo.pbStartScreen(pkmn,newspecies)
evo.pbEvolution(false)
evo.pbEndScreen
}
break
else
pbMessage(_INTL("I can't evolve this Pokemon."))
end
end
}
end
- Credits
- IKazart