• 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!
  • 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.

Sending a party Pokemon to PC

  • 226
    Posts
    9
    Years
    • Seen Feb 20, 2025
    So what I am trying to do is creating an event that select the first Pokemon from the player's party and send it to the PC.

    I tried several things after a quick search on the forums & the wiki:

    1)
    $Trainer.pokemonParty[0]=$game_variables[58]
    pbStorePokemon($game_variables[58])
    It simply does nothing.

    2)
    $Trainer.pokemonParty[0]=poke
    pbStorePokemon(poke)
    It causes the game to crash.

    3)
    $Trainer.pokemonParty[0]=$game_variables[58]
    $PokemonStorage[0][0]=$game_variables[58]
    It works, but it replaces the already existing Pokemon in the box.

    If someone could think of a solution, it would help... Thanks!
     
    Your mistake is in your ordering.

    Try this:
    Code:
    $game_variables[58]=$Trainer.pokemonParty[0]
    pbStorePokemon($game_variables[58])
    $Trainer.pokemonParty[0]=nil
    $Trainer.colapseParty

    I may have the last line wrong. I'm not at my computer right now to check the correct code.

    What your problem is was that you were making the first party member and changing that to be the value of game variable 58, which presumably holds nothing.
     
    Oops sorry, I only did the ordering mistake in my post, not in Essentials.

    So I have the same first two lines of code, and nothing happens (no error message, but the Pokemon is not stored either). The Pokemon is correctly associated with Var58 though.

    Including the 4th line causes the game to crash.
     
    i am attempting to do about the same thing, only i want to send all 6 pokemon, along with all the player items, out of the party/inventory to be recovered later. i have tried plugging in the script but i just get an argument error. i would say that its easy to fix, only i am not very proficient with coding or scripting all that well and fail to understand what i'm doing wrong. some help would be beyond appreciated
    [PokeCommunity.com] Sending a party Pokemon to PC
     
    i am attempting to do about the same thing, only i want to send all 6 pokemon, along with all the player items, out of the party/inventory to be recovered later. i have tried plugging in the script but i just get an argument error. i would say that its easy to fix, only i am not very proficient with coding or scripting all that well and fail to understand what i'm doing wrong. some help would be beyond appreciated
    [PokeCommunity.com] Sending a party Pokemon to PC

    Don't know if this will help you, but you could do something like this for the party:
    pokemonParty = $player.party.clone
    You can change "pokemonParty" for any other name. Even for a variable you define somewhere else.
    $game_variables[X] = $player.party[0]
    May also work if you have a different variable save a different pokemon from 0 to 5. Not sure if it'll work since I don't know if those variables can save more than 1 info at a time.
    You'll just need to use them in the inverse order to give the pokemon back.

    That would work to save the pokemon somewhere else so you can restore them. To delete them, you have to use this:
    $player.remove_pokemon_at_index(index)
    And you would have to repeat the command to remove the pokemon and change (index) with (0), (1), etc so it erases all 6 pokemon the player could have in the team.

    As for the bag, this would make a copy of the actual bag:
    oldbag = $bag.clone
    And this would allow you to erase the object in each of the pockets (you have to copy this line for each pocket and change "index" for 0, 1, etc until the amount of pockets you have minus 1):
    $bag.pokects[index]
    Though in this case, I recommend finding the script that makes the bag option appear in the menu and putting a condition for it to appear, like a variable being on or off. Then you would only need to change that variable to keep the player from accessing the bag. As an extra, also keep the player from being able to access the player's PC, since the bag would still be there and they could still interact with it that way, which would be weird.
     
    Back
    Top