Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

TrollandToad.com
Reply
 
Thread Tools
  #1    
Old December 8th, 2016 (11:36 PM).
sonicfan7895's Avatar
sonicfan7895 sonicfan7895 is offline
Lead Programmer and Composer
     
    Join Date: Dec 2010
    Location: Akala Island, Alola
    Age: 20
    Gender: Male
    Nature: Serious
    Posts: 85
    The thread started by Black Temple Guardian really piqued my interest; all along I've wanted to see Pokemon with triple-typings, but never been able to implement it myself.

    And still I haven't been able to.

    But after seeing that thread (and also for the more obvious fact of avoiding necro-ing an almost-two-month-old thread), it made me want to implement the triple-type. But, the information isn't all there; I've tried doing everything that was suggested, but I kept getting a weird compiler editor that says the following;

    Code:
    Exception: NameError
    Message: uninitialized constant PBColors
    Compiler:1680:in `pbCompilePokemonData'
    Compiler:4098:in `pbCompileAllData'
    EditorMain #####:275:in `pbEditorMenu'
    EditorMain #####:85:in `loop'
    EditorMain #####:279:in `pbEditorMenu'
    EditorMain #####:285
    EditorMain #####:285:in `pbCriticalCode'
    EditorMain #####:285
    I don't think PBColors has anything to do with this; maybe does it have to do with the compiling of the data itself? I've honestly hit a road-block and don't know where else to turn. However, I would like to re-ignite this discussion and join in on this; my own personal project, I would like my Pokemon to have triple-types, among many other things.

    Any help would be appreciated!

    Original thread, started by Black Temple Guardian:
    https://www.pokecommunity.com/showthread.php?t=379877
    __________________
    Check out my band: xSOBERDOSE!
    On Facebook

    Currently working on my short story, set in-between the events of Colosseum and XD, Orre's Return! Check out the thread by clicking on the highlighted words!

    My favorite video game: Jade Cocoon 2!
    Favorite Monster from Jade Cocoon 2: Delapon or Frogess
    Favorite Move from Jade Cocoon 2: Dark Impact
    Reply With Quote

    Relevant Advertising!

      #2    
    Old December 9th, 2016 (1:51 AM).
    Telemetius's Avatar
    Telemetius Telemetius is offline
    Tele*
       
      Join Date: Nov 2014
      Location: Italy
      Gender: Male
      Nature: Relaxed
      Posts: 263
      I don't know if this information can be helpful but every time I met that error it was because I had (or hadn't) made modifications to the editor scripts following this guide: http://reliccastle.com/forums/showthread.php?tid=254 . You may try making the same fixes to the editor scripts as well. Just remember to keep a backup.
      __________________

      That way!
      I thought..uhm, ok.
      -----------------------------------------------------------------------------------------------
      Beta 50%
      Reply With Quote
        #3    
      Old December 9th, 2016 (1:56 AM).
      sonicfan7895's Avatar
      sonicfan7895 sonicfan7895 is offline
      Lead Programmer and Composer
         
        Join Date: Dec 2010
        Location: Akala Island, Alola
        Age: 20
        Gender: Male
        Nature: Serious
        Posts: 85
        Quote:
        Originally Posted by Telemetius View Post
        I don't know if this information can be helpful but every time I met that error it was because I had (or hadn't) made modifications to the editor scripts following this guide: http://reliccastle.com/forums/showthread.php?tid=254 . You may try making the same fixes to the editor scripts as well. Just remember to keep a backup.
        Literally just as I figured it out I went back to see my thread and saw you posted a response. Thanks!

        Now the problem is actually getting the Type3 field to appear in my Editor. I don't know what else I can do to make it appear, other than potentially changing EditorScripts to Scripts in order to edit fields (if THAT's even possible).
        __________________
        Check out my band: xSOBERDOSE!
        On Facebook

        Currently working on my short story, set in-between the events of Colosseum and XD, Orre's Return! Check out the thread by clicking on the highlighted words!

        My favorite video game: Jade Cocoon 2!
        Favorite Monster from Jade Cocoon 2: Delapon or Frogess
        Favorite Move from Jade Cocoon 2: Dark Impact
        Reply With Quote
          #4    
        Old December 9th, 2016 (2:10 AM).
        Telemetius's Avatar
        Telemetius Telemetius is offline
        Tele*
           
          Join Date: Nov 2014
          Location: Italy
          Gender: Male
          Nature: Relaxed
          Posts: 263
          Quote:
          Originally Posted by sonicfan7895 View Post
          Literally just as I figured it out I went back to see my thread and saw you posted a response. Thanks!

          Now the problem is actually getting the Type3 field to appear in my Editor. I don't know what else I can do to make it appear, other than potentially changing EditorScripts to Scripts in order to edit fields (if THAT's even possible).
          It's possible to edit the fields of editorscripts.rxdata and I found that it shares a nearly identical structure to Scripts.rxdata. I don't know if that's all it takes to implement a third type but you can start from it. Maybe someone else with an in-depth knowledge of it can answer.
          __________________

          That way!
          I thought..uhm, ok.
          -----------------------------------------------------------------------------------------------
          Beta 50%
          Reply With Quote
            #5    
          Old December 9th, 2016 (4:03 AM).
          sonicfan7895's Avatar
          sonicfan7895 sonicfan7895 is offline
          Lead Programmer and Composer
             
            Join Date: Dec 2010
            Location: Akala Island, Alola
            Age: 20
            Gender: Male
            Nature: Serious
            Posts: 85
            Quote:
            Originally Posted by Telemetius View Post
            It's possible to edit the fields of editorscripts.rxdata and I found that it shares a nearly identical structure to Scripts.rxdata. I don't know if that's all it takes to implement a third type but you can start from it. Maybe someone else with an in-depth knowledge of it can answer.
            It is, and I have. It is in the editor, and as far as I know, it works.

            Black Temple Guardian, I've fixed a problem with the game drawing a Normal icon. This is what you need to do...
            In PokeBattle_Pokemon, you need to find "def type2" and directly below it, insert this script:

            Code:
            # Returns this pokemon's third type.
              def type3
                dexdata=pbOpenDexData
                pbDexDataOffset(dexdata,@species,10)
                ret=dexdata.fgetb
                dexdata.close
                return ret
              end
            (I assume you've done this already)
            Next, go to PScreen_Summary and search for "type2rect", then directly below it insert this:

            Code:
            type3rect=Rect.new(0,pokemon.type3*28,64,28)
            This draws a third type picture from the bitmap called "typebitmap.bmp".

            Next is reorganization of all three type icons. Underneath the type3rect you just wrote, insert this:

            Code:
            if pokemon.type1==pokemon.type2
                  overlay.blt(370,146,@typebitmap.bitmap,type1rect)
                else
                  overlay.blt(304,146,@typebitmap.bitmap,type1rect)
                  overlay.blt(370,146,@typebitmap.bitmap,type2rect)
                end
                if pokemon.type3==pokemon.type2
                  overlay.blt(436,146,@typebitmap.bitmap,type1rect)
                else
                  overlay.blt(370,146,@typebitmap.bitmap,type2rect)
                  overlay.blt(436,146,@typebitmap.bitmap,type3rect)
                end
            If you want the three types to look nice, you'll have to use an image editing software to change the look of this summary page to fit the three icons. The image is called "summary1.png", under "Pictures" in the Graphics folder.

            Case in point, I implemented this and added the Fire-type to White Kyurem, and fused it.

            Lo and behold!
            https://drive.google.com/open?id=0B7naGiszoz_rZTdBVjBXMjl1OWs

            A little cleaning up here and there, but everything functions. Tertiary typings are now a thing.

            If you would like me to write up a thread tutorial on tertiary typings, I can and gladly will. This was fun!
            __________________
            Check out my band: xSOBERDOSE!
            On Facebook

            Currently working on my short story, set in-between the events of Colosseum and XD, Orre's Return! Check out the thread by clicking on the highlighted words!

            My favorite video game: Jade Cocoon 2!
            Favorite Monster from Jade Cocoon 2: Delapon or Frogess
            Favorite Move from Jade Cocoon 2: Dark Impact
            Reply With Quote
              #6    
            Old December 9th, 2016 (9:15 AM).
            Rot8er_ConeX's Avatar
            Rot8er_ConeX Rot8er_ConeX is offline
               
              Join Date: May 2015
              Location: The Dissa Region
              Gender: Male
              Posts: 823
              My game has had a triple type for a while now, but it's been exclusive to Delta Pokemon. So I've never had to edit the compiler scripts - at least not for that particular function of mine.

              In order to make it work, be sure that you edit the type effectiveness code to use 16 as the base instead of 8. Otherwise, a triple-typed Pokemon with three types that all resist a move will be counted as an immunity to that type of move.
              __________________
              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
                #7    
              Old December 9th, 2016 (3:42 PM). Edited December 9th, 2016 by sonicfan7895.
              sonicfan7895's Avatar
              sonicfan7895 sonicfan7895 is offline
              Lead Programmer and Composer
                 
                Join Date: Dec 2010
                Location: Akala Island, Alola
                Age: 20
                Gender: Male
                Nature: Serious
                Posts: 85
                Quote:
                Originally Posted by Rot8er_ConeX View Post
                My game has had a triple type for a while now, but it's been exclusive to Delta Pokemon. So I've never had to edit the compiler scripts - at least not for that particular function of mine.

                In order to make it work, be sure that you edit the type effectiveness code to use 16 as the base instead of 8. Otherwise, a triple-typed Pokemon with three types that all resist a move will be counted as an immunity to that type of move.
                Yeah, I'm trying to work out all the kinks; normally-effective moves are now super-effective because of the addition of the third type, and I'm still trying to figure it out.

                EDIT: Also, it might've been something I did, but testing this on Black Kyurem causes Outrage to completely break. Haven't tried it out with other Dragon-type moves yet, but I will soon.
                __________________
                Check out my band: xSOBERDOSE!
                On Facebook

                Currently working on my short story, set in-between the events of Colosseum and XD, Orre's Return! Check out the thread by clicking on the highlighted words!

                My favorite video game: Jade Cocoon 2!
                Favorite Monster from Jade Cocoon 2: Delapon or Frogess
                Favorite Move from Jade Cocoon 2: Dark Impact
                Reply With Quote
                  #8    
                Old April 21st, 2017 (4:38 AM).
                Black Temple Gaurdian Black Temple Gaurdian is offline
                   
                  Join Date: May 2010
                  Posts: 196
                  Quote:
                  Originally Posted by Rot8er_ConeX View Post
                  My game has had a triple type for a while now, but it's been exclusive to Delta Pokemon. So I've never had to edit the compiler scripts - at least not for that particular function of mine.

                  In order to make it work, be sure that you edit the type effectiveness code to use 16 as the base instead of 8. Otherwise, a triple-typed Pokemon with three types that all resist a move will be counted as an immunity to that type of move.
                  Massive bump (mainly because this thread is useful), but I just wanted to point out that this should only happen if you've a pokemon with three types that is then granted an addition type by the [Type3] effect.
                  __________________
                  Reply With Quote
                    #9    
                  Old April 21st, 2017 (5:39 AM). Edited April 21st, 2017 by Black Temple Gaurdian.
                  Black Temple Gaurdian Black Temple Gaurdian is offline
                     
                    Join Date: May 2010
                    Posts: 196
                    Quote:
                    Originally Posted by sonicfan7895 View Post
                    It is, and I have. It is in the editor, and as far as I know, it works.

                    Black Temple Guardian, I've fixed a problem with the game drawing a Normal icon. This is what you need to do...
                    In PokeBattle_Pokemon, you need to find "def type2" and directly below it, insert this script:

                    Code:
                    # Returns this pokemon's third type.
                      def type3
                        dexdata=pbOpenDexData
                        pbDexDataOffset(dexdata,@species,10)
                        ret=dexdata.fgetb
                        dexdata.close
                        return ret
                      end
                    (I assume you've done this already)

                    [...]

                    If you would like me to write up a thread tutorial on tertiary typings, I can and gladly will. This was fun!
                    Just a minor point:
                    In the above "pbDexDataOffset(dexdata,@species,10)" should be some number other than 10 as that's already taken.
                    Other than that, that would be very helpful for people. People that totally aren't me. Honest.

                    <_<

                    Also my problem appears to not be false displaying, but it actually adding the normal type. Fighting moves against a venusaur, for example, register as normal effectiveness. Which they shouldn't.

                    EDIT: I have solved the problem I was having! It was with the compiler code I was back then blindly copying. It was wrong.
                    Instead it should be this:
                    Code:
                            if !lastsection["Type3"] || lastsection["Type3"]==""
                              if !lastsection["Type2"] || lastsection["Type2"]==""
                                if !lastsection["Type1"] || lastsection["Type1"]==""
                                  raise _INTL("No Pokémon type is defined in section {2} (PBS/pokemon.txt)",key,sectionDisplay) if hash==requiredtypes
                                  next
                                end
                                lastsection["Type2"]=lastsection["Type1"].clone
                            end
                              lastsection["Type3"]=lastsection["Type2"].clone
                            end
                    It's amazing what a break and some experience can do.

                    EDIT 2: Your summary code also doesn't work right; with just two types it still shows the third type. This should address that:
                    Code:
                        if pokemon.type1==pokemon.type2
                          overlay.blt(370,146,@typebitmap.bitmap,type1rect) # If just one, display in middle
                        elsif pokemon.type2==pokemon.type3
                          overlay.blt(304,146,@typebitmap.bitmap,type1rect) # If just two, display type 1 in middle
                          overlay.blt(370,146,@typebitmap.bitmap,type2rect) # And type 2 to the right
                        else
                          overlay.blt(304,146,@typebitmap.bitmap,type1rect) # Else type 1 on the left
                          overlay.blt(370,146,@typebitmap.bitmap,type2rect) # Type 2 in the middle
                          overlay.blt(436,146,@typebitmap.bitmap,type3rect) # And type 3 on the right
                        end
                    __________________
                    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 3:13 PM.