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

Wild Ditto Disguise

30
Posts
6
Years
  • This is a script of Ditto appearing as another pokemon within the wild and who only reveals itself after being caught.

    The instructions are within the script.

    please give credits.

    v1.4

    EBS SYSTEM:
    Spoiler:

    FOR STANDARD:
    Spoiler:

    MANUAL EDITING WORK.
    Spoiler:

    OPTIONAL EDITING:
    > if you want to use all pokeballs instead of just a list then do the following.
    Spoiler:


    v1.2
    v1.3 - added map entry.
    -1.3.1 - bug fixes.
    v1.4 - fix the problem with the pokedex entry adding the disguised pokemon,
    - compatible with 'Overworld Wild Encounters' script - by derFischae
     
    Last edited:
    62
    Posts
    6
    Years
    • Seen Aug 11, 2022
    Hello
    I would like to put the wild Ditto pp to 5 for each movement.
    Like a Ditto turned into a fight.
    Do you think that's possible?

    Thank you in advance.
     
    62
    Posts
    6
    Years
    • Seen Aug 11, 2022
    I think that to make this script well, you have to be inspired by Illusion ability or Transform move.
     
    Last edited:

    HeroesFightingFear

    "The Champion of Alon"
    99
    Posts
    4
    Years
  • Hello, I keep getting errors when using this. The game runs fine after I catch a disguised Pokemon, but this always pops up when it gets ready to transform.
    Wild Ditto Disguise
     
    30
    Posts
    6
    Years
  • Hello, I keep getting errors when using this. The game runs fine after I catch a disguised Pokemon, but this always pops up when it gets ready to transform.
    Wild Ditto Disguise

    Replace your code with this one.


    Code:
    ################################################################################
    #
    # Ditto_Discuise script by Seth-Angel
    #
    # This is a script that makes certain pokemon in the wild actually being a
    # disguise of Ditto, like in Pokemon Go.
    #
    # Note: This is for the standard battle mechanics.
    #===============================================================================
    #                                 INSTALLATION
    #===============================================================================
    #
    # Just paste this script ontop of main and underneath Compiler
    #
    #===============================================================================
    #===============================================================================
    # Change the chance of Ditto appearing @ DITTOCHANCE
    # It's discuised Pokemon @ DITTODISGUISES
    # The Pokeballs used when catching discuised Pokemon @ DITTOBALLS
    #
    ################################################################################
    
    DITTOCHANCE = 100 # The Chance of Ditto appearing.
    DITTODISGUISES = [:RATTATA,:WEEDLE,:PIDGEY,:RATTA] # Ditto's DISGUISES
    DITTOBALLS = [:POKEBALL,:GREATBALL,:ULTRABALL,:MASTERBALL] # Balls used for this event
    
    class PokemonChangeScene < PokemonEvolutionScene
      def pbEvolution(cancancel=false)
        metaplayer1 = SpriteMetafilePlayer.new(@metafile1,@sprites["rsprite1"])
        metaplayer2 = SpriteMetafilePlayer.new(@metafile2,@sprites["rsprite2"])
        metaplayer1.play
        metaplayer2.play
        pbBGMStop
        pbPlayCry(@pokemon)
        Kernel.pbMessageDisplay(@sprites["msgwindow"],
           _INTL("\\se[]What?\r\n{1} is changing!\\^",@pokemon.name)) { pbUpdate }
        Kernel.pbMessageWaitForInput(@sprites["msgwindow"],100,true) { pbUpdate }
        pbPlayDecisionSE
        oldstate  = pbSaveSpriteState(@sprites["rsprite1"])
        oldstate2 = pbSaveSpriteState(@sprites["rsprite2"])
        pbMEPlay("Evolution start")
        pbBGMPlay("Evolution")
        canceled = false
        begin
          pbUpdateNarrowScreen
          metaplayer1.update
          metaplayer2.update
          Graphics.update
          Input.update
          pbUpdate(true)
          if Input.trigger?(Input::B) && cancancel
            pbBGMStop
            pbPlayCancelSE
            canceled = true
            break
          end
        end while metaplayer1.playing? && metaplayer2.playing?
        pbFlashInOut(canceled,oldstate,oldstate2)
        if canceled
          Kernel.pbMessageDisplay(@sprites["msgwindow"],
             _INTL("Huh?\r\n{1} stopped evolving!",@pokemon.name)) { pbUpdate }
        else
          pbEvolutionSuccess
        end
      end
      
      # function used to create the newly evolved Pokemon
      def pbEvolutionSuccess
        # Play cry of evolved species
        frames = pbCryFrameLength(@newspecies,@pokemon.form)
        pbBGMStop
        pbPlayCrySpecies(@newspecies,@pokemon.form)
        frames.times do
          Graphics.update
          pbUpdate
        end
        # Success jingle/message
        pbMEPlay("Evolution success")
        newspeciesname = PBSpecies.getName(@newspecies)
        oldspeciesname = PBSpecies.getName(@pokemon.species)
        Kernel.pbMessageDisplay(@sprites["msgwindow"],
           _INTL("\\se[]OH WOW!\nIt was a Ditto disguised as {1}!\\wt[80]",
           @pokemon.name,newspeciesname)) { pbUpdate }
        @sprites["msgwindow"].text = ""
        # Check for consumed item and Pokémon duplication (i.e. Shedinja)
        removeItem = false
        createSpecies = pbCheckEvolutionEx(@pokemon){|pokemon,evonib,level,poke|
           case evonib
           when PBEvolution::Shedinja
             next poke if $PokemonBag.pbHasItem?(getConst(PBItems,:POKEBALL))
           when PBEvolution::TradeItem,PBEvolution::DayHoldItem,PBEvolution::NightHoldItem
             removeItem = true if poke==@newspecies   # Item is now consumed
           end
           next -1
        }
        @pokemon.setItem(0) if removeItem
        # Modify Pokémon to make it evolved
        @pokemon.species = @newspecies
        @pokemon.name    = newspeciesname if @pokemon.name==oldspeciesname
        @pokemon.form    = 0 if isConst?(@pokemon.species,PBSpecies,:MOTHIM)
        @pokemon.calcStats
        # See and own evolved species
        $Trainer.seen[@newspecies]  = true
        $Trainer.owned[@newspecies] = true
        pbSeenForm(@pokemon)
        # Learn moves upon evolution for evolved species
        movelist = @pokemon.getMoveList
        for i in movelist
          if i[0]==0 || i[0][email protected]          # Learned a new move
            pbLearnMove(@pokemon,i[1],true) { pbUpdate }
          end
        end
        # Duplicate Pokémon (i.e. Shedinja)
        if createSpecies>0 && $Trainer.party.length<6
          newpokemon = @pokemon.clone
          newpokemon.species = createSpecies
          newpokemon.name    = PBSpecies.getName(createSpecies)
          newpokemon.iv      = @pokemon.iv.clone
          newpokemon.ev      = @pokemon.ev.clone
          newpokemon.markings = 0
          newpokemon.ballused = 0
          newpokemon.setItem(0)
          newpokemon.clearAllRibbons
          newpokemon.calcStats
          newpokemon.heal
          # Add duplicate Pokémon to party
          $Trainer.party.push(newpokemon)
          # See and own duplicate Pokémon
          $Trainer.seen[createSpecies]  = true
          $Trainer.owned[createSpecies] = true
          pbSeenForm(newpokemon)
          # Consume Poké Ball
          $PokemonBag.pbDeleteItem(getConst(PBItems,:POKEBALL))
        end
      end 
    end
    
    
    for j in (0...DITTOBALLS.length)
      BallHandlers::OnCatch.add(DITTOBALLS[j],proc{|ball,battle,pokemon|
      for i in (0...DITTODISGUISES.length)
        if (isConst?(pokemon.species,PBSpecies,DITTODISGUISES[i]))
          if rand(100)<DITTOCHANCE
            battle.pbDisplay(_INTL("Wait! Something is happening to {1}",pokemon.name))
            evo=PokemonChangeScene.new
            newspecies = PBSpecies::DITTO
            evo.pbStartScreen(pokemon,newspecies)
            evo.pbEvolution
            evo.pbEndScreen
            pokemon.resetMoves
            pokemon.calcStats
          end
        end
      end
      })
    end
     
    Last edited:
    62
    Posts
    6
    Years
    • Seen Aug 11, 2022
    Updated: I have added a custom wild pp in the script.

    Yes now I think your script is starting to be better.
    I also think that is the right thing to do.
    Create an event

    'Events.onWildPokemonCreate '

    I also think that you have to create the effect of disguise beforehand by drawing inspiration from the Illusion or Transform movement.

    As a result, we'll get something like this:

    Events.onWildPokemonCreate
    pokemone[0]
    If DITTOCHANCE - isConst? (pokemon.species,PBSpecies,:DITTO)
    pokemon.effects[PBEffects::WildDittoTransform]
    pokemon.resetMoves
    End
    }

    I'm not good at writing scripts but the ideal would be to create the transformation before the wild encounter and thus create two Pokémon.
    Otherwise we may encounter problems such as entering the Pokédex or the identity of the Pokémon.

    Other than that, your script about transformation after the fight and fine.
     
    62
    Posts
    6
    Years
    • Seen Aug 11, 2022
    cool, i see what you mean, it shows the disguised pokemon as an entry. will work on that next.

    But I don't know if it's possible to do that because it means you'll have to generate two pokémons.
    The wild Ditto is that turned into a pokémon that does not exist.
    In addition, I do not know if it is Ditto or the "DITTODISGUISES" who will have to be called.

    To get something like:

    Events.onWildPokemonCreate
    pokemone
    If DITTOCHANCE - isConst? (pokemon.species,PBSpecies,:RATTATA)
    pokemon.effects[PBEffects::WildDittoTransform]
    pokemon.resetMoves
    End
    }

    It's up to you.
    I wish you the best of luck.
     
    62
    Posts
    6
    Years
    • Seen Aug 11, 2022
    I've been thinking about something.
    Can you get Ditto (disguised) to turn into a fight as soon as we knock him out?
     
    v1.4 updated.
    please let me know if there is any bugs

    The script is not working for me. I am using EBS and have done the manual editing correctly in PokeBattler_Battler.
    My Script-
    Spoiler:
     
    30
    Posts
    6
    Years
  • so when you catch a weedle,pidgey or rattata on map 42 with poke-,great-,ultra- or masterball it doesn't turn into a ditto afterwards? do you get an error?what precisely is happening?
    have you searched the part of code within [PokeBattle_Battle] globally? maybe it is being used in another script and that script is replacing the [PokeBattle_Battle] block.
     
    Last edited:
    so when you catch a weedle,pidgey or rattata on map 42 with poke-,great-,ultra- or masterball it doesn't turn into a ditto afterwards? do you get an error?what precisely is happening?
    have you searched the part of code within [PokeBattle_Battle] globally? maybe it is being used in another script and that script is replacing the [PokeBattle_Battle] block.

    I am not having disguised Dittos. The dittos are appearing as before. None of them get disguised
     
    Back
    Top