Dialga-Brite
 
 
 
 
Cornify
 

.

Back

Alternate Forms for Pokemon Essentials

 

This will show you how to make alternate forms in Pokemon Essentials, a pokemon starter kit for Rpg Maker XP. This system will allow you to give ANY pokemon up to 10 alternate forms. This system will only change looks, not stats. If you want it to change stats, I suggest you either code your own or use a different alternate forms system. This guide is good however, for if you want to change a pokemon’s outfit or clothing or something, or if you simply don’t care about stats.

 

This guide was updated on April 13th, 2009. First code section was changed, and one new code section was added at the bottom. Pokemon can now be encountered in the wild in their alternate forms.

 

 

The Code

 

 

In the script "PokeBattle_Pokemon", find the following code:

 

 

def egg?

 return @eggsteps>0

end

 

def isForeign?(trainer)

 return @trainerID!=trainer.id || @ot!=trainer.name

end

 

and put below it:

 

 

#new alt forms code
def isAlt?
  return @alt
end
 
def makeAlt
  a =@species
  filename=sprintf("Graphics/Battlers/%03da.png",a)
  if FileTest.exist?(filename)
     @alt=true
     @alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end


#form 2
def isAlt2?
  return @alt2
end
 
def makeAlt2
  a =@species
  filename=sprintf("Graphics/Battlers/%03da2.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=true
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end


#form 3
def isAlt3?
  return @alt3
end
 
def makeAlt3
  a =@species
  filename=sprintf("Graphics/Battlers/%03da3.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=true
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end

#form4
def isAlt4?
  return @alt4
end
 
def makeAlt4
  a =@species
  filename=sprintf("Graphics/Battlers/%03da4.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=false
 @alt4=true
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end

 

#form5
def isAlt5?
  return @alt5
end
 
def makeAlt5
  a =@species
  filename=sprintf("Graphics/Battlers/%03da5.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=false
 @alt4=false
 @alt5=true
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end


#form6
def isAlt6?
  return @alt6
end
 
def makeAlt6
  a =@species
  filename=sprintf("Graphics/Battlers/%03da6.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=true
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end


def isAlt7?
  return @alt7
end
 
#form7
def makeAlt7
  a =@species
  filename=sprintf("Graphics/Battlers/%03da7.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=true
 @alt8=false
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end


#form8
def isAlt8?
  return @alt8
end
 
def makeAlt8
  a =@species
  filename=sprintf("Graphics/Battlers/%03da8.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=true
 @alt9=false
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end

 

#form9
def isAlt9?
  return @alt9
end
 
def makeAlt9
  a =@species
  filename=sprintf("Graphics/Battlers/%03da9.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=true
 @alt10=false
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
end

#form10
def isAlt10?
  return @alt10
end
 
def makeAlt10
  a =@species
  filename=sprintf("Graphics/Battlers/%03da10.png",a)
  if FileTest.exist?(filename)
     @alt=false
     @alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=true
else
  @alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
     end
  end

 

   # changes to original form
    def noALTS
@alt=false
@alt2=false
 @alt3=false
 @alt4=false
 @alt5=false
 @alt6=false
 @alt7=false
 @alt8=false
 @alt9=false
 @alt10=false
end

 

 

Also in PokeBattle_Pokemon, find:

 

 

def initialize(species,level,player=nil)

 @ev=[0,0,0,0,0,0]

 

and below it put:

 

 

 @alt=false

 @alt2=false

 @alt3=false

 @alt4=false

 @alt5=false

 @alt6=false

 @alt7=false

 @alt8=false

 @alt9=false

 @alt10=false

 

in script PokemonUtilities, find:

 

 

return sprintf("Graphics/Icons/icon%03d.png",pokemon.species)

 

and replace with:

 

 

 return sprintf("Graphics/Icons/icon%03d%s%s%s%s%s%s%s%s%s%s.png",pokemon.species,pokemon.isAlt? ? "a" : "",

 pokemon.isAlt2? ? "a2" : "",

 pokemon.isAlt3? ? "a3" : "",

 pokemon.isAlt4? ? "a4" : "",

 pokemon.isAlt5? ? "a5" : "",

 pokemon.isAlt6? ? "a6" : "",

 pokemon.isAlt7? ? "a7" : "",

 pokemon.isAlt8? ? "a8" : "",

 pokemon.isAlt9? ? "a9" : "",

 pokemon.isAlt10? ? "a10" : "")

 

Also in PokemonUtilities, find:

 

 

      bitmapFileName=sprintf("Graphics/Battlers/%03d%s%s%s.png",species,

       pokemon.isShiny? ? "s" : "",

         pokemon.isAlt? ? "a" : "",

         back ? "b" : ""

         )

 

and replace with:

 

 

bitmapFileName=sprintf("Graphics/Battlers/%03d%s%s%s%s%s%s%s%s%s%s%s%s.png",species,

       pokemon.isShiny? ? "s" : "",

         pokemon.isAlt? ? "a" : "",

         pokemon.isAlt2? ? "a2" : "",

         pokemon.isAlt3? ? "a3" : "",

         pokemon.isAlt4? ? "a4" : "",

         pokemon.isAlt5? ? "a5" : "",

         pokemon.isAlt6? ? "a6" : "",

         pokemon.isAlt7? ? "a7" : "",

         pokemon.isAlt8? ? "a8" : "",

         pokemon.isAlt9? ? "a9" : "",

         pokemon.isAlt10? ? "a10" : "",

         back ? "b" : ""

         )

 

In PokemonField, find:

 

 
def pbGenerateWildPokemon(species,level)
    genwildpoke=PokeBattle_Pokemon.new(species,level,$Trainer)
    dexdata=pbOpenDexData
    itemrnd=rand(100)
    if itemrnd<50
     pbDexDataOffset(dexdata,species,48)
     genwildpoke.item=dexdata.fgetw
    elsif itemrnd<55
     pbDexDataOffset(dexdata,species,50)
     genwildpoke.item=dexdata.fgetw
    end
    dexdata.close
    Events.onWildPokemonCreate.trigger(nil,genwildpoke)
    pokerus=(rand(8192)==0)

 and put below it:

     altform=rand(11)
if altform ==1
genwildpoke.makeAlt
end
if altform ==2
genwildpoke.makeAlt2
end
if altform ==3
genwildpoke.makeAlt3
end
if altform ==4
genwildpoke.makeAlt4
end
if altform ==5
genwildpoke.makeAlt5
end
if altform ==6
genwildpoke.makeAlt6
end
if altform ==7
genwildpoke.makeAlt7
end
if altform ==8
genwildpoke.makeAlt8
end
if altform ==9
genwildpoke.makeAlt9
end
if altform ==10
genwildpoke.makeAlt10
end

Image files

 

Image files for the pokemon forms should follow the following example:

 

Pokemon #493 original form:

493.png

493s.png

493b.png

493sb.png

icon493.png

 

1st alt form:

493a.png

493sa.png

493ab.png

493sab.png

icon493a.png

 

2nd alt form:

493a2.png

493sa2.png

493a2b.png

493sa2b.png

icon493a2.png

 

..... keep naming them, changing only the number after the “a”, up to number 10.

If a pokemon has less then 10 forms, then you DO NOT need to provide images for 10 forms.

 

 

Changing the pokemon's form via an event

 

Here's an example of an event that let's you change a pokemon's form or outfit.

 

text: Change Kit's outfit?

show choices: OK, CANCEL

            When [OK]

            script: pbChoosePokemon(1,3)

            cond. branch: game variable #1  < 0

                        \PN chose not to have Kit get changed.

                        exit event processing

            end branch

            cond. branch - script: $Trainer.party[$game_variables[1]].egg?

                        text: an egg can't wear outfits....

                        exit event processing

            end branch

            script: $pkmndoll=$Trainer.party[$game_variables[1]]

            cond. branch - script: $pkmndoll.species==544

                        text: change Kit into which outfit?

                        text: \ch[26,8,"Meet Outfit","Play Dress","Birthday Dress","Holiday Dress","Pajamas","Reporter Dress","Floral Dress"]

                        cond. branch: game var 26 == 0

                                    script: $pkmndoll.noALTS

                                    text: Kit got changed. She looks happy and cute in her new outfit.

                        branch end

                        cond. branch: game var 26 == 1

                                    script: $pkmndoll.makeAlt

                                    text: Kit got changed. She looks happy and cute in her new outfit.

                        branch end

                        cond. branch: game var 26 == 2

                                    script: $pkmndoll.makeAlt2

                                    text: Kit got changed. She looks happy and cute in her new outfit.

                        branch end

                        cond. branch: game var 26 == 3

                                    script: $pkmndoll.makeAlt3

                                    text: Kit got changed. She looks happy and cute in her new outfit.

                        branch end

                        cond. branch: game var 26 == 4

                                    script: $pkmndoll.makeAlt4

                                    text: Kit got changed. She looks happy and cute in her new outfit.

                        branch end

                        cond. branch: game var 26 == 5

                                    script: $pkmndoll.makeAlt5

                                    text: Kit got changed. She looks happy and cute in her new outfit.

                        branch end

                        cond. branch: game var 26 == 6

                                    script: $pkmndoll.makeAlt6

                                    text: Kit got changed. She looks happy and cute in her new outfit.

                        branch end

                                    cond. branch: game var 26 == 7

                                    \PN chose not to have Kit get changed.

                        branch end

            else

            text: Only KIT can get changed here.

            branch end

            when [CANCEL]

                        Text: \PN chose not to have Kit get changed.

            branch end

 

Good Luck! :)

 

 

Credits:

udivision - my work is based off some of his code.

wichu - slightly modified udivison's code, and gave a few suggestions.

Dialga-Brite - Me.

poccil - created pokemon essentials.

 

 
   
You can place news, pictures or advertisements here.