• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • 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] Different colored evolution depending on type

180
Posts
6
Years
    • Seen Apr 15, 2024
    I... I was trying to do this, I know where the colours are modified, but it just use the first colour defined ignoring the type...
    I tried to do something like this:
    https://pastebin.com/raw/tbTjcHMt
    (I use EBS, and this is the part for the evolved form)
    I don't understand why the code don't check the type before changing the colour...
     
    44
    Posts
    8
    Years
    • Seen Apr 14, 2019
    Isn't the "poke2" string referring to the evolved Pokemon sprite? You want to change the tone of the Pokemon sprite?

    Also, if you want to confirm if it actually does consider it or not (outside of it not visually changing), you could set a variable based on which the conditional branch decides it is. Then check afterwards, since that variable should remain untouched by everything else.

    Hard to tell much else with seeing more information

    EDIT; Also, looking at it some more, Tone is defined for the "poke" and "poke2" sprites all over the place during the animation. I could imagine it getting reset to something else basically immediate at a regular interval
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • I... I was trying to do this, I know where the colours are modified, but it just use the first colour defined ignoring the type...
    I tried to do something like this:
    https://pastebin.com/raw/tbTjcHMt
    (I use EBS, and this is the part for the evolved form)
    I don't understand why the code don't check the type before changing the colour...

    To evolution methods, you should put in 'Pokemon_Forms'. See how works Arceus and edit to your pokemon:
    Spoiler:


    Also, you need to do to evolution too:
    Rockruff/Lycanroc example:
    Spoiler:


    Pay attention with this
    Code:
    MultipleForms.copy(:ROCKRUFF,:LYCANROC)
    . You need to put pre-evo and evolution form to copy.
     
    Last edited:
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    To evolution methods, you should put in 'Pokemon_Forms'. See how works Arceus and edit to your pokemon:
    Spoiler:


    Also, you need to do to evolution too:
    Rockruff/Lycanroc example:
    Spoiler:


    Pay attention with this
    Code:
    MultipleForms.copy(:ROCKRUFF,:LYCANROC)
    . You need to put pre-evo and evolution form to copy.
    what? i'm talking about the evolution scene xd
    when a pokemon evolves, in the evolution scene, it changes its tone to white, and i want to change that tone depending on pokemon's types. like bulbasaur, its a grass type, i want that in the evolution scene, don't "shine" in white, i like to bulbasaur's tone change to a green... and the same for other types
     
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    Isn't the "poke2" string referring to the evolved Pokemon sprite? You want to change the tone of the Pokemon sprite?
    l

    Yes, it is.
    The thing is that i want to change both of them, and they work simmilary.
    A weird thing is, that I change all of order, and it still is showing the blue colored sprites, instead of the first tone change scripted. I'm not sure, but maybe its a update somewhere in the code that change the colour again?
    anyways, maybe the "@newspecies" doesn't contain the type information, but even when i tried with the @pokemon, that i know that it contains almost, unless all data of the specific pokémon the error still comes out, i don't know if the type information is in the pokemon itself or in the species data... could it be?
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • what? i'm talking about the evolution scene xd
    when a pokemon evolves, in the evolution scene, it changes its tone to white, and i want to change that tone depending on pokemon's types. like bulbasaur, its a grass type, i want that in the evolution scene, don't "shine" in white, i like to bulbasaur's tone change to a green... and the same for other types

    Ops. So, could be here:
    Code:
        oldstate  = pbSaveSpriteState(@sprites["rsprite1"])
        oldstate2 = pbSaveSpriteState(@sprites["rsprite2"])

    Check how 'def pbFlashInOut(canceled,oldstate,oldstate2)', 'rsprite1' and 'rsprite2' works about their colors/tones.

    Maybe here you must to add your tones:
    Code:
          @sprites["rsprite2"].color.alpha=0
    Because 'rsprite1' is to canceled evolution.
     
    Last edited:
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    Ops. So, could be here:
    Code:
        oldstate  = pbSaveSpriteState(@sprites["rsprite1"])
        oldstate2 = pbSaveSpriteState(@sprites["rsprite2"])

    Check how 'def pbFlashInOut(canceled,oldstate,oldstate2)', 'rsprite1' and 'rsprite2' works about their colors/tones.

    Maybe here you must to add your tones:
    Code:
          @sprites["rsprite2"].color.alpha=0
    Because 'rsprite1' is to canceled evolution.
    how works the "alpha" value of a sprite?
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • how works the "alpha" value of a sprite?

    Nevermind. This is happen:
    lRevvUS.png


    Maybe here:
    Code:
      def pbFlashInOut(canceled,oldstate,oldstate2)
        tone=0
        loop do
          Graphics.update
          pbUpdate(true)
          pbUpdateExpandScreen
          tone+=10
          @viewport.tone.set(tone,tone,tone,0)
          break if tone>=255
        end

    Or here:
    Code:
        tone=255
        loop do
          Graphics.update
          pbUpdate
          tone=[tone-20,0].max
          @viewport.tone.set(tone,tone,tone,0)
          break if tone<=0
        end

    '0,0,0' is black; '255,255,255' is white tone.
     
    Last edited:
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    Nevermind. This is happen:
    lRevvUS.png


    Maybe here:
    Code:
        tone=255
        loop do
          Graphics.update
          pbUpdate
          tone=[tone-20,0].max
          @viewport.tone.set(tone,tone,tone,0)
          break if tone<=0
        end
    no, this is what changes the tones:
    sprite.color.red=255
    sprite.color.green=255
    sprite.color.blue=255
    sprite.color.alpha=alpha
    sprite.color=sprite.color
    sprite2.color=sprite.color
    sprite2.color.alpha=255
    sprite.update
    sprite2.update
    alpha+=5
    but the alpha changes the value of the second evolution.... idk what to do
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • no, this is what changes the tones:
    sprite.color.red=255
    sprite.color.green=255
    sprite.color.blue=255
    sprite.color.alpha=alpha
    sprite.color=sprite.color
    sprite2.color=sprite.color
    sprite2.color.alpha=255
    sprite.update
    sprite2.update
    alpha+=5
    but the alpha changes the value of the second evolution.... idk what to do

    Oh, so could be here:
    Spoiler:



    Or here lol:
    Code:
      def initialize(viewport=nil)
        @metafile=[]
        @values=[
           viewport,
           Tone.new(0,0,0,0),Rect.new(0,0,0,0),
           true,
           0,0,0,0,0,100,100,
           0,false,0,255,0,
           Color.new(0,0,0,0),Color.new(0,0,0,0),
           0
        ]
      end
     
    Last edited:
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    Oh, so could be here:
    Spoiler:



    Or here lol:
    Code:
      def initialize(viewport=nil)
        @metafile=[]
        @values=[
           viewport,
           Tone.new(0,0,0,0),Rect.new(0,0,0,0),
           true,
           0,0,0,0,0,100,100,
           0,false,0,255,0,
           Color.new(0,0,0,0),Color.new(0,0,0,0),
           0
        ]
      end
    nah, is where i said to you. the only problem is that the evolved sprite now shows white at the end, and not with the regular colours
     

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • nah, is where i said to you. the only problem is that the evolved sprite now shows white at the end, and not with the regular colours

    This is what you want?
    7ncYdTr.png

    dKwHJLD.png


    when its evolves, keep the white shine.

    So, if is, that's the code when you must to edit:
    Code:
        for j in 0...26
    [COLOR="red"]      sprite.color.red=0 #255
          sprite.color.green=0 #255 
          sprite.color.blue=0 #255[/COLOR]
          sprite.color.alpha=alpha
          sprite.color=sprite.color
          sprite2.color=sprite.color
          sprite2.color.alpha=255
          sprite.update
          sprite2.update
          alpha+=5
        end
        totaltempo=0
        currenttempo=25
        maxtempo=7*Graphics.frame_rate
        while totaltempo<maxtempo
          for j in 0...currenttempo
            if alpha<255
    [COLOR="Red"]          sprite.color.red=0 #255
              sprite.color.green=0 #255 
              sprite.color.blue=0 #255[/COLOR]
              sprite.color.alpha=alpha
              sprite.color=sprite.color
              alpha+=10
            end
     
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    This is what you want?
    7ncYdTr.png

    dKwHJLD.png


    when its evolves, keep the white shine.

    So, if is, that's the code when you must to edit:
    Code:
        for j in 0...26
    [COLOR="red"]      sprite.color.red=0 #255
          sprite.color.green=0 #255 
          sprite.color.blue=0 #255[/COLOR]
          sprite.color.alpha=alpha
          sprite.color=sprite.color
          sprite2.color=sprite.color
          sprite2.color.alpha=255
          sprite.update
          sprite2.update
          alpha+=5
        end
        totaltempo=0
        currenttempo=25
        maxtempo=7*Graphics.frame_rate
        while totaltempo<maxtempo
          for j in 0...currenttempo
            if alpha<255
    [COLOR="Red"]          sprite.color.red=0 #255
              sprite.color.green=0 #255 
              sprite.color.blue=0 #255[/COLOR]
              sprite.color.alpha=alpha
              sprite.color=sprite.color
              alpha+=10
            end
    Yes, i changed that, but i want a conditional that changes that value to another one...
    i do something like this:
    Spoiler:
    But the type doesn't metter, it always shows a orange shine...
     
    Last edited:

    WolfPP

    Spriter/ Pixel Artist
    1,309
    Posts
    5
    Years
  • Yes, i changed that, but i want a conditional that changes that value to another one...
    i do something like this:
    Spoiler:
    But the type doesn't metter, it always shows a orange shine...

    You must to change this:
    Code:
    sprite.color.alpha=alpha

    To this:
    Code:
    sprite.color.alpha=255

    Nqua2pz.png

    Code:
          if [COLOR="Red"]sprite[/COLOR].pbHasType?(:GRASS)
            sprite.color.red=92
            sprite.color.green=255
            sprite.color.blue=45
            sprite.color.alpha=255
            sprite.color=sprite.color
            alpha+=10
     
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    You must to change this:
    Code:
    sprite.color.alpha=alpha

    To this:
    Code:
    sprite.color.alpha=255

    Nqua2pz.png

    Code:
          if [COLOR="Red"]sprite[/COLOR].pbHasType?(:GRASS)
            sprite.color.red=92
            sprite.color.green=255
            sprite.color.blue=45
            sprite.color.alpha=255
            sprite.color=sprite.color
            alpha+=10

    thank you!
    and for ebs... how i have to do it? whatever, now i have a clue
    and... it don't worked for me. still don't check the pokémon type and always show the orange shine...
     
    Last edited:
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    You must to change this:
    Code:
    sprite.color.alpha=alpha

    To this:
    Code:
    sprite.color.alpha=255

    Nqua2pz.png

    Code:
          if [COLOR="Red"]sprite[/COLOR].pbHasType?(:GRASS)
            sprite.color.red=92
            sprite.color.green=255
            sprite.color.blue=45
            sprite.color.alpha=255
            sprite.color=sprite.color
            alpha+=10
    maybe is an error because pbHasType? check both types, and because that the script tries to show both colours? i dont know... is there some way to just check the first type. i tried but it causes an error
     
    180
    Posts
    6
    Years
    • Seen Apr 15, 2024
    solved!
    the problem was... weird
    the script that Wolfpp gave to me is correct, but i changed the slowpoke's type to normal and seems like the script get in trouble with that and deleting the water and psychic lines worked (don't make any sense, but it worked)
     
    Back
    Top