• 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] Change species if the Pokémon has a certain form

87
Posts
4
Years
  • Hi, it's the annoying questions guy again, I wanted to know if it's possible to change a pokemon species if said pokemon has a certain form, even better; I wanted to change the species of the pokemon as an egg when the egg inherits the mother's species.
    I've got NO idea if this is even possible in the first place
     
    19
    Posts
    3
    Years
    • Seen Nov 23, 2023
    Theoretically, you can do whatever you want.
    I don't understand what exactly you want to do, but you can change the hatching script so that the specie will be changed on certain conditions. You can also change the breeding script, so the egg at first will be a different specie.
    If you know how to code, you can do it yourself. If not- I'd like to understand what you want and I'll be able to help you. (For example: Do you want every Alolan Raichu female to breed a Dedenne egg?)
     
    87
    Posts
    4
    Years
  • Theoretically, you can do whatever you want.
    I don't understand what exactly you want to do, but you can change the hatching script so that the specie will be changed on certain conditions. You can also change the breeding script, so the egg at first will be a different specie.
    If you know how to code, you can do it yourself. If not- I'd like to understand what you want and I'll be able to help you. (For example: Do you want every Alolan Raichu female to breed a Dedenne egg?)

    My idea is for a handful of pokemon (ex.Hydreigon) to be able to hold an item that changes their form, if this pokemon form is at the daycare then the resulting egg would be of another species (ex. instead of Deino the egg hatches a different species). I would've tried to code it myself but I don't know enough of the already present code to try myself. I wish there was some guide somewhere that explains each section in detail.
     
    188
    Posts
    9
    Years
    • Seen May 16, 2024
    Sounds like the standard incense item mechanic that changes the newly-hatched Pokémon's species to their baby form (e.g. a female Snorlax holding a Full Incense will lay a Munchlax egg instead of a Snorlax egg). Try copying that. No alternate forms are necessary.
     
    87
    Posts
    4
    Years
  • Sounds like the standard incense item mechanic that changes the newly-hatched Pokémon's species to their baby form (e.g. a female Snorlax holding a Full Incense will lay a Munchlax egg instead of a Snorlax egg). Try copying that. No alternate forms are necessary.

    I alredy tried something similar but it doesn't appear to happen with alternative forms (also sorry for the 2 months wait)
     
    188
    Posts
    9
    Years
    • Seen May 16, 2024
    V21 code incoming…
    In [[ Overworld ]], Overworld_DayCare, try this code:
    Code:
        def determine_egg_species(parent_species, mother, father)
          ret = GameData::Species.get(parent_species).get_baby_species(true, mother.item_id, father.item_id)
          # Check for alternate offspring (i.e. Nidoran M/F, Volbeat/Illumise, Manaphy/Phione)
          offspring = GameData::Species.get(ret).offspring
          ret = offspring.sample if offspring.length > 0
          ret = :ALTBABYSPECIES if mother.isSpecies?(:HYDREIGON) && mother.form != 0 && mother.item_id == :FORMCHANGEITEM
          return ret
        end
    You can change :ALTBABYSPECIES and :FORMCHANGEITEM to whichever species and item you defined.
     
    87
    Posts
    4
    Years
  • V21 code incoming…
    In [[ Overworld ]], Overworld_DayCare, try this code:
    Code:
        def determine_egg_species(parent_species, mother, father)
          ret = GameData::Species.get(parent_species).get_baby_species(true, mother.item_id, father.item_id)
          # Check for alternate offspring (i.e. Nidoran M/F, Volbeat/Illumise, Manaphy/Phione)
          offspring = GameData::Species.get(ret).offspring
          ret = offspring.sample if offspring.length > 0
          ret = :ALTBABYSPECIES if mother.isSpecies?(:HYDREIGON) && mother.form != 0 && mother.item_id == :FORMCHANGEITEM
          return ret
        end
    You can change :ALTBABYSPECIES and :FORMCHANGEITEM to whichever species and item you defined.

    Doesn't seem to work... I've got no ideas left
     
    Back
    Top