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

Closed Thread
 
Thread Tools
  #6901    
Old May 27th, 2012 (9:48 AM). Edited May 28th, 2012 by vanillagfx.
vanillagfx's Avatar
vanillagfx vanillagfx is offline
     
    Join Date: May 2012
    Gender: Male
    Posts: 90
    Problem solved disregard this post.
    __________________

    Youtube Channel.

    Relevant Advertising!

      #6902    
    Old May 27th, 2012 (10:14 AM).
    Trev's Avatar
    Trev Trev is offline
    starting my comeback tour
       
      Join Date: May 2012
      Location: anywhere as long as I have dogs
      Age: 20
      Gender: Male
      Nature: Sassy
      Posts: 1,221
      Quote:
      Originally Posted by vanillagfx View Post
      Okay well everything worked fine but when I go back to the room the script resets. Also how do you do move camera don't see it in diegos tut.

      PC
      Spoiler:
      Unfixed script goes here


      Script
      [spoiler]Other unfixed script goes here
      I can see the problems in the first script, the one for the PC. Try this one instead:

      Spoiler:
      '---------------
      #org 0x800184
      lock
      faceplayer
      checkflag 0x200
      if 0x1 goto 0x88001E5
      msgbox 0x88001AF MSG_YESNO '"It's an email from Kira, would\nyo..."
      compare LASTRESULT 0x1
      if 0x1 goto 0x88001AC
      release
      end

      '---------------
      #org 0x8001E5
      msgbox 0x88001F3 MSG_NORMAL '"Hi [player], this is Kira. I\nwent..."
      setflag 0x200
      release
      end

      '---------------
      #org 0x8001AC
      release
      end


      '---------
      ' Strings
      '---------
      #org 0x8001AF
      = It's an email from Kira, would\nyou like to open it?

      #org 0x8001F3
      = Hi [player], this is Kira. I\nwent outside today to train\land my pokemon vanished right in\lfront of me! What could cause\lthis to happen?! Meet me at\lthe hideout behind the gym in\lWolkey Town, be careful [player].


      The problem was that, even if the player said no, it'd automatically go to the e-mail. Also, why was the flag being set at the end of the first script? And, for the "compare/if" commands you used for the "Yes/No" situation were unmatching (you were checking if the player said yes, but the "if" only worked if he/she said no). I moved setflag 0x200 to the end of the second script, removed the goto at the end of the first script, and fixed the error in the Compare/If commands. This modified version makes it so the e-mail can be read, and the PC will no longer execute the script afterwards.

      This one is also very obvious.

      Spoiler:
      #dynamic 0x800885

      #org @start
      checkflag 0x200
      if 0x1 goto @skip
      msgbox @nohoe 0x6
      applymovement 0xFF @move1
      pause 0x20
      end

      #org @skip
      release
      end

      #org @move1
      #raw 0x4
      #raw 0x1D
      #raw 0xFE

      #org @nohoe
      = Should look around for clues first.


      The clearflag under @skip would make the script repeat endlessly. You didn't need it.
        #6903    
      Old May 28th, 2012 (11:24 AM). Edited May 28th, 2012 by vanillagfx.
      vanillagfx's Avatar
      vanillagfx vanillagfx is offline
         
        Join Date: May 2012
        Gender: Male
        Posts: 90
        I'm trying to add a trainer script but his view radius isn't working I set it to 5 I have to talk to him for the battle to start.
        Spoiler:
        #dynamic 0x80117B

        #org @start
        trainerbattle 0x0 0x00A 0x0 @before @after
        msgbox @beaten 0x6
        release
        end

        #org @before
        = Check out my pokemon.

        #org @after
        = As soon as I get good enough I'm going to go and beat all the gym leaders in Kenchi!

        #org @beaten
        = Good game.
        __________________

        Youtube Channel.
          #6904    
        Old May 28th, 2012 (12:05 PM).
        Obix's Avatar
        Obix Obix is offline
           
          Join Date: May 2012
          Gender: Male
          Posts: 19
          Is there any like scripting for dummies or like a huge tutorial
          __________________
            #6905    
          Old May 28th, 2012 (12:43 PM).
          vanillagfx's Avatar
          vanillagfx vanillagfx is offline
             
            Join Date: May 2012
            Gender: Male
            Posts: 90
            Quote:
            Originally Posted by Obix View Post
            Is there any like scripting for dummies or like a huge tutorial
            http://www.pokecommunity.com/showthread.php?t=164276
            __________________

            Youtube Channel.
              #6906    
            Old May 30th, 2012 (9:02 AM). Edited May 30th, 2012 by Light_of_Aether.
            Light_of_Aether Light_of_Aether is offline
               
              Join Date: Jan 2012
              Gender: Male
              Posts: 6
              Thanks, Drfuji and redriders180! It was very helpful.

              Now I have a new problem. Whenever I try to compile a specific script with XSE, XSE crashes. At first I thought it was happening because of an extremely long message (hence the multiple msgbox's), but now I have no idea what is causing the crash. This crash is happening on my laptop. I tried compiling it on another computer and I got the error "Subscript out of range" on lines 65, 71, and 74 which are messages 6, 8, and 9. What does this error mean?
              EDIT: The problem must be with the messages because it was able to successfully compile without them.

              Code:
              #dynamic 0x71B791
              
              #org @start
              lock 
              faceplayer
              checkflag 0x829
              if 0x1 goto @done
              checkflag 0x26E
              if 0x1 goto @choosepokemon
              msgbox @1 0x6
              msgbox @10 0x6
              msgbox @11 0x6
              msgbox @12 0x6
              msgbox @13 0x6
              msgbox @2 0x6
              msgbox @3 0x6
              setflag 0x26E
              release
              end
              
              #org @choosepokemon
              checkflag 0x828
              if 0x1 goto @pokedex
              msgbox @4 0x6
              release
              end
              
              #org @pokedex
              msgbox @6 0x6
              fanfare 0x13E
              msgbox @7 0x6
              waitfanfare
              setflag 0x829
              special 0x181
              setvar 0x407C 0x1
              msgbox @8 0x6
              msgbox @9 0x6
              release
              end
              
              #org @done
              msgbox @5 0x6
              release
              end
              
              
              #org @1
              = Ah, there you are, [player]! Today is a\nspecial day for you and [rival]. 
              
              #org @2
              = [rival]: Why does [player] get to choose\nfirst?
              
              #org @3
              = Oak: Be patient, [rival]. You will get\nyour turn soon enough.
              
              #org @4
              = Once you have chosen your Pokemon,\ndon't leave. I have something for\lyou.
              
              #org @5
              = How is your Pokedex coming along?
              
              #org @6
              = Oak: Before you and [rival] go off on\nyour adventure, I’d like to give\lyou something.
              
              #org @7
              = [player] received the Pokedex!
              
              #org @8
              = That is a Pokedex, a Pokemon\nencyclopedia. I invented it to\lmake a detailed record of Pokemon\lthat the user encounters and\lcaptures. The Pokedex records\lsome data when you encounter a\lPokemon, but it records a lot\lmore data when you capture a\lPokemon. Make sure to catch’em\lall!
              
              #org @9
              = [rival]: I bet I’ll catch more Pokemon\nthan you, [player]! Smell you later!
              
              #org @10
              = Today is the day that you will\nreceive your first Pokemon!
              
              #org @11
              = Beside me are the keepers of the\nstarters.
              
              #org @12
              = There are nine starters—three\ngrass, three fire, and three\lwater—to choose from; you may\lonly have one.
              
              #org @13
              = [player], why don’t you choose first?
                #6907    
              Old May 31st, 2012 (11:53 AM).
              Alignment's Avatar
              Alignment Alignment is offline
              Revered with the stars
                 
                Join Date: Mar 2010
                Gender: Male
                Nature: Lonely
                Posts: 308
                Quote:
                Originally Posted by Light_of_Aether View Post
                Thanks, Drfuji and redriders180! It was very helpful.

                Now I have a new problem. Whenever I try to compile a specific script with XSE, XSE crashes. At first I thought it was happening because of an extremely long message (hence the multiple msgbox's), but now I have no idea what is causing the crash. This crash is happening on my laptop. I tried compiling it on another computer and I got the error "Subscript out of range" on lines 65, 71, and 74 which are messages 6, 8, and 9. What does this error mean?
                EDIT: The problem must be with the messages because it was able to successfully compile without them.

                Code:
                #dynamic 0x71B791
                 
                #org @start
                lock 
                faceplayer
                checkflag 0x829
                if 0x1 goto @done
                checkflag 0x26E
                if 0x1 goto @choosepokemon
                msgbox @1 0x6
                msgbox @10 0x6
                msgbox @11 0x6
                msgbox @12 0x6
                msgbox @13 0x6
                msgbox @2 0x6
                msgbox @3 0x6
                setflag 0x26E
                release
                end
                 
                #org @choosepokemon
                checkflag 0x828
                if 0x1 goto @pokedex
                msgbox @4 0x6
                release
                end
                 
                #org @pokedex
                msgbox @6 0x6
                fanfare 0x13E
                msgbox @7 0x6
                waitfanfare
                setflag 0x829
                special 0x181
                setvar 0x407C 0x1
                msgbox @8 0x6
                msgbox @9 0x6
                release
                end
                 
                #org @done
                msgbox @5 0x6
                release
                end
                 
                 
                #org @1
                = Ah, there you are, [player]! Today is a\nspecial day for you and [rival]. 
                 
                #org @2
                = [rival]: Why does [player] get to choose\nfirst?
                 
                #org @3
                = Oak: Be patient, [rival]. You will get\nyour turn soon enough.
                 
                #org @4
                = Once you have chosen your Pokemon,\ndon't leave. I have something for\lyou.
                 
                #org @5
                = How is your Pokedex coming along?
                 
                #org @6
                = Oak: Before you and [rival] go off on\nyour adventure, I’d like to give\lyou something.
                 
                #org @7
                = [player] received the Pokedex!
                 
                #org @8
                = That is a Pokedex, a Pokemon\nencyclopedia. I invented it to\lmake a detailed record of Pokemon\lthat the user encounters and\lcaptures. The Pokedex records\lsome data when you encounter a\lPokemon, but it records a lot\lmore data when you capture a\lPokemon. Make sure to catch’em\lall!
                 
                #org @9
                = [rival]: I bet I’ll catch more Pokemon\nthan you, [player]! Smell you later!
                 
                #org @10
                = Today is the day that you will\nreceive your first Pokemon!
                 
                #org @11
                = Beside me are the keepers of the\nstarters.
                 
                #org @12
                = There are nine starters—three\ngrass, three fire, and three\lwater—to choose from; you may\lonly have one.
                 
                #org @13
                = [player], why don’t you choose first?
                combine
                msgbox @1 0x6
                msgbox @10 0x6
                msgbox @11 0x6
                msgbox @12 0x6
                msgbox @13 0x6
                msgbox @2 0x6
                msgbox @3 0x6

                into one msgbox. Do the same with msgbox 8 &9. Don't forget the \n's and stuff.
                  #6908    
                Old June 2nd, 2012 (8:14 PM).
                hinkage's Avatar
                hinkage hinkage is offline
                Everyone currently in an argument with this member: I really suggest you stop.
                • Gold Tier
                 
                Join Date: Aug 2010
                Age: 21
                Posts: 378
                I have a problem with free space.

                I expanded my Emerald ROM to 32 MB. To avoid sound corruption, I have to use #dynamic 0xE3CF64 in scripts. However, when compiling in PKSV it assigns all offsets to 0x100001 no matter how big they are, and when compiling in XSE I get a "Not enough free space" error.

                I tried HackMew's Free Space Finder, but it is dangerous because it can overwrite scripts if I'm not careful, so I can't use it.
                How can I fix this? I don't know what to do. ;-;
                  #6909    
                Old June 2nd, 2012 (8:59 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
                  Quote:
                  Originally Posted by hinkage View Post
                  I have a problem with free space.

                  I expanded my Emerald ROM to 32 MB. To avoid sound corruption, I have to use #dynamic 0xE3CF64 in scripts. However, when compiling in PKSV it assigns all offsets to 0x100001 no matter how big they are, and when compiling in XSE I get a "Not enough free space" error.

                  I tried HackMew's Free Space Finder, but it is dangerous because it can overwrite scripts if I'm not careful, so I can't use it.
                  How can I fix this? I don't know what to do.
                  There is plenty of free space in your 16MB rom already if you just put it in use. But this is basically one of the reasons I don't want to use dynamic pointers because I never know where they send the leftover data of my scripts.

                  What you could do is find a way to expand the rom data or start finding the leftover script data and remove it (because if your 16MB rom is almost filled up, you ought to have more than > 4MB of that kind of data already (just my assumption though)).
                  __________________
                  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
                    #6910    
                  Old June 3rd, 2012 (7:10 AM).
                  hinkage's Avatar
                  hinkage hinkage is offline
                  Everyone currently in an argument with this member: I really suggest you stop.
                  • Gold Tier
                   
                  Join Date: Aug 2010
                  Age: 21
                  Posts: 378
                  Quote:
                  Originally Posted by miksy91 View Post
                  There is plenty of free space in your 16MB rom already if you just put it in use. But this is basically one of the reasons I don't want to use dynamic pointers because I never know where they send the leftover data of my scripts.

                  What you could do is find a way to expand the rom data or start finding the leftover script data and remove it (because if your 16MB rom is almost filled up, you ought to have more than > 4MB of that kind of data already (just my assumption though)).
                  What... First of all: No, there isn't that much free space in Emerald. Second, using that free space still corrupts music. Don't ask me how, but it does.

                  I've also tried "#define X freespaceY" in PKSV, but it has the same problem.

                  ...At this rate, it looks like I'm boned. ~Sound corruption all day~
                  __________________
                  (ღ˘⌣˘ღ)
                    #6911    
                  Old June 3rd, 2012 (7:36 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 hinkage View Post
                    What... First of all: No, there isn't that much free space in Emerald. Second, using that free space still corrupts music. Don't ask me how, but it does.

                    I've also tried "#define X freespaceY" in PKSV, but it has the same problem.

                    ...At this rate, it looks like I'm boned. ~Sound corruption all day~
                    It looks like the game doesn't want you to use specific part of the rom area at all. There is gotta be a certain code for making the sound corruption to happen (because nothing happens by accident) if you use that part of the rom data for different things.

                    However, haven't you noticed when the sound corruption takes place ? In case you've (and make backups often), you can easily track down what's making it to happen if you make a patch file using the one "not corrupted" as unmodified rom file and the one with sound corruption as modified one. Then open the ips-file with a hex editor (the format for changing data in the rom is pretty simple:
                    3 bytes for "offset" + 2 bytes for "how many bytes to change" + "bytes to change" and this goes over and over again till the end of file (EOF).

                    In case you can't expand your rom data though, I'd advise you to start removing existing events, maps, scripts and text to make room for new things to add (and do everything from scratch).
                    *At least you can remove all useless text no problem (and scripts that way as well)
                    __________________
                    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
                      #6912    
                    Old June 3rd, 2012 (8:41 AM).
                    hinkage's Avatar
                    hinkage hinkage is offline
                    Everyone currently in an argument with this member: I really suggest you stop.
                    • Gold Tier
                     
                    Join Date: Aug 2010
                    Age: 21
                    Posts: 378
                    Quote:
                    Originally Posted by miksy91 View Post
                    It looks like the game doesn't want you to use specific part of the rom area at all. There is gotta be a certain code for making the sound corruption to happen (because nothing happens by accident) if you use that part of the rom data for different things.

                    However, haven't you noticed when the sound corruption takes place ? In case you've (and make backups often), you can easily track down what's making it to happen if you make a patch file using the one "not corrupted" as unmodified rom file and the one with sound corruption as modified one. Then open the ips-file with a hex editor (the format for changing data in the rom is pretty simple:
                    3 bytes for "offset" + 2 bytes for "how many bytes to change" + "bytes to change" and this goes over and over again till the end of file (EOF).

                    In case you can't expand your rom data though, I'd advise you to start removing existing events, maps, scripts and text to make room for new things to add (and do everything from scratch).
                    *At least you can remove all useless text no problem (and scripts that way as well)
                    I don't think you really understand...

                    The sound corruption occurs whenever you insert anything into Emerald's normal space. EVERYTHING makes it happen. There's no code, just stuff being overwritten. Removing events doesn't help, either.. The only way to avoid corruption is with this method: http://www.pokecommunity.com/showthread.php?t=217054
                    But, for some reason, script editors aren't letting me assign anything in the expanded 16 MB.
                      #6913    
                    Old June 3rd, 2012 (10:24 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 hinkage View Post
                      I don't think you really understand...

                      The sound corruption occurs whenever you insert anything into Emerald's normal space. EVERYTHING makes it happen. There's no code, just stuff being overwritten. Removing events doesn't help, either.. The only way to avoid corruption is with this method: http://www.pokecommunity.com/showthread.php?t=217054
                      There is stuff there that has to be 00's, just like Chaos Rush said in that tutorial. So there's also gotta be a code for checking whether that data has been modified or not if sound corruption occurs if this has been done.
                      If there wouldn't be, writing something to that part of rom area wouldn't affect the game in any way.
                      Maybe it's like additional header or something ?

                      Anyway, there is no need arguing about it. I may be wrong here but I can't really think of any other explanation. Those 00's have to be used for something so some code must check that data as well (maybe gamefreak designed something to be written there and dropped the idea later on ?).

                      Quote:
                      Originally Posted by hinkage View Post
                      But, for some reason, script editors aren't letting me assign anything in the expanded 16 MB.
                      This may sound like a dumb question but did you know that when pointing to the expanded rom area (16MB to 32MB) you need to use 09 as part of any pointer instead of 08 ?
                      __________________
                      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
                        #6914    
                      Old June 3rd, 2012 (10:35 AM).
                      Renegade's Avatar
                      Renegade Renegade is offline
                      Time for real life...
                         
                        Join Date: Nov 2011
                        Location: United States
                        Gender: Male
                        Nature: Careful
                        Posts: 998
                        I'm having trouble finding out how to make a move camera script where the player stops moving but the camera pans to a certain location on the map. I pretty much know everything there is to know about Pokescript, but now I'm switching to XSE. Help? Thanks!
                          #6915    
                        Old June 3rd, 2012 (10:48 AM).
                        Spherical Ice's Avatar
                        Spherical Ice Spherical Ice is offline
                        • Moderator
                        • Silver Tier
                         
                        Join Date: Nov 2007
                        Location: Bristol, UK
                        Age: 19
                        Posts: 5,185
                        Quote:
                        Originally Posted by CrystalStatic View Post
                        I'm having trouble finding out how to make a move camera script where the player stops moving but the camera pans to a certain location on the map. I pretty much know everything there is to know about Pokescript, but now I'm switching to XSE. Help? Thanks!
                        Code:
                        ...
                        special 0x113
                        applymovement 0x7F @move1
                        waitmovement 0x0
                        special 0x114
                        ...
                        That code will move the camera according to the movements set at @move1.
                          #6916    
                        Old June 3rd, 2012 (2:48 PM).
                        PokemonPurple's Avatar
                        PokemonPurple PokemonPurple is offline
                           
                          Join Date: Jul 2011
                          Posts: 31
                          I am trying to make it check if you have at least one Pokemon, and if so you can pass, and if not it sends you one block back/South. But whenever I step on the tile it has the script on it just freezes the game.

                          Here's the script:

                          Quote:
                          #dynamic 0x899999
                          #org @check
                          setvar 0x8004 0x19
                          special2 0x800D 0x17C
                          compare 0x800D 0x1
                          if b_true goto @have
                          if b_false goto @donthave
                          #org @have
                          end
                          #org @donthave
                          msgbox @troll 0x6
                          waitmsgbox
                          pause 0x1E
                          applymovement MOVE_PLAYER 0x3 @movedown
                          waitmovement 0x0
                          end
                          #org @troll
                          = I don't have a Pokemon yet!\nBetter go talk to Oak!
                          #org @movedown
                          #raw 0x1 0x2 0x3 0x4 0xFE
                          __________________
                          Pokemon Purple: 10% Done ||||||||||
                          Dream Team -
                          Click Here for Pokemon: Purple Website!
                            #6917    
                          Old June 3rd, 2012 (3:02 PM).
                          Spherical Ice's Avatar
                          Spherical Ice Spherical Ice is offline
                          • Moderator
                          • Silver Tier
                           
                          Join Date: Nov 2007
                          Location: Bristol, UK
                          Age: 19
                          Posts: 5,185
                          Quote:
                          Originally Posted by PokemonPurple View Post
                          I am trying to make it check if you have at least one Pokemon, and if so you can pass, and if not it sends you one block back/South. But whenever I step on the tile it has the script on it just freezes the game.

                          Here's the script:
                          Oh my, there's quite a few things wrong with that script. Here's a version that will work, with annotations to explain:

                          Code:
                          #dynamic 0x800000 // You don't need to enter an arbitrary number, just enter this and XSE will find the right offset for you.
                          
                          #org @start
                          countpokemon // this stores the amount of Pokémon in your party to LASTRESULT
                          compare LASTRESULT 0x1 // this checks if LASTRESULT is equal to one
                          if B_>= goto @have // if it's equal or larger than one, the script goes to @have
                          msgbox @troll 0x6 //otherwise, "@donthave" happens here - a separate part isn't needed.
                          applymovement MOVE_PLAYER @movedown // I removed the "waitmsgbox " and "pause 0x1E" commands - they seemed useless.
                          waitmovement 0x0
                          end
                          
                          #org @have
                          end
                          
                          #org @troll
                          = I don't have a Pokemon yet!\nBetter go talk to Oak!
                          
                          #org @movedown
                          #raw 0x1 0x2 0x3 0x4 0xFE
                          Try that script, then make sure the script tile (the green square with a yellow "S" in Advance Map) is set up so that the "Unknown" is "$03" and the "Var Number" is "$4050" (or another variable that you never set).
                            #6918    
                          Old June 3rd, 2012 (3:31 PM).
                          PokemonPurple's Avatar
                          PokemonPurple PokemonPurple is offline
                             
                            Join Date: Jul 2011
                            Posts: 31
                            Thank you so much for your help, it works, but it doesn't move the player down, it just makes him turn looking down.
                            __________________
                            Pokemon Purple: 10% Done ||||||||||
                            Dream Team -
                            Click Here for Pokemon: Purple Website!
                              #6919    
                            Old June 3rd, 2012 (3:47 PM).
                            Spherical Ice's Avatar
                            Spherical Ice Spherical Ice is offline
                            • Moderator
                            • Silver Tier
                             
                            Join Date: Nov 2007
                            Location: Bristol, UK
                            Age: 19
                            Posts: 5,185
                            Oh, that's because the movements are wrong. Here's the fixed version:
                            Code:
                            #dynamic 0x800000
                            
                            #org @start
                            countpokemon
                            compare LASTRESULT 0x1
                            if B_>= goto @have
                            msgbox @troll 0x6
                            applymovement MOVE_PLAYER @movedown
                            waitmovement 0x0
                            end
                            
                            #org @have
                            end
                            
                            #org @troll
                            = I don't have a Pokemon yet!\nBetter go talk to Oak!
                            
                            #org @movedown
                            #raw 0x10 0xFE
                              #6920    
                            Old June 3rd, 2012 (4:10 PM). Edited June 3rd, 2012 by Hadesminion13.
                            Hadesminion13 Hadesminion13 is offline
                               
                              Join Date: Apr 2009
                              Gender:
                              Posts: 29
                              Ugh, I need help again
                              I'm trying to figure out how to change two tiles in a map after you talk to some guy in a totally different map (Although this flag check is not implemented yet because the scripts aren't finished). I figured out that there is something called setmaptile, and I'm trying to use that in conjunction with script tiles in AdvanceMap.

                              I can't find any information on script tiles anywhere, so I'm just kind of guessing and checking, here's my problem:

                              I have my script:
                              Code:
                              '---------------
                              #org 0xE00EB8
                              lockall
                              checkflag 0x939
                              if 0x1 goto 0x8E00EEA
                              fadescreen 0x1
                              setmaptile 0x58 0x5 0xA7 0x0
                              setmaptile 0x58 0x4 0x9F 0x1
                              fadescreen 0x0
                              setflag 0x939
                              releaseall
                              end
                              
                              '---------------
                              #org 0xE00EEA
                              releaseall
                              end
                              And I have some script tiles (They're the green boxes with an 'S' on them in AMap, mentioning this because I don't really know the name for them). I changed the script offset of each of the tiles to the offset of the above script, and I thought this was all I had to do. Now when I walk onto one of these tiles my game just freezes, almost like it gets to lockall but not ever to fadescreen, let alone releaseall lol.

                              Anyone know what's up?

                              EDIT: After reading the above post I saw he mentioned changing the unknown to 03 and the var to 4050, so I went and did that for all my scripting tiles, but now my game doesn't even freeze, it just... does nothing.

                              If it helps, I'm hacking Emerald.
                              __________________

                              Feed Me!

                              Adopted from Valenth
                                #6921    
                              Old June 3rd, 2012 (4:29 PM).
                              PokemonPurple's Avatar
                              PokemonPurple PokemonPurple is offline
                                 
                                Join Date: Jul 2011
                                Posts: 31
                                Ok, it makes me move back down which is good, but it doesn't display the message box saying, "I don't have a Pokemon blah blah blah."
                                __________________
                                Pokemon Purple: 10% Done ||||||||||
                                Dream Team -
                                Click Here for Pokemon: Purple Website!
                                  #6922    
                                Old June 3rd, 2012 (4:34 PM).
                                Spherical Ice's Avatar
                                Spherical Ice Spherical Ice is offline
                                • Moderator
                                • Silver Tier
                                 
                                Join Date: Nov 2007
                                Location: Bristol, UK
                                Age: 19
                                Posts: 5,185
                                Quote:
                                Originally Posted by PokemonPurple View Post
                                Ok, it makes me move back down which is good, but it doesn't display the message box saying, "I don't have a Pokemon blah blah blah."
                                I'm stumped. It should work. Are you sure you copied the entire the script?
                                Quote:
                                Originally Posted by Hadesminion13 View Post
                                Ugh, I need help again :(
                                I'm trying to figure out how to change two tiles in a map after you talk to some guy in a totally different map (Although this flag check is not implemented yet because the scripts aren't finished). I figured out that there is something called setmaptile, and I'm trying to use that in conjunction with script tiles in AdvanceMap.

                                I can't find any information on script tiles anywhere, so I'm just kind of guessing and checking, here's my problem:

                                I have my script:
                                Code:
                                '---------------
                                #org 0xE00EB8
                                lockall
                                checkflag 0x939
                                if 0x1 goto 0x8E00EEA
                                fadescreen 0x1
                                setmaptile 0x58 0x5 0xA7 0x0
                                setmaptile 0x58 0x4 0x9F 0x1
                                fadescreen 0x0
                                setflag 0x939
                                releaseall
                                end
                                
                                '---------------
                                #org 0xE00EEA
                                releaseall
                                end
                                And I have some script tiles (They're the green boxes with an 'S' on them in AMap, mentioning this because I don't really know the name for them). I changed the script offset of each of the tiles to the offset of the above script, and I thought this was all I had to do. Now when I walk onto one of these tiles my game just freezes, almost like it gets to lockall but not ever to fadescreen, let alone releaseall lol.

                                Anyone know what's up?

                                EDIT: After reading the above post I saw he mentioned changing the unknown to 03 and the var to 4050, so I went and did that for all my scripting tiles, but now my game doesn't even freeze, it just... does nothing.

                                If it helps, I'm hacking Emerald.
                                Perhaps flag 939 has been set? I'm not sure which flags are safe for Emerald, but maybe if you change the flag you'll get a result?
                                  #6923    
                                Old June 3rd, 2012 (4:55 PM).
                                PokemonPurple's Avatar
                                PokemonPurple PokemonPurple is offline
                                   
                                  Join Date: Jul 2011
                                  Posts: 31
                                  Thanks, but it still doesn't display the msgbox.

                                  Thanks so much for the help by the way and sorry i'm a noob at scripting.
                                  __________________
                                  Pokemon Purple: 10% Done ||||||||||
                                  Dream Team -
                                  Click Here for Pokemon: Purple Website!
                                    #6924    
                                  Old June 3rd, 2012 (5:24 PM).
                                  Hadesminion13 Hadesminion13 is offline
                                     
                                    Join Date: Apr 2009
                                    Gender:
                                    Posts: 29
                                    Crap I thought I responded, haha. Anyway, I tried changing the flag to check 271 and it still does nothing
                                    __________________

                                    Feed Me!

                                    Adopted from Valenth
                                      #6925    
                                    Old June 3rd, 2012 (5:39 PM). Edited June 3rd, 2012 by Renegade.
                                    Renegade's Avatar
                                    Renegade Renegade is offline
                                    Time for real life...
                                       
                                      Join Date: Nov 2011
                                      Location: United States
                                      Gender: Male
                                      Nature: Careful
                                      Posts: 998
                                      I'm having trouble with this long script. This is the first script I have made with XSE. The problem is: The script activates when I step onto a script box but the only things that happen are the movements. No talking appears in the script in-game. Help please? Thanks!

                                      Code:
                                      #dynamic 0x800000
                                      
                                      #org @start
                                      lock
                                      special 0x113
                                      applymovement 0x7F @m1
                                      waitmovement 0x0
                                      special 0x114
                                      textcolor 0x0
                                      msgbox @t1 6
                                      pause 0x30
                                      msgbox @t2 6
                                      pause 0x30
                                      applymovement 1 @m2
                                      waitmovement 0x0
                                      msgbox @t3 4
                                      closeonkeypress
                                      applymovement 2 @m3
                                      applymovement 3 @m3
                                      waitmovement 0x0
                                      msgbox @t4 4
                                      closeonkeypress
                                      msgbox @t5 6
                                      applymovement 2 @m3
                                      applymovement 3 @m3
                                      waitmovement 0x0
                                      msgbox @t4 4
                                      closeonkeypress
                                      fadescreen 0x3
                                      hidesprite 0x01
                                      setflag 0x1200
                                      hidesprite 0x02
                                      setflag 0x1201
                                      hidesprite 0x03
                                      setflag 0x1202
                                      warp 0x4 0x0 0xFF 0x02 0x06
                                      setvar 0x6000 0x0001
                                      end
                                      
                                      #org @m1
                                      #raw 0x11
                                      #raw 0x11
                                      #raw 0x11
                                      #raw 0x11
                                      #raw 0x11
                                      #raw 0x11
                                      #raw 0x11
                                      #raw 0xFE
                                      
                                      #org @t1
                                      = Man: So, this is the place\nwhere it all started...
                                      
                                      #org @t2
                                      = Maybe I should begin here...\pNo, it'll have to wait. I can't\ndo this just yet... I must\lwait. But I should return to the\lHQ to settle where we should begin\lat.
                                      
                                      #org @m2
                                      #raw 0x0
                                      #raw 0xFE
                                      
                                      #org @t3
                                      = Right! Let us head back to\nthe HQ at once!\pGRUNTS!
                                      
                                      #org @m3
                                      #raw 0x21
                                      #raw 0xFE
                                      
                                      #org @t4
                                      = Grunts: SIR!
                                      
                                      #org @t5
                                      = Man: We are ready to departure!
                                      Closed Thread
                                      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 12:15 AM.