The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

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  
Unread March 27th, 2012, 11:55 AM
TACHAN
Mime Jr.
 
Join Date: Jan 2010
Gender: Female
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.
Reply With Quote
  #2  
Unread March 27th, 2012, 04:09 PM
desbrina's Avatar
desbrina
Lightning Yellow Creator
 
Join Date: Feb 2011
Location: UK
Age: 24
Gender: Female
Nature: Quiet
pbAddPokemon(PBSpecies::species,level)
Adds a pokemon. If the party is full its automatically sends to the pc

Don't know about eggs though
__________________
Creator of


A Pokemon Yellow remake, using HGSS Tiles, and the ability to obtain all Kanto Pokemon as well as their previous/later evolutions.

Current Give-away: None
Dates: Unknown

If your reporting a problem, please make sure you're using the latest version first. Please post the full error message if there is one, as well as what you were doing/did so that i can recreate it

Reply With Quote
  #3  
Unread March 28th, 2012, 12:05 AM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
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).
__________________
Reply With Quote
  #4  
Unread March 28th, 2012, 07:50 PM
TACHAN
Mime Jr.
 
Join Date: Jan 2010
Gender: Female
Thank you, but I believe that it me will not work.

I put this in an event to obtain random Eggs in a lottery
Quote:
i=rand(247)
Kernel.pbGenerateEgg(
PBSpecies::CATERPIE,1
)if i==0
Kernel.pbGenerateEgg(
PBSpecies::WEEDLE,1
) if i==1
Kernel.pbGenerateEgg(
PBSpecies:IDGEY,1
)if i==2
Or for this:
Quote:
p=PokeBattle_Pokemon.new(
PBSpecies::ARCEUS,100,$Trainer
)
# Arceus Eigakan Event
pbAutoLearnMove(p,PBMoves::JUDGMENT)
pbAutoLearnMove(p,PBMoves::ROAROFTIME)
pbAutoLearnMove(p,PBMoves:PACIALREND)
pbAutoLearnMove(p,PBMoves:HADOWFORCE)
# Add the Pokemon
$Trainer.party.push(p)
I need it for these two things.
Reply With Quote
  #5  
Unread March 29th, 2012, 05:05 PM
Maruno's Avatar
Maruno
Lead Dev of Pokémon Essentials
 
Join Date: Jan 2008
Location: England
Gender: Male
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.
__________________
Reply With Quote
  #6  
Unread March 29th, 2012, 05:16 PM
TACHAN
Mime Jr.
 
Join Date: Jan 2010
Gender: Female
Quote:
Originally Posted by Maruno View Post
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
--------------
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 UTC. The time now is 02:06 AM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User posts belong to the user.