• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Trading Card Game 2 protagonist in the poll by clicking here.
  • 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.

[Custom Feature Question] Custom Shiny Variance, Based on IVs

Pokeminer20

PDM20, Coder of Chaos!
  • 412
    Posts
    11
    Years
    Greetings reader.
    For some time I've wanted to implement a second type of shiny pokemon. The Initial thought was to use the same formula as shiny pokemon but then a thought occurred, the two values could mix and break the idea. so looking at my pokemon in my copy of shield occured to me: "Why not make a shiny pokemon based on the IV Stat?" and that is where this odd idea comes from. my current idea is either all 6 IV's need to be perfect or the total IV Number needs to be above 75% max. if anyone has an idea of how to code this I'd very much appreciate it.
     
    I'm already familiar with setting up how to make graphics changed based on the attributes assigned to the pokemon. it's a lot easier than you think. what I need to learn is how to set the attribute the second the pokemon's IV equals the desired value
     
    of course by either chance or luck I found the right formula to use. I have decided to name it the "Prodigy Variant" so if you follow (broken link removed) when it comes time to add the Def instead of their 'albinoflag' use 'prodigyflag' and this section of code

    Code:
    # Returns whether this Pokémon is a prodigy (differently colored).
      def isProdigy?
        return @prodigyflag if @prodigyflag!=nil
        a=@iv[0]
        b=@iv[1]
        c=@iv[2]
        d=@iv[3]
        e=@iv[4]
        f=@iv[5]
        g=a+b+c+d+e+f
        return @prodigy=true if g>=PRODIGYVALUE
      end
    
    # Makes this Pokémon prodigy.
      def makeProdigy
        @prodigyflag=true
      end
    
    # Makes this Pokémon not prodigy.
      def makeNotProdigy
        @prodigyflag=false
      end

    and make sure you place PRODIGYVALUE under SHINYPOKEMONCHANCE and set it to any value you want between 0 and 186. the higher the value to rarer the pokemon will be a prodigy.

    with minor changes you can alter the code from @iv to @ev if you want your pokemon to become a prodigy that way, or do both and have a 'master fighter' instead. you're decision
     
    Last edited:
    of course by either chance or luck I found the right formula to use. I have decided to name it the "Prodigy Variant" so if you follow (broken link removed) when it comes time to add the Def instead of their 'albinoflag' use 'prodigyflag' and this section of code

    Code:
    # Returns whether this Pokémon is a prodigy (differently colored).
      def isProdigy?
        return @prodigyflag if @prodigyflag!=nil
        a=@iv[0]
        b=@iv[1]
        c=@iv[2]
        d=@iv[3]
        e=@iv[4]
        f=@iv[5]
        g=a+b+c+d+e+f
        return @prodigy=true if g>=PRODIGYVALUE
      end
    
    # Makes this Pokémon prodigy.
      def makeProdigy
        @prodigyflag=true
      end
    
    # Makes this Pokémon not prodigy.
      def makeNotProdigy
        @prodigyflag=false
      end

    and make sure you place PRODIGYVALUE under SHINYPOKEMONCHANCE and set it to any value you want between 0 and 186. the higher the value to rarer the pokemon will be a prodigy.

    with minor changes you can alter the code from @iv to @ev if you want your pokemon to become a prodigy that way, or do both and have a 'master fighter' instead. you're decision

    Nice! Glad you found a way to do it!
    EDIT: Maybe post your own tutorial here on pokecommunity?
     
    Back
    Top