The PokéCommunity Forums Fan Games ROM Hacking
Script Help Thread (DO NOT REQUEST SCRIPTS)

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
  #6151    
Old September 25th, 2011 (6:12 AM).
Truality Truality is offline
Left for good
     
    Join Date: Aug 2011
    Gender: Male
    Posts: 1,007
    Send a message via Windows Live Messenger to Truality
    Quote:
    Originally Posted by treeckopa View Post
    I notice that pokemart3 is used for decoration, but I can't find the list of decoration and so can't work on them.
    Still I can't figure out what pokemart2 does...
    Searching this very thread is no easy task, is it...
    Quote:
    Originally Posted by JPAN View Post
    The pokemart command gives analizes the data and, if a TM is present, treats all items a TMs. But because normal items don't have TM number or attack, a glitched response appears instead.

    The pokemart2 command, however, always presents pictures, so if really necessary to have both normal items and TMs in the same display, use it instead.
    __________________
    This is my December . . .

    Relevant Advertising!

      #6152    
    Old September 25th, 2011 (6:23 AM).
    Innocence's Avatar
    Innocence Innocence is offline
    PC Lurker: I'm watching you...
       
      Join Date: Aug 2004
      Location: Queensland, Australia. What are you, a stalker?
      Age: 22
      Gender: Male
      Nature: Lonely
      Posts: 1,038
      So. I'm basically creating a script that involves checking trainer flags.
      Without giving too much away, after battling the trainers, the trainer check initially works fine. After the first time that you choose not to reset the flags, however, my npc still behaves as if the flags are set, UNTIL I talk to one of the trainers in question again, whereupon he repeats this behavior. Can anyone tell me what's up?
      __________________

      I cringe at things I've said here in the past years.
        #6153    
      Old September 25th, 2011 (1:32 PM).
      EdensElite's Avatar
      EdensElite EdensElite is offline
      No0b, but getting there.
         
        Join Date: Jun 2011
        Location: UK
        Gender: Male
        Nature: Bold
        Posts: 190
        When I post this, it tells me no #org/#seek directives were found, cannot compile.

        Code:
        @dynamic 0x800000
        @org Bulbastarter
        checkflag 0x7
        if 0x1 goto @end
        checksound
        cry 0x1 0x0
        showpokepic 0x95 0xA 0x1
        msgbox @sAskPlayer 0x05
        waitcry
        hidepokepic
        compare LASTRESULT 0x0
        if 0x1 goto @end
        goto @giveStarter
        
        #org @giveStarter
        givepokemon 0x1 0xA 0x168 0x0 0x0 0x0
        fanfare 0x13E
        msgbox @3 0x4
        waitfanfare
        closeonkeypress
        setflag 0x828
        msgbox @4 0x5
        compare LASTRESULT 0x1
        if 0x1 gosub @name
        msgbox @5 0x6
        release
        end
        
        #org @name
        call 0x1A74EB
        return
        
        #org @end
        releaseall
        end
        
        #org @sAskPlayer
        = Do you want Bulbasaur?
        Can someone tell whats wrong?
        __________________

        ROM Hacking was getting frustrating for me. I've now stopped productions and writing the game from scratch in HTML 5.

        That means it will be playable in the browser, and across multiple devices such as the iPod touch.
          #6154    
        Old September 25th, 2011 (1:50 PM).
        colcolstyles's Avatar
        colcolstyles colcolstyles is offline
        Yours truly
        • Crystal Tier
         
        Join Date: May 2008
        Location: The Bay Area
        Gender: Male
        Nature: Lonely
        Posts: 1,584
        Change "@dynamic 0x800000" to "#dynamic 0x800000" and "@org Bulbastarter" to "#org @Bulbastarter". '#' is the symbol for preprocessing directives (like dynamic, org, seek, etc.) and '@' is the symbol for dynamic addresses.
        __________________

        Brother of Vrai
          #6155    
        Old September 26th, 2011 (7:52 PM).
        shinyabsol1's Avatar
        shinyabsol1 shinyabsol1 is offline
        Pokemon DarkJasper!?
           
          Join Date: Aug 2010
          Gender: Male
          Nature: Calm
          Posts: 330
          Ok, two questions:

          1). I'm a little unsure of how to use JPAN's hacked engine Special 0x7e – Get Tile Number. Yes, I know it says tile number, but: Does this special get the tile number or the block number? Block number really seems to make more sense to me...

          2). Is there a way to mute the clicking noise made when pressing "A" to select something (temporarily and only in specific instances)?

          Thanks in advance.
            #6156    
          Old September 26th, 2011 (8:47 PM).
          Darthatron's Avatar
          Darthatron Darthatron is offline
          巨大なトロール。
          • Silver Tier
           
          Join Date: Jan 2006
          Location: Melbourne, Australia
          Age: 25
          Gender: Male
          Nature: Modest
          Posts: 1,152
          Quote:
          Originally Posted by shinyabsol1 View Post
          Ok, two questions:

          1). I'm a little unsure of how to use JPAN's hacked engine Special 0x7e – Get Tile Number. Yes, I know it says tile number, but: Does this special get the tile number or the block number? Block number really seems to make more sense to me...

          2). Is there a way to mute the clicking noise made when pressing "A" to select something (temporarily and only in specific instances)?

          Thanks in advance.
          1) Yeah, it gets the block number.

          2) Not without an ASM hack.
          __________________
          あなた は しきしゃ です
          わたし は ばか です
            #6157    
          Old September 27th, 2011 (11:36 AM).
          shinyabsol1's Avatar
          shinyabsol1 shinyabsol1 is offline
          Pokemon DarkJasper!?
             
            Join Date: Aug 2010
            Gender: Male
            Nature: Calm
            Posts: 330
            Quote:
            Originally Posted by Darthatron
            1) Yeah, it gets the block number.

            2) Not without an ASM hack.
            1). Thanks

            2). I don't know any ASM...but out of curiosity, how difficult of a hack would this be to implement (could it be done fairly quickly by someone who does know ASM)?
              #6158    
            Old October 3rd, 2011 (1:54 AM).
            treeckopa treeckopa is offline
               
              Join Date: Dec 2008
              Location: Hong Kong
              Gender:
              Posts: 18
              I have some questions about trainerbattle.
              For trainerbattle 0x1, it can be used for both rival and GYM leader? What about the music during the battle? How can I change it?
              For trainerbattle 0x3, it seems that it's for elite four, but some said that for 0x3, the script will continue even if you've lost in the battle. So what is the exact function for 0x3?
              And for other kinds of trainerbattle, what are their functions?
                #6159    
              Old October 3rd, 2011 (11:32 AM).
              Missingyep Missingyep is offline
                 
                Join Date: Jul 2010
                Posts: 275
                Quote:
                Originally Posted by treeckopa View Post
                I have some questions about trainerbattle.
                For trainerbattle 0x1, it can be used for both rival and GYM leader? What about the music during the battle? How can I change it?
                For trainerbattle 0x3, it seems that it's for elite four, but some said that for 0x3, the script will continue even if you've lost in the battle. So what is the exact function for 0x3?
                And for other kinds of trainerbattle, what are their functions?
                Type 0 is an ordinary battle. Script execution stops after the battle, regardless of its outcome.

                1 and 2 are identical, and run scripts after the battle ends (but only if the player won). They except one extra argument: the offset of the script to run. (The script with "trainerbattle" stops running, and the offset you specify starts running.)

                3 is a continue-battle. The script that calls "trainerbattle" keeps running after the battle (but only if the player won).

                4 is a double battle. It accepts one extra argument: the offset of some text to display if the player does not have two or more usable Pokemon (and hence can't start the battle).

                5 is a rematch battle. It's almost identical to 0, but it will actually check the trainer number and do a lookup, to see if you're supposed to battle one of their rematch battles instead. To use this to its fullest potential, you would need to learn more about the rematch functionality.

                6 is a special kind of double battle that accepts two extra arguments. I have no idea what the second extra argument is.

                7 is a double rematch battle.

                8 is a clone of 6.

                9 is a tutorial battle. So far as I know, it functions identically to 0 except that the player will not whiteout if they lose the battle. Passing in 0x0003 instead of 0x0000 (as the unknown halfword argument) enables Oak's mid-battle narration.

                All other values are treated as type-0 battles.

                Note that if the trainer you specify has already been defeated, "trainerbattle" does nothing and the script that calls it will keep running unless you used a rematch battle type. And I think you need an ASM hack to change the music.
                  #6160    
                Old October 9th, 2011 (10:02 AM).
                M.L M.L is offline
                Invisible
                   
                  Join Date: Oct 2010
                  Gender: Male
                  Nature: Quiet
                  Posts: 765
                  Help me please i took the daycare script from Firered and used it so the player must give in a poke but i cant get it so that the player can recall the pokes i have done this...
                  Quote:
                  #dynamic 0x800000

                  #org @start
                  lock
                  countpokemon
                  compare 0x800D 0x1
                  if 0x1 goto @stop
                  special2 LASTRESULT 0x84
                  compare LASTRESULT 0x1
                  special 0xBC
                  waitstate
                  compare 0x8004 0x6
                  special2 LASTRESULT 0x85
                  compare LASTRESULT 0x0
                  special2 0x8005 0xBA
                  special 0x176
                  cmdc3 0x2F
                  goto 0x81BF541
                  special 0xBC
                  special2 LASTRESULT 0x85
                  compare LASTRESULT 0x0
                  special2 LASTRESULT 0x179
                  compare LASTRESULT 0x0
                  special2 LASTRESULT 0x178
                  compare LASTRESULT 0x1
                  special2 0x8005 0xBA
                  special 0x177
                  special 0x176
                  cmdc3 0x2F
                  special2 LASTRESULT 0x17A
                  call 0x81A6675
                  release
                  end

                  #org @stop
                  release
                  end
                  __________________
                  Fluffy
                    #6161    
                  Old October 9th, 2011 (3:54 PM).
                  Missingyep Missingyep is offline
                     
                    Join Date: Jul 2010
                    Posts: 275
                    Quote:
                    Originally Posted by M.L View Post
                    Help me please i took the daycare script from Firered and used it so the player must give in a poke but i cant get it so that the player can recall the pokes i have done this...

                    Spoiler:
                    Code:
                    #dynamic 0x800000
                    
                    #org @start
                    lock
                    countpokemon
                    compare 0x800D 0x1
                    if 0x1 goto @stop
                    special2 LASTRESULT 0x84
                    compare LASTRESULT 0x1
                    special 0xBC
                    waitstate
                    compare 0x8004 0x6
                    special2 LASTRESULT 0x85
                    compare LASTRESULT 0x0
                    special2 0x8005 0xBA
                    special 0x176
                    cmdc3 0x2F
                    goto 0x81BF541
                    special 0xBC
                    special2 LASTRESULT 0x85
                    compare LASTRESULT 0x0
                    special2 LASTRESULT 0x179
                    compare LASTRESULT 0x0
                    special2 LASTRESULT 0x178
                    compare LASTRESULT 0x1
                    special2 0x8005 0xBA
                    special 0x177
                    special 0x176
                    cmdc3 0x2F
                    special2 LASTRESULT 0x17A
                    call 0x81A6675
                    release
                    end
                    
                    #org @stop
                    release
                    end
                    You're not using "compare" properly.

                    Code:
                    special2 LASTRESULT 0x84
                     compare LASTRESULT 0x1
                     special 0xBC
                    You're doing a comparison, but you're not checking the result (with an "if" command). You make the same mistake with every comparison in the script except for the first one, which is why it's broken.
                      #6162    
                    Old October 10th, 2011 (12:38 PM).
                    BlazingMagmar's Avatar
                    BlazingMagmar BlazingMagmar is offline
                       
                      Join Date: Feb 2009
                      Gender:
                      Posts: 47
                      hi im trying to make all team rocket grunts use the RSE trainer battle music in pokemon leaf green. What script command can do this?
                        #6163    
                      Old October 10th, 2011 (7:16 PM).
                      SupahNinja's Avatar
                      SupahNinja SupahNinja is offline
                      Scripting Ninja
                         
                        Join Date: Mar 2011
                        Gender: Male
                        Posts: 34
                        Hello.
                        I was wondering how to change the character's sprite at will.
                        I know it's possible, because that's what happens every time the player rides their bike or goes fishing, but I don't know the proper commands to use in XSE.
                        This is for FRLG, by the way.

                        Help would be greatly appreciated, as I'm using this for a puzzle in my hack.
                        Thanks.
                        __________________
                        SupahNinja

                        My feelings on
                        ROM hacking:

                        -I like scripting a lot.
                        -Mapping is almost as fun.
                        -Hex editing isn't bad at all.
                        -I do NOT enjoy spriting.
                        -I've been meaning to start learning ASM for a while, but I don't ever seem to have enough time.

                        Favorites:

                        -My favorite color is green.
                        -My favorite type is fire.
                        -My favorite Pokémon are:
                        Growlithe, Charizard, Mew,
                        Giratina, Haxorus, and Aggron.
                        SupahNinja
                          #6164    
                        Old October 10th, 2011 (7:17 PM).
                        Missingyep Missingyep is offline
                           
                          Join Date: Jul 2010
                          Posts: 275
                          Quote:
                          Originally Posted by SupahNinja View Post
                          I know it's possible, because that's what happens every time the player rides their bike or goes fishing, but I don't know the proper commands to use in XSE.
                          Those aren't implemented with script commands. There are no script commands that can change the player's sprite...

                          Quote:
                          Originally Posted by SupahNinja View Post
                          This is for FRLG, by the way.
                          ...unless you're modding FireRed and you've applied JPAN's Hacked Engine.
                            #6165    
                          Old October 10th, 2011 (7:36 PM).
                          SupahNinja's Avatar
                          SupahNinja SupahNinja is offline
                          Scripting Ninja
                             
                            Join Date: Mar 2011
                            Gender: Male
                            Posts: 34
                            Quote:
                            Originally Posted by DavidJCobb View Post
                            Quote:
                            Originally Posted by SupahNinja View Post
                            I know it's possible, because that's what happens every time the player rides their bike or goes fishing, but I don't know the proper commands to use in XSE.
                            Those aren't implemented with script commands. There are no script commands that can change the player's sprite...

                            Quote:
                            Originally Posted by SupahNinja View Post
                            This is for FRLG, by the way.
                            ...unless you're modding FireRed and you've applied JPAN's Hacked Engine.
                            Hmm...

                            How is it done in the game?
                            ASM? Because I was planning on learning that soon, and I might as well start here.
                            __________________
                            SupahNinja

                            My feelings on
                            ROM hacking:

                            -I like scripting a lot.
                            -Mapping is almost as fun.
                            -Hex editing isn't bad at all.
                            -I do NOT enjoy spriting.
                            -I've been meaning to start learning ASM for a while, but I don't ever seem to have enough time.

                            Favorites:

                            -My favorite color is green.
                            -My favorite type is fire.
                            -My favorite Pokémon are:
                            Growlithe, Charizard, Mew,
                            Giratina, Haxorus, and Aggron.
                            SupahNinja
                              #6166    
                            Old October 11th, 2011 (12:27 AM).
                            Missingyep Missingyep is offline
                               
                              Join Date: Jul 2010
                              Posts: 275
                              Quote:
                              Originally Posted by SupahNinja View Post
                              Hmm...

                              How is it done in the game?
                              ASM? Because I was planning on learning that soon, and I might as well start here.
                              It's ASM, but that knowledge alone wouldn't be enough to reverse-engineer it. I'd imagine that the code for that particular sprite-change is buried deep in the game engine. It'd be hard to find, let alone reverse-engineer -- unless someone already has, that is.

                              JPAN's FireRed Hacked Engine adds functionality that allows you to change the player's overworld sprites from a script. His patch is meant to be applied only to a clean FR ROM (it deletes a lot of stuff), but he also has a hack tool that can apply the changes to a hack-in-progress (it's trickier, though).
                                #6167    
                              Old October 11th, 2011 (2:47 AM). Edited October 11th, 2011 by SupahNinja.
                              SupahNinja's Avatar
                              SupahNinja SupahNinja is offline
                              Scripting Ninja
                                 
                                Join Date: Mar 2011
                                Gender: Male
                                Posts: 34
                                Quote:
                                Originally Posted by DavidJCobb View Post
                                Quote:
                                Originally Posted by SupahNinja View Post
                                Hmm...

                                How is it done in the game?
                                ASM? Because I was planning on learning that soon, and I might as well start here.
                                It's ASM, but that knowledge alone wouldn't be enough to reverse-engineer it. I'd imagine that the code for that particular sprite-change is buried deep in the game engine. It'd be hard to find, let alone reverse-engineer -- unless someone already has, that is.

                                JPAN's FireRed Hacked Engine adds functionality that allows you to change the player's overworld sprites from a script. His patch is meant to be applied only to a clean FR ROM (it deletes a lot of stuff), but he also has a hack tool that can apply the changes to a hack-in-progress (it's trickier, though).
                                I've looked up some videos of it in action, and some of them do state that it's an ASM hack. But no one gives details.

                                http://www.youtube.com/watch?v=FKJM4L7xP84
                                http://www.youtube.com/watch?v=WteLk6tXwDA
                                http://www.youtube.com/watch?v=25JQ08zfp2M

                                Which means that if none of them reply to their YouTube messages, I'll check out JPAN's Hacked Engine.

                                Thank you, David.
                                __________________
                                SupahNinja

                                My feelings on
                                ROM hacking:

                                -I like scripting a lot.
                                -Mapping is almost as fun.
                                -Hex editing isn't bad at all.
                                -I do NOT enjoy spriting.
                                -I've been meaning to start learning ASM for a while, but I don't ever seem to have enough time.

                                Favorites:

                                -My favorite color is green.
                                -My favorite type is fire.
                                -My favorite Pokémon are:
                                Growlithe, Charizard, Mew,
                                Giratina, Haxorus, and Aggron.
                                SupahNinja
                                  #6168    
                                Old October 14th, 2011 (2:41 PM).
                                Valentin Valentin is offline
                                   
                                  Join Date: Oct 2011
                                  Posts: 18
                                  Hi, member's of Pokemon community , I was wondering if there is a script for the ROM Pokemon firered To make Whichever one you don't choose [Boy ,Girl ] become your rival like pokemon Emerald . Including pokemon overworld sprite changing gender.
                                    #6169    
                                  Old October 14th, 2011 (4:53 PM).
                                  Missingyep Missingyep is offline
                                     
                                    Join Date: Jul 2010
                                    Posts: 275
                                    Quote:
                                    Originally Posted by Valentin View Post
                                    Hi, member's of Pokemon community , I was wondering if there is a script for the ROM Pokemon firered To make Whichever one you don't choose [Boy ,Girl ] become your rival like pokemon Emerald . Including pokemon overworld sprite changing gender.
                                    There isn't one single script, but there are a combination of techniques you could use.

                                    In the maps on which the rival appears, you could use the dynamic OW functionality in JPAN's Hacked Engine. Have a level script check the player's gender and change the rival OW accordingly.

                                    In battle scripts, things get more difficult... The simplest way would be to simply create one trainer for every possible rival -- one trainer per gender per starter. Then, when you trigger the battle from a script, check the player's gender in addition to the player's starter and initiate the appropriate trainer battle.

                                    The only trouble I can see happening is in the intro sequence, where you actually name the rival. You'd need ASM modifications to conditionally alter their big sprite and to set a different OW to appear on the naming screen.
                                      #6170    
                                    Old October 15th, 2011 (8:21 AM).
                                    Sephiroth2009 Sephiroth2009 is offline
                                    Banned
                                       
                                      Join Date: Oct 2011
                                      Posts: 18
                                      Is there a script that can make the NPC walk backwards?
                                        #6171    
                                      Old October 15th, 2011 (4:46 PM).
                                      Teh Blazer's Avatar
                                      Teh Blazer Teh Blazer is offline
                                      Divider of Zero
                                         
                                        Join Date: Feb 2009
                                        Location: 'MERICA
                                        Age: 21
                                        Gender: Male
                                        Nature: Relaxed
                                        Posts: 764
                                        Quote:
                                        Originally Posted by Sephiroth2009 View Post
                                        Is there a script that can make the NPC walk backwards?
                                        Hmm... I don't think so. Sorry.

                                        My Question:
                                        If I move a NPC through a script over to another map, they won't disappear unless they leave my sight. Now, this is awesome and all, but how do I make it disappear in front of my eyes? Will the Person Id stay the same and all I have to do is hidesprite, or is there some other way? Or is the only way to make them disappear is to make them leave my sight?
                                        __________________
                                        Being a hero is overrated anyways
                                          #6172    
                                        Old October 15th, 2011 (5:33 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
                                        Quote:
                                        Originally Posted by Teh Blazer View Post

                                        My Question:
                                        If I move a NPC through a script over to another map, they won't disappear unless they leave my sight. Now, this is awesome and all, but how do I make it disappear in front of my eyes? Will the Person Id stay the same and all I have to do is hidesprite, or is there some other way? Or is the only way to make them disappear is to make them leave my sight?

                                        You can make the NPC disappear with hidesprite. Person ID is flag-based, not map-based.

                                        So, if you didn't know, just use hidesprite, then setflag that person's Person ID.
                                        __________________
                                        (ღ˘⌣˘ღ)
                                          #6173    
                                        Old October 15th, 2011 (10:26 PM).
                                        Satoshi Ookami's Avatar
                                        Satoshi Ookami Satoshi Ookami is offline
                                        Memento Mori
                                        • Gold Tier
                                         
                                        Join Date: Jul 2008
                                        Location: Abyss of Time, Great Seal
                                        Age: 24
                                        Gender: Male
                                        Nature: Calm
                                        Posts: 14,445
                                        The best way to make NPC disappear is by using applymovement.
                                        applymovement 'hide'
                                        applymovement 'movements that make NPC to some place player cannot reach'
                                        setflag
                                        And once you leave the map, NPC won't be there until you clear its flag =D
                                        __________________
                                        ROM hacking FAQ - Read before asking how to play a hack.

                                        Anime List | PSN Trophy List
                                          #6174    
                                        Old October 15th, 2011 (10:42 PM).
                                        Sephiroth2009 Sephiroth2009 is offline
                                        Banned
                                           
                                          Join Date: Oct 2011
                                          Posts: 18
                                          Yes using clearflag is useful when there's a sprite you want hidden for the moment until another time when you want it resurfaced on a map you've been through a dozen times.
                                            #6175    
                                          Old October 15th, 2011 (10:44 PM).
                                          Vladimir312's Avatar
                                          Vladimir312 Vladimir312 is offline
                                             
                                            Join Date: Sep 2011
                                            Location: Las Vegas, Nevada
                                            Gender: Male
                                            Posts: 27
                                            I'm looking to create a "train" script where you can see the players sprite as the train moves. How would I keep the character moving in sync with the train without making it walk as the train is moving?
                                            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 1:57 PM.