The PokéCommunity Forums Fan Games ROM Hacking
Script Pewter Guidepost Man Issue

ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

Reply
 
Thread Tools
  #1    
Old 1 Week Ago (11:54 PM).
KrustyKong KrustyKong is offline
     
    Join Date: Feb 2016
    Gender: Male
    Posts: 39
    I'm trying to edit the paths the boy in Pewter that shows you to the Gym walks. I got the first part of the script done fine but this part is giving me some hell #org 0x165F71. When I enter the commands and compile, the commands change. I'm trying to put in these:
    #raw 0x10
    #raw 0x12
    #raw 0x10
    #raw 0x30
    #raw 0x28

    but it ends up as these:
    #raw 0x10 'Step Down (Normal)
    #raw 0x12 'Step Left (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x10 'Step Down (Normal)
    #raw 0x25 'Step on the Spot Down (Faster)
    Reply With Quote

    Relevant Advertising!

      #2    
    Old 6 Days Ago (9:49 AM).
    tkim tkim is offline
       
      Join Date: May 2011
      Posts: 131
      Quote:
      Originally Posted by KrustyKong View Post
      I'm trying to edit the paths the boy in Pewter that shows you to the Gym walks. I got the first part of the script done fine but this part is giving me some hell #org 0x165F71. When I enter the commands and compile, the commands change. I'm trying to put in these:
      #raw 0x10
      #raw 0x12
      #raw 0x10
      #raw 0x30
      #raw 0x28

      but it ends up as these:
      #raw 0x10 'Step Down (Normal)
      #raw 0x12 'Step Left (Normal)
      #raw 0x10 'Step Down (Normal)
      #raw 0x10 'Step Down (Normal)
      #raw 0x10 'Step Down (Normal)
      #raw 0x25 'Step on the Spot Down (Faster)
      It's because you're overwriting the bytes and your entry is longer than what that offset holds. raw bytes are actually the bytes shown when you open the ROM with a hex editor and go to the offset. these movement byte entries always end with 0xFE. You'll have to use another offset or do a search in the hex editor, the bytes you want to use and if you can find it, just repoint the offset to the found location.
      Reply With Quote
        #3    
      Old 6 Days Ago (10:28 AM).
      KrustyKong KrustyKong is offline
         
        Join Date: Feb 2016
        Gender: Male
        Posts: 39
        Quote:
        Originally Posted by tkim View Post
        It's because you're overwriting the bytes and your entry is longer than what that offset holds. raw bytes are actually the bytes shown when you open the ROM with a hex editor and go to the offset. these movement byte entries always end with 0xFE. You'll have to use another offset or do a search in the hex editor, the bytes you want to use and if you can find it, just repoint the offset to the found location.
        I think in this particular case, it would be easier to make the initial script short, then use the Delay command during the next part. How would I go about doing the suggestions you gave in case this comes up again later?
        Also I'm not sure how me adding three bytes to an originally 2 command script raises the total from an expected 5 to 6?
        Reply With Quote
          #4    
        Old 5 Days Ago (8:47 AM).
        tkim tkim is offline
           
          Join Date: May 2011
          Posts: 131
          Quote:
          Originally Posted by KrustyKong View Post
          I think in this particular case, it would be easier to make the initial script short, then use the Delay command during the next part. How would I go about doing the suggestions you gave in case this comes up again later?
          Also I'm not sure how me adding three bytes to an originally 2 command script raises the total from an expected 5 to 6?
          the easiest laziest way to do this would be to search for free space and use that free space's offset. For example, you've found free space at 0x800000, then you would replace the 0x165F71 with 0x800000 within the script itself, while adding in your custom movements to that offset. You must end your movement with 0xFE.

          It's actually originally three commands (10, 25, FE). and you were overwriting those three(it doesn't go beyond 0xfe i guess) (in your case, only the first three of your custom movements overwrote those bytes. It became 6 (7 including 0xFE) because you got rid of the 0xFE when you overwrote, so the next set of commands were bridged to yours.

          basically: your entry can't be longer than the original, otherwise you need to use a different offset.
          Reply With Quote
            #5    
          Old 5 Days Ago (6:30 PM).
          KrustyKong KrustyKong is offline
             
            Join Date: Feb 2016
            Gender: Male
            Posts: 39
            Quote:
            Originally Posted by tkim View Post
            the easiest laziest way to do this would be to search for free space and use that free space's offset. For example, you've found free space at 0x800000, then you would replace the 0x165F71 with 0x800000 within the script itself, while adding in your custom movements to that offset. You must end your movement with 0xFE.

            It's actually originally three commands (10, 25, FE). and you were overwriting those three(it doesn't go beyond 0xfe i guess) (in your case, only the first three of your custom movements overwrote those bytes. It became 6 (7 including 0xFE) because you got rid of the 0xFE when you overwrote, so the next set of commands were bridged to yours.

            basically: your entry can't be longer than the original, otherwise you need to use a different offset.
            Forgot to mention that I never overwrote 0xFE. I'm gonna go ahead and do the free space thing, but I still wanna know where the third 0x10 came from where there's supposed to be 0x30. like, I'd think it'd be
            #raw 0x10
            #raw 0x12
            #raw 0x10
            #raw 0x30
            #raw 0x10
            #raw 0x25
            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 3:04 AM.