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

Gender based moveset

102
Posts
15
Years
    • Seen Jul 19, 2017
    Hi, I have been trying to work in a gender based moveset for a Pokemon. I found the appropriate section in PokemonMultipleForms and used other pre existing codes to make this (I blanked out the Pokemon name for this post):

    Code:
    MultipleForms.register(:XXXXX,{
    "getBaseStats"=>proc{|pokemon|
       next if pokemon.gender==0                 # Normal Forme
       case pokemon.gender
         when 1; next [55,47,52,41,40,40] # female Forme
           end
    },
    #Below code was just to make sure the conditions worked
    #"type1"=>proc{|pokemon|
    #   next if pokemon.gender==0              # Normal Form
    #   case pokemon.gender
    #     when 1; next getID(PBTypes,:FLYING)  # Female Form
    #   end
    #},       
    "evYield"=>proc{|pokemon|
       next if pokemon.gender==0      # Normal Forme
       case pokemon.gender
         when 1; next [0,1,0,0,0,0] # female Forme
       end
    },      
    "getMoveList"=>proc{|pokemon|
       next if pokemon.gender==0
       movelist=[]
       case pokemon.gender
         when 1; movelist=[[1,:GROWL],[1,:SCRATCH],[7,:TAILWHIP],[9,:DOUBLEKICK],
                           [13,:POISONSTING],[19,:FURYSWIPES],[21,:BITE],[25,:HELPINGHAND],
                           [31,:TOXICSPIKES],[33,:FLATTER],[37,:CRUNCH],[43,:CAPTIVATE],
                           [45,:POISONFANG]]
    
       end
       for i in movelist
         i[1]=getConst(PBMoves,i[1])
       end
       next movelist
    }
    })
    Now, the basestats work, the evYield works, the type works too. All of these change when the gender is female like I want them. The problem is the moveset. I copied the code exactly from Deoxys and only changed pokemon.form to pokemon.gender like the other three options. However, the moveset that comes up in female form is the default moveset and not the female moveset. Can anyone see what I have to change because I'm drawing a blank?
     

    Maruno

    Lead Dev of Pokémon Essentials
    5,286
    Posts
    16
    Years
    • Seen May 3, 2024
    A Pokémon is initially generated with its default moveset. It then checks to see whether the species has a getFormOnCreation procedure, and if it does and it "next"s something, it'll reset the movelist according to the getMoveList procedure. Currently it doesn't.

    Copy-paste a getFormOnCreation procedure for your species and simply have it "next 0", see if that works.
     
    102
    Posts
    15
    Years
    • Seen Jul 19, 2017
    Perfect, that did it. Thank you Maruno. This thread can be closed now.
     
    Back
    Top