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

[Scripting Question] Mega Evolution with Zen Mode Ability

157
Posts
8
Years
    • Seen Apr 25, 2024
    I'm trying to create a mega evolution which can change form, I thought the simplest way to do this would be to give the Mega Evolution the ability Zen Mode.

    When I try to do this I get an automatic Mega evolution when the Pokemon is sent into battle but the ability will activate as normal.

    In the Battlers folder I have the Mega evolution sprite as 009_1 and the Zen mode sprite as 009_2
    just wondered does anyone know how to stop the automatic evolution or is there a better way of doing this?

    My current method was to
    - set up a basic mega evolution
    - set up an another form
    - Give the mega the ability

    I'm not sure if i've missed anything but if anyone could help that would be great
     
    25
    Posts
    8
    Years
    • Seen May 30, 2018
    The script for Zen Mode within script section "PokeBattle_Battler" is:
    if isConst?(self.species,PBSpecies,:DARMANITAN)
    if self.hasWorkingAbility(:ZENMODE) && @hp<=((@totalhp/2).floor)
    if self.form!=1
    self.form=1; transformed=true
    end
    else
    if self.form!=0
    self.form=0; transformed=true
    end
    end
    end
    The "@hp<=((@totalhp/2).floor)" probably checks for 1/2 HP in order to transform. You can check if you have that in your own script.

    You can also try something without relying on Zen Mode as well.

    I was working on something similar to this about a week ago, Here's what I did in general:
    if isConst?(self.species,PBSpecies,: POKEMONNAME) && hp>0
    case @battle.pbWeather
    when PBWeather:: SUNNYDAY
    if self.form==1
    self.form=2
    transformed=true
    end
    else
    if self.form==2
    self.form=1
    transformed=true
    end
    end
    end
    This allowed for a Mega Evolved Pokemon to form change during Sunny Day.

    And yes, I believe naming the changed form sprite as "_2" is right.
     
    157
    Posts
    8
    Years
    • Seen Apr 25, 2024
    Yeah Zen Mode is basically what I want to happen,
    Its just i only want the mega form to have the ability but it seems to activate mega evolution straight away
     
    Back
    Top