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

[Essentials v17.2] Gen 8 stuffs (Abilities, Items & Move)

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024
Nice shot! Also, remember to add 'ignoreMirrorArmor' for CONTRARY ability code, when you stat would be increased but will be decreased thanks to ability or will trigger error about that.
OK but I use ignoremirror. Also, if ignoremirror is left, it is set to false so it is unlikely for the error to happen and mirror armor can't be triggered from stat-increasing effect. But i bet I will do something about it to make sire if contrary gets activated due to mirror armor, it must be shown the message for Mirror Armor activation as well for Contrary.

EDIT: I managed to fix it but unfortunately I won't sent the fixed version right away.
 
Last edited:

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Dauntless Shield, Zamazenta's signature ability and Intrepid Swords, Zacian's signature ability:

In ability.txt (XXX will be your last number):
Code:
XXX,INTREPIDSWORDS,Intrepid Sword,"Boosts the Pokémon's Attack stat when the Pokémon enters a battle."
XXX,DAUNTLESSSHIELD,Dauntless Shield,"Boosts the Pokémon's Defense stat when the Pokémon enters a battle."

Now, inside 'PokeBattle_Battler' script, above Air Ballon's code, paste (like):
Code:
    # Dauntless Shield
    if self.hasWorkingAbility(:DAUNTLESSSHIELD) && onactive
      if pbIncreaseStatWithCause(PBStats::DEFENSE,1,self,PBAbilities.getName(ability))
        PBDebug.log("[Ability triggered] #{pbThis}'s Dauntless Shield (raising Defense)")
      end
    end
    # Intrepid Sword
    if self.hasWorkingAbility(:INTREPIDSWORD) && onactive
      if pbIncreaseStatWithCause(PBStats::ATTACK,1,self,PBAbilities.getName(ability))
        PBDebug.log("[Ability triggered] #{pbThis}'s Intrepid Sword (raising Attack)")
      end
    end
    # Air Balloon message
    if self.hasWorkingItem(:AIRBALLOON) && onactive
      @battle.pbDisplay(_INTL("{1} floats in the air with its {2}!",pbThis,PBItems.getName(self.item)))
    end
  end

  def pbEffectsOnDealingDamage(move,user,target,damage)
 
Last edited:

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Punk Rock, Toxtricity's signature ability:
In ability.txt, paste (XXX will be your last number):
Code:
XXX,PUNKROCK,Punk Rock,"Boosts the power of sound-based moves. The Pokémon also takes half the damage from these finds of moves."

Now, in 'PokeBattle_Move' script, 'def pbCalcDamage(attacker,opponent,options=0)', below TOXICBOOST's code:
Code:
    if attacker.hasWorkingAbility(:TOXICBOOST) &&
       attacker.status==PBStatuses::POISON && pbIsPhysical?(type)
      damagemult=(damagemult*1.5).round
    end
    if attacker.hasWorkingAbility(:PUNKROCK) && isSoundBased?
      damagemult=(damagemult*1.3).round
    end
    if attacker.hasWorkingAbility(:ANALYTIC) &&

And for defense, below 'if opponent.hasWorkingAbility(:FURCOAT) &&':
Code:
      if opponent.hasWorkingAbility(:FURCOAT) &&
         (pbIsPhysical?(type) || @function==0x122) # Psyshock
        damagemult=(damagemult*0.5).round
      end
      if opponent.hasWorkingAbility(:PUNKROCK) && isSoundBased?
        damagemult=(damagemult*0.5).round
      end
      if opponent.hasWorkingAbility(:DRYSKIN) && isConst?(type,PBTypes,:FIRE)
 
Last edited:

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Wandering Spirit, Runerigus's signature ability:

In ability.txt, add (XXX will be your last number):
Code:
XXX,WANDERINGSPIRIT,Wandering Spirit,"The Pokémon exchanges Abilities with a Pokémon that hits it with a move that makes direct contact."

Now, in 'PokeBattle_Battler' script, below POISON TOUCH's code (inside 'def pbEffectsOnDealingDamage(move,user,target,damage)', in 'if damage>0 && move.isContactMove?(user)'), paste:
Code:
        if target.hasWorkingAbility(:WANDERINGSPIRIT,true) && !user.fainted?
          if !isConst?(user.ability,PBAbilities,:WONDERGUARD)
            PBDebug.log("[Ability triggered] #{target.pbThis}'s Wandering Spirit swapped #{PBAbilities.getName(user.ability)}")
            tmp=user.ability; user.ability=target.ability; target.ability=tmp
            @battle.pbDisplay(_INTL("{1} swapped Abilities with its target!",target.pbThis))
            user.pbAbilitiesOnSwitchIn(true); target.pbAbilitiesOnSwitchIn(true)
          end
        end
 
Last edited:

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024
I also have coded Ripen Ability as well
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
I also have coded Ripen Ability as well

Well, share with us you want to o.o don't need to "flood" posting only it xD

Anyway,

Screen Cleaner, Mr. Rime signature ability:
In ability.txt, paste (XXX will be your last number):
Code:
XXX,SCREENCLEANER,Screen Cleaner,"When the Pokémon enters a battle, the effects of Light Screen, Reflect, and Aurora Veil are nullified for both opposing and ally Pokémon."

Now, in 'PokeBattle_Battler' script, above IMPOSTER's code, paste:
Code:
    #Screen Cleaner
    if self.hasWorkingAbility(:SCREENCLEANER) && onactive
      if self.pbOwnSide.effects[PBEffects::LightScreen]>0 || self.pbOpposingSide.effects[PBEffects::LightScreen]>0 || 
      self.pbOwnSide.effects[PBEffects::Reflect]> 0 || self.pbOpposingSide.effects[PBEffects::Reflect]>0 ||
      self.pbOwnSide.effects[PBEffects::AuroraVeil]>0 || self.pbOpposingSide.effects[PBEffects::AuroraVeil]>0
        if self.pbOwnSide.effects[PBEffects::LightScreen]>0; self.pbOwnSide.effects[PBEffects::LightScreen]=0
          @battle.pbDisplay(_INTL("Your team's Light Screen wore off!"))
        end
        if self.pbOpposingSide.effects[PBEffects::LightScreen]>0; self.pbOpposingSide.effects[PBEffects::LightScreen]=0
          @battle.pbDisplay(_INTL("The opposing team's Light Screen wore off!"))
        end
        if self.pbOwnSide.effects[PBEffects::Reflect]>0; self.pbOwnSide.effects[PBEffects::Reflect]=0
          @battle.pbDisplay(_INTL("Your team's Reflect wore off!"))
        end
        if self.pbOpposingSide.effects[PBEffects::Reflect]>0; self.pbOpposingSide.effects[PBEffects::Reflect]=0
          @battle.pbDisplay(_INTL("The opposing team's Reflect wore off!"))
        end
        if self.pbOwnSide.effects[PBEffects::AuroraVeil]>0; self.pbOwnSide.effects[PBEffects::AuroraVeil]=0 
          @battle.pbDisplay(_INTL("Your team's Aurora Veil wore off!"))
        end
        if self.pbOpposingSide.effects[PBEffects::AuroraVeil]>0; self.pbOpposingSide.effects[PBEffects::AuroraVeil]=0
          @battle.pbDisplay(_INTL("The opposing team's Aurora Veil wore off!"))
        end
      end
    end
    # Imposter
    if self.hasWorkingAbility(:IMPOSTER) && !@effects[PBEffects::Transform] && onactive
P.S: If you know how to simplify, please share with us; We don't know the official phrases. I copied from Psychic Fangs.
 

WolfPP

Spriter/ Pixel Artist
1,309
Posts
5
Years
Hunger Switch, Morpeko's signature ability
In ability.txt, paste (XXX will be your last number):
Code:
XXX,HUNGERSWITCH,Hunger Switch,"The Pokémon changes its form, alternating between its Full Belly Mode and Hangry Mode after the end of each turn."

Now, in 'PokeBattle_Battle' script, below SLOWSTART's code (when 'i.turncount==6'), paste:
Code:
    # Slow Start's end message
    if i.hasWorkingAbility(:SLOWSTART) && i.turncount==6
      pbDisplay(_INTL("{1} finally got its act together!",i.pbThis))
    end
    for i in priority
      next if i.fainted?
      # Hunger Switch
      if i.hasWorkingAbility(:HUNGERSWITCH) && isConst?(i.species,PBSpecies,:MORPEKO)
        i.form=(i.form==0) ? 1 : 0
        i.pbUpdate(true)
        scene.pbChangePokemon(i,i.pokemon)
        @battle.pbDisplay(_INTL("{1} transformed!",i.pbThis))
        PBDebug.log("[Form changed] #{i.pbThis} changed to form #{i.form}")
      end
    end
    # Form checks
    for i in 0...4
      next if @battlers[i].fainted?
      @battlers[i].pbCheckForm
    end
 
Last edited:

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024

Screen Cleaner Ability (Alt version)

Spoiler:

Put this before Trace ability code
 
Last edited:

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024

Dauntless Shield (Alt version)

Code:
    # Dauntless Shield
    if self.hasWorkingAbility(:DAUNTLESSSHIELD) && onactive
      if pbIncreaseStatWithCause(PBStats::DEFENSE,1,self,PBAbilities.getName(ability))
        PBDebug.log("[Ability triggered] #{pbThis}'s Dauntless Shield")
      end
    end
Put this after download code. My version of Dauntless Shield (To be used on Kore) will increase the user's defense by 1 stage when it enters battle.
 

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024

Ripen Ability

Replace (or adapt) the defs pbConfusionBerry, pbStatIncreasingBerry and pbActivateBerryEffect with the following codes
Spoiler:

Code:
  def pbStatIncreasingBerry(stat,berryname)
    if hasWorkingAbility(:RIPEN)
      return pbIncreaseStatWithCause(stat,2,self,berryname)
    else
      return pbIncreaseStatWithCause(stat,1,self,berryname)
    end
  end
Spoiler:


You have successfully implemented the ability!!!!
 
Last edited:
17
Posts
8
Years
  • Age 26
  • Seen today
alright now that the datamines have dropped... anybody wants to claim a specific mechanic that they would like to implement?
I would suggest making a complete v17.2 Essentials with all mechanics upto Gen7 first and then adding changes onto that
maybe even making a GitHub of a single Essentials on which we'll add all the Gen8 stuff...

anyway, on the topic at hand, I'd like to claim all the Redirection-related stuffs... so basically Snipe Shot and Stalwart/PropellerTail
mostly because Maruno just recently discovered that RagePowder isn't exactly the same as FollowMe because Grass-types are immune to RagePowder because Powder-moves
so I plan to also add that change in it once I'm done
 

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024
alright now that the datamines have dropped... anybody wants to claim a specific mechanic that they would like to implement?
I would suggest making a complete v17.2 Essentials with all mechanics upto Gen7 first and then adding changes onto that
maybe even making a GitHub of a single Essentials on which we'll add all the Gen8 stuff...

anyway, on the topic at hand, I'd like to claim all the Redirection-related stuffs... so basically Snipe Shot and Stalwart/PropellerTail
mostly because Maruno just recently discovered that RagePowder isn't exactly the same as FollowMe because Grass-types are immune to RagePowder because Powder-moves
so I plan to also add that change in it once I'm done

I have coded these abilities as well. Only four Gen8 abilities are uncoded in my game.
 
17
Posts
8
Years
  • Age 26
  • Seen today
so I started off with a few moves based on whatever info we have at the moment... I'll update this post if we find out more about these moves later on

Magic Powder (takes up a modified version of Soak's function code)

PBS Entry (it appears to be an exact copy of Soak anyway):
Spoiler:

Code:
Spoiler:

and here's Bolt Beak / Fishous Rend (this one I have based off of Payback's code)

PBS entry:
Spoiler:

Code:
Spoiler:

EDITS: Magic Powder is a powder-based move so I have edited the PBS Entry to reflect that. Same for Fishious Rend being a Biting-move. Bolt Beak & Fishious Rend also work for switch-ins, which is yet to be accounted for.
 
Last edited:

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024

Ice Scales ability (Find Fur Coat's code and paste this)

Code:
      if opponent.hasWorkingAbility(:ICESCALES) && pbIsSpecial?(type)
        damagemult=(damagemult*0.5).round
      end

Magic Powder Function (Alt code)

Spoiler:
 
Last edited:

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024

Teatime Code (It is the signature move of Polteageist)

Spoiler:
 
20
Posts
11
Years
  • Seen Sep 11, 2022
I've managed to create EXP candies.

In PItem_ItemEffects underneath this:
Spoiler:

Add these puppies:
Spoiler:


Then hop down to PokeBattle_Pokemon and find and add whats in red:
Spoiler:


And add these to your Items PBS(Don't forget to change XXX to something that'll work for you):
Spoiler:


And that's it. Surprisingly straight forward. A thing to note: any levels that you pass won't won't trigger any moves you'd learn on them. For example if you use an XL Candy at level five you'll fly up to level 32 but won't learn any moves that say were at levels 12, 17, 22, and 27. Do not pass go do not collect 200 dollars :( ,however, you will learn whatever is at 32, and evolve if you've met the criteria. Let me know if you get any errors and I'll see what I can do to help.
(Images are from https://www.serebii.net/swordshield/newitems.shtml resized and transparent for your pleasure :)
 

Attachments

  • item678.png
    item678.png
    447 bytes · Views: 1,176
  • item679.png
    item679.png
    629 bytes · Views: 1,171
  • item680.png
    item680.png
    597 bytes · Views: 1,168
  • item681.png
    item681.png
    638 bytes · Views: 1,169
  • item682.png
    item682.png
    665 bytes · Views: 1,181

Diegou18

Forever Chandelure lover.
75
Posts
6
Years
  • Age 25
  • Seen Aug 16, 2021
Next, find where Delta Stream ability code exists. Now we add this after the strong winds weather initialization with DeltaStream:
Code:
      # Neutralizing Gas
      if self.hasWorkingAbility(:NEUTRALIZINGGAS) && [email protected][PBEffects::NeutralizingGas]  # Not hasWorkingAbility (We need to be workable even if other abilities supressed)
        @battle.field.effects[PBEffects::NeutralizingGas]=true
        PBDebug.log("[Ability triggered] #{pbThis}'s Neutralizing Gas started")
      end

Could you (or anyone else) post where you put it? I mean, the texts that there're before and after the code of the ability, please.
Thanks.

EDIT: Oh, and I've tested the script, it works good when it supresses abilities (by the way, it doesn't show the message of the ability when it's triggered or when you switch the Pokémon and the ability stops working, that's why I was asking the place where you put it before), but when you switch the Pokémon with Neutralizing Gas, the abilities don't activate again. I used a Gyarados and a Tapu Koko. Intimidation and Electric Surge don't activate, but when I switch my Weezing, those abilities don't activate again like it should happens.
 
Last edited:

HM100

HM100 the Techno
113
Posts
7
Years
  • Age 23
  • Seen Apr 27, 2024
Could you (or anyone else) post where you put it? I mean, the texts that there're before and after the code of the ability, please.
Thanks.

EDIT: Oh, and I've tested the script, it works good when it supresses abilities (by the way, it doesn't show the message of the ability when it's triggered or when you switch the Pokémon and the ability stops working, that's why I was asking the place where you put it before), but when you switch the Pokémon with Neutralizing Gas, the abilities don't activate again. I used a Gyarados and a Tapu Koko. Intimidation and Electric Surge don't activate, but when I switch my Weezing, those abilities don't activate again like it should happens.

Unfortunately, this will be hard because we won't know if the abilities were before activated while no Pokémon with Neutralizing Gas existed in the battle. I tried to do that but it gave errors and that require heavy edition to make that working
 
Last edited:
17
Posts
8
Years
  • Age 26
  • Seen today
Here's a better and simpler implementation of the EXP Candies...
A thing to note: any levels that you pass won't won't trigger any moves you'd learn on them. For example if you use an XL Candy at level five you'll fly up to level 32 but won't learn any moves that say were at levels 12, 17, 22, and 27.
Yes, this one does take into account the moves that you would learn if you just magically went from level x to level y.

PBS Entries (text cut down to fit the vanilla Essentials' Bag UI):
Spoiler:

and here's the implementation:
Spoiler:
 
Last edited:
17
Posts
8
Years
  • Age 26
  • Seen today
If you are like me and don't want to have 25 separate Nature Mints in your PBS, then you might like this: A single Nature Mint that freely allows 1 Nature change of the player's choice. (Not gonna lie, I directly copied the snippet from Debug_Pokemon but eh, whatever)

PBS Entry:
Spoiler:

Implementation:
Spoiler:

and I have attached a custom made Nature Mint icon which is just a haphazard mesh of all the mints but it works I guess. Enjoy.

In case you wanted to know how any of the actual 25 mints would look like, here's an example that you can copy-paste for all 25 of them
Spoiler:
I'll probably add a much simpler implementation to this later on too :)
 

Attachments

  • item459.png
    item459.png
    1.2 KB · Views: 1,149
Back
Top