• 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!
  • Which Pokémon Masters protagonist do you like most? Let us know by casting a vote in our Masters favorite protagonist poll here!
  • Red, Hilda, Paxton, or Kellyn - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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.

[Scripting Question] Individual values are limited to 31 in Essentials per base ... But, how do I put a new limit on 36? I want normal Pokémon to have a limit of 31, but S

Essential Base. So this is partly understanding how present calculation operates alongside with 'what's the minimum we can do to achieve the goal'

I'm unsure of 'what all needs to be changed', these are the location of importance. e.g. will the game allow IV stat of 36 if we don't change IV STAT LIMIT beyond 31? probably? If no, then also change IV_STAT_LIMIT, but also need to change regular default " @iv = rand(IV_STAT_LIMIT+1) " to @iv = rand(IV_STAT_LIMIT-4)" and assign default to the .shiny pkmn.
There are two lines of shiny? one within wild encounter, one within egg hatching.

You're looking to implement this 'logic', but not this line specifically.

@iv = rand(IV_STAT_LIMIT+6)

Code:
  if shinyretries>0
    shinyretries.times do
      break if egg.shiny?
      egg.personalID = rand(65536)|(rand(65536)<<16)
    end

if egg.shiny? #c.edit  add in two lines of new codes here
                  pkmn.iv[s]      = rand(IV_STAT_LIMIT+6)      #something like this.

  end
  # Give Pokérus
  if rand(65536)<POKERUS_CHANCE
    genwildpoke.givePokerus
  end


belows are essentials code as they are, use these to search for place of edits.
Code:
 IV_STAT_LIMIT         = 31    # Max total IVs
Code:
    PBStats.eachStat do |s|
      @iv[s]      = rand(IV_STAT_LIMIT+1)
      @ev[s]      = 0

I think you got it from here. Try some stuff. Probably easiest way to check if it's working is giving yourself PKMN and see if it's still limit at IV 31
Then put "always shiny = on" then try again, if some stats > 31 . ya done good.

After that, then you'd do the same code to eggs, and then check eggs real quick.
 
Last edited:
Essential Base. So this is partly understanding how present calculation operates alongside with 'what's the minimum we can do to achieve the goal'

I'm unsure of 'what all needs to be changed', these are the location of importance. e.g. will the game allow IV stat of 36 if we don't change IV STAT LIMIT beyond 31? probably? If no, then also change IV_STAT_LIMIT, but also need to change regular default " @iv = rand(IV_STAT_LIMIT+1) " to @iv = rand(IV_STAT_LIMIT-4)" and assign default to the .shiny pkmn.
There are two lines of shiny? one within wild encounter, one within egg hatching.

You're looking to implement this 'logic', but not this line specifically.

@iv = rand(IV_STAT_LIMIT+6)

Code:
  if shinyretries>0
    shinyretries.times do
      break if egg.shiny?
      egg.personalID = rand(65536)|(rand(65536)<<16)
    end

if egg.shiny? #c.edit  add in two lines of new codes here
                  pkmn.iv[s]      = rand(IV_STAT_LIMIT+6)      #something like this.

  end
  # Give Pokérus
  if rand(65536)<POKERUS_CHANCE
    genwildpoke.givePokerus
  end


belows are essentials code as they are, use these to search for place of edits.
Code:
 IV_STAT_LIMIT         = 31    # Max total IVs
Code:
    PBStats.eachStat do |s|
      @iv[s]      = rand(IV_STAT_LIMIT+1)
      @ev[s]      = 0

I think you got it from here. Try some stuff. Probably easiest way to check if it's working is giving yourself PKMN and see if it's still limit at IV 31
Then put "always shiny = on" then try again, if some stats > 31 . ya done good.

After that, then you'd do the same code to eggs, and then check eggs real quick.


Perfect! You are good at scripting!
But there is a hole ...
When a trainer breeds with Shinys Pokémon with Ivs over 31 using Items that pass individual values from father to son, the Pokémon is born normal with IV above 31, how to block this in the breeding done in daycare?
Because if a normal Pokémon is born with an individual value above 31, it is not exclusive to the Shinys.
 
I'm still learning about PKMN games, which item is it that allows IV to be passed? It'll be easier to locate and alter the code by searching the item. e.g. I'm unsure what the code currently looks like.

That's a good catch.

I'm starting to understand that Essentials is like a long script. Or a book if you will. and it's kind of like. "you know which chapter this happens in?" haha
 
Perfect! You are good at scripting!
But there is a hole ...
When a trainer breeds with Shinys Pokémon with Ivs over 31 using Items that pass individual values from father to son, the Pokémon is born normal with IV above 31, how to block this in the breeding done in daycare?
Because if a normal Pokémon is born with an individual value above 31, it is not exclusive to the Shinys.

In the file PField_DayCare, in the long function:
Code:
def pbDayCareGenerateEgg
find the lines:
Code:
  egg.iv[0] = ivs[0]
  egg.iv[1] = ivs[1]
  egg.iv[2] = ivs[2]
  egg.iv[3] = ivs[3]
  egg.iv[4] = ivs[4]
  egg.iv[5] = ivs[5]
and replace them with:
Code:
  egg.iv[0] = (egg.shiny? ? ivs[0] : [31, ivs[0]].min)
  egg.iv[1] = (egg.shiny? ? ivs[1] : [31, ivs[1]].min)
  egg.iv[2] = (egg.shiny? ? ivs[2] : [31, ivs[2]].min)
  egg.iv[3] = (egg.shiny? ? ivs[3] : [31, ivs[3]].min)
  egg.iv[4] = (egg.shiny? ? ivs[4] : [31, ivs[4]].min)
  egg.iv[5] = (egg.shiny? ? ivs[5] : [31, ivs[5]].min)
 
In the file PField_DayCare, in the long function:
Code:
def pbDayCareGenerateEgg
find the lines:
Code:
  egg.iv[0] = ivs[0]
  egg.iv[1] = ivs[1]
  egg.iv[2] = ivs[2]
  egg.iv[3] = ivs[3]
  egg.iv[4] = ivs[4]
  egg.iv[5] = ivs[5]
and replace them with:
Code:
  egg.iv[0] = (egg.shiny? ? ivs[0] : [31, ivs[0]].min)
  egg.iv[1] = (egg.shiny? ? ivs[1] : [31, ivs[1]].min)
  egg.iv[2] = (egg.shiny? ? ivs[2] : [31, ivs[2]].min)
  egg.iv[3] = (egg.shiny? ? ivs[3] : [31, ivs[3]].min)
  egg.iv[4] = (egg.shiny? ? ivs[4] : [31, ivs[4]].min)
  egg.iv[5] = (egg.shiny? ? ivs[5] : [31, ivs[5]].min)

St. Cooler always sending well
 
Back
Top