The PokéCommunity Forums Fan Games ROM Hacking Research & Development
Research Trainer AI Command Research

Research & Development Got a well-founded knack with ROM hacking? Love reverse-engineering the Pokémon games? Or perhaps you love your assembly language. This is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!


Reply
 
Thread Tools
  #26    
Old May 28th, 2018 (9:20 PM). Edited May 28th, 2018 by jirachiwishmaker.
jirachiwishmaker's Avatar
jirachiwishmaker jirachiwishmaker is offline
     
    Join Date: Jul 2007
    Location: Forina
    Gender: Male
    Nature: Lonely
    Posts: 98
    In the JumpIfDamageBonusEquals AI commands, I used the Fairy type move, Fairy Wind that its hex code is 0x166. But the error of "invalid immediate: 358 is out of range" appearred while I was compiling the routine. Is there any way to solve it?
    Reply With Quote

    Relevant Advertising!

      #27    
    Old May 28th, 2018 (9:32 PM).
    Skeli-'s Avatar
    Skeli- Skeli- is offline
    Lord of the Rings
       
      Join Date: Apr 2014
      Location: Canada
      Age: 19
      Gender: Male
      Nature: Adamant
      Posts: 179
      Quote:
      Originally Posted by jirachiwishmaker View Post
      In the JumpIfDamageBonusEquals AI commands, I used the Fairy type move, Fairy Wind that its hex code is 0x166. But the error of "invalid immediate: 358 is out of range" appearred while I was compiling the routine. Is there any way to solve it?
      Are you using the old AI Script Pro? I rewrote it last week and I recommend using it instead. https://github.com/xizqu/FR_AI_Script/tree/master/Python_Compiler

      As for your bug, JumpIfDamageBonusEquals takes a byte as its first argument; a number up to 0xFF or 255. You're getting that error because 0x166 or 358 is larger than a byte. In any case, the argument does not take a move ID as its argument. Look through the OP again to see what you should be putting there.
      __________________
      Pokemon Unbound

      Reply With Quote
        #28    
      Old May 28th, 2018 (10:55 PM).
      jirachiwishmaker's Avatar
      jirachiwishmaker jirachiwishmaker is offline
         
        Join Date: Jul 2007
        Location: Forina
        Gender: Male
        Nature: Lonely
        Posts: 98
        Quote:
        Originally Posted by Skeli- View Post
        Are you using the old AI Script Pro? I rewrote it last week and I recommend using it instead. https://github.com/xizqu/FR_AI_Script/tree/master/Python_Compiler

        As for your bug, JumpIfDamageBonusEquals takes a byte as its first argument; a number up to 0xFF or 255. You're getting that error because 0x166 or 358 is larger than a byte. In any case, the argument does not take a move ID as its argument. Look through the OP again to see what you should be putting there.
        Thanks a lot for the updating of the tools. Is it means that the move hex code must less than 0xFF and there is no other ways to make the command to take two bytes as its argument?
        Reply With Quote
          #29    
        Old May 28th, 2018 (11:15 PM).
        Skeli-'s Avatar
        Skeli- Skeli- is offline
        Lord of the Rings
           
          Join Date: Apr 2014
          Location: Canada
          Age: 19
          Gender: Male
          Nature: Adamant
          Posts: 179
          Quote:
          Originally Posted by jirachiwishmaker View Post
          Thanks a lot for the updating of the tools. Is it means that the move hex code must less than 0xFF and there is no other ways to make the command to take two bytes as its argument?
          The move hex code can be more than 0xFF, it's just that command isn't looking for a move ID. Read through what the command does and you'll understand.
          __________________
          Pokemon Unbound

          Reply With Quote
            #30    
          Old May 29th, 2018 (1:46 AM).
          jirachiwishmaker's Avatar
          jirachiwishmaker jirachiwishmaker is offline
             
            Join Date: Jul 2007
            Location: Forina
            Gender: Male
            Nature: Lonely
            Posts: 98
            Quote:
            Originally Posted by Skeli- View Post
            The move hex code can be more than 0xFF, it's just that command isn't looking for a move ID. Read through what the command does and you'll understand.
            What I see is the hex code is really move ID, such as "mov r0, #0xF /*Cut*/", cut move hex code is 0xF, others are also the same except dragon type move, dragon rush.
            Reply With Quote
              #31    
            Old May 29th, 2018 (7:47 AM).
            Skeli-'s Avatar
            Skeli- Skeli- is offline
            Lord of the Rings
               
              Join Date: Apr 2014
              Location: Canada
              Age: 19
              Gender: Male
              Nature: Adamant
              Posts: 179
              Quote:
              Originally Posted by jirachiwishmaker View Post
              What I see is the hex code is really move ID, such as "mov r0, #0xF /*Cut*/", cut move hex code is 0xF, others are also the same except dragon type move, dragon rush.
              Ah, I see where you're confusion is coming from. If you're using the rewritten JumpIfDamageBonusEquals, the first argument takes a move type, or 0x12 to compare the current move. You cannot check if it's a certain move. If you use the rewritten command, you'll also need to update the command in the commands file.
              __________________
              Pokemon Unbound

              Reply With Quote
                #32    
              Old June 7th, 2018 (6:48 AM).
              xizqu's Avatar
              xizqu xizqu is offline
                 
                Join Date: Feb 2018
                Location: California
                Gender: Male
                Nature: Adamant
                Posts: 79
                Quote:
                Originally Posted by jirachiwishmaker View Post
                What I see is the hex code is really move ID, such as "mov r0, #0xF /*Cut*/", cut move hex code is 0xF, others are also the same except dragon type move, dragon rush.
                Just going on what skeli said, if you need to update your commands, I have a tool in the tool/resource section. Akame has updated 5+ commands so I'll be adding them this week. Just wait a few days if you're interested in it. It'll add all new commands, repoint the table and repoint the commands in the table to the new ones. Only thing it doesn't do is clear out the old command data. Too lazy to add it and it you ever need to repoint back, it's easy.
                Reply With Quote
                Reply

                Quick Reply

                Join the conversation!

                Create an account to post a reply in this thread, participate in other discussions, and more!

                Create a PokéCommunity Account

                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 4:47 PM.