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.

Draconius GO
Reply
 
Thread Tools
  #1    
Old July 28th, 2013 (11:49 PM).
thor348's Avatar
thor348 thor348 is offline
That's Oak to You
     
    Join Date: Nov 2012
    Location: Arizona
    Gender: Male
    Nature: Calm
    Posts: 136
    http://pokemonessentials.wikia.com/wiki/Tutorial:Random_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

    Relevant Advertising!

      #2    
    Old July 29th, 2013 (1:41 AM).
    Harvey_Create's Avatar
    Harvey_Create Harvey_Create is offline
    Pokemon Apex Team Member
       
      Join Date: Nov 2012
      Location: Iowa
      Gender: Male
      Nature: Naughty
      Posts: 188
      Quote:
      Originally Posted by thor348 View Post
      http://pokemonessentials.wikia.com/wiki/Tutorial:Random_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 (3:24 PM).
      Nickalooose Nickalooose is offline
      --------------------
         
        Join Date: Mar 2008
        Gender: Female
        Posts: 1,309
        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 thor348 is offline
        That's Oak to You
           
          Join Date: Nov 2012
          Location: Arizona
          Gender: Male
          Nature: Calm
          Posts: 136
          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 (3:52 PM).
          FL's Avatar
          FL FL is offline
          Pokémon Island Creator
             
            Join Date: Sep 2010
            Gender: Male
            Posts: 1,720
            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 (6:01 PM).
            Harvey_Create's Avatar
            Harvey_Create Harvey_Create is offline
            Pokemon Apex Team Member
               
              Join Date: Nov 2012
              Location: Iowa
              Gender: Male
              Nature: Naughty
              Posts: 188
              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

              Join the conversation!

              Create an account to post a reply in this thread, participate in other discussions, and more!

              Create a PokéCommunity Account

              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 GMT -8. The time now is 1:44 PM.