• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Staff applications for our PokéCommunity Daily and Social Media team are now open! Interested in joining staff? Then click here for more info!
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Move Tutors to teach a move only if the Pokémon already knows another move

  • 12
    Posts
    9
    Years
    • Seen Sep 21, 2019
    so i want a certain pokemon to only be able to learn a new move if it already knows a different move.

    first im giving the player the choice to choose which pokemon should learn the attack with:
    pbChooseNonEggPokemon(1,3)

    now i can check for the pokemons moves with a conditional branch
    pbGetPokemon(1).knowsMove?(:...)

    now that all that is setup my problem is actually allowing the player to teach the pokemon the move.
    i only know pbMoveTutorChoose which is against the purpose of this because the player could check for a pokemon that fullfills the requirements and then teach the move to an other one.
    or pbLearnMove which doesnt allow the player to choose which move to delete as it simply silently deletes a move.

    so how can i make a pbMoveTutorChoose without the choose? ;)
     
    Last edited:
    Why don't you just make a copy of def pbMoveTutorChoose that does what you want it to?
     
    First, go into the script editor and find "def pbMoveTutorChoose". (In my versions, it's line 2410 of the PSystem_Utilities section). Just above that line, paste this code. As you might guess, this is just a primitive modification of pbMoveTutorChoice.

    Code:
    def pbMoveTutorChosen(move,movelist=nil,bymachine=false)
      ret=false
      pbFadeOutIn(99999){
         movename=PBMoves.getName(move)
           chosen=$game_variables[1]
           if chosen>=0
             pokemon=$Trainer.party[chosen]
               if pbLearnMove(pokemon,move,false,bymachine)
                 ret=true
                 break
               end
           else
             break
           end  
      }
      return ret # Returns whether the move was learned by a Pokemon
    end

    Then, make an event like the one you described. The only difference in the evnt is that "pbMoveTutorChoice" should be "pbMoveTutorChosen". The script will automatically teach the move to whatever pokemon was stored in pbChooseNonEggPokemon. However, the event using this script will teach the move to any pokémon which knows the prerequisite move. It has no dependency on tm.txt like a Move Tutor normally does.

    This was just something I had laying around in the game I've been working on. It's a pretty simple edit, but hopefully you can put it to use.
     
    Back
    Top