• 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] Egg moves for forms

8
Posts
8
Years
  • Age 24
  • 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
 
188
Posts
9
Years
  • Age 39
  • Seen Jan 21, 2024
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