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
  #24151    
Old March 11th, 2013 (10:08 PM).
destinedjagold's Avatar
destinedjagold destinedjagold is offline
Oh Hai Thar~
  • Silver Tier
 
Join Date: May 2007
Location: Philippines
Age: 26
Gender: Male
Nature: Careful
Posts: 8,517
Quote:
Originally Posted by robin22gongon View Post
Well, what if for example in route 1 I battle a wild Pidgey, and after defeating it I have a chance to get or not to get an oran berry? Is it the same? Can you post a sample because diegoisawesome's and tajaros' scripting tutorial doesn't work on me, I'm using XSE 1.11 I always get errors on certain lines.

Oh and also what about a random weather? For example I get out of a building it's sunny I go back in and go out again and it will rain but if I go to another place or route, the rain still goes on until I get inside another building again. Is that possible?
Both your questions may be achieved through the use of the random code.
Taken from diegoisawesome's tutorial...
Quote:
With this command, the ROM will choose a random number within the range of 0x0 to the value you set with the argument, and then assign it to 0x800D.
Here is an example...
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @pidgey 0x6
wildbattle 0x10 0x05 0
random 0x2
compare 0x800D 0x0
if 0x1 goto @getberry
compare 0x800D 0x1
if 0x1 goto @noberry
end

#org @getberry
giveitem 139 1
setflag 0x(flag)
hidesprite 0x(sprite #)
release
end

#org @noberry
setflag 0x(flag)
hidesprite 0x(sprite #)
release
end
Remember the golden rule of hacking...
Save a back-up before doing something you're not sure of.
__________________


FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)


Relevant Advertising!

  #24152    
Old March 11th, 2013 (10:14 PM).
BlackWhiteRobin's Avatar
BlackWhiteRobin BlackWhiteRobin is offline
     
    Join Date: Sep 2012
    Age: 19
    Gender: Male
    Nature: Quirky
    Posts: 537
    Quote:
    Originally Posted by destinedjagold View Post


    Both your questions may be achieved through the use of the random code.
    Taken from diegoisawesome's tutorial...


    Here is an example...
    Code:
    #dynamic 0x800000
    
    #org @start
    lock
    faceplayer
    msgbox @pidgey 0x6
    wildbattle 0x10 0x05 0
    random 0x2
    compare 0x800D 0x0
    if 0x1 goto @getberry
    compare 0x800D 0x1
    if 0x1 goto @noberry
    end
    
    #org @getberry
    giveitem 139 1
    setflag 0x(flag)
    hidesprite 0x(sprite #)
    release
    end
    
    #org @noberry
    setflag 0x(flag)
    hidesprite 0x(sprite #)
    release
    end
    Remember the golden rule of hacking...
    Save a back-up before doing something you're not sure of.
    Thanks dude. So I just hit compile and I'm good to go? Or do I need to make a new event for this?
    __________________

      #24153    
    Old March 12th, 2013 (4:11 AM).
    Mizumi's Avatar
    Mizumi Mizumi is offline
       
      Join Date: Mar 2013
      Posts: 7
      Quote:
      Originally Posted by karatekid552 View Post
      If you notice, number 2013 did not change its offset. That is becuase the original still exists, and you put your new one later in the rom, and now it exists at its own number. If you opted to change the pointer, it should ignore the old one and go straight to your new one.
      I checked the fix pointers box and still replaces it with the old? Should I get a new unlz-GBA?
        #24154    
      Old March 12th, 2013 (4:23 AM).
      BlackWhiteRobin's Avatar
      BlackWhiteRobin BlackWhiteRobin is offline
         
        Join Date: Sep 2012
        Age: 19
        Gender: Male
        Nature: Quirky
        Posts: 537
        Quote:
        Originally Posted by Mizumi View Post
        I checked the fix pointers box and still replaces it with the old? Should I get a new unlz-GBA?

        Have you tried to play your game? Because in unlz, when you put a new image in a new offset, checked the automatically fix pointers box and successfully saved it, it will exist in a new number in unlz format. Reply if you tried it but still nothing.
        __________________

          #24155    
        Old March 12th, 2013 (6:34 AM).
        YogiBerra YogiBerra is offline
           
          Join Date: Oct 2010
          Gender: Male
          Posts: 48
          Hello.

          Would anyone be able to help me with editing the default names in the intro for Professor Oak? I want to change both the random name the player is assigned if he clicks "OK" without entering a name in the box and the default names that are provided for the rival.

          I would also like to find the location of the MSG_FIND and MSG_OBTAIN scripts so that I could change them.
            #24156    
          Old March 12th, 2013 (8:01 AM).
          BlackWhiteRobin's Avatar
          BlackWhiteRobin BlackWhiteRobin is offline
             
            Join Date: Sep 2012
            Age: 19
            Gender: Male
            Nature: Quirky
            Posts: 537
            Quote:
            Originally Posted by YogiBerra View Post
            Hello.

            Would anyone be able to help me with editing the default names in the intro for Professor Oak? I want to change both the random name the player is assigned if he clicks "OK" without entering a name in the box and the default names that are provided for the rival.

            I would also like to find the location of the MSG_FIND and MSG_OBTAIN scripts so that I could change them.
            Just use the search function of Advance Text. Google it. For example, if you search TERRY in advance text which is one of the default names of the rivals just write it to ini and edit them.

            But about the MSG_FIND and MSG_OBTAIN, I'm really not sure since those are parts of scripts.
            __________________

              #24157    
            Old March 12th, 2013 (1:21 PM).
            YogiBerra YogiBerra is offline
               
              Join Date: Oct 2010
              Gender: Male
              Posts: 48
              Quote:
              Originally Posted by robin22gongon View Post
              Just use the search function of Advance Text. Google it. For example, if you search TERRY in advance text which is one of the default names of the rivals just write it to ini and edit them.

              But about the MSG_FIND and MSG_OBTAIN, I'm really not sure since those are parts of scripts.
              Thank you very much, that works for the rival names, I'll test if the same will work for the hero's names. Thanks again!
                #24158    
              Old March 12th, 2013 (2:06 PM).
              foxz.'s Avatar
              foxz. foxz. is offline
                 
                Join Date: Jan 2012
                Gender: Male
                Posts: 22
                hello!
                Well, I would like to know how to change the design of the trainer card in pokemon fire red.
                I know the offset of the card and his pals, but not as ordering raw. Because the raw serves to the front and back of the card.
                Well, I hope and I can help, thanks
                  #24159    
                Old March 12th, 2013 (2:34 PM).
                YogiBerra YogiBerra is offline
                   
                  Join Date: Oct 2010
                  Gender: Male
                  Posts: 48
                  Quote:
                  Originally Posted by robin22gongon View Post
                  Thanks dude. So I just hit compile and I'm good to go? Or do I need to make a new event for this?
                  Well if you still have the original script uncompiled with dynamic offsets you can add in the random part no problem.

                  As for the weather part, I assume you would use level scripts with the setweather/doweather commands.
                    #24160    
                  Old March 12th, 2013 (3:05 PM).
                  iDowngrade iDowngrade is offline
                     
                    Join Date: Jan 2013
                    Gender: Male
                    Posts: 34
                    Quote:
                    Originally Posted by karatekid552 View Post
                    Does the emulator run clean roms?
                    clean roms and non-lunarips-patching required rom hacks
                      #24161    
                    Old March 12th, 2013 (3:12 PM). Edited March 12th, 2013 by BlackWhiteRobin.
                    BlackWhiteRobin's Avatar
                    BlackWhiteRobin BlackWhiteRobin is offline
                       
                      Join Date: Sep 2012
                      Age: 19
                      Gender: Male
                      Nature: Quirky
                      Posts: 537
                      Quote:
                      Originally Posted by foxz. View Post
                      hello!
                      Well, I would like to know how to change the design of the trainer card in pokemon fire red.
                      I know the offset of the card and his pals, but not as ordering raw. Because the raw serves to the front and back of the card.
                      Well, I hope and I can help, thanks
                      Here's my answer:
                      Spoiler:
                      If you know the offset and palette, open it in NSE 2.1. And then edit that or you can import your new image using the Import function. Then hit Save. Fix Pointers and your good. About the raw, do you know its unlz-GBA number? If so, Hit raw dump once you locate it. Usually it's just in the next offset of the image. So after saving the raw file, open your edited or your own image with NTME or Professional Tilemap Creator then load tilemap from .raw which is the one you saved earlier and from there edit the order of things. I hope I helped you.


                      Quote:
                      Originally Posted by YogiBerra View Post
                      Well if you still have the original script uncompiled with dynamic offsets you can add in the random part no problem.

                      As for the weather part, I assume you would use level scripts with the setweather/doweather commands.
                      So I would still need to put new events in A-map? Or I just compile it using XSE and it will do its thing automatically?

                      Quote:
                      Originally Posted by iDowngrade View Post
                      clean roms and non-lunarips-patching required rom hacks
                      I personally use this one:
                      http://www.mediafire.com/?x8dbik80db0vkf2

                      Reply if it worked.
                      __________________

                        #24162    
                      Old March 12th, 2013 (3:55 PM).
                      karatekid552's Avatar
                      karatekid552 karatekid552 is offline
                      What happens if I push it?....
                         
                        Join Date: Nov 2012
                        Location: Do you really want to know? Really?
                        Gender: Male
                        Nature: Bold
                        Posts: 1,766
                        Quote:
                        Originally Posted by iDowngrade View Post
                        clean roms and non-lunarips-patching required rom hacks
                        Wow, that is weird. Try patching it with A-ptch or UPS. I have links for both patches on the thread.

                        And try robin22gongon's link^ a new emulator might solve your problem.
                        __________________

                        Paired with Simba
                          #24163    
                        Old March 12th, 2013 (4:12 PM).
                        YogiBerra YogiBerra is offline
                           
                          Join Date: Oct 2010
                          Gender: Male
                          Posts: 48
                          Quote:
                          Originally Posted by robin22gongon View Post
                          So I would still need to put new events in A-map? Or I just compile it using XSE and it will do its thing automatically?
                          Well you will need to have a Person Event with the Pidgey overworld sprite that has the script that karatekid552 posted for the random item giving after the battle. As for the weather, a level script that has code such as:
                          Code:
                          #dynamic 0x800000
                          #org @start
                          random 0x2
                          compare LASTRESULT 0x0
                          if 0x1 goto @sunny
                          compare LASTRESULT 0x1
                          if 0x1 goto @rainy
                          end
                          
                          #org @sunny
                          setweather 0x1 //sets up the weather "0x1" which is "Sunny weather with clouds in water" in Advance Map
                          doweather //executes the weather set in the previous line
                          end
                          
                          #org @rainy
                          setweather 0x3 //sets up the weather "0x3" which is "Rainy weather" in Advance Map
                          doweather
                          end
                          should be placed on each map on which you want the weather to vary. The type of level script should probably be "03 On entering map/not on menu close" I believe, although I have little experience with level scripts, so anyone can feel free to disagree with me on that. Anyway, I hope I could help.
                            #24164    
                          Old March 12th, 2013 (4:23 PM).
                          BlackWhiteRobin's Avatar
                          BlackWhiteRobin BlackWhiteRobin is offline
                             
                            Join Date: Sep 2012
                            Age: 19
                            Gender: Male
                            Nature: Quirky
                            Posts: 537
                            Quote:
                            Originally Posted by YogiBerra View Post
                            Well you will need to have a Person Event with the Pidgey overworld sprite that has the script that karatekid552 posted for the random item giving after the battle. As for the weather, a level script that has code such as:
                            Code:
                            #dynamic 0x800000
                            #org @start
                            random 0x2
                            compare LASTRESULT 0x0
                            if 0x1 goto @sunny
                            compare LASTRESULT 0x1
                            if 0x1 goto @rainy
                            end
                            
                            #org @sunny
                            setweather 0x1 //sets up the weather "0x1" which is "Sunny weather with clouds in water" in Advance Map
                            doweather //executes the weather set in the previous line
                            end
                            
                            #org @rainy
                            setweather 0x3 //sets up the weather "0x3" which is "Rainy weather" in Advance Map
                            doweather
                            end
                            should be placed on each map on which you want the weather to vary. The type of level script should probably be "03 On entering map/not on menu close" I believe, although I have little experience with level scripts, so anyone can feel free to disagree with me on that. Anyway, I hope I could help.
                            Okay thanks dude. Imma try it later.
                            __________________

                              #24165    
                            Old March 12th, 2013 (4:42 PM).
                            YogiBerra YogiBerra is offline
                               
                              Join Date: Oct 2010
                              Gender: Male
                              Posts: 48
                              Quote:
                              Originally Posted by robin22gongon View Post
                              Okay thanks dude. Imma try it later.
                              You're very welcome. I'll try it out too and see how it works.
                                #24166    
                              Old March 12th, 2013 (4:44 PM). Edited March 12th, 2013 by BlackWhiteRobin.
                              BlackWhiteRobin's Avatar
                              BlackWhiteRobin BlackWhiteRobin is offline
                                 
                                Join Date: Sep 2012
                                Age: 19
                                Gender: Male
                                Nature: Quirky
                                Posts: 537
                                Oh, and do I need to implement it for every map?

                                EDIT: How do I test it? I have been going back and forth from map to map and still sunny.
                                __________________

                                  #24167    
                                Old March 12th, 2013 (4:58 PM).
                                YogiBerra YogiBerra is offline
                                   
                                  Join Date: Oct 2010
                                  Gender: Male
                                  Posts: 48
                                  Yes, you will need to put it on every map you want to have random weather, and I can't think of why it would be doing that. I'll have to test it out myself, but I don't have much time at the moment.
                                    #24168    
                                  Old March 12th, 2013 (4:59 PM).
                                  karatekid552's Avatar
                                  karatekid552 karatekid552 is offline
                                  What happens if I push it?....
                                     
                                    Join Date: Nov 2012
                                    Location: Do you really want to know? Really?
                                    Gender: Male
                                    Nature: Bold
                                    Posts: 1,766
                                    Quote:
                                    Originally Posted by robin22gongon View Post
                                    Oh, and do I need to implement it for every map?

                                    EDIT: How do I test it? I have been going back and forth from map to map and still sunny.
                                    Yes, you will need to implement it on every map as a level script:

                                    http://www.pokecommunity.com/showthread.php?t=191500
                                    __________________

                                    Paired with Simba
                                      #24169    
                                    Old March 12th, 2013 (5:11 PM).
                                    BlackWhiteRobin's Avatar
                                    BlackWhiteRobin BlackWhiteRobin is offline
                                       
                                      Join Date: Sep 2012
                                      Age: 19
                                      Gender: Male
                                      Nature: Quirky
                                      Posts: 537
                                      Quote:
                                      Originally Posted by karatekid552 View Post
                                      Yes, you will need to implement it on every map as a level script:

                                      http://www.pokecommunity.com/showthread.php?t=191500
                                      Can you dumb that down and just tell me which level script command I should use?
                                      __________________

                                        #24170    
                                      Old March 12th, 2013 (5:32 PM).
                                      destinedjagold's Avatar
                                      destinedjagold destinedjagold is offline
                                      Oh Hai Thar~
                                      • Silver Tier
                                       
                                      Join Date: May 2007
                                      Location: Philippines
                                      Age: 26
                                      Gender: Male
                                      Nature: Careful
                                      Posts: 8,517
                                      Quote:
                                      Originally Posted by robin22gongon View Post
                                      Can you dump that down and just tell me which level script command I should use?
                                      In my case, I use level script number 3 for my hack SkyLine.
                                      __________________


                                      FC: 0061-1111-6462
                                      TSV: 1364(X), 0790(OR)

                                        #24171    
                                      Old March 12th, 2013 (5:51 PM).
                                      BlackWhiteRobin's Avatar
                                      BlackWhiteRobin BlackWhiteRobin is offline
                                         
                                        Join Date: Sep 2012
                                        Age: 19
                                        Gender: Male
                                        Nature: Quirky
                                        Posts: 537
                                        Quote:
                                        Originally Posted by destinedjagold View Post
                                        In my case, I use level script number 3 for my hack SkyLine.
                                        Thanks I'll try it later. BTW the example of Loot script you gave doesn't compile.
                                        It says "Error 13 'Type Mismatch' on line 6 Missing #define or parameter. Line msgbox @pidgey 0x6.
                                        __________________

                                          #24172    
                                        Old March 12th, 2013 (5:54 PM). Edited March 12th, 2013 by destinedjagold.
                                        destinedjagold's Avatar
                                        destinedjagold destinedjagold is offline
                                        Oh Hai Thar~
                                        • Silver Tier
                                         
                                        Join Date: May 2007
                                        Location: Philippines
                                        Age: 26
                                        Gender: Male
                                        Nature: Careful
                                        Posts: 8,517
                                        Quote:
                                        Originally Posted by robin22gongon View Post
                                        Thanks I'll try it later. BTW the example of Loot script you gave doesn't compile.
                                        It says "Error 13 'Type Mismatch' on line 6 Missing #define or parameter. Line msgbox @pidgey 0x6.
                                        brad, obvious na sana ang solusyon n'yan kung alam mo ang basics of scripting.
                                        ---
                                        bro, the solution would have been pretty obvious if you know the basics of scripting.

                                        it means that XSE couldn't find the text address of msgbox @pidgey 0x6
                                        Add this line of code.

                                        Quote:
                                        Originally Posted by karatekid552 View Post
                                        #org @pidgey
                                        = hey, this is text.
                                        __________________


                                        FC: 0061-1111-6462
                                        TSV: 1364(X), 0790(OR)

                                          #24173    
                                        Old March 12th, 2013 (5:56 PM).
                                        karatekid552's Avatar
                                        karatekid552 karatekid552 is offline
                                        What happens if I push it?....
                                           
                                          Join Date: Nov 2012
                                          Location: Do you really want to know? Really?
                                          Gender: Male
                                          Nature: Bold
                                          Posts: 1,766
                                          Quote:
                                          Originally Posted by robin22gongon View Post
                                          Thanks I'll try it later. BTW the example of Loot script you gave doesn't compile.
                                          It says "Error 13 'Type Mismatch' on line 6 Missing #define or parameter. Line msgbox @pidgey 0x6.
                                          You need a text portion that is:

                                          #org @pidgey
                                          = hey, this is text.

                                          If you have it, make sure it isn't spelled wrong, and make sure you are using XSE 1.1.1.
                                          __________________

                                          Paired with Simba
                                            #24174    
                                          Old March 12th, 2013 (6:02 PM). Edited March 12th, 2013 by BlackWhiteRobin.
                                          BlackWhiteRobin's Avatar
                                          BlackWhiteRobin BlackWhiteRobin is offline
                                             
                                            Join Date: Sep 2012
                                            Age: 19
                                            Gender: Male
                                            Nature: Quirky
                                            Posts: 537
                                            Quote:
                                            Originally Posted by destinedjagold View Post


                                            brad, obvious na sana ang solusyon n'yan kung alam mo ang basics of scripting.
                                            ---
                                            bro, the solution would have been pretty obvious if you know the basics of scripting.

                                            it means that XSE couldn't find the text address of msgbox @pidgey 0x6
                                            Di ko kc alam kung ano ilalagay ko at nagiba ung commands kc update ko ung XSE

                                            -----
                                            I didn't know what to put and commands were changed because I updated XSE just now.

                                            Sorry LOL! That's why I posted in the Simple Questions Thread.

                                            Quote:
                                            Originally Posted by karatekid552 View Post
                                            You need a text portion that is:

                                            #org @pidgey
                                            = hey, this is text.

                                            If you have it, make sure it isn't spelled wrong, and make sure you are using XSE 1.1.1.
                                            Tnx dude.

                                            EDIT:How about this one, I got an Error again:
                                            [SPOILER]
                                            "Error 13 'Type Mismatch' on line 7
                                            Missing #define or parameter.
                                            Line: wildbattle 0x10 0x05 0

                                            EDIT2: I fixed it but surprise surprise! It gives me Master Ball!

                                            EDIT3: Fixed it again. But how do I make him not disappear? Because I want him to be always available for battle.
                                            Do I just remove the hide sprite command in the script?
                                            __________________

                                              #24175    
                                            Old March 12th, 2013 (6:28 PM).
                                            karatekid552's Avatar
                                            karatekid552 karatekid552 is offline
                                            What happens if I push it?....
                                               
                                              Join Date: Nov 2012
                                              Location: Do you really want to know? Really?
                                              Gender: Male
                                              Nature: Bold
                                              Posts: 1,766
                                              Quote:
                                              Originally Posted by robin22gongon View Post
                                              Di ko kc alam kung ano ilalagay ko at nagiba ung commands kc update ko ung XSE

                                              -----
                                              I didn't know what to put and commands were changed because I updated XSE just now.

                                              Sorry LOL! That's why I posted in the Simple Questions Thread.



                                              Tnx dude.

                                              EDIT:How about this one, I got an Error again:
                                              [SPOILER]
                                              "Error 13 'Type Mismatch' on line 7
                                              Missing #define or parameter.
                                              Line: wildbattle 0x10 0x05 0

                                              EDIT2: I fixed it but surprise surprise! It gives me Master Ball!
                                              Ummmm, lol? Try changing 0 to 0x0, it isn't best to mix hex and decimal. It makes it a little harder to read. Choose one and stick with it.

                                              Wait, are you talking about the giveitem section later?

                                              Btw: open XSE. Hit F1. You're welcome:p.
                                              __________________

                                              Paired with Simba
                                              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:21 PM.