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

Help Making Various Custom Abilities?

  • 58
    Posts
    9
    Years
    • Seen Oct 6, 2019
    I have some ideas for new abilities and would greatly appreciate if someone could suggest how to code them in Essentials.

    1.) Insectivore
    - Absorbs Bug attacks
    o damage and effect negation
    o 25% HP recovery
    o does not redirect attacks (i.e. Storm Drain or Lightning Rod)
    o Purely stat changing moves are exempt.
    o does not affect Sticky Web set up
    o does not affect Powder
    - Removes Sticky Web upon switch in
    o no HP recovery from Sticky Web removal
    - Possessor(s): Bellsprout line, Carnivine

    2.) Martial Block / Peace Maker
    - Gives full immunity against Fighting type moves
    o Purely stat changing moves are exempt.
    o does not redirect attacks
    - I would have simply copied Levitate's code, but I don't want its other effects (Sky Battles, Smack Down, Gravity, Iron Ball, Arena Trap immunity, etc.) on this ability.
    - I'm not sure whom to give this ability to. Perhaps an average Dark or Normal type? Recommendations?

    3.) Phantomize
    - A Ghost version of Refrigerate / Pixilate
    - Possessor(s): Golett line (It will be able to learn Body Slam in my fan-game.)

    4.) Reprisal
    - If the Pokemon is knocked out by attack damage, then the attacker is given a random Burn, Paralysis, Sleep, or severe Poisoning.
    o equal chance for each status condition to occur (25%)
    o type immunities to status still apply
    o also triggered by friendly K.O.s from teammates
    o functions like Mold Breaker when applying the status conditions
    o ignores Safety Goggles
    o If K.O.ed by U-turn or Volt Switch, the attacker is given the random status before switching out.
    - Possessor(s): Dusclops, Dusknoir.

    5.) Lithophagy
    - Absorbs Rock attacks
    o damage and effect negation
    o 25% HP recovery
    o does not redirect attacks
    o Purely stat changing moves are exempt.
    o does not affect Stealth Rock set up
    - Removes Stealth Rock upon switch in
    o no HP recovery from Stealth Rock removal
    - Possessor(s): Geodude & Roggenrola Lines

    6.) Inversion (or other name suggestion)
    - The Pokemon immediately activates Trick Room upon entering battle.
    o lasts for 5 turns
    o Add a +3 turns extension with an item? (Or, would be too unbalanced?)
    - Possessor(s): Elgyem & Solosis lines


    Thanks.
     
    Last edited:
    For INSECTIVORE ability, paste the following code after MOTORDRIVE script, in PokeBattle_Move:

    Code:
         if opponent.hasWorkingAbility(:INSECTIVORE) && isConst?(type,PBTypes,:BUG) &&
          pbIsDamaging?
          if opponent.effects[PBEffects::HealBlock]==0
            if opponent.pbRecoverHP((opponent.totalhp/4).floor,true)>0
              @battle.pbDisplay(_INTL("{1}'s {2} restored its HP!",
                 opponent.pbThis,PBAbilities.getName(opponent.ability)))
            else
              @battle.pbDisplay(_INTL("{1}'s {2} made {3} useless!",
                 opponent.pbThis,PBAbilities.getName(opponent.ability),@name))
            end
            return true
          end
        end

    To remove Sticky Web, replace the original code in PokeBattle_Battle (I pasted the original one for backup copy):
    Code:
           if pkmn.pbOwnSide.effects[PBEffects::StickyWeb] && !pkmn.isFainted? &&
             !pkmn.isAirborne?(moldbreaker)
            if pkmn.pbCanReduceStatStage?(PBStats::SPEED,nil,false,nil,moldbreaker)
              PBDebug.log("[Entry hazard] #{pkmn.pbThis} triggered Sticky Web")
              pbDisplayPaused(_INTL("{1} was caught in a sticky web!",pkmn.pbThis))
              pkmn.pbReduceStat(PBStats::SPEED,1,nil,false,nil,true,moldbreaker)
            end
          end

    With this:
    Code:
           if pkmn.pbOwnSide.effects[PBEffects::StickyWeb] && !pkmn.isFainted?
            if pkmn.hasWorkingAbility(:INSECTIVORE)
                pkmn.pbOwnSide.effects[PBEffects::StickyWeb]=false
                pbDisplayPaused(_INTL("{1} removes Sticky Web on its side of the field!",pkmn.pbThis))
            else
              if !pkmn.isAirborne?(moldbreaker)
                if pkmn.pbCanReduceStatStage?(PBStats::SPEED,nil,false,nil,moldbreaker)
                  PBDebug.log("[Entry hazard] #{pkmn.pbThis} triggered Sticky Web")
                  pbDisplayPaused(_INTL("{1} was caught in a sticky web!",pkmn.pbThis))
                  pkmn.pbReduceStat(PBStats::SPEED,1,nil,false,nil,true,moldbreaker)
                end
              end
            end
          end

    For MARTIALBLOCK or PEACEMAKER abilities, paste the following code before WONDERGUARD script, in PokeBattle_Battler:
    Code:
          if isConst?(type,PBTypes,:FIGHTING) && !target.hasWorkingItem(:RINGTARGET)
            if !user.hasMoldBreaker && (target.hasWorkingAbility(:MARTIALBLOCK) ||
              target.hasWorkingAbility(:PEACEMAKER))
              @battle.pbDisplay(_INTL("{1} makes Fighting moves miss with {2}!",target.pbThis,PBAbilities.getName(target.ability)))
              return false
            end
          end

    I think that is better to give this ability to dark type Pokémon, because they've low defense stats.

    For PHANTOMIZE go, first of all, to def pbModifyType(type,attacker,opponent) in PokeBattle_Move script section and, after this:
    Code:
          elsif attacker.hasWorkingAbility(:PIXILATE)
            type=getConst(PBTypes,:FAIRY) || 0
            @powerboost=true

    add this:
    Code:
          elsif attacker.hasWorkingAbility(:PHANTOMIZE)
            type=getConst(PBTypes,:GHOST) || 0
            @powerboost=true

    Then, always in PokeBattle_Move script section, find and replace the old:
    Code:
        if (attacker.hasWorkingAbility(:AERILATE) ||
           attacker.hasWorkingAbility(:REFRIGERATE) ||
           attacker.hasWorkingAbility(:PIXILATE)) && @powerboost
          damagemult=(damagemult*1.3).round
        end

    with this:
    Code:
        if (attacker.hasWorkingAbility(:AERILATE) ||
           attacker.hasWorkingAbility(:REFRIGERATE) ||
           attacker.hasWorkingAbility(:PIXILATE) ||
           attacker.hasWorkingAbility(:PHANTOMIZE)) && @powerboost
          damagemult=(damagemult*1.3).round
        end

    For REPRISAL ability, paste the following code after CURSEDBODY script, in PokeBattle_Battler:
    Code:
            if target.hasWorkingAbility(:REPRISAL,true) && target.isFainted? &&
               !user.isFainted?
              case @battle.pbRandom(4)
              when 0
                if user.pbCanPoison?(nil,false)
                  user.pbPoison(target,_INTL("{1}'s {2} badly poisoned {3}!",target.pbThis,
                    PBAbilities.getName(target.ability),user.pbThis(true)),true)
                end
              when 1
                if user.pbCanSleep?(nil,false)
                  user.pbSleep(_INTL("{1}'s {2} made {3} fall asleep!",target.pbThis,
                    PBAbilities.getName(target.ability),user.pbThis(true)))
                end
              when 2
                if user.pbCanParalyze?(nil,false)
                  user.pbParalyze(target,_INTL("{1}'s {2} paralyzed {3}! It may be unable to move!",
                    target.pbThis,PBAbilities.getName(target.ability),user.pbThis(true)))
                end
              when 3
                if user.pbCanBurn?(nil,false)
                  user.pbBurn(target,_INTL("{1}'s {2} burned {3}!",
                    target.pbThis,PBAbilities.getName(target.ability),user.pbThis(true)))
                end
              end
            end

    To correct Sleep Status error, go to PokeBattler_BattlerEffects script section and replace the old line 28:
    Code:
    if attacker.hasBypassingAbility || !hasWorkingAbility(:SOUNDPROOF)

    With this:
    Code:
    if (attacker && attacker.hasMoldBreaker) || !hasWorkingAbility(:SOUNDPROOF)

    For LITHOPHAGY ability, paste the following code after INSECTIVORE script, in PokeBattle_Move:
    Code:
        if opponent.hasWorkingAbility(:LITHOPHAGY) && isConst?(type,PBTypes,:ROCK) &&
        pbIsDamaging?
          if opponent.effects[PBEffects::HealBlock]==0
            if opponent.pbRecoverHP((opponent.totalhp/4).floor,true)>0
              @battle.pbDisplay(_INTL("{1}'s {2} restored its HP!",
                 opponent.pbThis,PBAbilities.getName(opponent.ability)))
            else
              @battle.pbDisplay(_INTL("{1}'s {2} made {3} useless!",
                 opponent.pbThis,PBAbilities.getName(opponent.ability),@name))
            end
            return true
          end
        end

    To remove Stealth Rocks, replace the original code in PokeBattle_Battle:
    Code:
          # Original Stealth Rock code
          if pkmn.pbOwnSide.effects[PBEffects::StealthRock] && !pkmn.isFainted?
            if !pkmn.hasWorkingAbility(:MAGICGUARD)
              atype=getConst(PBTypes,:ROCK) || 0
              eff=PBTypes.getCombinedEffectiveness(atype,pkmn.type1,pkmn.type2)
              if eff>0
                PBDebug.log("[Entry hazard] #{pkmn.pbThis} triggered Stealth Rock")
                @scene.pbDamageAnimation(pkmn,0)
                pkmn.pbReduceHP(((pkmn.totalhp*eff)/32).floor)
                pbDisplayPaused(_INTL("Pointed stones dug into {1}!",pkmn.pbThis))
              end
            end
          end

    With this:
    Code:
          # Stealth Rock
          if pkmn.pbOwnSide.effects[PBEffects::StealthRock] && !pkmn.isFainted?
            if pkmn.hasWorkingAbility(:LITHOPHAGY)
              pkmn.pbOwnSide.effects[PBEffects::StealthRock]=false
              pbDisplayPaused(_INTL("{1} blew up stealth rocks on its side of the field!",pkmn.pbThis))
            else  
              if !pkmn.hasWorkingAbility(:MAGICGUARD)
                atype=getConst(PBTypes,:ROCK) || 0
                eff=PBTypes.getCombinedEffectiveness(atype,pkmn.type1,pkmn.type2)
                if eff>0
                  PBDebug.log("[Entry hazard] #{pkmn.pbThis} triggered Stealth Rock")
                  @scene.pbDamageAnimation(pkmn,0)
                  pkmn.pbReduceHP(((pkmn.totalhp*eff)/32).floor)
                  pbDisplayPaused(_INTL("Pointed stones dug into {1}!",pkmn.pbThis))
                end
              end
            end
          end

    For DECEPTION ability, paste the following code before AIRBALLOON script, in PokeBattle_Battler.
    Code:
         if self.hasWorkingAbility(:DECEPTION) && onactive
          if @battle.field.effects[PBEffects::TrickRoom]>0
            @battle.field.effects[PBEffects::TrickRoom]=0
            @battle.pbDisplay(_INTL("{1}'s {2} reverted the dimensions!",self.pbThis,PBAbilities.getName(self.ability)))
          else
            @battle.field.effects[PBEffects::TrickRoom]=5
            @battle.pbDisplay(_INTL("{1}'s {2} twisted the dimensions!",self.pbThis,PBAbilities.getName(self.ability)))
          end
        end

    I hope that my codes are what you're looking for.
     
    Last edited:
    (Update)

    I have had mixed results with making these abilities work.

    Martial Block & False Truce (I gave the latter to Dark types and so changed its name.):
    - success
    - works properly with Mold Breaker and Ring Target

    Phantomize:
    - partial success
    - turns ALL moves into Ghost type
    - I didn't modify Aerilate, Pixilate, and Refrigerate, but they have the same type-changing error
    - current code in PokeBattle_Move:

    Code:
    # About the move
    ################################################################################
      def totalpp
        return @totalpp if @totalpp && @totalpp>0
        return @thismove.totalpp if @thismove
        return 0
      end
    
      def addlEffect
        return @addlEffect
      end
    
      def to_int
        return @id
      end
    
      def pbModifyType(type,attacker,opponent)
        if type>=0
          if attacker.hasWorkingAbility(:NORMALIZE)
            type=getConst(PBTypes,:NORMAL) || 0
          elsif attacker.hasWorkingAbility(:AERILATE)
            type=getConst(PBTypes,:FLYING) || 0
            @powerboost=true
          elsif attacker.hasWorkingAbility(:REFRIGERATE)
            type=getConst(PBTypes,:ICE) || 0
            @powerboost=true
          elsif attacker.hasWorkingAbility(:PHANTOMIZE)
            type=getConst(PBTypes,:GHOST) || 0
            @powerboost=true  
          elsif attacker.hasWorkingAbility(:PIXILATE)
            type=getConst(PBTypes,:FAIRY) || 0
            @powerboost=true
          end
        end
        return type
      end
    
    ###################################

    And also:

    Code:
    ##################################################
     if attacker.hasWorkingAbility(:SHEERFORCE) && self.addlEffect>0
          damagemult=(damagemult*1.3).round
        end
        if attacker.hasWorkingAbility(:TOUGHCLAWS) && isContactMove?
          damagemult=(damagemult*4/3).round
        end
        if (attacker.hasWorkingAbility(:AERILATE) ||
           attacker.hasWorkingAbility(:REFRIGERATE) ||
           attacker.hasWorkingAbility(:PHANTOMIZE) ||
           attacker.hasWorkingAbility(:PIXILATE)) && @powerboost
          damagemult=(damagemult*1.3).round
        end
        if (@battle.pbCheckGlobalAbility(:DARKAURA) && isConst?(type,PBTypes,:DARK)) ||
           (@battle.pbCheckGlobalAbility(:FAIRYAURA) && isConst?(type,PBTypes,:FAIRY))
          if @battle.pbCheckGlobalAbility(:AURABREAK)
            damagemult=(damagemult*2/3).round
          else
            damagemult=(damagemult*4/3).round
          end
        end
    
    #################################################################

    Lithophagy & Insectivore:
    - partial success
    - properly absorb Rock and Bug attacks, respectively
    - but, DO NOT remove Stealth Rock and Sticky Web upon entry

    I copied the replacement codes that you provided, but the portions concerning entry hazard removal for each ability do not function.

    Reprisal:
    - fails
    - In PokeBattle_Battler, gives syntax error on this piece of the code:

    Code:
    ###########################################
     when 3
                if user.pbCanBurn?(nil,false)
                  user.pbBurn(target,_INTL("{1}'s {2} burned {3}!",
                    target.pbThis,PBAbilities.getName(target.ability),user.pbThis(true)))
                end
              end
            end
    #################################
    I fiddled around and fixed this line but then got a syntax error on the final line of PokeBattle_Battler editor. Once I nudged it some, errors began popping up in:

    PokeBattle Clauses:

    Code:
    ###########################################
    class PokeBattle_Battler
      unless @__clauses__aliased
        alias __clauses__pbCanSleep? pbCanSleep?
        alias __clauses__pbCanSleepYawn? pbCanSleepYawn?
        alias __clauses__pbCanFreeze? pbCanFreeze?
        alias __clauses__pbUseMove pbUseMove
        @__clauses__aliased=true
      end
    ########################
    (The problem line was the one after pbCanFreeze?)

    After fixing the above line, I get an error in the ShadowPokemon section at line 536:

    Code:
    ##################################
      
    alias __shadow_pbEndTurn pbEndTurn
    
    ##################################

    Also, I forgot to mention: I would like for Reprisal to activate upon any attack damage K.O., whether physical or special, contact or not.

    Deception:
    Yes, move-activated Trick Room should disappear when a Pokemon with this ability enters the field. Would it be unbalanced to add an item that extends the effect to 8 turns, like for weather effects? Or, would that make the ability overpowered?

    Grazie per l'aiuto, signore.
     
    Last edited by a moderator:
    Code:
    # About the move
    ################################################################################
      def totalpp
        return @totalpp if @totalpp && @totalpp>0
        return @thismove.totalpp if @thismove
        return 0
      end
    
      def addlEffect
        return @addlEffect
      end
    
      def to_int
        return @id
      end
    
      def pbModifyType(type,attacker,opponent)
        if type>=0[COLOR="Red"] && attacker.hasWorkingAbility(:NORMALIZE)[/COLOR]
          type=getConst(PBTypes,:NORMAL) || 0[COLOR="Red"]
        end
        if type==0[/COLOR]
          if attacker.hasWorkingAbility(:AERILATE)
            type=getConst(PBTypes,:FLYING) || 0
            @powerboost=true
          elsif attacker.hasWorkingAbility(:REFRIGERATE)
            type=getConst(PBTypes,:ICE) || 0
            @powerboost=true
          elsif attacker.hasWorkingAbility(:PHANTOMIZE)
            type=getConst(PBTypes,:GHOST) || 0
            @powerboost=true  
          elsif attacker.hasWorkingAbility(:PIXILATE)
            type=getConst(PBTypes,:FAIRY) || 0
            @powerboost=true
          end
        end
        return type
      end
    
    ###################################

    Try this for your Ghost-type Pixilate.
     
    I'm updating my main post, but i would like to know what version do you use.
    However, yes. Giving an item to a Pokémon that increases the duration of Trick Room it's, in my opinion, enough unbalanced.
     
    Last edited:
    @Rot8er ConeX

    Your code addition fixed the problem with Phantomize, Aerilate, etc. Thanks. :-)

    @Folle64

    I have Essentials V16.1.
     
    @Folle64

    update:

    Insectivore
    and Lithophagy: They now work fully and remove Sticky Web + Stealth Rock in addition to the health restoration effect.

    Deception: completely functional.

    Reprisal: This one is still giving problems. The playtester loads up without any issues. However, when I knock out multiple practice Dusclops, I get the following outcomes:
    - burn: works fine (~30% occurrence)
    - bad poisoning: works fine (~40% occurrence)
    - paralysis: After 20 practice KOs, paralysis never happened.
    - sleep: I get an error (~30% occurrence)

    Here's the error:

    ##############################################

    Exception: NoMethodError
    Message: undefined method `hasMoldBreaker' for nil:NilClass
    PokeBattle_BattlerEffects:28:in `__clauses__pbCanSleep?'
    PokeBattle_Clauses:100:in `pbCanSleep?'
    PokeBattle_Battler:1388:in `pbEffectsOnDealingDamage'
    PokeBattle_Battler:2782:in `pbProcessMoveAgainstTarget'
    PokeBattle_Battler:2701:in `each'
    PokeBattle_Battler:2701:in `pbProcessMoveAgainstTarget'
    PokeBattle_Battler:3191:in `pbUseMove'
    PokeBattle_Battler:3171:in `loop'
    PokeBattle_Battler:3194:in `pbUseMove'
    [FONT=&quot]PokeBattle_Battler:3390:in `pbProcessTurn'

    ############################################
    [/FONT]
     
    Last edited:
    I updated the main post and sleep status should work now. About paralysis status, i can tell you that it's just bad luck (in my tests it works fine).
     
    I'm still getting the sleep error. :-/

    Also, I finally got paralysis. (2/28 times so far)
     
    Last edited:
    I found the solution! There is a little mistake made by developers of Essentials. So, I updated the main post with the correction of this problem. I'm going to report this bug to Maruno.
     
    *New abilities, part 2*

    Some more ideas:

    Parasitic
    - restores 50% more HP from draining moves
    - possessor(s): Zubat line (others?)

    Bone Helmet
    - reduces damage from special attacks by 1/2
    - possessor(s): Cubone line (others?)

    Scraps (name suggestions?)
    - doubles recovery from Leftovers
    - possessor(s): Munchlax line
    (Would it be appropriate to include a sister ability for Poison types to use with Black Sludge?)

    Quick Block
    - gives complete immunity to damaging priority moves
    - possessor(s): a mediocre fast Pokemon???

    Marvel Force
    - Sp. Def version of Marvel Scale
    - possessor(s): Pokemon suggestions?

    As before, programming guidance would be much appreciated.
     
    Back
    Top