• 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] v18.1 - DNA Splicers but for all Pokemon

  • 55
    Posts
    6
    Years
    • Seen Nov 24, 2023
    So what I am basically looking for is the DNA Splicer stuff but not just limited to Kyurem. Is there a way to change the DNA Splicer script to make it work for all Pokemon without having to copy the stuff of the original DNA Splicer thing for every instance? And if yes, how? :)
     
  • 277
    Posts
    15
    Years
    Can you be more specific about what your looking for?
    You can take two Pokemon to make a Pokemon change form.
    Create a different species.
    Do you want any Pokemon to be used as junk material to get a certain Pokemon to change form?
    Do you want a unique out come for every possible combination of Pokemon?
    Does the form of the individual Pokemon used in the DNA Splice effect the out come?
     
  • 277
    Posts
    15
    Years
    Try replacing your DNA Splicer with this:
    Code:
    ItemHandlers::UseOnPokemon.add(:DNASPLICERS,proc { |item,pkmn,scene|
      if pkmn.fainted?
        scene.pbDisplay(_INTL("This can't be used on the fainted Pokémon."))
      end
      # Fusing
      if pkmn.fused==nil
        $game_variables[100]=pkmn.form
        chosen = scene.pbChoosePokemon(_INTL("Fuse with which Pokémon?"))
        next false if chosen<0
        poke2 = $Trainer.party[chosen]
        if pkmn==poke2
          scene.pbDisplay(_INTL("It cannot be fused with itself."))
          poke2 = nil
        elsif poke2.egg?
          scene.pbDisplay(_INTL("It cannot be fused with an Egg."))
          poke2 = nil
        elsif poke2.fainted?
          scene.pbDisplay(_INTL("It cannot be fused with that fainted Pokémon."))
          poke2 = nil
        end
        newForm = 0
        newForm = pkmn.form+poke2.species if poke2 != nil
        pkmn.setForm(newForm) {
          pkmn.fused = poke2
          pbRemovePokemonAt(chosen)
          scene.pbHardRefresh
          scene.pbDisplay(_INTL("{1} changed Forme!",pkmn.name))
        }
        next true
      end
      # Unfusing
      if $Trainer.party.length>=6
        scene.pbDisplay(_INTL("You have no room to separate the Pokémon."))
        next false
      end
      pkmn.setForm($game_variables[100]) {
        $Trainer.party[$Trainer.party.length] = pkmn.fused
        pkmn.fused = nil
        poke2 = nil
        scene.pbHardRefresh
        scene.pbDisplay(_INTL("{1} changed Forme!",pkmn.name))
      }
      next true
    })

    Replace variable 100 with any variable you wish to use to store the original Pokemon's form.

    How to use:
    This will record the first Pokemon's form and then add the selected Pokemon's form with the species number of the second Pokemon. So if you select Meowth (form 0) and fuse it with a Magikarp you will get Meowth form 129.
    To fuse Pokemon that have more than one form you have to move that Pokemon's next form to be after the last possible combination (I.E. the number after the last Pokemon in you National Dex). So if you only have the original 151 Pokemon in your game Alolan Meowth (form 1) needs to be form 152. You must apply this rule for every form, so Galarian Meowth (form 2) would be form 303.
    As of right now this script does not take the second Pokemon's form into account.
     
    Last edited:
    Back
    Top