• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Cyndy, May, Hero (Conquest), or Wes - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

Making a gift Pokémon replace a party member

  • 67
    Posts
    12
    Years
    • Seen Aug 22, 2024
    If I get a pokemon from someone, how can I send one of my team-pokemon to the box to take the pokemon into my team?
     
    I made an event (purely for testing and learning purposes) which does what you seem to describe.

    Screen One + Screen Two

    Some of the flavor text is cut off, but you can get the gist. If you have less than a full party, the event asks if you want to receive a Ditto. If you have 6 pokemon, it asks if you want to deposit one--and if you do, you then receive the Ditto.

    Anyway, if you use the wiki, it shouldn't be too difficult to make events like this. I mean, even I can do it.
     
    I have an event in my game that forces you to send a Pokemon to the PC before you receive it, like the Xerneas and Rayquaza events in Gen VI. let me look at the code.

    Code:
      def pbAddPokemonKickParty(pokemon,level=nil,seeform=true)
        return if !pokemon || !$Trainer
        if $Trainer.party.length>=6
          pbDisplayPaused(_INTL("Your party is full, and something's preventing {1} from going to the PC.",pokemon.name))
          pbDisplayPaused(_INTL("Choose a party member to send back."))
          loop do
            [email protected](1,3)
            if $game_variables[1]>=0
              commands=[]
              cmdShift=-1
              cmdSummary=-1
              pkmnindex=$game_variables[1]
              commands[cmdShift=commands.length]=_INTL("Send to PC")
              commands[cmdSummary=commands.length]=_INTL("Summary")
              commands[commands.length]=_INTL("Cancel")
              command=pbShowCommands(_INTL("Do what with {1}?",$Trainer.party[pkmnindex].name),commands,false)
              if cmdShift>=0 && command==cmdShift
                $PokemonStorage.pbStoreCaught($Trainer.party[pkmnindex])
                pbRemovePokemonAt(pkmnindex)
                pbAddPokemon(pokemon,level,seeform)
                return
              elsif cmdSummary>=0 && command==cmdSummary
                scene.pbSummary(activecmd)
              end
            end
          end
        else
          pbAddPokemon(pokemon,level,seeform)
        end
      end

    There you go. Add that in PSystem_Utilities, then use that in any events where you want to force the player to add the event Pokemon to their party.

    My code actually has a species requirement as well as the party size check, because it's in and amongst the code for snagged [Shadow] Pokemon. But I removed that from this one, because it sounds to me like you're wanting to use this in a gift Pokemon event.
     
    Last edited:
    Back
    Top