The PokéCommunity Forums Fan Games Game Development Pokémon Essentials
Using Fly without owning a Pokémon that knows it

Pokémon Essentials All questions and discussion about Pokémon Essentials, the Pokémon game kit for RPG Maker XP, go in here. Also contains links to the latest downloads and the Essentials Wiki.

Reply
 
Thread Tools
  #1    
Old December 20th, 2012 (7:51 PM).
MikeTwo2's Avatar
MikeTwo2 MikeTwo2 is offline
     
    Join Date: Apr 2012
    Gender: Male
    Posts: 9
    Hey guys,
    Just looking for a bit of help with RMXP, I need to allow the player to be transported to a place of his/her choosing within an event (like the dungeon choosing in PMD)
    My solution was to open up the fly screen so that players can fly to "dungeons" they've been to before, and there won't be any tacky choice screens. I soon realised this was tricky to do, however, without actually giving the player a Pokémon that knows Fly. As such have resorted to the forums.
    Anyone know how I go about this?
    Many thanks,
    Mike

    P.S. One last quick question: How do I copy across the variable catchRate into my own Script Section?
    Reply With Quote

    Relevant Advertising!

      #2    
    Old December 21st, 2012 (2:59 AM).
    Maruno's Avatar
    Maruno Maruno is offline
    Lead Dev of Pokémon Essentials
       
      Join Date: Jan 2008
      Location: England
      Posts: 5,173
      If the only way the player can use Fly is through your event transport system, then you can edit its scripts so that it no longer requires that a player's Pokémon knows Fly in order to use it. That is, delete what you need to from HiddenMoveHandlers::CanUseMove.add(:FLY,proc (probably most of it; just return true like Sweet Scent's does).

      Here is some stripped-down code which you can use to use Fly:
      Code:
      scene=PokemonRegionMapScene.new(-1,false)
      screen=PokemonRegionMap.new(scene)
      ret=screen.pbStartFlyScreen
      if ret
        $PokemonTemp.flydata=ret
        Kernel.pbUseHiddenMove(nil,PBMoves::FLY)
      end
      You'll also want to remove the "Pidgeot used Fly!" message and the hidden move animation for using Fly, because they're not appropriate.

      However, if you want to be able to use Fly normally as well, then you'll need to create a new method containing (mostly) the above code and Fly's effect (minus the message/animation as mentioned). Call this method from your event.


      The catch rate for a species can be loaded with the following code:
      Code:
      dexdata=pbOpenDexData
      pbDexDataOffset(dexdata,species,16)
      catchrate=dexdata.fgetb
      dexdata.close
      You can use this anywhere, so long as you have a species to find the catch rate of.
      __________________
      Go to the Pokémon Essentials Wiki

      | Downloads | Tutorials | Fangames |
      | All Animations Project |

      Follow me on Twitter: @maruno42


      Reply With Quote
        #3    
      Old December 21st, 2012 (5:06 AM). Edited December 21st, 2012 by MikeTwo2.
      MikeTwo2's Avatar
      MikeTwo2 MikeTwo2 is offline
         
        Join Date: Apr 2012
        Gender: Male
        Posts: 9
        Quote:
        Originally Posted by Maruno View Post
        If the only way the player can use Fly is through your event transport system, then you can edit its scripts so that it no longer requires that a player's Pokémon knows Fly in order to use it. That is, delete what you need to from HiddenMoveHandlers::CanUseMove.add(:FLY,proc (probably most of it; just return true like Sweet Scent's does).

        Here is some stripped-down code which you can use to use Fly:
        Code:
        scene=PokemonRegionMapScene.new(-1,false)
        screen=PokemonRegionMap.new(scene)
        ret=screen.pbStartFlyScreen
        if ret
          $PokemonTemp.flydata=ret
          Kernel.pbUseHiddenMove(nil,PBMoves::FLY)
        end
        You'll also want to remove the "Pidgeot used Fly!" message and the hidden move animation for using Fly, because they're not appropriate.

        However, if you want to be able to use Fly normally as well, then you'll need to create a new method containing (mostly) the above code and Fly's effect (minus the message/animation as mentioned). Call this method from your event.
        I don't want to be able to Fly normally too, but what method do I call in the event?

        Quote:
        The catch rate for a species can be loaded with the following code:
        Code:
        dexdata=pbOpenDexData
        pbDexDataOffset(dexdata,species,16)
        catchrate=dexdata.fgetb
        dexdata.close
        You can use this anywhere, so long as you have a species to find the catch rate of.
        This worked perfectly, thanks.
        Which bit of this do I change to get base HP?
        Code:
        catchrate=dexdata.fgetb
        Sorry for all the questions...

        Thanks
        Mike
        Reply With Quote
          #4    
        Old December 21st, 2012 (6:10 AM).
        Maruno's Avatar
        Maruno Maruno is offline
        Lead Dev of Pokémon Essentials
           
          Join Date: Jan 2008
          Location: England
          Posts: 5,173
          You can create a new method with the stripped-down code I gave you, and call that.

          To get the base HP, use the same code as for catch rate but replace the 16 with 10.
          __________________
          Go to the Pokémon Essentials Wiki

          | Downloads | Tutorials | Fangames |
          | All Animations Project |

          Follow me on Twitter: @maruno42


          Reply With Quote
            #5    
          Old December 21st, 2012 (6:17 AM).
          MikeTwo2's Avatar
          MikeTwo2 MikeTwo2 is offline
             
            Join Date: Apr 2012
            Gender: Male
            Posts: 9
            Quote:
            Originally Posted by Maruno View Post
            You can create a new method with the stripped-down code I gave you, and call that.

            To get the base HP, use the same code as for catch rate but replace the 16 with 10.
            Thanks for all your help :D
            Reply With Quote
            Reply
            Quick Reply

            Sponsored Links
            Thread Tools

            Posting Rules
            You may not post new threads
            You may not post replies
            You may not post attachments
            You may not edit your posts

            BB code is On
            Smilies are On
            [IMG] code is On
            HTML code is Off

            Forum Jump


            All times are GMT -8. The time now is 5:00 AM.