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
 
Thread Tools
  #1    
Old October 6th, 2015 (6:00 PM). Edited 6 Hours Ago by Lucidious89.
Lucidious89 Lucidious89 is online now
     
    Join Date: Apr 2014
    Gender: Male
    Posts: 166
    Egg Group Types


    This displays the Egg Groups for each species in its Summary screen (Page 2). I renamed some Egg Groups due to spacing issues, or to avoid confusion with actual Pokemon types, but feel free to name them what you wish if creating custom icons of your own.

    Name Changes
    Monster = Monster
    Water 1 = Aquatic
    Bug = Insect
    Flying = Aerial
    Field = Field
    Fairy = Pixie
    Grass = Plant
    Humanlike = Humanoid
    Water 3 = Shellbody
    Mineral = Mineral
    Amorphous = Enigma
    Water 2 = Marine
    Ditto = Mimic
    Dragon = Draco
    Undiscovered = No Eggs

    Breedable genderless species (besides Ditto) will have their Egg Group be displayed as "????".


    This is now compatible with Essentials v17. This now comes built-in with my Pokemon Birthsigns project, so there's no need to install this if you're already using that. Just make sure that the SHOW_EGG_GROUPS toggle is set to "true" for this to show up.

    Installation

    Go to Thread Tools > Show Printable Version in the top right corner of this post before copy/pasting any code. This'll avoid errors.

    Step 1
    First, you must install the following graphic into your Pictures folder:
    Egg Groups

    Step 2
    In PScreen_Summary, paste the following above "def drawPage(page)":
    Code:
    #=============================================================================
      # Egg Groups - Shows Pokemon's Egg Groups on Page 2 (Memo)
      #=============================================================================
      def pbDisplayEggGroups
        if [email protected]?
          dexdata=pbOpenDexData
          pbDexDataOffset(dexdata,@pokemon.species,31)
          compat10=dexdata.fgetb
          compat11=dexdata.fgetb
          noGender=(@pokemon.isGenderless? && !isConst?(@pokemon.species,PBSpecies,:DITTO))
          eggGroupbitmap=AnimatedBitmap.new(_INTL("Graphics/Pictures/typesEgg"))
          eggGroup0rect=Rect.new(0,700,64,28)
          eggGroup1rect=Rect.new(0,compat10*28,64,28)
          eggGroup2rect=Rect.new(0,compat11*28,64,28)
          overlay = @sprites["overlay"].bitmap
          if noGender && compat10!=0
            overlay.blt(364,336,eggGroupbitmap.bitmap,eggGroup0rect)
          elsif compat10==compat11
            overlay.blt(364,336,eggGroupbitmap.bitmap,eggGroup1rect)
          else
            overlay.blt(364,336,eggGroupbitmap.bitmap,eggGroup1rect)
            overlay.blt(432,336,eggGroupbitmap.bitmap,eggGroup2rect)
          end
          dexdata.close
        end
        if compat10>14
          textpos=[[_INTL("Egg Groups:"),234,334,0,Color.new(41,86,143),Color.new(150,177,210)]]
        else
          textpos=[[_INTL("Egg Groups:"),234,334,0,Color.new(64,64,64),Color.new(176,176,176)]]
        end
        pbDrawTextPositions(overlay,textpos)
      end
    Step 3
    Then, somewhere in drawPage(page), paste this line (right above pbDrawImagePositions(overlay,imagepos) would be fine)
    Code:
    pbDisplayEggGroups if @page==2
    And that's it! Enjoy.


    Other scripts of mine that you may like:
    Spoiler:
    • "Pokemon Birthsigns"
      This is my most ambitious project, consisting of several scripts that adds an entirely new breeding mechanic to the game known as 'Birthsigns'. These are added perks that are applied to a Pokemon at its moment of birth, which vary depending on the different constellations for each month of the year. Think Elder Scrolls, but with a Pokemon twist!

    • "Legendary Breeding"
      This adds new mechanics to allow breeding among legendary species. Adds new Egg Groups that are fully compatible with the Egg Group display.

    • "IV Star Ratings"
      A script that gives a general indication of the Pokemon's IV's through a star ranking system in the summary. This may be more visually appealing if you don't like the idea of cramming your screen with a bunch of extra numbers, but still want to give the player some way to gauge a quality Pokemon at a glance.

    • "HGSS Shiny Leaf Display"
      A script that adds the ability to attach Shiny Leaves to your Pokemon, a feature exclusive to HGSS. This adds an extra way of adding some uniqueness to your Pokemon. How you utilize them is up to you!

    • "Unique Party Ball"
      A script that changes the ball graphic in the party screen to reflect the actual ball the Pokemon was caught in, rather than always displaying the standard Pokeball.

    • "Custom Abilities"
      A series of miscellaneous scripts for different abilities I came up with. Any new ones I make are added to the thread, and anyone else who'd like to contribute are free to as well!
    Reply With Quote

    Relevant Advertising!

      #2    
    Old October 9th, 2015 (11:42 PM).
    Rot8er_ConeX's Avatar
    Rot8er_ConeX Rot8er_ConeX is offline
       
      Join Date: May 2015
      Location: The Dissa Region
      Gender: Male
      Posts: 823
      Stuck your code in a few places where you never intended it to go, slightly edited your image so that each egg group has its own color the way each type has its own color,

      Works like a charm.

      __________________
      Features of Pokemon Entropy

      The black circular "doodles" in the lower right corner of my avatar are actually my username written in Gallifreyan. Yes I'm a Whovian.
      Reply With Quote
        #3    
      Old October 10th, 2015 (1:10 AM).
      Lucidious89 Lucidious89 is online now
         
        Join Date: Apr 2014
        Gender: Male
        Posts: 166
        Awesome, looks good. The pokedex is another great place for this.
        Reply With Quote
          #4    
        Old February 1st, 2016 (8:08 AM).
        Lucidious89 Lucidious89 is online now
           
          Join Date: Apr 2014
          Gender: Male
          Posts: 166
          Just noting that this still works as intended as far as I can tell in Essentials v16. If anyone encounters errors, let me know.
          Reply With Quote
            #5    
          Old 3 Weeks Ago (10:08 PM).
          kurugane's Avatar
          kurugane kurugane is offline
             
            Join Date: Aug 2014
            Gender: Male
            Posts: 5
            It doesn't work in Pokemon essentials 17.2
            Reply With Quote
              #6    
            Old 3 Weeks Ago (4:57 AM).
            p.claydon p.claydon is online now
               
              Join Date: Jan 2011
              Gender:
              Posts: 373
              yh ive noticed this appears 17.2 dsnt work well with scripts for previous versions
              __________________
              Still learning how to sprite but if you want to look at my progress then here you go
              http://pclaydon.deviantart.com/gallery/
              Reply With Quote
                #7    
              Old 3 Weeks Ago (9:55 AM).
              Lucidious89 Lucidious89 is online now
                 
                Join Date: Apr 2014
                Gender: Male
                Posts: 166
                Thanks for making me aware of this. I've updated the instructions so this may now be compatible with Essentials v17. If you happen to also be using my Birthsigns script, you will have to install this within that script, instead of PScreen_Summary. You may have to move some graphics around to accommodate this.
                Reply With Quote
                  #8    
                Old 3 Weeks Ago (11:53 AM).
                p.claydon p.claydon is online now
                   
                  Join Date: Jan 2011
                  Gender:
                  Posts: 373
                  thank you for the update this script works great
                  __________________
                  Still learning how to sprite but if you want to look at my progress then here you go
                  http://pclaydon.deviantart.com/gallery/
                  Reply With Quote
                    #9    
                  Old 1 Week Ago (9:05 AM). Edited 1 Week Ago by Lucidious89.
                  Lucidious89 Lucidious89 is online now
                     
                    Join Date: Apr 2014
                    Gender: Male
                    Posts: 166
                    Minor update
                    • I've created a new graphic for the Egg Group types to make it look less shabby.

                    • I've also slightly updated the code so that now breedable genderless species (like Magnemite and Porygon) will have their Egg Group be displayed as "????", while unbreedable species (like Mewtwo or Arceus) will have their Egg Group be displayed as "No Eggs". This is to help differentiate them a bit, and it just makes a bit more visual sense (since Porygon being in the Mineral group is kinda moot if it cant breed with any of them, for example).

                    • This script has now been rolled into my Pokemon Birthsigns project, and thus does not need to be installed if you're already using that.

                    Here are some example images:

                    Reply With Quote
                      #10    
                    Old 1 Week Ago (12:19 AM).
                    Keileon's Avatar
                    Keileon Keileon is offline
                    Pokémon Sardonyx: RtW dev
                       
                      Join Date: Jul 2017
                      Gender: Female
                      Nature: Quiet
                      Posts: 5
                      Hi! This script looks *great* and I'd like to use it, but whether I put the code in as-is or fiddle with it in a way that seems intuitive it just doesn't work. No error or anything, it just doesn't show up.

                      Here's what we have under def drawPageTwo in its entirety:
                      https://pastebin.com/n4FtQpcZ

                      The main edit I made was to fix the image's location as we're not using Birthsigns. Even with only that edit made, it didn't work. So I removed if SHOW_EGG_GROUPS and its corresponding "end" because it seemed like that also relied on Birthsigns being present. I've messed around with deleting one but not the other, deleting both, and leaving both in, and none of them seem to do anything.

                      We're still using Essentials v16.2 as some of our scripts don't like v17. I don't know why Essentials version would make a difference in this case, but then I'm not the best at coding. So if I've missed something glaringly obvious, go easy on me as I barely know what I'm doing. :P

                      Thank you for your time!
                      __________________
                      Reply With Quote
                        #11    
                      Old 1 Week Ago (4:49 AM). Edited 1 Week Ago by Lucidious89.
                      Lucidious89 Lucidious89 is online now
                         
                        Join Date: Apr 2014
                        Gender: Male
                        Posts: 166
                        Quote:
                        Originally Posted by Keileon View Post
                        Hi! This script looks *great* and I'd like to use it, but whether I put the code in as-is or fiddle with it in a way that seems intuitive it just doesn't work. No error or anything, it just doesn't show up.

                        Here's what we have under def drawPageTwo in its entirety:
                        https://pastebin.com/n4FtQpcZ

                        The main edit I made was to fix the image's location as we're not using Birthsigns. Even with only that edit made, it didn't work. So I removed if SHOW_EGG_GROUPS and its corresponding "end" because it seemed like that also relied on Birthsigns being present. I've messed around with deleting one but not the other, deleting both, and leaving both in, and none of them seem to do anything.

                        We're still using Essentials v16.2 as some of our scripts don't like v17. I don't know why Essentials version would make a difference in this case, but then I'm not the best at coding. So if I've missed something glaringly obvious, go easy on me as I barely know what I'm doing.

                        Thank you for your time!
                        That's because im an idiot who updated the code, but forgot to update the instructions. I also had a line or two that was incorrect for the non-Birthsigns version. It's fixed now, sorry.
                        Reply With Quote
                          #12    
                        Old 1 Week Ago (5:23 AM).
                        Keileon's Avatar
                        Keileon Keileon is offline
                        Pokémon Sardonyx: RtW dev
                           
                          Join Date: Jul 2017
                          Gender: Female
                          Nature: Quiet
                          Posts: 5
                          Thanks for the prompt fix. Now, however, I can't find "def drawPage(page)". This is where I'm assuming it's because we're still using Essentials 16.2 and is probably when I should stop and wait for my scripter to wake up.

                          *goes to mess around in a copied folder anyway because why wouldn't I try to do this myself lol*
                          __________________
                          Reply With Quote
                            #13    
                          Old 1 Week Ago (5:31 AM).
                          Lucidious89 Lucidious89 is online now
                             
                            Join Date: Apr 2014
                            Gender: Male
                            Posts: 166
                            Quote:
                            Originally Posted by Keileon View Post
                            Thanks for the prompt fix. Now, however, I can't find "def drawPage(page)". This is where I'm assuming it's because we're still using Essentials 16.2 and is probably when I should stop and wait for my scripter to wake up.

                            *goes to mess around in a copied folder anyway because why wouldn't I try to do this myself lol*
                            Ahh, yes. Sorry. It's a v17 thing. For step 2, just try inserting the code where you were before (bottom of page 2), but delete the "def pbDisplayEggGroups" line, and the final "end". And just ignore Step 3. That should work, but I'm not at a computer to test.
                            Reply With Quote
                              #14    
                            Old 1 Week Ago (5:38 AM).
                            Keileon's Avatar
                            Keileon Keileon is offline
                            Pokémon Sardonyx: RtW dev
                               
                              Join Date: Jul 2017
                              Gender: Female
                              Nature: Quiet
                              Posts: 5
                              Ah yep, that one works. For some reason I got a syntax error thrown at me but I'm assuming I just messed up while copying, I deleted the line that was being a pill (it was just an "end") and it works perfectly now. Thanks!
                              __________________
                              Reply With Quote
                                #15    
                              Old 11 Hours Ago (1:03 AM).
                              Lucidious89 Lucidious89 is online now
                                 
                                Join Date: Apr 2014
                                Gender: Male
                                Posts: 166
                                Minor update.
                                • Renamed the Water 3 Egg Group from "Ancient" to "Shellbody". This more accurately describes the kinds of species that occupy the group.
                                • Further improved the quality of the Egg Group graphic.
                                • Added 8 new Egg Groups to the graphic so that it may now be fully compatible with my Legendary Breeding scripts.
                                • Made some slight changes to the code for compatibility.
                                Reply With Quote
                                Reply

                                Quick Reply

                                Join the conversation!

                                Create an account to post a reply in this thread, participate in other discussions, and more!

                                Create a PokéCommunity Account

                                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

                                Forum Jump


                                All times are GMT -8. The time now is 12:59 PM.