The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Scripts & Tutorials
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

Scripts & Tutorials This forum is for scripts and code, as well as all kinds of tutorials, software, tools and so forth. Remember to give credit!
The thread revival limit does not apply here.


Reply
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old December 11th, 2010, 11:19 AM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Have you tired of all the Eggs looks exactly? With this script you can change this!
I also create Sample Eggs for the Egg Groups plus Togepi (see the zip).
Code:
#===============================================================================
# Change egg picture - by FL (Credits will be apreciated)
#===============================================================================
#
# This script is for Poccil Pokémon Essentials, to install put it above main,
# put one picture for each egg in YourGameFolder\Graphics\Pictures. Put the
# pictures for each Egg Group (15) like egg1, egg2, egg3... and  iconEgg1,
# iconEgg2, iconEgg3... for icons. 
# Change a line in PokemonUtilities. The line 
# return AnimatedBitmap.new(sprintf("Graphics/Pictures/egg"))
# change it for 
# return AnimatedBitmap.new(sprintf(EggType.EggPicture(pokemon.species,false)))
# If you want change the icons too, change other line in the same script. 
# The line 
# return sprintf("Graphics/Pictures/iconEgg")
# change it for
# return sprintf(EggType.EggPicture(pokemon.species,true))
#
#===============================================================================
#
# This script changes the egg picture for each pokémon that they contains.
# I put one for each Egg Group, but in a way to Igglybuff (a pokémon that
# cannot breed and have Egg Group 15) to have they evolution (Jigglypuff) Egg
# Group (6).
# You can add special egg pictures like Togepi if you follow the instructions
# in specialcases. Name the special cases eggs+specialcasepokémon number, like
# eggs175 for Togepi. I recommend to use this.
# You can uncomment a line to change it to put one egg for EACH pokémon species
# instead one for each Egg Group. Use a picture for each pokémon species that
# can be in a egg, use the specie number in a picture, like egg100 for Voltorb,
# but the egg101 isn't necessary because that Electrode cannot be in a egg.
#
#===============================================================================

module EggType
  
  def self.EggPicture(specie,isIcon)
    compat=EggType.getCompat(specie) # picks the Compatibility
    if(compat==15) # if the Compatibility is 15, checks for evo (for babies)
      ret=pbGetEvolvedFormData(specie)
      compat=EggType.getCompat(ret[0][2]) if (ret[0]!=nil)
    end
    resultnumber=compat.to_s
#   resultnumber=EggType.specialcases(specie,compat)
#   UNCOMMENT THE ABOVE LINE TO USE SPECIAL CASES
#   resultnumber=specie.to_s
#   UNCOMMENT THE ABOVE LINE TO PUT ONE EGG PICTURE FOR EACH POKÉMON SPECIES
    if isIcon
      eggstring="Graphics/Pictures/iconEgg"+resultnumber
    else
      eggstring="Graphics/Pictures/egg"+resultnumber
    end  
    # use the egg picture, plus a number, like egg3 for Caterpie
    return eggstring
  end
  
  def self.specialcases(specie,compat)
    case specie
    when 175 # Togepi Number
      return ("s"+specie.to_s) # Use eggs175 to Togepi Egg Picture
    #when ? 
    #  return ("s"+specie.to_s)
    # Copy the two above lines, uncomment and change the "?" for a special
    # case pokémon number. Do this for each special case pokémon 
    else
      return (compat.to_s)
    end
  end
  
  def self.getCompat(specie) # Returns the first Compatibility.
    dexdata=pbOpenDexData
    pbDexDataOffset(dexdata,specie,31)
    compat1=dexdata.fgetb
    compat2=dexdata.fgetb
    dexdata.close
    return compat1
  end
end
Attached Thumbnails
EggTypeScreen.png‎  
Attached Files
File Type: zip Sample Eggs.zip‎ (57.2 KB, 79 views) (Save to Dropbox)
Reply With Quote
  #2    
Old December 11th, 2010, 11:30 AM
Cilerba
the hearts of lonely people
Community Supporter
 
Join Date: Feb 2010
Location: Massachusetts
Age: 17
Gender: Male
Nature: Quiet
This is a pretty neat idea you got here, FL. I'll download it soon and tell you what I think of it. :D
__________________
A MODEST PROPOSAL
http://www.pokecommunity.com/showthread.php?p=7766537
Reply With Quote
  #3    
Old December 11th, 2010, 11:54 AM
KitsuneKouta's Avatar
KitsuneKouta
狐 康太
 
Join Date: Mar 2010
Age: 23
Gender: Male
I messed with something sort of like this a while back too. I didn't do the icons, nice idea by the way, but had the egg pictures change based on type. Yours is a bit neater though, and using egg group instead of types works a bit better since you don't have to worry about mixing (as you would with dual types).
__________________
Creator of the Harvest Moon Tool Kit (HMTK).

Anime/Manga fans can find me on MyAnimeList.net, as KitsuneKouta.
Reply With Quote
Reply
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 12:32 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.