The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Game Development > Pokémon Essentials
Sign Up Rules/FAQ Live Battle 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    
Old July 28th, 2013, 11:49 PM
thor348's Avatar
thor348
That's Oak to You
 
Join Date: Nov 2012
Location: Albion
Gender: Male
Nature: Calm
http://pokemonessentials.wikia.com/w..._Egg_Generator

For the script by FL, I was wondering on how to make it so it only randomly generates a species ranging from 1-251 because those are the only pokémon i'm using.

Is this all i have to change? Or is this even possible.

Code:
species=0
    dexdata=pbOpenDexData
    while(species<=251)
Thanks
Reply With Quote
  #2    
Old July 29th, 2013, 01:41 AM
Harvey_Create's Avatar
Harvey_Create
Pokemon Apex Team Member
 
Join Date: Nov 2012
Location: Iowa
Gender: Male
Nature: Naughty
Send a message via Skype™ to Harvey_Create
Quote:
Originally Posted by thor348 View Post
http://pokemonessentials.wikia.com/w..._Egg_Generator

For the script by FL, I was wondering on how to make it so it only randomly generates a species ranging from 1-251 because those are the only Pokemon i'm using.

Is this all i have to change? Or is this even possible.

Code:
species=0
    dexdata=pbOpenDexData
    while(species<=251)
Thanks
I'm going to assume that(after reading the script) that it will only generate an egg based off of the Pokemon written into the game. So if you Pokemon.TXT only has Regional Des 1-251 in it, it will only generate out of them.
__________________
This signature has been disabled.
Exceeds signature width limit (strictly 600 pixels or less).
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Reply With Quote
  #3    
Old July 29th, 2013, 03:24 PM
Nickalooose
--------------------
 
Join Date: Mar 2008
Gender: Female
For starters, changing the (species==0) to (species<=251), will never, ever, ever, ever, ever, get what you are looking for.

Quick explanation on FL .'s script.

Code:
def randomEggGenerator(exceptions=[],type=[],enableIncenseEvos=false)
  # Phione and Manaphy are always exceptions 
  exceptions+=[PBSpecies::PHIONE,PBSpecies::MANAPHY]  Is Pokémon you won't get within an egg.
Code:
  if $Trainer.party.length>=6
    Kernel.pbMessage(_INTL(
        "I'm sorry, but it would seem that you can't carry any more Pokemon.")) Means if you own 6 or more Pokémon in your team, you will NOT, get an egg.
Code:
  else   
    species=0 Will set species to equal 0, incase the script has run before I suppose.
    dexdata=pbOpenDexData Gets Pokémon info from pokemon.txt.
    while(species==0) (your guessed part to edit) means, for as long as species = 0, keep doing the next part.
      species=rand(PBSpecies.maxValue)+1 randoms what species will equal within your pokemon.txt.
      pbDexDataOffset(dexdata,species,8) will get the species name of the random'd Pokémon, i.e. Bulbasaur, Mew, Regirock, etc.
      type1=dexdata.fgetb Will recall that Pokémons type1.
      type2=dexdata.fgetb Will recall that Pokémons type2.
      # Redo the loop if the species can't be in an egg, is an exceptions or
      # is an evolution (only if enableIncenseEvos=false)
      species=0 if (!pbHasEgg?(species) || exceptions.include?(species) || 
          (!type.empty? && !type.include?(type1) && !type.include?(type2)) ||
          (!enableIncenseEvos && pbGetPreviousForm(species)!=species))
    end Will set species to 0, if the random'd Pokémon equals any of these things...  Remember the while you wanted to edit...  Well it will replay from there.
Code:
    dexdata.close    Closes the use of pokemon.txt.
    pbGenerateEgg(species) Gives you your egg.
    Kernel.pbMessage(
        _INTL("{1} received the Egg!\\se[itemlevel]\1",$Trainer.name))
  end
end Shows message and ends generator.
So yes, Harvey is correct, if you only have 251 Pokémon in your pokemon.txt, it will work nonetheless, if you have 9340 Pokémon in the pokemon.txt, then it will random up to 9340.

Bottom line, don't edit that part you wanted to.
Reply With Quote
  #4    
Old July 29th, 2013, 10:14 PM
thor348's Avatar
thor348
That's Oak to You
 
Join Date: Nov 2012
Location: Albion
Gender: Male
Nature: Calm
Thank you both for your input and explanation. Would you both like credit along with FL in my game if I decide to use this script?
Reply With Quote
  #5    
Old July 30th, 2013, 03:52 PM
FL's Avatar
FL
Pokémon Island Creator
 
Join Date: Sep 2010
Gender: Male
Changing 'species=rand(PBSpecies.maxValue)+1' to 'species=rand(251)+1' also do the job without changing pokemon.txt.

An example: If you only wish to show the pokémon between 494-649 use 'species=rand(156)+494'.
__________________
Reply With Quote
  #6    
Old July 30th, 2013, 06:01 PM
Harvey_Create's Avatar
Harvey_Create
Pokemon Apex Team Member
 
Join Date: Nov 2012
Location: Iowa
Gender: Male
Nature: Naughty
Send a message via Skype™ to Harvey_Create
Quote:
Originally Posted by thor348 View Post
Thank you both for your input and explanation. Would you both like credit along with FL in my game if I decide to use this script?
THis is a simple question, No need for credit. Now, if a gave you something Drastic, That would be Different
__________________
This signature has been disabled.
Exceeds signature width limit (strictly 600 pixels or less).
Please review and fix the issues by reading the signature rules.

You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.

Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 12:24 AM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 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 generated content remains the property of its creator.