FANDOM


Adding abilities that affect egg steps
This tutorial is deprecated. It is no longer relevant to the latest version of Pokémon Essentials.

This tutorial was written by -Desbrina-. Please give credit.

Click here for more tutorials!


This tutorial explains how to add the abilities that speed up egg hatching: Flame Body and Magma Armor.

In the script section PokemonDayCare, at the bottom replace the following code:

for egg in $Trainer.party
  if egg.eggsteps>0
    egg.eggsteps-=1
    if egg.eggsteps<=0
      egg.eggsteps=0
      pbHatch(egg)
    end
  end
end

with this code:

for egg in $Trainer.party
  # Edited for pokemon abilities
  if egg.eggsteps>0
    abilityname0=abilityname1=abilityname2=abilityname3=abilityname4=abilityname5=""
    abilityname0=abilityname1=abilityname2=abilityname3=abilityname4=abilityname5=""
    abilityname0=PBAbilities.getName($Trainer.party[0].ability) if $Trainer.party[0]
    abilityname1=PBAbilities.getName($Trainer.party[1].ability) if $Trainer.party[1]
    abilityname2=PBAbilities.getName($Trainer.party[2].ability) if $Trainer.party[2]
    abilityname3=PBAbilities.getName($Trainer.party[3].ability) if $Trainer.party[3]
    abilityname4=PBAbilities.getName($Trainer.party[4].ability) if $Trainer.party[4]
    abilityname5=PBAbilities.getName($Trainer.party[5].ability) if $Trainer.party[5]
    if (abilityname0 == "Flame Body" || 
       abilityname1 == "Flame Body" || 
       abilityname2 == "Flame Body" || 
       abilityname3 == "Flame Body" || 
       abilityname4 == "Flame Body" || 
       abilityname5 == "Flame Body" ||
       abilityname0 == "Magma Armor" || 
       abilityname1 == "Magma Armor" || 
       abilityname2 == "Magma Armor" || 
       abilityname3 == "Magma Armor" || 
       abilityname4 == "Magma Armor" || 
       abilityname5 == "Magma Armor")
      egg.eggsteps-=2
    else
      egg.eggsteps-=1
    end
    if egg.eggsteps<=0
      egg.eggsteps=0
      pbHatch(egg)
    end
  end
end

If you wish to add more abilities, you just add to the if statement.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.