• 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.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

How to send a Pokemon to the computer if there is no space in the team?

  • 199
    Posts
    15
    Years
    • Seen Jul 6, 2022
    Hi!

    There is some command for this?
    If I have 6 Pokemon in my team, I want that it gets into the computer the Egg or Pokemon that give me.
     
    Adding Eggs that can go to the PC is difficult. There's no easy method for it - you need to piece it together yourself:

    Code:
    species=PBSpecies::TOGEPI
    dexdata=pbOpenDexData
    pbDexDataOffset(dexdata,species,21)
    eggsteps=dexdata.fgetw
    dexdata.close
    poke=PokeBattle_Pokemon.new(species,EGGINITIALLEVEL,$Trainer)
    poke.calcstats
    poke.name=_INTL("Egg")
    poke.eggsteps=eggsteps
    pbAddToPartySilent(poke)
    You'll also need to include a message. The reason why pbAddToParty isn't used is because it gives the name of the Pokémon being added, which you don't want to show because it's an Egg and the player shouldn't know the species.

    Frankly, you shouldn't have a situation where the game wants to give an Egg to the player when they have a full party. It's messy, and rather uncaring if you send an Egg straight off to storage.

    To give the player an Egg when they have a free space in their party, simply use pbGenerateEgg(PBSpecies::TOGEPI). You'll still need to add in your own message. The Wiki has more information about Eggs (and about giving Pokémon too).
     
    Thank you, but I believe that it me will not work.

    I put this in an event to obtain random Eggs in a lottery
    i=rand(247)
    Kernel.pbGenerateEgg(
    PBSpecies::CATERPIE,1
    )if i==0
    Kernel.pbGenerateEgg(
    PBSpecies::WEEDLE,1
    ) if i==1
    Kernel.pbGenerateEgg(
    PBSpecies::PIDGEY,1
    )if i==2

    Or for this:
    p=PokeBattle_Pokemon.new(
    PBSpecies::ARCEUS,100,$Trainer
    )
    # Arceus Eigakan Event
    pbAutoLearnMove(p,PBMoves::JUDGMENT)
    pbAutoLearnMove(p,PBMoves::ROAROFTIME)
    pbAutoLearnMove(p,PBMoves::SPACIALREND)
    pbAutoLearnMove(p,PBMoves::SHADOWFORCE)
    # Add the Pokemon
    $Trainer.party.push(p)
    I need it for these two things.
     
    Just include a check before playing your lottery, so that you can't play with a full party. Then you can use your code just fine. This is by far the best and simplest solution.
     
    Just include a check before playing your lottery, so that you can't play with a full party. Then you can use your code just fine. This is by far the best and simplest solution.

    Good idea!
    Thanks you :)
    --------------
     
    Back
    Top