• 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 Conquest 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.

[Scripting Question] Form change on evolution screen

  • 2
    Posts
    143
    Days
    • Seen Mar 13, 2025
    First of all, sorry for my bad English. I have created a script in which Mime Jr., when female and knowing Mimetic, evolves into regular Mr. Mime. However, if it is male and knows Mimetic, it evolves into Galarian Mr. Mime and when a male Mime Jr. knows Mimetic, it evolves into Galarian Mr. Mime. The evolution code works fine. The problem occurs during the evolution screen, where the sprite of regular Mr. Mime is shown instead of the Galarian form.

    Here below is the evolution method code and the evolution screen code

    Evolution method code

    Code:
    GameData::Evolution.register(
      :id            => :MimeJrGenderMove,
      :parameter     => nil,  # No necesitamos pasar ningún parámetro aquí
      :level_up_proc => proc { |pkmn, parameter|
        # Verificar si el Pokémon es Mime Jr. y si conoce el movimiento Mimético
        next false unless pkmn.species == :MIMEJR
        next false unless pkmn.hasMove?(:MIMIC)
        next true  # Evolucionar si cumple las condiciones
      },
      :after_evolution_proc => proc { |pkmn, new_species, parameter, evo_species|
        # Determinar la forma según el género
        new_form = pkmn.male? ? 1 : 0  # Forma 1 para macho (Galar), Forma 0 para hembra (normal)
    
        # Actualizar la forma y la especie tras la evolución
        pkmn.form = new_form
        pkmn.species = :MRMIME  # Cambiar la especie a Mr. Mime
    
        # Recalcular las estadísticas para reflejar los cambios de la evolución
        pkmn.calc_stats
    
        next true  # Continuar con la evolución
      }
    )

    Evolution screen code
    Code:
    class PokemonEvolutionScene
      def pbStartScreen(pokemon, newspecies)
        @pokemon = pokemon
        @newspecies = newspecies
        @sprites = {}
        @bgviewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
        @bgviewport.z = 99999
        @viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
        @viewport.z = 99999
        @msgviewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
        @msgviewport.z = 99999
        addBackgroundOrColoredPlane(@sprites, "background", "evolution_bg",
                                    Color.new(248, 248, 248), @bgviewport)
        rsprite1 = PokemonSprite.new(@viewport)
        rsprite1.setOffset(PictureOrigin::CENTER)
        rsprite1.setPokemonBitmap(@pokemon, false)
        rsprite1.x = Graphics.width / 2
        rsprite1.y = (Graphics.height - 64) / 2
        rsprite2 = PokemonSprite.new(@viewport)
        rsprite2.setOffset(PictureOrigin::CENTER)
        
        # Comprobamos si Mime Jr. es macho y si evoluciona a Mr. Mime (Galar)
        if @pokemon.species == :MIMEJR && @pokemon.male? && @pokemon.hasMove?(:MIMIC)
          # Usar la forma Galar de Mr. Mime
          rsprite2.setPokemonBitmapSpecies(@pokemon, :MRMIME, true)  # Forma Galar
        else
          rsprite2.setPokemonBitmapSpecies(@pokemon, @newspecies, false)
        end
        
        rsprite2.x       = rsprite1.x
        rsprite2.y       = rsprite1.y
        rsprite2.visible = false
        @sprites["rsprite1"] = rsprite1
        @sprites["rsprite2"] = rsprite2
        @sprites["msgwindow"] = pbCreateMessageWindow(@msgviewport)
        set_up_animation
        pbFadeInAndShow(@sprites) { pbUpdate }
      end
    end

    I changed Evolution screen code, now mr mime's backsprite is showing.
     
    Last edited:
    See attached files
     

    Attachments

    • [PokeCommunity.com] Form change on evolution screen
      1.png
      178.7 KB · Views: 4
    • [PokeCommunity.com] Form change on evolution screen
      2.png
      88.2 KB · Views: 3
    • [PokeCommunity.com] Form change on evolution screen
      3.png
      169.5 KB · Views: 4
    Back
    Top