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 September 10th, 2015 (11:07 PM).
TerminalVelo TerminalVelo is offline
     
    Join Date: Aug 2012
    Gender: Male
    Posts: 38
    If I wanted to rematch Gym Leaders and Trainers in Pokemon FireRed after defeating them, what would I need to do? For example, let's say I wanted to rematch Brock immediately after beating him, and all it took was talking to him again after beating him... what would I need to get rid of in his script?

    Code:
    #org 0x816A593
    '-----------------------------------
    setvar 0x8004 0x2
    setvar 0x8005 0x2
    special FAME_CHECKER_NEW
    trainerbattle 0x1 0x19E 0x0 0x8190CD4 0x8190E4F 0x816A5C5
    checkflag 0x254
    if false jump 0x816A5F3 ' Flag is unset
    msgbox 0x819110F ' There are all kinds ...
    callstd MSG_NOCLOSE ' Non-closing message
    release
         ' Release commands close any open messages
    end
    
    #org 0x816A5C5
    '-----------------------------------
    setvar 0x8004 0x2
    setvar 0x8005 0x1
    special FAME_CHECKER
    setflag 0x4B0
    setflag FR_BADGE_1
    setvar 0x406C 0x1
    setflag 0x2E
    clearflag 0x92
    setvar 0x8008 0x1
    call 0x81A6B18
    jump 0x816A5F3
    
    #org 0x81A6B18
    '-----------------------------------
    copyvar 0x8000 0x8008
    compare 0x8000 0x1
    if == jump 0x81A6B76 ' Equal To
    compare 0x8000 0x2
    if == jump 0x81A6B7A ' Equal To
    compare 0x8000 0x3
    if == jump 0x81A6B81 ' Equal To
    compare 0x8000 0x4
    if == jump 0x81A6B8B ' Equal To
    compare 0x8000 0x5
    if == jump 0x81A6BA1 ' Equal To
    compare 0x8000 0x6
    if == jump 0x81A6BB4 ' Equal To
    compare 0x8000 0x7
    if == jump 0x81A6BCA ' Equal To
    compare 0x8000 0x8
    if == jump 0x81A6BE0 ' Equal To
    end
    
    #org 0x81A6B76
    '-----------------------------------
    cleartrainerflag 0x8E
    return
    
    #org 0x816A5F3
    '-----------------------------------
    msgbox 0x8190FC1 ' Wait!\nTake this wit...
    callstd MSG_NOCLOSE ' Non-closing message
    checkitemspaceinbag TM39 1
    compare LASTRESULT 0x0
    if == jump 0x816A634 ' Equal To
    additem TM39 1
    msgbox 0x8190FDB ' \v\h01 received TM39...
    copyvarifnotzero 0x8000 TM39
    copyvarifnotzero 0x8001 0x1
    copyvarifnotzero 0x8002 0x101
    callstd MSG_ITEM ' Shows a message, then... 'Player put the yyy in the zzz!'
    setflag 0x254
    msgbox 0x8190FF8 ' A TM, Technical Mach...
    callstd MSG_NOCLOSE ' Non-closing message
    release
         ' Release commands close any open messages
    end
    
    #org 0x816A634
    '-----------------------------------
    msgbox 0x81911CE ' You don't have room ...
    callstd MSG_NOCLOSE ' Non-closing message
    release
         ' Release commands close any open messages
    end
    
    #org 0x81A6B7A
    '-----------------------------------
    cleartrainerflag 0x96
    cleartrainerflag 0xEA
    return
    
    #org 0x81A6B81
    '-----------------------------------
    cleartrainerflag 0x8D
    cleartrainerflag 0xDC
    cleartrainerflag 0x1A7
    return
    
    #org 0x81A6B8B
    '-----------------------------------
    cleartrainerflag 0x84
    cleartrainerflag 0x85
    cleartrainerflag 0xA0
    cleartrainerflag 0x109
    cleartrainerflag 0x10A
    cleartrainerflag 0x10B
    cleartrainerflag 0x192
    return
    
    #org 0x81A6BA1
    '-----------------------------------
    cleartrainerflag 0x126
    cleartrainerflag 0x127
    cleartrainerflag 0x120
    cleartrainerflag 0x121
    cleartrainerflag 0x124
    cleartrainerflag 0x125
    return
    
    #org 0x81A6BB4
    '-----------------------------------
    cleartrainerflag 0x118
    cleartrainerflag 0x119
    cleartrainerflag 0x11A
    cleartrainerflag 0x11B
    cleartrainerflag 0x1CE
    cleartrainerflag 0x1CF
    cleartrainerflag 0x1D0
    return
    
    #org 0x81A6BCA
    '-----------------------------------
    cleartrainerflag 0xB1
    cleartrainerflag 0xB2
    cleartrainerflag 0xB3
    cleartrainerflag 0xB4
    cleartrainerflag 0xD5
    cleartrainerflag 0xD6
    cleartrainerflag 0xD7
    return
    
    #org 0x81A6BE0
    '-----------------------------------
    cleartrainerflag 0x128
    cleartrainerflag 0x129
    cleartrainerflag 0x142
    cleartrainerflag 0x143
    cleartrainerflag 0x144
    cleartrainerflag 0x188
    cleartrainerflag 0x190
    cleartrainerflag 0x191
    return
    
    
    #org 0x8190CD4
    = So, you're here. I'm BROCK.\nI'm PEWTER's GYM LEADER.\pMy rock-hard willpower is evident\neven in my POK\eMON.\pMy POK\eMON are all rock hard, and\nhave true-grit determination.\pThat's right - my POK\eMON are all\nthe ROCK type!\pFuhaha! You're going to challenge\nme knowing that you'll lose?\pThat's the TRAINER's honor that\ncompels you to challenge me.\pFine, then!\nShow me your best!\c\h0B\h56\h01
    
    #org 0x8190E4F
    = I took you for granted, and so\nI lost.\pAs proof of your victory, I confer\non you this[.]the official POK\eMON\lLEAGUE BOULDERBADGE.\p\c\h06\h02\v\h01 received the BOULDERBADGE\nfrom BROCK!\c\h17\c\h0B\h04\h01\c\h08\n\c\h08\h56\c\h18\p\c\h06\h04Just having the BOULDERBADGE makes\nyour POK\eMON more powerful.\pIt also enables the use of the\nmove FLASH outside of battle.\pOf course, a POK\eMON must know the\nmove FLASH to use it.
    
    #org 0x819110F
    = There are all kinds of TRAINERS in\nthis huge world of ours.\pYou appear to be very gifted as a\nPOK\eMON TRAINER.\pSo let me make a suggestion.\pGo to the GYM in CERULEAN and test\nyour abilities.
    
    #org 0x8190FC1
    = Wait!\nTake this with you.
    
    #org 0x8190FDB
    = \v\h01 received TM39\nfrom BROCK.
    
    #org 0x8190FF8
    = A TM, Technical Machine, contains a\ntechnique for POK\eMON.\pUsing a TM teaches the move it\ncontains to a POK\eMON.\pA TM is good for only one use.\pSo, when you use one, pick the\nPOK\eMON carefully.\pAnyways[.]\nTM39 contains ROCK TOMB.\pIt hurls boulders at the foe and\nlowers its SPEED.
    
    #org 0x81911CE
    = You don't have room for this.
    Reply With Quote

    Relevant Advertising!

      #2    
    Old September 11th, 2015 (1:42 AM).
    chrunch chrunch is offline
    • Gold Tier
     
    Join Date: Oct 2009
    Gender: Male
    Posts: 1,348
    You'd need to add another part to the start of the script like this:

    checkflag 0x820
    if 0x1 goto @rematch

    Then at @rematch put another trainerbattle and whatever you want him to say
    __________________
    Reply With Quote
      #3    
    Old September 11th, 2015 (5:05 AM).
    TerminalVelo TerminalVelo is offline
       
      Join Date: Aug 2012
      Gender: Male
      Posts: 38
      Quote:
      Originally Posted by chrunch View Post
      You'd need to add another part to the start of the script like this:

      checkflag 0x820
      if 0x1 goto @rematch

      Then at @rematch put another trainerbattle and whatever you want him to say
      So, if I do this, I can rematch Brock as many times as I like?
      Reply With Quote
        #4    
      Old September 11th, 2015 (2:08 PM).
      chrunch chrunch is offline
      • Gold Tier
       
      Join Date: Oct 2009
      Gender: Male
      Posts: 1,348
      Yes, you'd also need to add a settrainerflag 0x(his trainer ID) before the battle so you can continually battle him.
      __________________
      Reply With Quote
        #5    
      Old September 11th, 2015 (10:40 PM).
      TerminalVelo TerminalVelo is offline
         
        Join Date: Aug 2012
        Gender: Male
        Posts: 38
        Quote:
        Originally Posted by chrunch View Post
        Yes, you'd also need to add a settrainerflag 0x(his trainer ID) before the battle so you can continually battle him.
        I see. Truth be told, I've spent most of my time yesterday (as of this response), trying to script the rebattle, but I just don't have the faintest idea on how to start. I think I might have somewhat of an idea, but I don't think it'll work...

        Code:
        checkflag 0x820
        if 0x1 goto @rematch
        
        #dyn 0x8740001
        #org @rematch
        trainerbattle 0x0 0x19E 0x0 @intro @defeat
        settrainerflag 0x19E
        msgbox @afterwards
        callstd msg_normal
        end
        #org @intro
        = I will crush you!!!
        
        #org @defeat
        = You crushed me[.]
        
        #org @afterwards
        = I can also say something after the battle
        Yeah, I'm new to the scripting game, so... forgive me if I'm not getting it.
        Reply With Quote
          #6    
        Old September 12th, 2015 (2:51 AM).
        chrunch chrunch is offline
        • Gold Tier
         
        Join Date: Oct 2009
        Gender: Male
        Posts: 1,348
        Quote:
        Originally Posted by TerminalVelo View Post
        I see. Truth be told, I've spent most of my time yesterday (as of this response), trying to script the rebattle, but I just don't have the faintest idea on how to start. I think I might have somewhat of an idea, but I don't think it'll work...

        Code:
        checkflag 0x820
        if 0x1 goto @rematch
        
        #dyn 0x8740001
        #org @rematch
        trainerbattle 0x0 0x19E 0x0 @intro @defeat
        settrainerflag 0x19E
        msgbox @afterwards
        callstd msg_normal
        end
        #org @intro
        = I will crush you!!!
        
        #org @defeat
        = You crushed me[.]
        
        #org @afterwards
        = I can also say something after the battle
        Yeah, I'm new to the scripting game, so... forgive me if I'm not getting it.
        Here you go, I spent 5 minutes editing Brock's script so it has a very basic rematch functionality. Changes in bold.
        Spoiler:
        Code:
        #dynamic 0x800000
        
        #org @start
        checkflag 0x820
        if 0x1 goto @rematch
        setvar 0x8004 0x2
        setvar 0x8005 0x2
        special 0x174
        trainerbattle 0x1 0x19E 0x0 @string1 @string2 @snippet1
        checkflag 0x254
        if 0x0 goto @snippet2
        msgbox @string3 MSG_KEEPOPEN
        release
        end
        
        #org @rematch
        settrainerflag 0x19E
        trainerbattle 0x1 0x19E 0x0 @1 @2 @after
        end
        
        #org @after
        msgbox @3 0x6
        release
        end
        
        #org @snippet1
        setvar 0x8004 0x2
        setvar 0x8005 0x1
        special 0x173
        setflag 0x4B0
        setflag 0x820
        setvar 0x406C 0x1
        setflag 0x2E
        clearflag 0x92
        setvar 0x8008 0x1
        call @snippet3
        goto @snippet2
        
        #org @snippet2
        msgbox @string4 MSG_KEEPOPEN
        checkitemroom 0x147 0x1
        compare LASTRESULT 0x0
        if 0x1 goto @snippet4
        additem 0x147 0x1
        loadpointer 0x0 @string5
        giveitem2 0x147 0x1 0x101
        setflag 0x254
        msgbox @string6 MSG_KEEPOPEN
        release
        end
        
        #org @snippet3
        copyvar 0x8000 0x8008
        compare 0x8000 0x1
        if 0x1 goto @snippet5
        compare 0x8000 0x2
        if 0x1 goto @snippet6
        compare 0x8000 0x3
        if 0x1 goto @snippet7
        compare 0x8000 0x4
        if 0x1 goto @snippet8
        compare 0x8000 0x5
        if 0x1 goto @snippet9
        compare 0x8000 0x6
        if 0x1 goto @snippet10
        compare 0x8000 0x7
        if 0x1 goto @snippet11
        compare 0x8000 0x8
        if 0x1 goto @snippet12
        end
        
        #org @snippet4
        msgbox @string7 MSG_KEEPOPEN
        release
        end
        
        #org @snippet5
        cleartrainerflag 0x8E
        return
        
        #org @snippet6
        cleartrainerflag 0x96
        cleartrainerflag 0xEA
        return
        
        #org @snippet7
        cleartrainerflag 0x8D
        cleartrainerflag 0xDC
        cleartrainerflag 0x1A7
        return
        
        #org @snippet8
        cleartrainerflag 0x84
        cleartrainerflag 0x85
        cleartrainerflag 0xA0
        cleartrainerflag 0x109
        cleartrainerflag 0x10A
        cleartrainerflag 0x10B
        cleartrainerflag 0x192
        return
        
        #org @snippet9
        cleartrainerflag 0x126
        cleartrainerflag 0x127
        cleartrainerflag 0x120
        cleartrainerflag 0x121
        cleartrainerflag 0x124
        cleartrainerflag 0x125
        return
        
        #org @snippet10
        cleartrainerflag 0x118
        cleartrainerflag 0x119
        cleartrainerflag 0x11A
        cleartrainerflag 0x11B
        cleartrainerflag 0x1CE
        cleartrainerflag 0x1CF
        cleartrainerflag 0x1D0
        return
        
        #org @snippet11
        cleartrainerflag 0xB1
        cleartrainerflag 0xB2
        cleartrainerflag 0xB3
        cleartrainerflag 0xB4
        cleartrainerflag 0xD5
        cleartrainerflag 0xD6
        cleartrainerflag 0xD7
        return
        
        #org @snippet12
        cleartrainerflag 0x128
        cleartrainerflag 0x129
        cleartrainerflag 0x142
        cleartrainerflag 0x143
        cleartrainerflag 0x144
        cleartrainerflag 0x188
        cleartrainerflag 0x190
        cleartrainerflag 0x191
        return
        
        #org @string1
        = So, you're here. I'm BROCK.\nI'm PEWTER's GYM LEADER.\pMy rock-hard willpower is evident\neven in my POKéMON.\pMy POKéMON are all rock hard, and\nhave true-grit determination.\pThat's right - my POKéMON are all\nthe ROCK type!\pFuhaha! You're going to challenge\nme knowing that you'll lose?\pThat's the TRAINER's honor that\ncompels you to challenge me.\pFine, then!\nShow me your best!\c\h0B[Ke]À
        
        #org @string2
        = I took you for granted, and so\nI lost.\pAs proof of your victory, I confer\non you this[.]the official POKéMON\lLEAGUE BOULDERBADGE.\p\c\h06Á[player] received the BOULDERBADGE\nfrom BROCK!\c\h17\c\h0BÇÀ\c\h08\n\c\h08[Ke]\c\h18\p\c\h06ÇJust having the BOULDERBADGE makes\nyour POKéMON more powerful.\pIt also enables the use of the\nmove FLASH outside of battle.\pOf course, a POKéMON must know the\nmove FLASH to use it.
        
        #org @string3
        = There are all kinds of TRAINERS in\nthis huge world of ours.\pYou appear to be very gifted as a\nPOKéMON TRAINER.\pSo let me make a suggestion.\pGo to the GYM in CERULEAN and test\nyour abilities.
        
        #org @string4
        = Wait!\nTake this with you.
        
        #org @string5
        = [player] received TM39\nfrom BROCK.
        
        #org @string6
        = A TM, Technical Machine, contains a\ntechnique for POKéMON.\pUsing a TM teaches the move it\ncontains to a POKéMON.\pA TM is good for only one use.\pSo, when you use one, pick the\nPOKéMON carefully.\pAnyways[.]\nTM39 contains ROCK TOMB.\pIt hurls boulders at the foe and\nlowers its SPEED.
        
        #org @string7
        = You don't have room for this.
        
        #org @1
        = I will crush you!!!
        
        #org @2
        = You crushed me[.]
        
        #org @3
        = I can also say something after the battle


        If you have any questions let me know but hopefully it makes sense, you should be able to compile this using XSE and replace Brock's old script with it.
        __________________
        Reply With Quote
          #7    
        Old September 13th, 2015 (1:44 AM).
        akhil1991's Avatar
        akhil1991 akhil1991 is offline
           
          Join Date: Aug 2015
          Location: Kanto
          Gender: Male
          Nature: Relaxed
          Posts: 13
          Quote:
          Originally Posted by chrunch View Post
          You'd need to add another part to the start of the script like this:

          checkflag 0x820
          if 0x1 goto @rematch

          Then at @rematch put another trainerbattle and whatever you want him to say
          what should I do if I want to rebattle gym leaders after getting national dex ie becoming champion the first time. for example brock will only battle second time after he checks you has a national dex
          Reply With Quote
            #8    
          Old September 14th, 2015 (3:58 PM).
          TerminalVelo TerminalVelo is offline
             
            Join Date: Aug 2012
            Gender: Male
            Posts: 38
            Thanks a lot! Now, I can battle Brock to my heart's content. Of course, there's one more favor I need... Giovanni Viridian Gym match. I could make a rematch script for Giovanni, but the problem is he seems to vanish after battle. In Pokemon Yellow, you could respawn and rematch him with this code:

            Giovanni (Viridian Rematch, Pokemon Yellow) [JDonald]
            Code:
            010050D7
            0100ABD5
            In FR/LG, I don't think it's that simple. What in the script tells Giovanni to vanish after the "Farewell!" part?
            Reply With Quote
              #9    
            Old September 14th, 2015 (11:41 PM).
            chrunch chrunch is offline
            • Gold Tier
             
            Join Date: Oct 2009
            Gender: Male
            Posts: 1,348
            Quote:
            Originally Posted by TerminalVelo View Post
            Thanks a lot! Now, I can battle Brock to my heart's content. Of course, there's one more favor I need... Giovanni Viridian Gym match. I could make a rematch script for Giovanni, but the problem is he seems to vanish after battle. In Pokemon Yellow, you could respawn and rematch him with this code:

            Giovanni (Viridian Rematch, Pokemon Yellow) [JDonald]
            Code:
            010050D7
            0100ABD5
            In FR/LG, I don't think it's that simple. What in the script tells Giovanni to vanish after the "Farewell!" part?
            Delete this part of the script:
            Code:
            fadescreen 0x1
            hidesprite 0x8
            fadescreen 0x0
            You also might want to replace his person ID in Advance map with 0000 incase he still disappears after exiting the map.
            __________________
            Reply With Quote
              #10    
            Old September 15th, 2015 (12:09 AM).
            TerminalVelo TerminalVelo is offline
               
              Join Date: Aug 2012
              Gender: Male
              Posts: 38
              Quote:
              Originally Posted by chrunch View Post
              Delete this part of the script:
              Code:
              fadescreen 0x1
              hidesprite 0x8
              fadescreen 0x0
              You also might want to replace his person ID in Advance map with 0000 incase he still disappears after exiting the map.
              Thanks for your help so far... Just one more thing and my troubles are over: the Gym Trainers... This is Camper Liam's script I made for rebattling him:

              Code:
              Spoiler:
              #dyn 0x800000 #org 0x816A63E '----------------------------------- checkflag 0x820 if 0x1 goto @rematch trainerbattle 0x0 0x8E 0x0 0x81911EC 0x8191237 msgbox 0x819126B ' You're pretty hot.\n... callstd MSG_LOCK ' Built-in lock command end #org @rematch settrainerflag 0x8E trainerbattle 0x0 0x8E 0x0 0x81911EC 0x8191237 end #org @after msgbox 0x819126B ' You're pretty hot.\n... callstd MSG_LOCK ' Built-in lock command release end #org 0x81911EC = Stop right there, kid!\pYou're ten thousand light-years \nfrom facing BROCK! #org 0x8191237 = Darn!\pLight-years isn't time[.]\nIt measures distance! #org 0x819126B = You're pretty hot.\n[.]But not as hot as BROCK!
              Problem? The game crashes after Liam comes my way with the Rocket Grunt encounter music playing, just before he talks. The only way I can stop this from happening is if I strip him of his Trainer data ($00) and View Radius, and he works like Brock... which seems to implicate to me I'm doing something wrong there when it comes to Gym/Dungeon Trainers... either that, or the @rematch doesn't work with normal trainers. What would this be?
              Reply With Quote
                #11    
              Old September 15th, 2015 (12:33 AM).
              chrunch chrunch is offline
              • Gold Tier
               
              Join Date: Oct 2009
              Gender: Male
              Posts: 1,348
              Quote:
              Originally Posted by TerminalVelo View Post
              Thanks for your help so far... Just one more thing and my troubles are over: the Gym Trainers... This is Camper Liam's script I made for rebattling him:

              Code:
              Spoiler:
              #dyn 0x800000 #org 0x816A63E '----------------------------------- checkflag 0x820 if 0x1 goto @rematch trainerbattle 0x0 0x8E 0x0 0x81911EC 0x8191237 msgbox 0x819126B ' You're pretty hot.\n... callstd MSG_LOCK ' Built-in lock command end #org @rematch settrainerflag 0x8E trainerbattle 0x0 0x8E 0x0 0x81911EC 0x8191237 end #org @after msgbox 0x819126B ' You're pretty hot.\n... callstd MSG_LOCK ' Built-in lock command release end #org 0x81911EC = Stop right there, kid!\pYou're ten thousand light-years \nfrom facing BROCK! #org 0x8191237 = Darn!\pLight-years isn't time[.]\nIt measures distance! #org 0x819126B = You're pretty hot.\n[.]But not as hot as BROCK!
              Problem? The game crashes after Liam comes my way with the Rocket Grunt encounter music playing, just before he talks. The only way I can stop this from happening is if I strip him of his Trainer data ($00) and View Radius, and he works like Brock... which seems to implicate to me I'm doing something wrong there when it comes to Gym/Dungeon Trainers... either that, or the @rematch doesn't work with normal trainers. What would this be?
              Normal trainers work differently. If you move the checkflag under the trainerbattle then it should work but you'll have to talk to him to rematch him. Do you want to be able to infinitely battle him too, and do you want to only be able to after beating brock?
              __________________
              Reply With Quote
                #12    
              Old September 15th, 2015 (12:41 AM).
              TerminalVelo TerminalVelo is offline
                 
                Join Date: Aug 2012
                Gender: Male
                Posts: 38
                Quote:
                Originally Posted by chrunch View Post
                Normal trainers work differently. If you move the checkflag under the trainerbattle then it should work but you'll have to talk to him to rematch him. Do you want to be able to infinitely battle him too, and do you want to only be able to after beating brock?
                Well, let's say I wanted to rematch Liam infinitely after defeating Brock for the first time? I think I figured out how to do it before battling Brock.
                Reply With Quote
                  #13    
                Old September 15th, 2015 (2:01 AM).
                chrunch chrunch is offline
                • Gold Tier
                 
                Join Date: Oct 2009
                Gender: Male
                Posts: 1,348
                Quote:
                Originally Posted by TerminalVelo View Post
                Well, let's say I wanted to rematch Liam infinitely after defeating Brock for the first time? I think I figured out how to do it before battling Brock.
                Then just do what I said and move the checkflag.
                __________________
                Reply With Quote
                  #14    
                Old September 15th, 2015 (7:36 PM).
                TerminalVelo TerminalVelo is offline
                   
                  Join Date: Aug 2012
                  Gender: Male
                  Posts: 38
                  Quote:
                  Originally Posted by chrunch View Post
                  Then just do what I said and move the checkflag.
                  I see. But, I just discovered if you do the "checkflag for [Gym Badge Hex]" routine to the trainers, it's obviously gonna overwrite the guy at the entrance's script. You know, "Yo! Champ in the making!"? and you obviously can't do this with two trainers in the gym (I did this in Cerulean Gym to know for sure). So, let's say I wanted to do this for multiple gym trainers without screwing up the script of another person... is there any way to do that?

                  P.S., Giovanni disappearing didn't really matter because the checkflag thing just looped back to his starting script before you beat him, "Fuahahaha! This is my hideout..." that pre-battle speech at Viridian? But I took that out of his Gym Leader script like you said, chrunch.
                  Reply With Quote
                    #15    
                  Old September 15th, 2015 (11:55 PM).
                  chrunch chrunch is offline
                  • Gold Tier
                   
                  Join Date: Oct 2009
                  Gender: Male
                  Posts: 1,348
                  Quote:
                  Originally Posted by TerminalVelo View Post
                  I see. But, I just discovered if you do the "checkflag for [Gym Badge Hex]" routine to the trainers, it's obviously gonna overwrite the guy at the entrance's script. You know, "Yo! Champ in the making!"? and you obviously can't do this with two trainers in the gym (I did this in Cerulean Gym to know for sure). So, let's say I wanted to do this for multiple gym trainers without screwing up the script of another person... is there any way to do that?

                  P.S., Giovanni disappearing didn't really matter because the checkflag thing just looped back to his starting script before you beat him, "Fuahahaha! This is my hideout..." that pre-battle speech at Viridian? But I took that out of his Gym Leader script like you said, chrunch.
                  When you edit and recompile any script in the game, and it's bigger than the original version, than yeah it overwrites and corrupts whatever comes after it. This is why I told you to compile brock's script in XSE and replace the old one, not just edit it.

                  To do this first make sure in Options>Decompile Options in XSE you have ticked refactoring and unticked comments. find your script and it should be in the same format as any normal script you write, which makes it a bit easier to understand. From here you can copy the script into a new tab and once you've edited it, compile it. You will get an offset that can be pasted over the old one in A-map.
                  __________________
                  Reply With Quote
                    #16    
                  Old September 16th, 2015 (1:50 AM).
                  TerminalVelo TerminalVelo is offline
                     
                    Join Date: Aug 2012
                    Gender: Male
                    Posts: 38
                    Quote:
                    Originally Posted by chrunch View Post
                    When you edit and recompile any script in the game, and it's bigger than the original version, than yeah it overwrites and corrupts whatever comes after it. This is why I told you to compile brock's script in XSE and replace the old one, not just edit it.

                    To do this first make sure in Options>Decompile Options in XSE you have ticked refactoring and unticked comments. find your script and it should be in the same format as any normal script you write, which makes it a bit easier to understand. From here you can copy the script into a new tab and once you've edited it, compile it. You will get an offset that can be pasted over the old one in A-map.
                    Well, my good man, I've done it and I did that without corrupting the guy at the entrance. I guess we can finally consider this case closed.
                    Reply With Quote
                      #17    
                    Old September 16th, 2015 (2:28 AM).
                    TerminalVelo TerminalVelo is offline
                       
                      Join Date: Aug 2012
                      Gender: Male
                      Posts: 38
                      Quote:
                      Originally Posted by chrunch View Post
                      When you edit and recompile any script in the game, and it's bigger than the original version, than yeah it overwrites and corrupts whatever comes after it. This is why I told you to compile brock's script in XSE and replace the old one, not just edit it.

                      To do this first make sure in Options>Decompile Options in XSE you have ticked refactoring and unticked comments. find your script and it should be in the same format as any normal script you write, which makes it a bit easier to understand. From here you can copy the script into a new tab and once you've edited it, compile it. You will get an offset that can be pasted over the old one in A-map.
                      ...Of course, while this case is solved, I kinda did it in a more... complicated way. I got PKSV-UI involved. Dunno if that was necessary, but it seemed appropriate at the time... heh heh heh...
                      Reply With Quote
                        #18    
                      Old May 3rd, 2017 (5:51 PM).
                      TerminalVelo TerminalVelo is offline
                         
                        Join Date: Aug 2012
                        Gender: Male
                        Posts: 38
                        Well, it took a few years, but I figured out how to not only rematch Brock via scripts, but I've done it with these scripts. I use XSE to compile these, BTW... and you can put them on the signs outside the Gyms. They're what I like to call "Restart the Gym" scripts.

                        http://www.mediafire.com/file/g6tv2xqe714prh4/Brock_Yes_No_Script.txt
                        http://www.mediafire.com/file/8xa3u82pkxp5v3v/Misty_Script.txt
                        http://www.mediafire.com/file/7ve7emm2dq7r928/Lt._Surge_Script.txt
                        http://www.mediafire.com/file/i37a2f7m4spax7h/Erika_Yes_No_Script.txt
                        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 2:59 AM.