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

[PBS Question] Where are Primal Reversions actually defined?

19
Posts
4
Years
    • Seen Jan 14, 2021
    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.
     
    277
    Posts
    15
    Years
  • Primal Reversion is under PokeBattle_Battle around line 1718 in stock Essentials.

    Code:
    ################################################################################
    # 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.
     
    Last edited:
    19
    Posts
    4
    Years
    • Seen Jan 14, 2021
    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.
     
    Last edited:
    277
    Posts
    15
    Years
  • I just found this in Pokemon_MegaEvolution line 104

    Code:
    # 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.
     
    Back
    Top