• 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] Form change based on pre-evolution.

4
Posts
5
Years
    • Seen Apr 5, 2019
    In my game I'm working on a evolution line that's like an anti-Eevee. There are three basic pokemon that evolve into one 1st stage. I want the type of the evolution to be the same as that of its pre-evolution and have a different moveset based on it, but I don't know how to script it. I'm currently using wormadam as a base script, but I need to change the getFormOnCreation so the form is based on it's previous evolution. Is there any way to do this?
     

    Sir_Tman

    Overworked game Dev
    201
    Posts
    8
    Years
  • Try something like
    Code:
    MultipleForms.register(:NAME,{
    #THIS HANDLES ALL YOUR LEVEL UP MOVES
    "getMoveList"=>proc{|pokemon|
       next if pokemon.form==0      # Midday
       movelist=[]
       case pokemon.form            # Midnight, Dusk
         when 1 ; movelist=[[0,:COUNTER],[1,:REVERSAL],[1,:TAUNT],
                            [1,:TACKLE],[1,:LEER],[1,:SANDATTACK],
                            [1,:BITE],[4,:SANDATTACK],[7,:BITE],[12,:HOWL],
                            [15,:ROCKTHROW],[18,:ODORSLEUTH],[23,:ROCKTOMB],
                            [26,:ROAR],[29,:STEALTHROCK],[34,:ROCKSLIDE],
                            [37,:SCARYFACE],[40,:CRUNCH],[45,:ROCKCLIMB],
                            [48,:STONEEDGE]]
         when 2 ; movelist=[[0,:THRASH],[1,:ACCELEROCK],[1,:COUNTER],
                            [1,:TACKLE],[1,:LEER],[1,:SANDATTACK],
                            [1,:BITE],[4,:SANDATTACK],[7,:BITE],[12,:HOWL],
                            [15,:ROCKTHROW],[18,:ODORSLEUTH],[23,:ROCKTOMB],
                            [26,:ROAR],[29,:STEALTHROCK],[34,:ROCKSLIDE],
                            [37,:SCARYFACE],[40,:CRUNCH],[45,:ROCKCLIMB],
                            [48,:STONEEDGE]]
       end
       for i in movelist
         i[1]=getConst(PBMoves,i[1])
       end
       next movelist
    },
    #THIS HANDLES ALL YOUR TMS
    "getMoveCompatibility"=>proc{|pokemon|
       next if pokemon.form==0
       movelist=[]
       case pokemon.form
       when 1; movelist=[# TMs
                         :TOXIC,:VENOSHOCK,:HIDDENPOWER,
                         # Move Tutors
                         :BUGBITE,:EARTHPOWER,:ELECTROWEB,:UPROAR]
       when 2; movelist=[# TMs
                         :TOXIC,:VENOSHOCK,:HIDDENPOWER,:SUNNYDAY,
                         # Move Tutors
                         ,:SUCKERPUNCH,:UPROAR]
       end
       for i in 0...movelist.length
         movelist[i]=getConst(PBMoves,movelist[i])
       end
       next movelist
    }
    })

    And form ID is a variable that carries over automatically when your pokemon evolve
     
    Last edited:
    4
    Posts
    5
    Years
    • Seen Apr 5, 2019
    Oh, if I set the form number ([PREEVOLUTION 1]) in its pre-evolution, it will maintain that in its evolution ([EVOLUTION 1]) despite being different pokemon?
     
    Back
    Top