Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.

Reply
 
Thread Tools
  #1    
Old April 5th, 2014 (12:40 PM).
masterxy's Avatar
masterxy masterxy is offline
Pokémon Breeder
     
    Join Date: Nov 2013
    Location: Austria
    Gender: Male
    Nature: Relaxed
    Posts: 21
    Yay, first post!

    Well to just quickly introduce myself: I'm really obsessed with Pokemon as well as Computers and I got into ROM hacking a while ago.
    However I really love the charm of Gen 2 and since there is a lack of hacking/editing tools for gen 2 as well as not very much general ROM information (at least it seems so to me) I decided to start a general editor for second gen ROMs.
    I'm still figuring out the ROM structure and stuff like where the game gets it's pointers from to allow adding new data in the future.
    Atm the editor is capable of editing existing moves and searching for free data blocks in the ROM but with time going on I will add more things like editing Pokemon, Trainers etc.

    I'm putting this thread up to see if there's any appreciation for gen 2 tools as well as getting some detailed info about Gen 2 roms (For instance where the game stores pointers to pointer tables etc, atm I just used a HEX editor to find the pointer tables manually)

    I'd be more then happy if you try it out and tell me what features you'd whish or if there's any errors. Created in Visual Studio C# so it will need Net Framework 4.5 to run.
    Attached Files
    File Type: rar PokeEdit.rar‎ (22.8 KB, 223 views) (Save to Dropbox)
    Reply With Quote

    Relevant Advertising!

      #2    
    Old April 7th, 2014 (10:00 AM).
    masterxy's Avatar
    masterxy masterxy is offline
    Pokémon Breeder
       
      Join Date: Nov 2013
      Location: Austria
      Gender: Male
      Nature: Relaxed
      Posts: 21
      So I've been getting personal response to this thread and one reaction was to lower the required Net Framework target (which I should've done to begin with). Well I lowered it to 4.0, couldn't go any lower though.

      Current Development Overview
      I added some new things, but I will wait with the upload. Want to finish them and do some testing. I added the option to rename Attacks, will add Attack descriptions too (Those are accessed via pointer table so it should be easy repointing them)
      One thin I'm trying to find out is where the data for increased crit chance of attacks is stored since it's not in the move data itself. I think I read something about a list with all the attacks that have increased crit chance but I've not found it yet.

      The type editor is almost ready. Renaming Types (even the unused BIRD type and the types using the text from the NORMAL type) works and it repoints text automatically if needed. Didn't take too long to find those pointer tables as well as the corresponding pointers to those tables. Editing type effectiveness is done pretty much but it gets a littly tricky adding new effectiveness values other then "Normal damage" since there's not much free space in that particular bank. Since those data is stored pretty stupid (just a long byte list without special pointers) if you repoint it, you have to repoint ALL of it but the available free space left in the bank is actually smaller then the initial type effectiveness data. I fear there's nothing that you can do about that.

      Repointing stuff has worked so far though I might just be lucky cause I'm not sure if I'm calculating pointers right since I've different approaches. Atm I'm doing: (Address % 0x4000) + 0x4000
      I've seen some approaches where you subtract 0x4000, change nothing, add 0x4000 or even add 0x8000 dpending on the pointer value O.o
      So correct me if I made some mistake that just seemed to work in all my testcases

      TL;DR
      As stated above, I'll upload the next version when the attack & type editors are finished. I'll probably include the source code (since I've seen enough people ranting about developers not doing that xD) although it's really messy since I don't usually program in C# and I think many things could be done better (But hey! Free source code!).
      Reply With Quote
        #3    
      Old April 7th, 2014 (12:08 PM).
      miksy91's Avatar
      miksy91 miksy91 is offline
      Dark Energy is back in action! ;)
         
        Join Date: Oct 2008
        Location: A small country in the North
        Gender: Male
        Nature: Relaxed
        Posts: 1,435
        Nice to see you're creating stuff that's handy for hacking the gen II games. There are really not many of those out there.
        You should upload this tool elsewhere as well though; for example Skeetendo Inc. and possibly PHO. There are others there who could find it useful.

        Quote:
        Originally Posted by masterxy View Post
        One thin I'm trying to find out is where the data for increased crit chance of attacks is stored since it's not in the move data itself. I think I read something about a list with all the attacks that have increased crit chance but I've not found it yet.
        I believe that is part of the asm routine of the move that has an enhanced crit. hit ratio (and has nothing to do with attack data itself).

        Quote:
        Originally Posted by masterxy View Post
        Repointing stuff has worked so far though I might just be lucky cause I'm not sure if I'm calculating pointers right since I've different approaches. Atm I'm doing: (Address % 0x4000) + 0x4000
        I've seen some approaches where you subtract 0x4000, change nothing, add 0x4000 or even add 0x8000 dpending on the pointer value O.o
        So correct me if I made some mistake that just seemed to work in all my testcases
        Your method for calculating the pointer value works in every case when we are pointing to a variable rom bank (= pointing to rom, but not in rom bank 0). So yeah, you've got it correct.

        Rom bank 0 (data area 0x0 - 0x3FFF) can be pointed to with pointers values between 00 00 and FF 3F, and all the other parts of the rom with pointer values between 00 40 and FF 7F. Apart from those, we can also point to stuff in ram by setting our pointer to something higher than 00 80.

        But hey, keep up the good work and if you're looking for some more attention, you should create accounts in those forums as well and post your stuff there. Crystal hacking doesn't really need any tools because of diassembly, but we don't have that for Gold and Silver yet so hacking those is pretty tool-based.

        P.S
        Those others pointer calculating methods you mentioned there work so that they just take the last four digits of the address and then "convert" that to a value that is between 0x4000 and 0x7FFF with the right addition/subtraction by a multiple of 0x4000. If you try it out for yourself, you can see why it works too. Not that I would program an algorithm that uses such method myself, hahha.
        __________________
        My Rom Hack



        Fixing bugs in a ROM hack
        CP of encountered pokemon in GO

        Learn how to hack GB/C games:

        Check my GameBoy/Color hacking videos in Youtube
        -The video set uses Pokemon Silver (U) rom for demonstrations
        Reply With Quote
          #4    
        Old April 8th, 2014 (6:04 AM).
        masterxy's Avatar
        masterxy masterxy is offline
        Pokémon Breeder
           
          Join Date: Nov 2013
          Location: Austria
          Gender: Male
          Nature: Relaxed
          Posts: 21
          Thanks for your reply

          Quote:
          Originally Posted by miksy91 View Post
          I believe that is part of the asm routine of the move that has an enhanced crit. hit ratio (and has nothing to do with attack data itself).
          I don't think so, since those moves don't have a custom effect byte set, like I thought they would. So e.g. Slash's move data uses effect byte 0 which is "no effect" like Tackle has for instance. So that move would use the default asm routine I guess, still slash has increased hit ratio. That means the crit chance is either hardcoded in the attack routine (which would take up too much space I guess) or there's a list of moves that have incresed hit chance.

          I'll probably register at other formums too when this tool has gotten to a stage where it will be more useful than now, for now I'll stick to this community

          Quote:
          Originally Posted by miksy91 View Post
          Crystal hacking doesn't really need any tools because of diassembly
          What does that mean? You can disassemble Crystal but not Gold and Silver? How so? I just know little about assembly.
          Reply With Quote
            #5    
          Old April 8th, 2014 (6:41 AM).
          miksy91's Avatar
          miksy91 miksy91 is offline
          Dark Energy is back in action! ;)
             
            Join Date: Oct 2008
            Location: A small country in the North
            Gender: Male
            Nature: Relaxed
            Posts: 1,435
            Quote:
            Originally Posted by masterxy View Post
            I don't think so, since those moves don't have a custom effect byte set, like I thought they would. So e.g. Slash's move data uses effect byte 0 which is "no effect" like Tackle has for instance. So that move would use the default asm routine I guess, still slash has increased hit ratio. That means the crit chance is either hardcoded in the attack routine (which would take up too much space I guess) or there's a list of moves that have incresed hit chance.
            I don't remember clearly enough since I have never really played with attacks that much either, and besides, been quite long since I have done GSC hacking as well.
            But I'd say that the effect byte is just a value that tells what kind of effect the move has, but I believe that the move has its own asm routine as well. could be totally wrong about this if the animation is simply determined by the id value of the move as well, and so, what would be the point of this additional routine?

            If no such routine exists, I don't really know what could cause the critical hit ratios to be different. Are you sure that they are actually? I remember that the ratios are different for some moves in gen I but don't remember them "differing" in gen II.

            Quote:
            Originally Posted by masterxy View Post
            What does that mean? You can disassemble Crystal but not Gold and Silver? How so? I just know little about assembly.
            We have a fully functioning disassembly for pokemon crystal (u) rom that others that Skeetendo Inc. have written, but no such diassembly exists for Gold or Silver.
            https://github.com/kanzure/pokecrystal
            __________________
            My Rom Hack



            Fixing bugs in a ROM hack
            CP of encountered pokemon in GO

            Learn how to hack GB/C games:

            Check my GameBoy/Color hacking videos in Youtube
            -The video set uses Pokemon Silver (U) rom for demonstrations
            Reply With Quote
              #6    
            Old April 8th, 2014 (10:16 AM).
            masterxy's Avatar
            masterxy masterxy is offline
            Pokémon Breeder
               
              Join Date: Nov 2013
              Location: Austria
              Gender: Male
              Nature: Relaxed
              Posts: 21
              Quote:
              Originally Posted by miksy91 View Post
              But I'd say that the effect byte is just a value that tells what kind of effect the move has, but I believe that the move has its own asm routine as well. could be totally wrong about this if the animation is simply determined by the id value of the move as well, and so, what would be the point of this additional routine?
              Well I'm pretty sure about what all the bytes in the move data itself do, what I'm guessing about the effect byte is, that it uses a default attack routine for moves with the effect byte 0 and that all the other effect bytes define custom attack routines but don't take my word on that. That's just what I think and would do as a programmer since having an effect byte AND a custom routine for every move would be a waste of space. But I think I saved a link to that post about the crit data somewhere on my other pc so when I get to my parents place again I'll probably find out

              A different thing I'm wondering is how big is the chance that a pointer to some data occures more then one time in a bank? I'm currently in a situation where I calculated a pointer from an offset and I found that pointer 2 times in the same bank both times with a leading 21 instruction. I noticed the difference when repointing the second one but didn't really notice one on the first. Guess that needs some more investigation.
              Reply With Quote
                #7    
              Old April 8th, 2014 (11:30 AM).
              miksy91's Avatar
              miksy91 miksy91 is offline
              Dark Energy is back in action! ;)
                 
                Join Date: Oct 2008
                Location: A small country in the North
                Gender: Male
                Nature: Relaxed
                Posts: 1,435
                Quote:
                Originally Posted by masterxy View Post
                Well I'm pretty sure about what all the bytes in the move data itself do, what I'm guessing about the effect byte is, that it uses a default attack routine for moves with the effect byte 0 and that all the other effect bytes define custom attack routines but don't take my word on that. That's just what I think and would do as a programmer since having an effect byte AND a custom routine for every move would be a waste of space. But I think I saved a link to that post about the crit data somewhere on my other pc so when I get to my parents place again I'll probably find out
                Yeah, I guess you're right. The effect byte probably works as the index value of some pointer table of the asm routines actually..

                Quote:
                Originally Posted by masterxy View Post
                A different thing I'm wondering is how big is the chance that a pointer to some data occures more then one time in a bank? I'm currently in a situation where I calculated a pointer from an offset and I found that pointer 2 times in the same bank both times with a leading 21 instruction. I noticed the difference when repointing the second one but didn't really notice one on the first. Guess that needs some more investigation.
                If that same data structure has to be accessable from several different routines, it's totally possible. In this case, both of those "21 + [pointer]" cases indeed access that data.

                "21 + 2-byte value" is "load HL with $address" asm instruction. Like it says, it simply loads a 16-bit value to register pair HL for usage. HL is the most used 16-bit register pair in GB/C CPU language because most opcodes that work with register pairs are related to using HL as part of the opcode.
                http://nemesis.lonestar.org/computers/tandy/software/apps/m4/qd/opcodes.html

                P.S
                Trying to figure out how certain data structures work is waaay easier if you play around with bgb (which has a built-in debugger) or Gameboy ASM editor. Both of them should be downloadable in romhacking.net.
                __________________
                My Rom Hack



                Fixing bugs in a ROM hack
                CP of encountered pokemon in GO

                Learn how to hack GB/C games:

                Check my GameBoy/Color hacking videos in Youtube
                -The video set uses Pokemon Silver (U) rom for demonstrations
                Reply With Quote
                  #8    
                Old April 13th, 2014 (8:18 AM).
                cloudforgiven's Avatar
                cloudforgiven cloudforgiven is offline
                   
                  Join Date: Mar 2012
                  Gender: Male
                  Posts: 23
                  I know im off topic but i dont want to wait to get approve to make a new topic so here goes, Ive notice many tools do not edit the AI of the pokemon games difficulty mainly the trainer editors so, ill make one, but what language would i need to learn, and what compiler would i use? its for pokmeon g/c/s. thx. Hopefully if i can make one I will release it haere so you can edit the game even better.
                  Reply With Quote
                    #9    
                  Old April 14th, 2014 (4:16 AM).
                  masterxy's Avatar
                  masterxy masterxy is offline
                  Pokémon Breeder
                     
                    Join Date: Nov 2013
                    Location: Austria
                    Gender: Male
                    Nature: Relaxed
                    Posts: 21
                    Quote:
                    Originally Posted by cloudforgiven View Post
                    I know im off topic but i dont want to wait to get approve to make a new topic so here goes, Ive notice many tools do not edit the AI of the pokemon games difficulty mainly the trainer editors so, ill make one, but what language would i need to learn, and what compiler would i use? its for pokmeon g/c/s. thx. Hopefully if i can make one I will release it haere so you can edit the game even better.
                    I think (I read that somewhere) that the difficulty of the AI is based off the prize money you get by winning.
                    I used C# but you can really use almost any programming language that can edit files.
                    Reply With Quote
                      #10    
                    Old August 27th, 2014 (12:19 AM).
                    Amonvangrell's Avatar
                    Amonvangrell Amonvangrell is offline
                    Goathi - Pokemon Master
                       
                      Join Date: Aug 2014
                      Location: New Zealand
                      Gender: Male
                      Nature: Calm
                      Posts: 2
                      Thank you for this tool, im looking forward to see this tool update with all features you can add to it.
                      Reply With Quote
                        #11    
                      Old February 8th, 2017 (6:30 PM).
                      ChrisPreTend ChrisPreTend is offline
                         
                        Join Date: Feb 2017
                        Gender: Male
                        Posts: 1
                        I am having trouble downloading :(
                        Reply With Quote
                          #12    
                        Old February 11th, 2017 (7:58 AM).
                        Boufto24's Avatar
                        Boufto24 Boufto24 is offline
                           
                          Join Date: Feb 2017
                          Gender: Male
                          Posts: 1
                          The download link doesn't work :'(
                          __________________
                          Corpish is the best Pokémon ever.
                          Kisses from France ♥
                          Reply With Quote
                            #13    
                          Old February 12th, 2017 (4:10 AM).
                          masterxy's Avatar
                          masterxy masterxy is offline
                          Pokémon Breeder
                             
                            Join Date: Nov 2013
                            Location: Austria
                            Gender: Male
                            Nature: Relaxed
                            Posts: 21
                            Seems like a forum issue? I will try reuploading it when I get the time to look for the tool. Keep in mind it's not finished (and probably won't ever be at this point).
                            __________________
                            Double Battle Team

                            Reply With Quote
                              #14    
                            Old February 13th, 2017 (11:13 AM).
                            Deokishisu's Avatar
                            Deokishisu Deokishisu is online now
                            Mr. Magius
                               
                              Join Date: Feb 2006
                              Location: If I'm online, it's a safe bet I'm at a computer.
                              Gender: Male
                              Nature: Relaxed
                              Posts: 858
                              Quote:
                              Originally Posted by Boufto24 View Post
                              The download link doesn't work :'(
                              You should be using the disassembly of Crystal instead of tools like this. Pretty much all tools have been made obsolete by the disassembly. Here's a link to it.
                              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

                              Forum Jump


                              All times are GMT -8. The time now is 7:49 AM.