• 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.

Forced Evolutions

1,224
Posts
10
Years
  • Just a handy little script I made for testing purposes, I will also show you how to add it to your debug options in the party scene.

    Main script
    Code:
    def pbForceEvo(pokemon)
      for form in pbGetEvolvedFormData(pokemon.species)
        newspecies=form[2]
      end
      return if !newspecies
      if newspecies>0
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution
        evo.pbEndScreen
      end
    end

    To add it into your pokemon's options, go to pbPokemonDebug in PokemonParty and add this red part into the commands
    Code:
    [email protected](_INTL("Do what with {1}?",pkmn.name),[
             _INTL("HP/Status"),
             _INTL("Level"),
             _INTL("Species"),
             _INTL("Moves"),
             _INTL("Gender"),
             _INTL("Ability"),
             _INTL("Nature"),
             _INTL("Shininess"),
             _INTL("Form"),
             _INTL("Happiness"),
             _INTL("EV/IV/pID"),
             _INTL("Pokérus"),
             _INTL("Ownership"),
             _INTL("Nickname"),
             _INTL("Poké Ball"),
             _INTL("Ribbons"),
             _INTL("Egg"),
             _INTL("Shadow Pokémon"),
             _INTL("Make Mystery Gift"),
             _INTL("Duplicate"),
             _INTL("Delete"),
             [COLOR="Red"]_INTL("Force Evo"),[/COLOR]
             _INTL("Cancel")
          ],command)

    Right below that replace the 21 here with 22
    Code:
    case command
            ### Cancel ###
            when -1, 21
    And inside the case statement (after "when 20") add
    Code:
    ## Force Evolution##  
            when 21  
              pbForceEvo(pkmn)
              pbHardRefresh

    Note that this doesn't have support for choosing options when you have pokemon with multiple evolutions (i.e. Eevee), so it will choose the last one listed in pokemon.txt .

    Edit: Via AlexTCGPro's request, methods to de-evolve pokemon, both by one stage and by all stages.

    One stage
    Code:
    def pbForceDeEvo(pokemon)
      newspecies=pbGetPreviousForm(pokemon.species)
      return if !newspecies
      return if newspecies==pokemon.species
      if newspecies>0
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution
        evo.pbEndScreen
      end
    end
    All stages
    Code:
    def pbForceBabyEvo(pokemon)
      newspecies=pbGetBabySpecies(pokemon.species)
      return if !newspecies
      return if newspecies==pokemon.species
      if newspecies>0
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution
        evo.pbEndScreen
      end
    end
     
    Last edited:

    Zeak6464

    Zeak #3205 - Discord
    1,101
    Posts
    11
    Years
  • well looks like a new script to be added to v15 of Essentials I hope !
    Keep the great work !
     
    56
    Posts
    10
    Years
    • Seen Jun 12, 2018
    You think this could be modifyed to make a pokemon de-evolve? (return to its previous form)
     
    11
    Posts
    12
    Years
    • Seen Jun 1, 2018
    Any ideas on how to make this in-game usable? Like, for example, you pay or you deliver some item, and then the NPC evolves your pokemon (with a selection screen)
     

    Nickalooose

    --------------------
    1,309
    Posts
    16
    Years
    • Seen Dec 28, 2023
    Code:
    def pbForceEvo2
      pbChoosePokemon(1,3)
      pkmn=$Trainer.party[$game_variables[1]]
      for form in pbGetEvolvedFormData(pkmn.species)
        newspecies=form[2]
      end
      return if !newspecies
      if newspecies>0
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pkmn,newspecies)
        evo.pbEvolution
        evo.pbEndScreen
      end
    end
    Should work. Untested.
     
    46
    Posts
    10
    Years
    • Seen Jan 19, 2017
    Question about Force Evolution

    I used force evolution of mej71 script to make my Pokemon evolve, but if I evolved Clamperl it just evolved into Gorebyss. how I can make Clamperl evolve into Huntail with script?
    this script make Clamperl evol into Gorebyss
    Code:
    def pbForceEvo(pokemon)
      for form in pbGetEvolvedFormData(pokemon.species)
        newspecies=form[2]
      end
      return if !newspecies
      if newspecies>0
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution
        evo.pbEndScreen
      end
    end
     
    12
    Posts
    8
    Years
    • Seen Mar 8, 2016
    That may be a wild guess...

    But, for any chance, did you try swapping the two evolutions on the "pokemon.txt"? I think the script takes the first one in line... like, and Eevee would evolve into a Vaporean with it, not any other form.

    Make it like thisÇ said:
    [366]
    Name=Clamperl
    InternalName=CLAMPERL
    Type1=WATER
    BaseStats=35,64,85,32,74,55
    GenderRate=Female50Percent
    GrowthRate=Erratic
    BaseEXP=69
    EffortPoints=0,0,1,0,0,0
    Rareness=255
    Happiness=70
    Abilities=SHELLARMOR
    HiddenAbility=RATTLED
    Moves=1,CLAMP,1,WATERGUN,1,WHIRLPOOL,1,IRONDEFENSE,50,SHELLSMASH
    EggMoves=AQUARING,BARRIER,BODYSLAM,BRINE,CONFUSERAY,ENDURE,MUDDYWATER,MUDSPORT,REFRESH,SUPERSONIC,WATERPULSE
    Compatibility=Water1
    StepsToHatch=5355
    Height=0.4
    Weight=52.5
    Color=Blue
    Habitat=Sea
    Kind=Bivalve
    Pokedex=A Clamperl slams its shell closed on prey to prevent escape. The pearl it creates upon evolution is said to be infused with a mysterious energy.
    WildItemUncommon=BIGPEARL
    BattlerPlayerY=17
    BattlerEnemyY=7
    BattlerAltitude=0
    Evolutions=[S-HIGHLIGHT]GOREBYSS,TradeItem,DEEPSEASCALE,HUNTAIL,TradeItem,DEEPSEATOOTH[/S-HIGHLIGHT]
     
    824
    Posts
    8
    Years
  • Code:
    def pbForceEvo(pokemon,usefirst=false)
      newspecies=0
      for form in pbGetEvolvedFormData(pokemon.species)
        newspecies=form[2] if newspecies<=0 || !usefirst
      end
      if newspecies>0
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution
        evo.pbEndScreen
      end
    end

    Try this variation. Now you can do pbForceEvo(pokemon,true) to make Clamperl evolve into a Huntail, or make any Pokemon with more than two evolutions evolve into the first one in the PBS File. pbForceEvo(pokemon,false) or pbForceEvo(pokemon) will make it evolve into the last listed. Note that means you can't use this method to evolve into anything but the first or last in the PBS File.

    Alternatively, try this one:
    Code:
    def pbForceEvo(pokemon,evolveoption=-1)
      newspecies=0
      i=0
      if evolveoption==-2
        evolvedata=pbGetEvolvedFormData(pokemon.species)
        evolveoption=rand(evolvedata.length)+1
      end
      for form in pbGetEvolvedFormData(pokemon.species)
        i+=1
        newspecies=form[2] if i==evolveoption || evolveoption==-1
      end
      if newspecies>0
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pokemon,newspecies)
        evo.pbEvolution
        evo.pbEndScreen
      end
    end

    pbForceEvo(pokemon,1) will evolve into Huntail, and pbForceEvo(pokemon,2) into Gorybass.
    this version will work on Pokemon that have more than two evolutionary paths. But note that it's based on the order they're listed in the PBS File - for Eevee, Leafeon and Glaceon are listed first, and IIRC Espeon and Umbreon last. Also, note that if you try to evolve something with two or fewer evolutionary paths into their third evolutionary path, nothing will happen - and similarly for other numbers.
    I also coded in the options:
    pbForceEvo(pokemon,-1) or pbForceEvo(pokemon) will evolve it into the last listed in the PBS file, like the original function.
    pbForceEvo(pokemon,-2) will randomly choose at the time the evolution is forced, between all possible evolutionary paths.
     
    824
    Posts
    8
    Years
  • That may be a wild guess...

    But, for any chance, did you try swapping the two evolutions on the "pokemon.txt"? I think the script takes the first one in line... like, and Eevee would evolve into a Vaporean with it, not any other form.

    The script actually takes the last form. Eevee would evolve into an Umbreon with it (I got the order wrong in my last post, Eevee's evolutions come in this order in the PBS File: Vaporeon, Jolteon, Flareon, Leafeon, Glaceon :) , Sylveon if you have it, Espeon, Umbreon).

    Swapping the two evolutions would work for the opposite of the reason you thought they would, but I feel like the TC was just using Clamperl as an example. Which is why I went for a more script-based solution.
     
    46
    Posts
    10
    Years
    • Seen Jan 19, 2017
    [hide]...
    Try this variation. Now you can do pbForceEvo(pokemon,true) to make Clamperl evolve into a Huntail, or make any Pokemon with more than two evolutions evolve into the first one in the PBS File. pbForceEvo(pokemon,false) or pbForceEvo(pokemon) will make it evolve into the last listed. Note that means you can't use this method to evolve into anything but the first or last in the PBS File.
    ...
    thank you, i will credit you :)
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    Force Evolution Script Call Issues

    Hello, all! I am right now creating a scene where after you lose a fight the Pokemon Frogadier in your party will be forcefully evolved, because reasons.

    For some reason however, I cannot figure out how to use the thing. I do the script call: pbForceEvo(pokemon) But, I have no idea what I am supposed to ACTUALLY put inside of the parenthesis. I put the Pokemon's name in all caps, like I usually would for a script call, but, is it the Pokemon's dex number, is it their evolution, is it just 1,2? I feel really dumb for asking this, but I am generally confused on this o.e mainly for the lack of examples. The majority of the time I get an error, so I am pretty clueless at the moment for how it is supposed to work.

    Spoiler:
     

    Sir_Tman

    Overworked game Dev
    201
    Posts
    8
    Years
  • I think it something like

    Poke= 1 slot < to lazy to write proper script you know how this works.
    PbForceEvo(poke)
     

    Dylanrockin

    That guy
    276
    Posts
    12
    Years
    • Seen Jun 9, 2016
    I think it something like

    Poke= 1 slot < to lazy to write proper script you know how this works.
    PbForceEvo(poke)

    So, it would be something like this?

    poke=Trainer.party[0]
    pbForceEvo(pokemon)

    I am gonna give this a whirl real fast, and see if that works. Because, I mainly just need the script to search the party for Frogadier, then evolve the Pokemon.

    Edit

    I figured out how it all works now. I had to use this script call, thanks to Nikaloose's previous post:

    pkmn=$Trainer.party[$game_variables[0]]
    pbForceEvo(pkmn)

    Where $game_variables[0] is equal to the Pokemon in the first slot, and will forcefully evolve that Pokemon.
     
    3
    Posts
    4
    Years
    • Seen Nov 28, 2019
    How do i make this into an event in game to evolve a certain pokemon? I can't really figure out how I'm kinda new to this.
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • How do i make this into an event in game to evolve a certain pokemon? I can't really figure out how I'm kinda new to this.

    Lol did you read Dylanrockin's post?

    "pkmn=$Trainer.party[$game_variables[0]]
    pbForceEvo(pkmn)

    Where $game_variables[0] is equal to the Pokemon in the first slot, and will forcefully evolve that Pokemon."
     
    3
    Posts
    4
    Years
    • Seen Nov 28, 2019
    Lol did you read Dylanrockin's post?

    "pkmn=$Trainer.party[$game_variables[0]]
    pbForceEvo(pkmn)

    Where $game_variables[0] is equal to the Pokemon in the first slot, and will forcefully evolve that Pokemon."

    I must be dumb because all i get is this error code when I use that,

    ---------------------------
    Pokemon World
    ---------------------------
    [Pokémon Essentials version 17.2]

    Exception: RuntimeError

    Message: Script error within event 13 (coords 37,29), map 94 (COTEINN DEMO 1):

    Exception: NameError

    Message: (eval):2:in `pbExecuteScript'undefined local variable or method `pkmn' for #<Interpreter:0x1220d1d8>

    ***Full script:

    pbGetPokemon(0)
    pbForceEvo(pkmn)


    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `eval'

    Interpreter:243:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:163:in `follow_update'

    Scene_Map:161:in `loop'



    Interpreter:276:in `pbExecuteScript'

    Interpreter:1606:in `command_355'

    Interpreter:494:in `execute_command'

    Interpreter:193:in `update'

    Interpreter:106:in `loop'

    Interpreter:198:in `update'

    Scene_Map:163:in `follow_update'

    Scene_Map:161:in `loop'

    Scene_Map:170:in `follow_update'

    follow pokemon:1551:in `update'



    This exception was logged in

    C:\Users\Tina\Saved Games\Pokemon World\errorlog.txt.

    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK
    ---------------------------
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    ***Full script:

    pbGetPokemon(0)
    pbForceEvo(pkmn)

    It looks like you're missing the pkmn= bit, which means pkmn is undefined in your script. I think you wanted to write something like:
    Code:
    pkmn=pbGetPokemon(0)
    pbForceEvo(pkmn)

    (Note I have no idea about whether this will actually work, I'm just addressing the specific name error you got)
     

    Zeak6464

    Zeak #3205 - Discord
    1,101
    Posts
    11
    Years
  • Force Evo v19.1

    Code:
    def pbForceEvo(pkmn)
      allevos=[]
      pkmn.species_data.get_evolutions(true).each do |evo|   # [new_species, method, parameter, boolean]
        next if evo[3]   # Prevolution
        allevos.push(evo[0])
      end
      return if allevos.length==0 #No evos
      newspecies = allevos[rand(allevos.length)]
      if newspecies
        pbFadeOutInWithMusic {
        evo=PokemonEvolutionScene.new
        evo.pbStartScreen(pkmn,newspecies)
        evo.pbEvolution
        evo.pbEndScreen }
      end
    end
     
    Back
    Top