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

How can i add a megaevolution animation?

Zeak6464

Zeak #3205 - Discord
1,101
Posts
11
Years
  • Common:MegaEvolution

    you will have to make the animation in the editor
     
    36
    Posts
    9
    Years
    • Seen Sep 28, 2017
    Thanks a lot!
    I have another problem with the megaevolution, when my pokèmon megaevolve againsts a wild pokèmon the megaevolution don't reverse in the next fight!
    Why?
     

    Luka S.J.

    Jealous Croatian
    1,270
    Posts
    15
    Years
  • This might be an issue in the previous iteration of Essentials. I can confirm this issue does not exist in v15.1.
     

    Luka S.J.

    Jealous Croatian
    1,270
    Posts
    15
    Years
  • The Pokemon revert out of their Mega form in both my battle system, and the stock Essentials one. There is something you're doing that is interfering with the scripts.
     
    36
    Posts
    9
    Years
    • Seen Sep 28, 2017
    It only happens with the wild battle, i really don't know What could be... There is nothing that I can try to do?
     

    Luka S.J.

    Jealous Croatian
    1,270
    Posts
    15
    Years
  • You haven't told us all the changes you made to your system, and to what extent. It might be the wild VS sequence thing, it might not. What you can always try to do is revert to a clean copy of Essentials, and carefully start migrating your other functionality in. But the error is definitely on your side, because stock Essentials users don't experience this.
     
    36
    Posts
    9
    Years
    • Seen Sep 28, 2017
    Thanks Luka S.J. i've tried to cancel the script of the vs animation and now the megaevolution reversing correctly!
    I have a last question , is possible add a symbol next to the bar hp like the symbol of the megaevolution but for a specific Pokemon ?
     
    188
    Posts
    9
    Years
    • Seen Jan 21, 2024
    Yes, it is. I already managed to get that working for the fan game I'm working on.

    In PokeBattle_Scene, def refresh there is a bit of code that causes the mega evolution icon and the shiny icon to show up in the HUD that looks a bit like this:
    Code:
    if @battler.isMega?
      imagepos.push(["Graphics/Pictures/battleMegaEvoBox.png",@spritebaseX+8,34,0,0,-1,-1])
    end
    Adding similar code with an image file of your own will make it possible. All you need to know is how to make a form and species check.
     
    36
    Posts
    9
    Years
    • Seen Sep 28, 2017
    Really thanks! There is a guide for make a form and species check?
    For example IF i Wanna create a new species like The shiny pokemon... How can i do?
     
    188
    Posts
    9
    Years
    • Seen Jan 21, 2024
    This is how you check for species in def refresh:
    Code:
    if isConst?(@battler.species,PBSpecies,:SHAYMIN)
    This code in particular returns true if the battler is a Shaymin. The first argument is an object in the PokeBattle_Battler class.

    To check for shininess, the function isShiny? in the PokeBattle_Pokemon class will return true if it is. For example:
    Code:
    if @battler.pokemon.isShiny?

    Checking for form is easy as objects in both the PokeBattle_Pokemon and the PokeBattle_Battler classes have an attribute called form that can be checked as follows:
    Code:
    if @battler.form==1
    This checks if the object's form (referred to inside the class) is equal to 1.

    The following code returns true for a shiny Sky Forme Shaymin:
    Code:
    if isConst?(@battler.species,PBSpecies,:SHAYMIN) && @battler.form==1 && @battler.pokemon.isShiny?

    Of course, the battler objects will be referred to differently depending on which class you're working in.

    Creating a new species of Pokémon involves adding an entry to the pokemon.txt file in the PBS directory. Just copy and paste an existing entry and alter the data as you see fit. The wiki will explain it better.
     
    36
    Posts
    9
    Years
    • Seen Sep 28, 2017
    Thanks James!
    I've tried to put this code in the section PokeBattle_Scene after the code for show the mega icon but when i found a wild shaymin the simbol doesn't appear!
    Code:
     if isConst?(@battler.species,PBSpecies,:SHAYMIN)
          imagepos.push(["Graphics/Pictures/battleMegaEvoBox.png",@spritebaseX+8,34,0,0,-1,-1])
        end
     
    188
    Posts
    9
    Years
    • Seen Jan 21, 2024
    There are no closing square and round brackets in that piece of code before the end statement. Also, make sure the image file being referred to actually exists in that path.
     
    36
    Posts
    9
    Years
    • Seen Sep 28, 2017
    I solved the problem!
    But is possible call an animation for a particular species of pokemon?
    For example when a wild weedle appears the animation common:Weedle start. It is possible?
     
    188
    Posts
    9
    Years
    • Seen Jan 21, 2024
    Yes, it is possible. All you need to do is use similar coding to the shiny sparkle animation calls.

    In PokeBattle_Scene, def pbStartBattle, add the code in blue:
    Code:
          # Show shiny animation for wild Pokémon
          if @battle.party2[0].isShiny? && @battle.battlescene
            pbCommonAnimation("Shiny",@battle.battlers[1],nil)
          end
          [COLOR=Blue]if isConst?(@battle.party2[0].species,PBSpecies,:WEEDLE) && @battle.battlescene
            pbCommonAnimation("Weedle",@battle.battlers[1],nil)
          end[/COLOR]
          if @battle.party2.length==2
            if @battle.party2[1].isShiny? && @battle.battlescene
              pbCommonAnimation("Shiny",@battle.battlers[3],nil)
            end
    [COLOR=Blue]        if [/COLOR][COLOR=Blue][COLOR=Blue]isConst?(@battle.party2[1].species,PBSpecies,:WEEDLE)[/COLOR] && @battle.battlescene
              pbCommonAnimation("Weedle",@battle.battlers[3],nil)
            end[/COLOR]
          end
    For the animation to show, make sure it exists. The blue code calls an animation for a wild Weedle, but you can adapt it to any species by changing the third argument in the blue isConst? codes
     
    Back
    Top