• 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!
  • Dawn, Gloria, Juliana, or Summer - which Pokémon protagonist is your favorite? Let us know by voting in our poll!
  • 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] Darmanitan Changing Back

  • 68
    Posts
    5
    Years
    • Seen Nov 9, 2023
    Does anyone know how to make it so Unovian and Galarian Zen Mode will turn back into their respective Standard Modes? I've tried many times, but it always ends with both of them changing back to the same form every time.
     
    I know, I've tried editing those sections multiple times, but nothing seems to work for me. I was wondering if anyone had a working script for this, because nothing I do seems to work.
     
    I have a script that seems to be working. Find '# Zen Mode', replace the code for it with this:
    Code:
        # Zen Mode
        if isConst?(self.species,PBSpecies,:DARMANITAN)
          if self.hasWorkingAbility(:ZENMODE) && @hp<=((@totalhp/2).floor)
            if self.form==0
              self.form=1; transformed=true
            elsif self.form==2
              self.form=3; transformed=true
            end
          else
            if self.form==1
              self.form=0; transformed=true
            elsif self.form==3
              self.form=2; transformed=true
            end
          end
        end
    This assumes that you have Galarian Darmanitan as form 2 and Zen Mode Galarian Darmanitan as form 3.
     
    I made a better code for it. Zen Mode will only be activated when start the battle and into the end of round (instead turn). Check here.
     
    I still don't know how to make it so it resets to the right form after battle. Right now, it keeps resetting to the Unovian Standard Mode, even if it was a Galarian Form.
     
    I still don't know how to make it so it resets to the right form after battle. Right now, it keeps resetting to the Unovian Standard Mode, even if it was a Galarian Form.

    Ah yes, you're right. I forgot to include that. I think it will work if you find 'def pbResetForm' and replace it with this:
    Code:
      def pbResetForm
        if !@effects[PBEffects::Transform]
          if isConst?(self.species,PBSpecies,:CASTFORM) ||
             isConst?(self.species,PBSpecies,:CHERRIM) ||
             isConst?(self.species,PBSpecies,:MELOETTA) ||
             isConst?(self.species,PBSpecies,:AEGISLASH) ||
             isConst?(self.species,PBSpecies,:XERNEAS) ||
             isConst?(self.species,PBSpecies,:GRENINJA) ||
             isConst?(self.species,PBSpecies,:CRAMORANT) ||
             isConst?(self.species,PBSpecies,:MIMIKYU)
            self.form=0
          end
          if isConst?(self.species,PBSpecies,:DARMANITAN)
            if self.form==1 || self.form==3
              self.form-=1
            end
          end
        end
        pbUpdate(true)
      end
     
    Or you installed wrong:
    [PokeCommunity.com] Darmanitan Changing Back

    The problem I'm having with your script is that whenever Zygarde becomes complete and I switch it out, it stays Complete once the battle ends. It only resets its form if I don't switch it out.
     
    The problem I'm having with your script is that whenever Zygarde becomes complete and I switch it out, it stays Complete once the battle ends. It only resets its form if I don't switch it out.

    In the start of the script, he gave the link to multiple scripts he has used and edited. Wolf's script isn't a standalone script, its edits of the scripts he has linked above. You need to add those and then add Wolf's Edits.
     
    Back
    Top