• 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] Mid Battle Animation for pokemon that change forms

  • 8
    Posts
    1
    Years
    • Seen Jun 28, 2024
    So I´ve installed the Gen 9 repack for essentials from relic castle, its excellent, but I realised Pokemon such as Morpeko, Wishiwashi, Terapagos among others change form in an awkard way and I would like to add some animations to those form changes while in battle.

    The question I guess is: How do I script for when those pokemons change form (via item such as Zazian or via ability such as Morpeko) an animation is displayed (sort of like a mega) so that it doesn´t abruptly change from one sprite to the other.

    I´m kinda new to this. Thanks.
     
    In def pbMegaEvolve the command pbCommonAnimation("MegaEvolution", battler) is used to play the Common:MegaEvolution Battle Animation before it changes the form.
    You would want to do something similar.
    So I dont think I understand, I´m new to this sorry.

    The line of code for the morpeko form change is this I think:

    # Morpeko - Hunger Switch
    if isSpecies?(:MORPEKO) && hasActiveAbility?(:HUNGERSWITCH) && endOfRound
    # Intentionally doesn't show the ability splash or a message
    newForm = (@form + 1) % 2
    pbChangeForm(newForm, nil)
    end
    end

    So how do I add the animation display here? or how do I add a custom animation?

    I mean maybe its not even here where i have to introduce the animation, maybe its some other script folder within rpg maker. As I said im new to this
     
    Last edited:
    So I dont think I understand, I´m new to this sorry.

    The line of code for the morpeko form change is this I think:

    # Morpeko - Hunger Switch
    if isSpecies?(:MORPEKO) && hasActiveAbility?(:HUNGERSWITCH) && endOfRound
    # Intentionally doesn't show the ability splash or a message
    newForm = (@form + 1) % 2
    pbChangeForm(newForm, nil)
    end
    end

    So how do I add the animation display here? or how do I add a custom animation?

    I mean maybe its not even here where i have to introduce the animation, maybe its some other script folder within rpg maker. As I said im new to this
    The edit belongs in pbChangeForm, just above the line that sets the form variable, self.form = newForm. However I don't believe mega evolution has an animation defined by default, so I'm not sure you can use that one to test. You can add new animations in the Battle Animation Editor in the Debug menu.
     
    The edit belongs in pbChangeForm, just above the line that sets the form variable, self.form = newForm. However I don't believe mega evolution has an animation defined by default, so I'm not sure you can use that one to test. You can add new animations in the Battle Animation Editor in the Debug menu.
    So basically what I wanna do is, with my very limited knowledge of ruby, be able to display an animation every time morpeko changes form (which he does at the end of every turn), as well as terapagos (which he does when his hability tera shift activate at the beggening of the battle). Okey so let´s say I have the animation created with the editor, what do I do now?. Sorry for the trouble I just dont know how to do it
     
    Last edited:
    So basically what I wanna do is, with my very limited knowledge of ruby, be able to display an animation every time morpeko changes form (which he does at the end of every turn), as well as terapagos (which he does when his hability tera shift activate at the beggening of the battle). Okey so let´s say I have the animation created with the editor, what do I do now?. Sorry for the trouble I just dont know how to do it
    So, to make this easy, let's pretend the animation you made is called Common:FormChange in the animation editor.
    Now we find def pbChangeForm (you can use CTRL+SHIFT+F to search all script sections at once).
    Find this bit
    Ruby:
        oldDmg = @totalhp - @hp
        self.form = newForm
    and make it this
    Ruby:
        oldDmg = @totalhp - @hp
        @battle.pbCommonAnimation("FormChange", self)
        self.form = newForm
     
    So, to make this easy, let's pretend the animation you made is called Common:FormChange in the animation editor.
    Now we find def pbChangeForm (you can use CTRL+SHIFT+F to search all script sections at once).
    Find this bit
    Ruby:
        oldDmg = @totalhp - @hp
        self.form = newForm
    and make it this
    Ruby:
        oldDmg = @totalhp - @hp
        @battle.pbCommonAnimation("FormChange", self)
        self.form = newForm
    I did as follows
    def pbChangeForm(newForm, msg)
    return if fainted? || @effects[PBEffects::Transform] || @form == newForm
    oldForm = @form
    oldDmg = @totalhp - @HP
    @battle.pbCommonAnimation("FormChange", self)
    self.form = newForm
    pbUpdate(true)
    @HP = @totalhp - oldDmg
    @effects[PBEffects::WeightChange] = 0 if Settings::MECHANICS_GENERATION >= 6
    @battle.scene.pbChangePokemon(self, @Pokemon)
    @battle.scene.pbRefreshOne(@IndeX)
    @battle.pbDisplay(msg) if msg && msg != ""
    PBDebug.log("[Form changed] #{pbThis} changed from form #{oldForm} to form #{newForm}")
    @battle.pbSetSeen(self)
    end

    And it doesnt work. Idk why
     
    I did as follows
    def pbChangeForm(newForm, msg)
    return if fainted? || @effects[PBEffects::Transform] || @form == newForm
    oldForm = @form
    oldDmg = @totalhp - @HP
    @battle.pbCommonAnimation("FormChange", self)
    self.form = newForm
    pbUpdate(true)
    @HP = @totalhp - oldDmg
    @effects[PBEffects::WeightChange] = 0 if Settings::MECHANICS_GENERATION >= 6
    @battle.scene.pbChangePokemon(self, @Pokemon)
    @battle.scene.pbRefreshOne(@IndeX)
    @battle.pbDisplay(msg) if msg && msg != ""
    PBDebug.log("[Form changed] #{pbThis} changed from form #{oldForm} to form #{newForm}")
    @battle.pbSetSeen(self)
    end

    And it doesnt work. Idk why
    Next time, surround code in code blocks. Not sure who you pinged with that.

    Do you actually have a battle animation called FormChange? See the wiki link for instructions on how to make an animation (I dontdon't really know how to do that part)
     
    Next time, surround code in code blocks. Not sure who you pinged with that.

    Do you actually have a battle animation called FormChange? See the wiki link for instructions on how to make an animation (I dontdon't really know how to do that part)
    Yes yes I have the .anm file in the root directory
     
    Back
    Top