• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Egg moves for forms

  • 8
    Posts
    9
    Years
    • Seen Aug 29, 2018
    In my game i am trying to give different forms their own egg moves. How do I go about doing this. I am using version 16.2
     
    In PField_DayCare, you can use this code for move inheritance:
    Code:
    # Volt Tackle
      lightball=false
      if (isConst?(father.species,PBSpecies,:PIKACHU) || 
          isConst?(father.species,PBSpecies,:RAICHU)) && 
          isConst?(father.item,PBItems,:LIGHTBALL)
        lightball=true
      end
      if (isConst?(mother.species,PBSpecies,:PIKACHU) || 
          isConst?(mother.species,PBSpecies,:RAICHU)) && 
          isConst?(mother.item,PBItems,:LIGHTBALL)
        lightball=true
      end
      if lightball && isConst?(babyspecies,PBSpecies,:PICHU) &&
         hasConst?(PBMoves,:VOLTTACKLE)
        moves.push(getConst(PBMoves,:VOLTTACKLE))
      end
      [COLOR="Red"]# Different forms or regional variants
      case babyspecies
      when getConst(PBSpecies,:VULPIX) # example Alolan Vulpix
        if babyspecies.form == 1
          moves.push(getConst(PBMoves,:ICEBEAM))
          # etc
        end
        break
      end[/color]

    As for form inheritance, you will need to think about which forms of various species would be dominant in your region. For example, eggs obtained in Alola bred from species with local variants will always hatch into an Alolan form. You can alter this code in PField_DayCare:
    Code:
      # Inheriting form
      if isConst?(babyspecies,PBSpecies,:BURMY) ||
         isConst?(babyspecies,PBSpecies,:SHELLOS) ||
         isConst?(babyspecies,PBSpecies,:BASCULIN)
        egg.form=mother.form
      end
      [COLOR="red"]# Example Alolan variants
      if isConst?(babyspecies,PBSpecies,:VULPIX) ||
         isConst?(babyspecies,PBSpecies,:SANDSHREW) # etc
        egg.form=1
      end[/color]
     
    Last edited:
    Back
    Top