The PokéCommunity Forums Fan Games Game Development Scripts & Tutorials
Essentials Script Family Tree

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
  #26    
Old May 11th, 2015 (4:26 PM).
Lucidious89 Lucidious89 is offline
     
    Join Date: Apr 2014
    Gender: Male
    Posts: 169
    Quote:
    Originally Posted by FL View Post
    I guess that you biggest problem is that pbDexDataOffset second paramether must be the Pokémon index number (species) and you are passing a PokeBattle_Pokemon instance.

    Add this def on your script.

    Code:
      def getEggGroupString(species)
      dexdata=pbOpenDexData
      pbDexDataOffset(dexdata,species,31)
      compat10=dexdata.fgetb
      compat11=dexdata.fgetb
      eggGroupArray=[
          nil,_INTL("Monster"),_INTL("Water1"),_INTL("Bug"),_INTL("Flying"),
          _INTL("Ground"),_INTL("Fairy"),_INTL("Plant"),_INTL("Humanshape"),
          _INTL("Water3"),_INTL("Mineral"),_INTL("Indeterminate"),
          _INTL("Water2"),_INTL("Ditto"),_INTL("Dragon"),_INTL("No Eggs")
      ]
      ret = compat10==compat11 ? eggGroupArray[compat10] : 
          _INTL("{1}, {2}",eggGroupArray[compat10],eggGroupArray[compat11])
      dexdata.close
      return ret
    end
    So, if you call 'getEggGroupString(parent[j].species)' (on the right spot where 'parent' and 'j' exist, of course), this will return you the Egg Group formatted.
    Thanks, this helped. I think I've got it working how I want it now.
    Reply With Quote

    Relevant Advertising!

      #27    
    Old August 7th, 2015 (1:40 AM).
    AndromedaKerova AndromedaKerova is offline
       
      Join Date: Aug 2015
      Gender: Female
      Nature: Sassy
      Posts: 32
      I'm having a problem with this script. When it comes to loading the game, it reads the line on 677 and throws an error. Syntax Error occurred.

      Here's what I have in that area.

      676 def drawPageFive(pokemon)
      677 when 5
      678 drawPageSix(@pokemon)
      679 [email protected]["overlay"].bitmap
      680 overlay.clear
      Reply With Quote
        #28    
      Old August 7th, 2015 (6:40 AM).
      Rot8er_ConeX's Avatar
      Rot8er_ConeX Rot8er_ConeX is offline
         
        Join Date: May 2015
        Location: The Dissa Region
        Gender: Male
        Posts: 823
        You can't use a "when" command without having defined the "case" command as well.
        __________________
        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
          #29    
        Old August 8th, 2015 (8:07 PM).
        AndromedaKerova AndromedaKerova is offline
           
          Join Date: Aug 2015
          Gender: Female
          Nature: Sassy
          Posts: 32
          I simply went to thread tools and copied the script into the right place then did the other parts the script said in those places so I'm not really sure what I'm doing wrong. I'm not exactly fluent in this form of coding, not yet at least. I think LSL, basic PHP, basic HTML, LUA etc is enough for my brain right now.
          __________________
          Currently working on 2 projects.
          Chromia (banner to be added)
          Mirror (banner to be added)
          Reply With Quote
            #30    
          Old September 13th, 2015 (4:16 AM).
          Richard PT's Avatar
          Richard PT Richard PT is offline
             
            Join Date: Aug 2014
            Location: Portugal
            Gender: Male
            Nature: Calm
            Posts: 93
            It's a great script, good work.

            I tested it in various ways to see if i got errors. This script works fine but if i have a pokemon in the party that have parents in summary family tree page, when i close the game and open again, this errors appear before the tittle screen, after i press ok in all messages, the game runs nice.
            Is that a way to fix this?

            __________________
            Reply With Quote
              #31    
            Old September 14th, 2015 (9:12 PM).
            Super Dedenne's Avatar
            Super Dedenne Super Dedenne is offline
               
              Join Date: Apr 2014
              Gender: Other
              Posts: 32
              The order of your scripts matter. Please move this script somewhere above Main but also above PField_Daycare.

              It'll be fine afterward.
              __________________
              Public Additions/Snippets:
              Trainer Outfit: Acro/MachBike Fix
              (Needs 15.1 update) Pokemon Summary Add-On: Improved Ribbons + Scroll!
              I might release some of my private plug-n'-play scripts in the future.
              Reply With Quote
                #32    
              Old September 15th, 2015 (2:12 AM). Edited September 15th, 2015 by Maruno.
              Richard PT's Avatar
              Richard PT Richard PT is offline
                 
                Join Date: Aug 2014
                Location: Portugal
                Gender: Male
                Nature: Calm
                Posts: 93
                Thanks to answer i will check to see what happens.

                It worked, i moved the script above PField_Daycare and those messages are gone. I had that script only above Main. Thanks.
                __________________
                Reply With Quote
                  #33    
                Old September 19th, 2015 (11:05 AM).
                FL's Avatar
                FL FL is offline
                Pokémon Island Creator
                   
                  Join Date: Sep 2010
                  Gender: Male
                  Posts: 1,722
                  Quote:
                  Originally Posted by AndromedaKerova View Post
                  I'm having a problem with this script. When it comes to loading the game, it reads the line on 677 and throws an error. Syntax Error occurred.

                  Here's what I have in that area.

                  676 def drawPageFive(pokemon)
                  677 when 5
                  678 drawPageSix(@pokemon)
                  679 [email protected]["overlay"].bitmap
                  680 overlay.clear
                  Sorry, I didn't notice your message. Just copy the script using "Show Printable Version" option and follow the instructions.

                  Quote:
                  Originally Posted by Richard PT View Post
                  It's a great script, good work.

                  I tested it in various ways to see if i got errors. This script works fine but if i have a pokemon in the party that have parents in summary family tree page, when i close the game and open again, this errors appear before the tittle screen, after i press ok in all messages, the game runs nice.
                  Is that a way to fix this?

                  Exact as Super Dedenne said. The load script is called on pbSetUpSystem() on PokemonSystem, so, if you put any class below this section that have an instance on any part of save data, you got this error. I've warned Maruno long time ago.
                  __________________
                  Reply With Quote
                    #34    
                  Old September 20th, 2015 (2:15 AM).
                  Richard PT's Avatar
                  Richard PT Richard PT is offline
                     
                    Join Date: Aug 2014
                    Location: Portugal
                    Gender: Male
                    Nature: Calm
                    Posts: 93
                    Thanks for your help.
                    __________________
                    Reply With Quote
                      #35    
                    Old September 20th, 2015 (8:53 AM).
                    AndromedaKerova AndromedaKerova is offline
                       
                      Join Date: Aug 2015
                      Gender: Female
                      Nature: Sassy
                      Posts: 32
                      I managed to fix it with a fresh copy. I'm not entirely sure what use this is but it makes me feel more connected to my Pokemon. More of a personal level I guess. <3
                      __________________
                      Currently working on 2 projects.
                      Chromia (banner to be added)
                      Mirror (banner to be added)
                      Reply With Quote
                        #36    
                      Old January 8th, 2016 (6:16 PM).
                      PunkPhantom's Avatar
                      PunkPhantom PunkPhantom is offline
                      "midna's a cat" -vinny, vinesauce
                         
                        Join Date: Mar 2014
                        Age: 22
                        Gender: Female
                        Nature: Naive
                        Posts: 79
                        I'm sorry I know this thread is old, but I tried putting in this script (using v16.1). When I go into the Pokemon Summary screen I get this error.

                        Code:
                        Exception: NoMethodError
                        Message: undefined method `name' for nil:NilClass
                        PField_Field:1695
                        PField_Field:1688:in `call'
                        Event:54:in `trigger'
                        Event:49:in `each'
                        Event:49:in `trigger'
                        PField_Map:617:in `setMapChanging'
                        PField_Map:594:in `setup'
                        PScreen_Load:365:in `pbStartLoadScreen'
                        PScreen_Load:335:in `open'
                        PScreen_Load:335:in `pbStartLoadScreen'
                        __________________
                        POKEMON ABSOLUTION
                        coming soon
                        Reply With Quote
                          #37    
                        Old January 10th, 2016 (7:10 AM).
                        FL's Avatar
                        FL FL is offline
                        Pokémon Island Creator
                           
                          Join Date: Sep 2010
                          Gender: Male
                          Posts: 1,722
                          Quote:
                          Originally Posted by PunkPhantom View Post
                          I'm sorry I know this thread is old, but I tried putting in this script (using v16.1). When I go into the Pokemon Summary screen I get this error.

                          Code:
                          Exception: NoMethodError
                          Message: undefined method `name' for nil:NilClass
                          PField_Field:1695
                          PField_Field:1688:in `call'
                          Event:54:in `trigger'
                          Event:49:in `each'
                          Event:49:in `trigger'
                          PField_Map:617:in `setMapChanging'
                          PField_Map:594:in `setup'
                          PScreen_Load:365:in `pbStartLoadScreen'
                          PScreen_Load:335:in `open'
                          PScreen_Load:335:in `pbStartLoadScreen'
                          Updated and tested.
                          __________________
                          Reply With Quote
                            #38    
                          Old January 10th, 2016 (7:38 PM).
                          PunkPhantom's Avatar
                          PunkPhantom PunkPhantom is offline
                          "midna's a cat" -vinny, vinesauce
                             
                            Join Date: Mar 2014
                            Age: 22
                            Gender: Female
                            Nature: Naive
                            Posts: 79
                            It works now, thank you!
                            __________________
                            POKEMON ABSOLUTION
                            coming soon
                            Reply With Quote
                              #39    
                            Old March 25th, 2016 (3:26 PM).
                            marfil92 marfil92 is offline
                               
                              Join Date: Jun 2008
                              Gender:
                              Posts: 46
                              Hello
                              I put the script and I have done all the modifications but I can't access to the family tree summary page. It doesn't says any error. I am working with the 16.1 version.

                              Thanks!
                              Reply With Quote
                                #40    
                              Old March 26th, 2016 (4:36 AM).
                              FL's Avatar
                              FL FL is offline
                              Pokémon Island Creator
                                 
                                Join Date: Sep 2010
                                Gender: Male
                                Posts: 1,722
                                Quote:
                                Originally Posted by marfil92 View Post
                                Hello
                                I put the script and I have done all the modifications but I can't access to the family tree summary page. It doesn't says any error. I am working with the 16.1 version.

                                Thanks!
                                You probably done something wrong/missed a step, since this tutorial was tested with 16.1. Redo the steps.
                                __________________
                                Reply With Quote
                                  #41    
                                Old March 26th, 2016 (7:11 AM).
                                marfil92 marfil92 is offline
                                   
                                  Join Date: Jun 2008
                                  Gender:
                                  Posts: 46
                                  I solve the problem. You have to edit the Birthsigns Script too.
                                  Reply With Quote
                                    #42    
                                  Old April 17th, 2016 (4:38 PM). Edited April 17th, 2016 by p.claydon.
                                  p.claydon p.claydon is offline
                                     
                                    Join Date: Jan 2011
                                    Gender:
                                    Posts: 379
                                    how do you get the birthsign token icon on the family tree page?
                                    __________________
                                    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
                                      #43    
                                    Old April 17th, 2016 (8:16 PM).
                                    Lucidious89 Lucidious89 is offline
                                       
                                      Join Date: Apr 2014
                                      Gender: Male
                                      Posts: 169
                                      Quote:
                                      Originally Posted by p.claydon View Post
                                      how do you get the birthsign token icon on the family tree page?
                                      Check the Birthsigns thread, I just helped someone with this.
                                      Reply With Quote
                                        #44    
                                      Old April 18th, 2016 (10:27 AM).
                                      p.claydon p.claydon is offline
                                         
                                        Join Date: Jan 2011
                                        Gender:
                                        Posts: 379
                                        thank you 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
                                          #45    
                                        Old June 4th, 2016 (2:47 PM).
                                        p.claydon p.claydon is offline
                                           
                                          Join Date: Jan 2011
                                          Gender:
                                          Posts: 379
                                          ok so just upgraded to essentials 16.2 and now it wont show the parents of the hatched pokemon just remains as ? any help to get it working?
                                          __________________
                                          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
                                            #46    
                                          Old June 4th, 2016 (5:17 PM).
                                          FL's Avatar
                                          FL FL is offline
                                          Pokémon Island Creator
                                             
                                            Join Date: Sep 2010
                                            Gender: Male
                                            Posts: 1,722
                                            Quote:
                                            Originally Posted by p.claydon View Post
                                            ok so just upgraded to essentials 16.2 and now it wont show the parents of the hatched pokemon just remains as ? any help to get it working?
                                            Tested right now and it's working. Did you forget the first step or did you "generate" the egg before implementing this script?
                                            __________________
                                            Reply With Quote
                                              #47    
                                            Old June 5th, 2016 (1:15 AM). Edited June 5th, 2016 by p.claydon.
                                            p.claydon p.claydon is offline
                                               
                                              Join Date: Jan 2011
                                              Gender:
                                              Posts: 379
                                              ok tested the on a clean copy and works it appears ive missed something with the birthsigns but not quite sure what
                                              EDIT
                                              okay fixed i missed the daycare thing from the birthsigns script
                                              __________________
                                              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
                                                #48    
                                              Old July 5th, 2016 (5:23 AM). Edited July 6th, 2016 by mej71.
                                              Pokemon Fan 1604 :) Pokemon Fan 1604 :) is offline
                                                 
                                                Join Date: Apr 2015
                                                Gender: Male
                                                Posts: 1
                                                ---------------------------
                                                Pokemon Essentials
                                                ---------------------------
                                                Exception: NoMethodError

                                                Message: undefined method `hasEgg?' for #<PokeBattle_Pokemon:0x903fea8>

                                                Family Tree:46:in `drawPageSeven'

                                                PScreen_Summary:1067:in `pbScene'

                                                PScreen_Summary:989:in `loop'

                                                PScreen_Summary:1070:in `pbScene'

                                                PScreen_Summary:1084:in `pbStartScreen'

                                                PScreen_Party:790:in `pbSummary'

                                                PScreen_Party:1905:in `pbPokemonScreen'

                                                PScreen_Party:1816:in `loop'

                                                PScreen_Party:1993:in `pbPokemonScreen'

                                                PScreen_PauseMenu:174:in `pbStartPokemonMenu'



                                                This exception was logged in

                                                C:\Users\Office\Saved Games/Pokemon Essentials/errorlog.txt.

                                                Press Ctrl+C to copy this message to the clipboard.
                                                ---------------------------
                                                OK
                                                ---------------------------

                                                Getting this error..

                                                Sorry if there is a dumb mistake I'm doing somewhere.
                                                Using Essentials v16.1 btw and have made all Six --> Seven and other @page which have 5 --> 6

                                                Quote:
                                                Originally Posted by Pokemon Fan 1604 :) View Post
                                                ---------------------------
                                                Pokemon Essentials
                                                ---------------------------
                                                Exception: NoMethodError

                                                Message: undefined method `hasEgg?' for #<PokeBattle_Pokemon:0x903fea8>

                                                Family Tree:46:in `drawPageSeven'

                                                PScreen_Summary:1067:in `pbScene'

                                                PScreen_Summary:989:in `loop'

                                                PScreen_Summary:1070:in `pbScene'

                                                PScreen_Summary:1084:in `pbStartScreen'

                                                PScreen_Party:790:in `pbSummary'

                                                PScreen_Party:1905:in `pbPokemonScreen'

                                                PScreen_Party:1816:in `loop'

                                                PScreen_Party:1993:in `pbPokemonScreen'

                                                PScreen_PauseMenu:174:in `pbStartPokemonMenu'



                                                This exception was logged in

                                                C:\Users\Office\Saved Games/Pokemon Essentials/errorlog.txt.

                                                Press Ctrl+C to copy this message to the clipboard.
                                                ---------------------------
                                                OK
                                                ---------------------------

                                                Getting this error..

                                                Sorry if there is a dumb mistake I'm doing somewhere.
                                                Using Essentials v16.1 btw and have made all Six --> Seven and other @page which have 5 --> 6
                                                I solved the error on my own, it was isEgg? lol.

                                                One suggestion: Is it possible that for wild Pokemons / Caught Pokemons the family becomes the male and the female of the same specie? It would become a lot interesting if it becomes so.. Thanks for the script though, it's awesome!
                                                __________________
                                                This signature has been disabled.
                                                Signature is too tall
                                                Please review and fix the issues by reading the signature rules.

                                                You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

                                                Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
                                                Reply With Quote
                                                  #49    
                                                Old July 10th, 2016 (3:44 AM).
                                                FL's Avatar
                                                FL FL is offline
                                                Pokémon Island Creator
                                                   
                                                  Join Date: Sep 2010
                                                  Gender: Male
                                                  Posts: 1,722
                                                  Quote:
                                                  Originally Posted by Pokemon Fan 1604 :) View Post
                                                  One suggestion: Is it possible that for wild Pokemons / Caught Pokemons the family becomes the male and the female of the same specie? It would become a lot interesting if it becomes so.. Thanks for the script though, it's awesome!
                                                  Yes, but is necessary to handle some exceptions, like when the specie have only male/female members and when it can't breed like Nidorina.
                                                  __________________
                                                  Reply With Quote
                                                    #50    
                                                  Old October 13th, 2016 (12:54 PM).
                                                  apokemoncoordinator apokemoncoordinator is offline
                                                     
                                                    Join Date: Jul 2016
                                                    Gender: Other
                                                    Posts: 40
                                                    Quote:
                                                    Originally Posted by FL View Post
                                                    PokéCommunity is breaking codes. For copying scripts at PokéCommunity: Click Thread Tools, and then Show Printable Version, and copy that instead.
                                                    Code:
                                                    #===============================================================================
                                                    # * Family Tree - by FL (Credits will be apreciated)
                                                    #===============================================================================
                                                    #
                                                    # This script is for Pokémon Essentials. It displays a sixth page at pokémon
                                                    # summary showing a little info about the pokémon mother, father, grandmothers
                                                    # and grandfathers if the pokémon has any.
                                                    #
                                                    #===============================================================================
                                                    #
                                                    # To this script works, put it above main, put a 512x384 background for this
                                                    # screen in "Graphics/Pictures/summary6" and in "Graphics/Pictures/summaryEgg6".
                                                    # This last one is only necessary if SHOWFAMILYEGG is true. You also need to
                                                    # update the below pictures in order to reflect the summary icon change:
                                                    # - summary1
                                                    # - summary2
                                                    # - summary3
                                                    # - summary4
                                                    # - summary4details
                                                    # - summary5
                                                    #
                                                    # -At PokemonDayCare, before line '$Trainer.party[$Trainer.party.length]=egg'
                                                    # add line 'egg.family = PokemonFamily.new(egg, father, mother)'
                                                    #
                                                    # -At PokemonSummary, change both lines '@page=4 if @page>4'
                                                    # to '@page=5 if @page>5'
                                                    #
                                                    # -Before line 'if Input.trigger?(Input::UP) && @partyindex>0'
                                                    # add line 'handleInputsEgg'
                                                    #
                                                    # -Change line 'if @page!=0' to 'if @page!=0 && !(SHOWFAMILYEGG && @page==5)'
                                                    #
                                                    # -After line 'drawPageFive(@pokemon)' add
                                                    #
                                                    # when 5
                                                    #   drawPageSix(@pokemon)
                                                    #
                                                    #===============================================================================
                                                    
                                                    class PokemonSummaryScene
                                                      SHOWFAMILYEGG = true # when true, family tree is also showed in egg screen.
                                                      
                                                      def drawPageSix(pokemon)
                                                        [email protected]["overlay"].bitmap
                                                        overlay.clear
                                                        @sprites["background"].setBitmap(@pokemon.isEgg? ? 
                                                            "Graphics/Pictures/summaryEgg6" : "Graphics/Pictures/summary6")
                                                        imagepos=[]
                                                        if pbPokerus(pokemon)==1 || pokemon.hp==0 || @pokemon.status>0
                                                          status=6 if pbPokerus(pokemon)==1
                                                          [email protected] if @pokemon.status>0
                                                          status=5 if pokemon.hp==0
                                                          imagepos.push(["Graphics/Pictures/statuses",124,100,0,16*status,44,16])
                                                        end
                                                        if pokemon.isShiny?
                                                          imagepos.push([sprintf("Graphics/Pictures/shiny"),2,134,0,0,-1,-1])
                                                        end
                                                        if pbPokerus(pokemon)==2
                                                          imagepos.push([
                                                              sprintf("Graphics/Pictures/summaryPokerus"),176,100,0,0,-1,-1])
                                                        end
                                                        [email protected] ? @pokemon.ballused : 0
                                                        ballimage=sprintf("Graphics/Pictures/summaryball%02d",@pokemon.ballused)
                                                        imagepos.push([ballimage,14,60,0,0,-1,-1])
                                                        pbDrawImagePositions(overlay,imagepos)
                                                        base=Color.new(248,248,248)
                                                        shadow=Color.new(104,104,104)
                                                        pbSetSystemFont(overlay)
                                                        naturename=PBNatures.getName(pokemon.nature)
                                                        itemname=pokemon.item==0 ? _INTL("None") : PBItems.getName(pokemon.item)
                                                        [email protected]
                                                        if @pokemon.name.split('').last=="♂" || @pokemon.name.split('').last=="♀"
                                                          [email protected][0..-2]
                                                        end
                                                        textpos=[
                                                           [_INTL("FAMILY TREE"),26,16,0,base,shadow],
                                                           [pokename,46,62,0,base,shadow],
                                                           [_INTL("Item"),16,320,0,base,shadow],
                                                           [itemname,16,352,0,Color.new(64,64,64),Color.new(176,176,176)],
                                                        ]
                                                        textpos.push([_INTL("{1}",pokemon.level),46,92,0,
                                                               Color.new(64,64,64),Color.new(176,176,176)]) if [email protected]?
                                                        if [email protected]?
                                                          if pokemon.gender==0
                                                            textpos.push([_INTL("♂"),178,62,0,
                                                                Color.new(24,112,216),Color.new(136,168,208)])
                                                          elsif pokemon.gender==1
                                                            textpos.push([_INTL("♀"),178,62,0,
                                                                Color.new(248,56,32),Color.new(224,152,144)])
                                                          end
                                                        end    
                                                        base=Color.new(248,248,248)
                                                        shadow=Color.new(104,104,104)
                                                        # Draw parents
                                                        parentsY=[78,234]
                                                        for i in 0...2
                                                          parent = @pokemon.family && @pokemon.family[i] ? @pokemon.family[i] : nil
                                                          iconParentParam = parent ? [parent.species,
                                                              parent.gender==1,false,parent.form,false] : [0,0,false,0,false]
                                                          iconParent=AnimatedBitmap.new(pbCheckPokemonIconFiles(iconParentParam))
                                                          overlay.blt(234,parentsY[i],iconParent.bitmap,Rect.new(0,0,64,64))
                                                          textpos.push([parent ? parent.name : _INTL("???"),
                                                              320,parentsY[i],0,base,shadow])
                                                          parentSpecieName=parent ? PBSpecies.getName(parent.species) : _INTL("???")
                                                          if (parentSpecieName.split('').last=="♂" ||
                                                              parentSpecieName.split('').last=="♀")
                                                            parentSpecieName=parentSpecieName[0..-2]
                                                          end
                                                          textpos.push([parentSpecieName,320,32+parentsY[i],0,base,shadow])
                                                          if parent
                                                            if parent.gender==0
                                                              textpos.push([_INTL("♂"),500,32+parentsY[i],1,
                                                                  Color.new(24,112,216),Color.new(136,168,208)])
                                                            elsif parent.gender==1
                                                              textpos.push([_INTL("♀"),500,32+parentsY[i],1,
                                                                  Color.new(248,56,32),Color.new(224,152,144)])
                                                            end
                                                          end    
                                                          grandX = [380,448]
                                                          for j in 0...2
                                                            iconGrandParam = parent && parent[j] ? [parent[j].species,
                                                                parent[j].gender==1,false,parent[j].form,false] : 
                                                                [0,0,false,0,false]
                                                            iconGrand=AnimatedBitmap.new(pbCheckPokemonIconFiles(iconGrandParam))
                                                            overlay.blt(
                                                                grandX[j],68+parentsY[i],iconGrand.bitmap,Rect.new(0,0,64,64))
                                                          end
                                                        end
                                                        pbDrawTextPositions(overlay,textpos)
                                                        drawMarkings(overlay,15,291,72,20,pokemon.markings)
                                                      end
                                                      
                                                      def handleInputsEgg
                                                        if SHOWFAMILYEGG && @pokemon.isEgg?
                                                          if Input.trigger?(Input::LEFT) && @page==5
                                                            @page=0 
                                                            pbPlayCursorSE()
                                                            dorefresh=true
                                                          end
                                                          if Input.trigger?(Input::RIGHT) && @page==0
                                                            @page=5 
                                                            pbPlayCursorSE()
                                                            dorefresh=true
                                                          end
                                                        end
                                                        if dorefresh
                                                          case @page
                                                            when 0
                                                              drawPageOne(@pokemon)
                                                            when 5
                                                              drawPageSix(@pokemon)
                                                          end
                                                        end
                                                      end
                                                    end
                                                    
                                                    
                                                    class PokemonFamily
                                                      MAXGENERATIONS = 3 # Tree stored generation limit
                                                      
                                                      attr_reader :mother # PokemonFamily object
                                                      attr_reader :father # PokemonFamily object
                                                      
                                                      attr_reader :species
                                                      attr_reader :gender
                                                      attr_reader :form
                                                      attr_reader :name # nickname
                                                      # You can add more data here and on initialize class. Just 
                                                      # don't store the entire pokémon object.
                                                      
                                                      def initialize(pokemon, father=nil,mother=nil)
                                                        initializedAsParent = !father || !mother
                                                        if pokemon.family && pokemon.family.father
                                                          @father = pokemon.family.father
                                                        elsif father 
                                                          @father = PokemonFamily.new(father)
                                                        end
                                                        if pokemon.family && pokemon.family.mother
                                                          @mother = pokemon.family.mother
                                                        elsif mother
                                                          @mother = PokemonFamily.new(mother)
                                                        end
                                                        
                                                        # This data is only initialized as a parent in a cub.
                                                        if initializedAsParent 
                                                          @species=pokemon.species
                                                          @gender=pokemon.gender
                                                          @name=pokemon.name
                                                          @form=pokemon.form
                                                        end
                                                        
                                                        applyGenerationLimit(MAXGENERATIONS)
                                                      end
                                                      
                                                      def applyGenerationLimit(generation)
                                                        if generation>1
                                                          father.applyGenerationLimit(generation-1) if @father
                                                          mother.applyGenerationLimit(generation-1) if @mother
                                                        else
                                                          father=nil
                                                          mother=nil
                                                        end  
                                                      end 
                                                      
                                                      def [](value) # [0] = father, [1] = mother
                                                        if value==0
                                                         return @father
                                                        elsif value==1
                                                         return @mother
                                                        end
                                                        return nil
                                                      end
                                                    end  
                                                      
                                                    class PokeBattle_Pokemon
                                                      attr_accessor :family
                                                    end
                                                    which one? there's two,so i just changed both lines with what is bold to the new line form
                                                    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 1:02 AM.