- 30
- Posts
- 7
- Years
- South Africa
- Seen Jul 5, 2023
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:
FOR STANDARD:
MANUAL EDITING WORK.
Inside [PokeBattle_Battle]
Search for this:
And Replace it with this:
OPTIONAL EDITING:
> if you want to use all pokeballs instead of just a list then do the following.
Remove this entire code:
and then at the bottom of the script replace this entire block:
With this block of code:
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
The instructions are within the script.
please give credits.
v1.4
EBS SYSTEM:
Spoiler:
Code:
################################################################################
#
# Ditto_Discuise script by Seth-Angel
#
# v1.4
#
# This is a script that makes certain pokemon in the wild actually being a
# disguise of Ditto, like in Pokemon Go.
#
# Note: This only works with pokemon EBS, it is untested with the standard
# battle mechanics.
#===============================================================================
# INSTALLATION
#===============================================================================
#
# Just paste this script ontop of main and underneath Compiler
#
# Some manual editing.
#
# Inside [PokeBattle_Battle]
# Search for this:
#=======================================
# if !self.pbPlayer.hasOwned?(species)
# self.pbPlayer.setOwned(species)
# if $Trainer.pokedex
# pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.",pokemon.name))
# @scene.pbShowPokedex(species)
# end
# end
#=======================================
#
# And Replace it with this:
#=======================================
#if $disguise != true # Ditto disguise
# if !self.pbPlayer.hasOwned?(species)
# self.pbPlayer.setOwned(species)
# if $Trainer.pokedex
# pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.",pokemon.name))
# @scene.pbShowPokedex(species)
# end
# end
#else
# if !self.pbPlayer.hasOwned?(:DITTO)
# self.pbPlayer.setOwned(:DITTO)
# if $Trainer.pokedex
# pbDisplayPaused(_INTL("Ditto's data was added to the Pokédex."))
# @scene.pbShowPokedex(PBSpecies::DITTO)
# end
# end
#end
#=======================================
#===============================================================================
#
# Some custom edits.
#
#===============================================================================
# Change the chance of Ditto appearing as disguise @ DITTOCHANCE
# 100 for always and 0 for never.
#
# List of discuised Pokemon @ DITTODISGUISES
# The first index being the MAP_ID
#
# The Pokeballs used when catching discuised Pokemon @ DITTOBALLS
# Customize the wild disguise's PP. true/false @ WILDPPCUSTOM
# The PP of all moves from the wild disguise @ WILDPP
#
################################################################################
# The Chances of the disguise being a Ditto.
DITTOCHANCE = 100
# Balls used for this event.
DITTOBALLS = [:POKEBALL,:GREATBALL,:ULTRABALL,:MASTERBALL]
# use false if you want to use the default PP of wild disguise.
WILDPPCUSTOM = true
# The PP of all moves from the wild disguise.Only if WILDPPCUSTOM is true.
WILDPP = 5
DITTODISGUISES = [ # Ditto's DISGUISES. Add your own below
#===============================================================================
# Add your own maps.
#
# Please take note of all punctuations and constructions.
#===============================================================================
# Map 12
[12, # << MAP ID.
:RATTATA, # << Pokemon Disguises.
:WEEDLE,
:PIDGEY
],
# Map 3
[3, # << MAP ID.
:LUGIA,
:RIOLU,
:MEWTWO,
:MEW
],
# Map 2
[2, # << MAP ID.
:PIKACHU,
:CHARMANDER
] # << no comma at the last one
#===============================================================================
# After this... DO NOT TOUCH!
#===============================================================================
]
class PokemonChangeScene < PokemonEvolutionScene
def pbEvolution(cancancel=false)
# stops BGM and displays message
pbBGMStop()
16.times do
Graphics.update
self.update
@sprites["bar1"].y -= @sprites["bar1"].bitmap.height/16
@sprites["bar2"].y += @sprites["bar2"].bitmap.height/16
end
@sprites["msgwindow"].visible = true
Kernel.pbMessageDisplay(@sprites["msgwindow"],_INTL("\\se[]What?\r\n{1} is changing!\\^",@pokemon.name)) { self.update }
Kernel.pbMessageWaitForInput(@sprites["msgwindow"],100,true) { self.update }
@sprites["msgwindow"].visible = false
# plays Pokemon's cry
pbPlayCry(@pokemon)
pbCryFrameLength(@pokemon.species).times do
Graphics.update
self.update
end
pbBGMPlay("evolv")
canceled = false
# beginning glow effect
self.glow
k1 = 1 # zoom factor for the Pokemon
k2 = 1 # zoom factor for the shine
s = 1 # speed of the animation
@viewport.color = Color.new(255,255,255,0)
pbSEPlay("#{SE_EXTRA_PATH}Heal4")
# main animation loop
for i in 0...256
k1 *= -1 if i%(32/s) == 0
k2 *= -1 if i%(16) == 0
s *= 2 if i%64 == 0 && i > 0 && s < 8
Graphics.update
Input.update
self.update(false)
self.updateParticles
self.updateRays(i)
@sprites["poke"].zoom_x += 0.03125*k1*s
@sprites["poke"].zoom_y += 0.03125*k1*s
@sprites["poke"].tone.red += 16
@sprites["poke"].tone.green += 16
@sprites["poke"].tone.blue += 16
@sprites["poke2"].zoom_x -= 0.03125*k1*s
@sprites["poke2"].zoom_y -= 0.03125*k1*s
if @sprites["shine2"].opacity < 255
@sprites["shine2"].opacity += 16
@sprites["shine2"].zoom_x += 0.08
@sprites["shine2"].zoom_y += 0.08
else
@sprites["shine2"].zoom_x += 0.01*k2
@sprites["shine2"].zoom_y += 0.01*k2
@sprites["shine2"].tone.red += 0.5
@sprites["shine2"].tone.green += 0.5
@sprites["shine2"].tone.blue += 0.5
end
if i >= 240
@sprites["shine3"].opacity += 16
@sprites["shine3"].zoom_x += 0.1
@sprites["shine3"].zoom_y += 0.1
end
@viewport.color.alpha += 32 if i >= 248
if Input.trigger?(Input::B) && cancancel
pbBGMStop()
canceled = true
break
end
end
@viewport.color = Color.new(255,255,255)
self.flash(canceled)
if canceled
# prints message when evolution is cancelled
@sprites["msgwindow"].visible = true
Kernel.pbMessageDisplay(@sprites["msgwindow"],_INTL("Huh?\r\n{1} stopped evolving!",@pokemon.name)) { self.update }
else
# creates the actual evolved Pokemon
self.createEvolved
end
end
# function used to create the newly evolved Pokemon
def createEvolved
frames = pbCryFrameLength(@newspecies)
# plays Pokemon's cry
pbBGMStop()
pbPlayCry(@newspecies)
frames.times do
Graphics.update
self.update
end
pbMEPlay("EvolutionSuccess")
# gets info of the new species
newspeciesname = PBSpecies.getName(@newspecies)
oldspeciesname = PBSpecies.getName(@pokemon.species)
@sprites["msgwindow"].visible = true
Kernel.pbMessageDisplay(@sprites["msgwindow"],_INTL("\\se[]OH WOW!\nIt was a Ditto disguised as {1}!\\wt[80]",@pokemon.name,newspeciesname)) { self.update }
@sprites["msgwindow"].text = ""
removeItem = false
createSpecies = pbCheckEvolutionEx(@pokemon){|pokemon,evonib,level,poke|
if evonib == PBEvolution::Shedinja
# checks if a Pokeball is available for Shedinja
next poke if $PokemonBag.pbQuantity(getConst(PBItems,:POKEBALL))>0
elsif evonib == PBEvolution::TradeItem || evonib == PBEvolution::DayHoldItem || evonib == PBEvolution::NightHoldItem
# consumes evolutionary item
removeItem = true if poke == @newspecies
end
next -1
}
@pokemon.setItem(0) if removeItem
@pokemon.species = @newspecies
$Trainer.seen[@newspecies] = true
$Trainer.owned[@newspecies] = true
pbSeenForm(@pokemon)
@pokemon.name = newspeciesname if @pokemon.name == oldspeciesname
@pokemon.calcStats
# checking moves for new species
movelist = @pokemon.getMoveList
for i in movelist
if i[0] == @pokemon.level
# learning new moves
pbLearnMove(@pokemon,i[1],true) { self.update }
end
end
# adding new species of Pokemon to the party
if createSpecies>0 && $Trainer.party.length<6
newpokemon = @pokemon.clone
newpokemon.iv = @pokemon.iv.clone
newpokemon.ev = @pokemon.ev.clone
newpokemon.species = createSpecies
newpokemon.name = PBSpecies.getName(createSpecies)
newpokemon.setItem(0)
newpokemon.clearAllRibbons
newpokemon.markings = 0
newpokemon.ballused = 0
newpokemon.calcStats
newpokemon.heal
$Trainer.party.push(newpokemon)
$Trainer.seen[createSpecies] = true
$Trainer.owned[createSpecies] = true
pbSeenForm(newpokemon)
$PokemonBag.pbDeleteItem(getConst(PBItems,:POKEBALL))
end
end
end
class PokeBattle_Battle
def pbSetSeen(pokemon)
if pokemon && @internalbattle
if $disguise != true
self.pbPlayer.seen[pokemon.species]=true
pbSeenForm(pokemon)
else
self.pbPlayer.seen[PBSpecies::DITTO]=true
pbSeenForm(pokemon)
end
end
end
end
Events.onWildPokemonCreate += proc{|sender,e|
pokemon = e[0]
ditto_disguise = false
$disguise=false
for m in (0...DITTODISGUISES.length)
if $game_map.map_id == DITTODISGUISES[m][0]
for n in (1...DITTODISGUISES[m].length)
if isConst?(pokemon.species,PBSpecies,DITTODISGUISES[m][n])
if rand(100)<DITTOCHANCE
ditto_disguise = true
$disguise=true
if WILDPPCUSTOM == true
for k in (0...pokemon.numMoves)
pokemon.moves[k].pp=WILDPP
end
end
else
ditto_disguise = false
$disguise=false
end
end
end
end
end
for j in (0...DITTOBALLS.length)
BallHandlers::OnCatch.add(DITTOBALLS[j],proc{|ball,battle,pokemon|
if ditto_disguise == true && $disguise==true
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
ditto_disguise = false
end
})
end
}
FOR STANDARD:
Spoiler:
Code:
################################################################################
#
# Ditto_Discuise script by Seth-Angel
#
# v1.4
#
# This is a script that makes certain pokemon in the wild actually being a
# disguise of Ditto, like in Pokemon Go.
#
# Note: This only works with standard battle mechanics.
#===============================================================================
# INSTALLATION
#===============================================================================
#
# Just paste this script ontop of main and underneath Compiler
#
# Some manual editing.
#
# Inside [PokeBattle_Battle]
# Search for this:
#=======================================
# if !self.pbPlayer.hasOwned?(species)
# self.pbPlayer.setOwned(species)
# if $Trainer.pokedex
# pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.",pokemon.name))
# @scene.pbShowPokedex(species)
# end
# end
#=======================================
#
# And Replace it with this:
#=======================================
#if $disguise != true # Ditto disguise
# if !self.pbPlayer.hasOwned?(species)
# self.pbPlayer.setOwned(species)
# if $Trainer.pokedex
# pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.",pokemon.name))
# @scene.pbShowPokedex(species)
# end
# end
#else
# if !self.pbPlayer.hasOwned?(:DITTO)
# self.pbPlayer.setOwned(:DITTO)
# if $Trainer.pokedex
# pbDisplayPaused(_INTL("Ditto's data was added to the Pokédex."))
# @scene.pbShowPokedex(PBSpecies::DITTO)
# end
# end
#end
#=======================================
#===============================================================================
#
# Some custom edits.
#
#===============================================================================
# Change the chance of Ditto appearing as disguise @ DITTOCHANCE
# 100 for always and 0 for never.
#
# List of discuised Pokemon @ DITTODISGUISES
# The first index being the MAP_ID
#
# The Pokeballs used when catching discuised Pokemon @ DITTOBALLS
# Customize the wild disguise's PP. true/false @ WILDPPCUSTOM
# The PP of all moves from the wild disguise @ WILDPP
#
################################################################################
# The Chances of the disguise being a Ditto.
DITTOCHANCE = 100
# Balls used for this event.
DITTOBALLS = [:POKEBALL,:GREATBALL,:ULTRABALL,:MASTERBALL]
# use false if you want to use the default PP of wild disguise.
WILDPPCUSTOM = true
# The PP of all moves from the wild disguise.Only if WILDPPCUSTOM is true.
WILDPP = 5
DITTODISGUISES = [ # Ditto's DISGUISES. Add your own below
#===============================================================================
# Add your own maps.
#
# Please take note of all punctuations and constructions.
#===============================================================================
# Map 12
[12, # << MAP ID.
:RATTATA, # << Pokemon Disguises.
:WEEDLE,
:PIDGEY
],
# Map 3
[3, # << MAP ID.
:LUGIA,
:RIOLU,
:MEWTWO,
:MEW
],
# Map 2
[2, # << MAP ID.
:PIKACHU,
:CHARMANDER
] # << no comma at the last one
#===============================================================================
# After this... DO NOT TOUCH!
#===============================================================================
]
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
class PokeBattle_Battle
def pbSetSeen(pokemon)
if pokemon && @internalbattle
if $disguise != true
self.pbPlayer.seen[pokemon.species]=true
pbSeenForm(pokemon)
else
self.pbPlayer.seen[PBSpecies::DITTO]=true
pbSeenForm(pokemon)
end
end
end
end
Events.onWildPokemonCreate += proc{|sender,e|
pokemon = e[0]
ditto_disguise = false
$disguise=false
for m in (0...DITTODISGUISES.length)
if $game_map.map_id == DITTODISGUISES[m][0]
for n in (1...DITTODISGUISES[m].length)
if isConst?(pokemon.species,PBSpecies,DITTODISGUISES[m][n])
if rand(100)<DITTOCHANCE
ditto_disguise = true
$disguise=true
if WILDPPCUSTOM == true
for k in (0...pokemon.numMoves)
pokemon.moves[k].pp=WILDPP
end
end
else
ditto_disguise = false
$disguise=false
end
end
end
end
end
for j in (0...DITTOBALLS.length)
BallHandlers::OnCatch.add(DITTOBALLS[j],proc{|ball,battle,pokemon|
if ditto_disguise == true && $disguise==true
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
ditto_disguise = false
end
})
end
}
MANUAL EDITING WORK.
Spoiler:
Inside [PokeBattle_Battle]
Search for this:
Code:
if !self.pbPlayer.hasOwned?(species)
self.pbPlayer.setOwned(species)
if $Trainer.pokedex
pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.",pokemon.name))
@scene.pbShowPokedex(species)
end
end
And Replace it with this:
Code:
if $disguise != true # Ditto disguise
if !self.pbPlayer.hasOwned?(species)
self.pbPlayer.setOwned(species)
if $Trainer.pokedex
pbDisplayPaused(_INTL("{1}'s data was added to the Pokédex.",pokemon.name))
@scene.pbShowPokedex(species)
end
end
else
if !self.pbPlayer.hasOwned?(:DITTO)
self.pbPlayer.setOwned(:DITTO)
if $Trainer.pokedex
pbDisplayPaused(_INTL("Ditto's data was added to the Pokédex."))
@scene.pbShowPokedex(PBSpecies::DITTO)
end
end
end
OPTIONAL EDITING:
> if you want to use all pokeballs instead of just a list then do the following.
Spoiler:
Remove this entire code:
Code:
# Balls used for this event.
DITTOBALLS = [:POKEBALL,:GREATBALL,:ULTRABALL,:MASTERBALL]
and then at the bottom of the script replace this entire block:
Code:
for j in (0...DITTOBALLS.length)
BallHandlers::OnCatch.add(DITTOBALLS[j],proc{|ball,battle,pokemon|
if ditto_disguise == true && $disguise==true
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
ditto_disguise = false
end
})
end
With this block of code:
Code:
$BallTypes.each do |key, value|
BallHandlers::OnCatch.add(value,proc{|ball,battle,pokemon|
if ditto_disguise == true && $disguise==true
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
pokemon.happiness=200 if value == :FRIENDBALL
pokemon.heal if value == :HEALBALL
# add more balls for 'BallHandlers::OnCatch.add' if you have added custom balls
# else just leave as is.
ditto_disguise = false
end
})
end
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: