Advertiser Content
Seen August 16th, 2019
Posted August 11th, 2019
5 posts
57 Days
Hello, I am trying to mess around with primal reversion, to give it to more than Groudon and Kyogre.

I've been able to work out that is is called in 'Pokemon_MegaEvolution', but I cannot seem to find where the changes to the form of the pokemon are actually coded in.

So far I've tested it with Groudon. The primal reversion changes Groudon's ability, but not his type (i.e. he doesnt become Ground / Fire, he stays pure Ground type). From this I can also infer that it doesnt boost his base stats either.

So, can anyone please tell me where it is that primal forms are defined? Because they definitely aren't in pokemonforms.txt

Thanks in advance for any insight.
Male
Unova
Seen 58 Minutes Ago
Posted 1 Week Ago
114 posts
11.2 Years
Primal Reversion is under PokeBattle_Battle around line 1718 in stock Essentials.

################################################################################
# Primal Revert battler.
################################################################################
  def pbPrimalReversion(index)
    return if !@battlers[index] || !@battlers[index].pokemon
    return if !(@battlers[index].hasPrimal? rescue false)
    return if (@battlers[index].isPrimal? rescue true)
    if isConst?(@battlers[index].pokemon.species,PBSpecies,:KYOGRE)
      pbCommonAnimation("PrimalKyogre",@battlers[index],nil)
    elsif isConst?(@battlers[index].pokemon.species,PBSpecies,:GROUDON)
      pbCommonAnimation("PrimalGroudon",@battlers[index],nil)
    end
    @battlers[index].pokemon.makePrimal
    @battlers[index].form=@battlers[index].pokemon.form
    @battlers[index].pbUpdate(true)
    @scene.pbChangePokemon(@battlers[index],@battlers[index].pokemon)
    if isConst?(@battlers[index].pokemon.species,PBSpecies,:KYOGRE)
      pbCommonAnimation("PrimalKyogre2",@battlers[index],nil)
    elsif isConst?(@battlers[index].pokemon.species,PBSpecies,:GROUDON)
      pbCommonAnimation("PrimalGroudon2",@battlers[index],nil)
    end
    pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",@battlers[index].pbThis))
    PBDebug.log("[Primal Reversion] #{@battlers[index].pbThis} Primal Reverted")
  end
the bit of code that matches Groudon to the Red Orb and Kyoger to the Blue Orb is around line 460.
Seen August 16th, 2019
Posted August 11th, 2019
5 posts
57 Days
Ah, thanks for the insight.

It seems strange to me that primal reversion is hard coded for these two, whereas every other form change or difference in the game uses pokemonforms.

EDIT: I discovered that I can put the forms of the primal pokemon in to pokemonforms.txt, and that allows me to change types/stats, which is what I was originally so invested in this for.
Male
Unova
Seen 58 Minutes Ago
Posted 1 Week Ago
114 posts
11.2 Years
I just found this in Pokemon_MegaEvolution line 104

# Primal Reversion #############################################################

MultipleForms.register(:KYOGRE,{
"getPrimalForm"=>proc{|pokemon|
   next 1 if isConst?(pokemon.item,PBItems,:BLUEORB)
   next
}
})

MultipleForms.register(:GROUDON,{
"getPrimalForm"=>proc{|pokemon|
   next 1 if isConst?(pokemon.item,PBItems,:REDORB)
   next
}
})
If you want to adjust any information on the Primal Reversions here seems like the place to do it.
Advertiser Content