• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!

Primal Reversion Questions

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
Hi all,

I've been researching Primal Reversion in Pokemon Essentials, looked at a lot of stuff on forums, the wiki, and of coarse the script. I have not been able to answer all my questions so I have decided to ask the community.

1) Pokemon like GROUDON and KYOGRE maintain their Primal Reversion when revived. Is there a way to prevent them from maintaining Primal Reversion when revived?

2) I would like to add custom pokemon with Primal Reversion to my game. I have created the appropriate form handlers but have also done a search for all GROUDON to find all the primal reversion scripts. I found the following script which looks like it deals with the animations of the form changes. Do I have to alter this script to include the custom pokemon or can I create a similar script below it and include the custom pokemon? I only ask because I have a tendancy to mess up the branches in the script and I may have a few more custom pokemon with primal reversions to add later on.

Battle_Action_Other:
Expand Collapse Copy
  #=============================================================================
  # Primal Reverting a battler
  #=============================================================================
  def pbPrimalReversion(idxBattler)
    battler = @battlers[idxBattler]
    return if !battler || !battler.pokemon
    return if !battler.hasPrimal? || battler.primal?
    if battler.isSpecies?(:KYOGRE)
      pbCommonAnimation("PrimalKyogre",battler)
    elsif battler.isSpecies?(:GROUDON)
      pbCommonAnimation("PrimalGroudon",battler)
    end
    battler.pokemon.makePrimal
    battler.form = battler.pokemon.form
    battler.pbUpdate(true)
    @scene.pbChangePokemon(battler,battler.pokemon)
    @scene.pbRefreshOne(idxBattler)
    if battler.isSpecies?(:KYOGRE)
      pbCommonAnimation("PrimalKyogre2",battler)
    elsif battler.isSpecies?(:GROUDON)
      pbCommonAnimation("PrimalGroudon2",battler)
    end
    pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",battler.pbThis))
  end
end

3) I found another section of script that has Groudon listed with the Red Orb and I was wondering if I would need to do the same here as well with each custom pokemon I add with a Primal Reversion along with any custom items I may require beyound blue and red orbs? Below is the piece of script I am reffering to.

Item:
Expand Collapse Copy
         :KYOGRE   => [:BLUEORB],
         :GROUDON  => [:REDORB]
      }
      return combos[species] && combos[species].include?(@id)
    end
  end
end

I will keep researching in the meantime and thank you in advance for taking the time to read or answer any of my questions above.
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
1) Pokemon do not retain Primal/Mega forms upon fainting and being revived. However, in the case of Primals, these Pokemon will re-trigger their Primal forms upon being sent out, because unlike Megas, there are no limitations on how many times you can Primal Revert in a battle. So if the Pokemon has all of the requirements needed to Primal Revert, it will. If your intent is to set up a limitation to how many times a trainer can Primal Revert per battle, then that's a different story and would require basically copying how Megas impose this limitation.

2) You don't have to edit this code. As you say, it's only referencing specific species here for animation purposes.

3) Yes, you should add your custom primals here. This code is what's uses to prevent a Primal from having its held item removed/stolen.
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
1) Pokemon do not retain Primal/Mega forms upon fainting and being revived. However, in the case of Primals, these Pokemon will re-trigger their Primal forms upon being sent out, because unlike Megas, there are no limitations on how many times you can Primal Revert in a battle. So if the Pokemon has all of the requirements needed to Primal Revert, it will. If your intent is to set up a limitation to how many times a trainer can Primal Revert per battle, then that's a different story and would require basically copying how Megas impose this limitation.

2) You don't have to edit this code. As you say, it's only referencing specific species here for animation purposes.

3) Yes, you should add your custom primals here. This code is what's uses to prevent a Primal from having its held item removed/stolen.
@ Lucidious89 Thank you for the explanations. I never played any of the games with primal revertions and I was reading up on how it worked and how pokemon essentials does it. I think I am ok with how it works, It is a more powerful mechanic than mega evolution but I have decided to use my berry mechanic with it which makes the item become consumed and should lower the power of primal evolutions and at the same time alow some sort of animation to play when activated.

2) If I was to play with the animation code would I need each species with primal revertion refrenced in the same code with Kyogre and Groudon or could I do a seperate code for each species? I am leaning towards the second option so as not to mess with any of the essentials primal revertion animation script in case there are issues or I decide to not worry about it.

3) I was really unsure what exactly this code was doing. If the item is stolen I assume the pokemon imediantly revert back to its original form?
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
@Lucidious89 Ive been play testing and I ran into a couple of issues.

1) The megaberry does not seem to be consumed when also used for primal reversion. Is there anything I can do to change this so that it is? Megaberry does work on other pokemon if primal reversion has already been used by another pokemon.

2) My script for primal revertions does not seem to work when using MultipleForms.register + "getPrimalForm" => proc { |pkmn| is there a reason for this? The Venusaur portion at the top works properly except for its megaberry is never consumed when it is low on life.

Also heres the test script I am using:

Primal Reversion Script:
Expand Collapse Copy
MultipleForms.register(:VENUSAUR,{
  "getPrimalForm" => proc { |pkmn|
    next 1 if pkmn.hasItem?(:MEGABERRY)
    next 0
  }
})

MultipleForms.copy(:CHARIZARD, :BLASTOISE, :BEEDRILL, :PIDGEOT, :ALAKAZAM,
:SLOWBRO, :GENGAR, :KANGASKHAN, :PINSIR, :AERODACTYL, :MEWTWO, :AMPHAROS,
:STEELIX, :SCIZOR, :HERACROSS, :HOUNDOOM, :TYRANITAR, :SCEPTILE, :BLAZIKEN,
:SWAMPERT, :GARDEVOIR, :SABLEYE, :MAWILE, :AGGRON, :MEDICHAM, :MANECTRIC,
:SHARPEDO, :CAMERUPT, :ALTARIA, :BANETTE, :ABSOL, :GLALIE, :SALAMENCE,
:METAGROSS, :LATIAS, :LATIOS, :RAYQUAZA, :LOPUNNY, :GARCHOMP, :LUCARIO,
:ABOMASNOW, :GALLADE, :AUDINO, :DIANCIE)
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
If I was to play with the animation code would I need each species with primal revertion refrenced in the same code with Kyogre and Groudon or could I do a seperate code for each species? I am leaning towards the second option so as not to mess with any of the essentials primal revertion animation script in case there are issues or I decide to not worry about it.
I'm not really sure what you mean by "separate", but yes, you would need to reference each individual species, the same way it references Kyogre and Groudon. Because only two species utilize this mechanic, Essentials simply references each species specifically, rather than Megas which is coded in a much more general way.

3) I was really unsure what exactly this code was doing. If the item is stolen I assume the pokemon imediantly revert back to its original form?
No, but from a gameplay perspective it wouldn't make sense for the item to be removed, the same way Mega Stones are un-losable when equipped.

1) The megaberry does not seem to be consumed when also used for primal reversion. Is there anything I can do to change this so that it is? Megaberry does work on other pokemon if primal reversion has already been used by another pokemon.

2) My script for primal revertions does not seem to work when using MultipleForms.register + "getPrimalForm" => proc { |pkmn| is there a reason for this? The Venusaur portion at the top works properly except for its megaberry is never consumed when it is low on life.

Primal Reversion is mechanically different than Megas. Primal Reversion is only ever checked for and triggered immediately when the Pokemon is sent out, and only then. So if your item has some sort of specific trigger (low HP), then it's not going to do anything unless you've specifically coded the item to trigger Primal Reversion itself. I don't know what the code for this item looks like, so I have to assume this has something to do with it.

Also, your MultipleForms code lists form "1" as the Primal Form for Venusaur (and all the other species listed). But form 1 is already defined as their Mega Forms. Unless you're somehow blending both Primals and Megas into the same mechanic, this is probably not a good idea. And if you ARE blending both mechanics, it's probably a lot easier to simply make Kyogre/Groudon into Megas than it is to convert everything into Primals.
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
@Lucidious89 So originally I was using a berry to trigger a form change and when consumed the pokemon would revert back to its original form. This actually all worked fine. The item was the Mega Berry you helped me with a couple weeks ago that had the Focus Sash effect. My form change script however did not play any animations and so I started looking at mega evolution and primal revertion to see how animations were used. For story purposes in the game the berry item (Mega Berry = Primal Berry now) is a fossilized berry that is discovered and when unfossilized functions as a berry. Primal reversion had less scripts in the editor and was closer to the desired effect I wanted so I am now attempting to use it. I am only using the first form of each pokemon at the moment as a placeholder for testing the scripts.

Now with the script above from my last post everything after MultipleForms.copy does not seem to work. From your explanation above if I understand you correctly it is because of how Primal Revertion is scripted and I can not use MultipleForms.copy in this way than?

I'm not really sure what you mean by "separate", but yes, you would need to reference each individual species, the same way it references Kyogre and Groudon. Because only two species utilize this mechanic, Essentials simply references each species specifically, rather than Megas which is coded in a much more general way.
Seperate was reffering to a seprate block of script. Instead of placing everything within the same block as Kyogre and Groudon.

Primal Reversion is only ever checked for and triggered immediately when the Pokemon is sent out, and only then. So if your item has some sort of specific trigger (low HP), then it's not going to do anything unless you've specifically coded the item to trigger Primal Reversion itself. I don't know what the code for this item looks like, so I have to assume this has something to do with it.
I will post the item's script below and I hope you can tell me what needs added to have the berry work as normal and check for the item after it is consumed and hope we can revert the pokemon back to form 0 when the item is consummed in this way. Also thank you for answering my questions and taking a look at the script for me.

Mega Berry Script:
Expand Collapse Copy
        elsif target.hasActiveItem?(:MEGABERRY) && if damage>=target.hp
          target.damageState.berryWeakened = true
          damage -= 1
          target.battle.pbCommonAnimation("EatBerry",target)
 
Last edited:

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
I will post the item's script below and I hope you can tell me what needs added to have the berry work as normal and check for the item after it is consumed and hope we can revert the pokemon back to form 0 when the item is consummed in this way. Also thank you for answering my questions and taking a look at the script for me.

Ruby:
Expand Collapse Copy
elsif target.hasActiveItem?(:MEGABERRY) && if damage>=target.hp
target.damageState.berryWeakened = true
damage -= 1
target.battle.pbCommonAnimation("EatBerry",target)
Ok well first of all, you can remove that "berryWeakened" line. That is only relevant to the effects of type-reducing berries, so it really has no reason to be here.

But beyond that, I'm having trouble following what this item is supposed to do with the way you have it set up. So simply HOLDING the berry forces the Pokemon into a specific form? But then CONSUMING the berry un-Mega/Primals the Pokemon, and returns it to its base form? That feels mechanically backwards to me, so I want to make sure I get how this is supposed to work before I really delve into anything.

Secondly, all this code you have here does is allow the user to survive with 1 HP. Nothing is implemented to allow for any type of form change, unless you've coded that somehow elsewhere (again, I'm having trouble keeping track of how this is meant to work). Also, unless you've implemented it somewhere else, this code does not allow for the berry to actually be consumed upon triggering. If you're using Focus Sash as your guide, then this is probably best implemented in def pbEndureKOMessage, because that's where Focus Sash is consumed after being triggered.
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
@Lucidious89 The item/berry when held powers up some pokemon causing them to revert to a primal form. If the pokemon would be KOed they instead consume the item/berry to stay in the battle but at the cost of losing their primal form. The items are berries and can be grown by the player.

Yes, I have two scripts. The primal berry script for the item and the primal revertion script for the pokemon form change. I have posted both scripts in this thread but will post them below for easier viewing. I must of missed def pbEndureKOMessage so I will take a look at that also. These scripts are what I have so far but I will continue to work on them when I can. Thank you for taking a look and I hope we can make some progress on these scripts.


Primal Reversion Script:
Expand Collapse Copy
MultipleForms.register(:VENUSAUR,{
  "getPrimalForm" => proc { |pkmn|
    next 1 if pkmn.hasItem?(:MEGABERRY)
    next 0
  }
})

MultipleForms.copy(:CHARIZARD, :BLASTOISE, :BEEDRILL, :PIDGEOT, :ALAKAZAM,
:SLOWBRO, :GENGAR, :KANGASKHAN, :PINSIR, :AERODACTYL, :MEWTWO, :AMPHAROS,
:STEELIX, :SCIZOR, :HERACROSS, :HOUNDOOM, :TYRANITAR, :SCEPTILE, :BLAZIKEN,
:SWAMPERT, :GARDEVOIR, :SABLEYE, :MAWILE, :AGGRON, :MEDICHAM, :MANECTRIC,
:SHARPEDO, :CAMERUPT, :ALTARIA, :BANETTE, :ABSOL, :GLALIE, :SALAMENCE,
:METAGROSS, :LATIAS, :LATIOS, :RAYQUAZA, :LOPUNNY, :GARCHOMP, :LUCARIO,
:ABOMASNOW, :GALLADE, :AUDINO, :DIANCIE)

Primal Berry Script:
Expand Collapse Copy
elsif target.hasActiveItem?(:MEGABERRY) && if damage>=target.hp
target.damageState.berryWeakened = true
damage -= 1
target.battle.pbCommonAnimation("EatBerry",target)
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
Ok, I see what you're trying to accomplish now. I'm gonna try and just cover everything all at once.

Activating Primal Forms
  • Your MultipleForms code should function fine for your purposes when it comes to triggering a Primal Form upon sending a Pokemon out in battle. However, I would note that you need to add :VENUSAUR as the first entry in MultipleForms.copy. The first entry is what all the other subsequent entries are copying. So the way you have it right now, all of the entries are copying how Charizard works, which probably doesn't have any specific form mechanic. Also you don't need "0" on the line next 0. All this will do is force the Pokemon into its base form, 0, if it DOESN'T meet the criteria for Primal Reversion. Which is probably fine in 99% of cases, but say you have a regional (like Galarian Slowbro), this might unintentionally force it into its base form. I'm not sure on this, but it's better to not include this.

  • Adding the Mega Berry to def unlosable? to prevent the item from being prematurely stolen/removed is highly recommended. If the item is forcibly removed, it might lead to situations with unintended side effects because the code is set up expecting the item to be there. However, the problem you run into by making this item a Berry, is that berries in particular have a multitude of ways of being removed (Moves like Pluck, Bug Bite, Incinerate, Tea Time, etc.), and accounting for every single one of them would be incredibly annoying. It would honestly be far easier to just change this item to something that isn't a Berry. Unless you want to just keep the name, but simply don't classify the item as a berry (not setting it as Item Type 5 in the PBS) so that it doesn't appear in the Berry pocket. In any case, I would just add return true if @id == :MEGABERRY as the first line in this code block to prevent it from being removed/stolen. You could follow the example of how Kyogre/Groudon function where they list the specific species/item combos, but that would be an enormous amount of repetitive code to add in due to every species using the same exact item in this case, so you might as well just ignore all that and make the item universally un-losable.

  • If you're looking for an animation to play with each of these Primals, you will have to add them to the code in def pbPrimalReversion, because the way it's set up now ONLY takes Kyogre and Groudon into account. Both Kyogre and Groudon have their own specific animations when transforming, so there isn't any generic "primal" animation that can be played for Pokemon in general. So because of this, my suggestion is to simply re-use the Mega transformation animation here as just a default fallback measure for cases that aren't Kyogre/Groudon. I would just slot it in, like this:

    Code:
    Expand Collapse Copy
        if battler.isSpecies?(:KYOGRE)
          pbCommonAnimation("PrimalKyogre",battler)
        elsif battler.isSpecies?(:GROUDON)
          pbCommonAnimation("PrimalGroudon",battler)
        else
          pbCommonAnimation("MegaEvolution",battler)
        end

    You'll have to repeat the same thing further below in the code for "MegaEvolution2".
    Note, however, that if you don't have animations added to your game for any of these effects, all of this is moot and no animation will play regardless.

Consuming Mega Berry, and reverting forms
  • Your second code regarding the Mega Berry should work fine in allowing the Pokemon to survive with 1 HP. However, since you don't specify that this item should only trigger on species capable of Primal Reversion, this item will trigger on ANY Pokemon that holds it, allowing them to survive with 1 HP even if they don't have a Primal form. To remedy this, you'll have to add && target.primal? on the "elsif" line checking for your Mega Berry. This will make it so the item will only trigger if the holder has a Primal form, and is already in that form.

  • As mentioned, despite the item triggering, the Mega Berry is not actually consumed here. The item just triggers assuming it's a non-consumable (like Focus Band), and will remain on the Pokemon. This likely explains why your Pokemon aren't returning to their base forms. Because technically, they still meet all requirements for being in Primal Form thanks to the berry still being held. Allowing for this item to be properly triggered and consumed is a multi-step process.
    • To implement this properly, you will likely need to create a new type of "damage state" in the section PokeBattle_DamageState. Just add something like attr_accessor :megaBerry to the list of accessors, and then in def resetPerHit, just add the line @megaBerry = false. This creates a new type of damage state condition that is specific to your item, which can be called upon specifically when triggered.

    • Then, in your current code for Mega Berry where you have the line target.damageState.berryWeakened = true, you can replace this line with target.damageState.megaBerry = true, which will indicate that the unique damage conditions for your item has been triggered. The current "berryWeakened" code you have here is specific to berries that reduce damage based on type, which isn't relevant to your code at all. Adding the megaBerry proc that you just created will properly flag this now with what you want it to do.

    • Finally, to allow for the consumption of the Mega Berry, I would continue following Focus Sash's example, and tweak def pbEndureKOMessage to include the consumption part of the code. You can check for your Mega Berry's activation with target.damageState.megaBerry, now that you've created the unique damage state for this item. Now you can add the code to consume the item here, following Focus Sash as your guide. In fact, I would move the "EatBerry" animation from where you currently have it, and place that animation here instead, to further sync up with how Focus Sash handles itself.

    • The item should now be properly consumed. However, actually changing the Pokemon's form is a different issue altogether. Because Megas and Primals are permanent battle forms that cannot normally be lost in a battle (only upon fainting, which simply resets the Pokemon), there isn't any real "trigger" to un-Mega/Primal a battler during combat. So because of this, even if your item is triggered and consumed, it's likely that the Pokemon will still retain its form. To fix this, you'll have to add additional code after consuming the item that will readjust the Pokemon's form. I haven't tested this at all, but at a glance, this seems to be a good way to do it:

      Code:
      Expand Collapse Copy
            if target.primal?
              target.pokemon.makeUnprimal
              target.pbChangeForm(target.pokemon.form,_INTL("{1}'s Primal Reversion ended!",target.pbThis))
            end

      Add this above the line which consumes the berry. What it SHOULD do is check if the Pokemon is in Primal form. If so, it un-Primals the Pokemon object to its base form. However, to make sure the in-battle Pokemon is properly updated with this form change as well, pbChangeForm is called here. You can change the display text in this method to whatever you want, I just wrote some generic placeholder text. This must be done before the berry is consumed, because target.primal? checks if the species is in Primal Form first, and the game won't consider it in Primal Form if it isn't holding the corresponding item to allow for Primal Reversion.


After all this is said and done, the item and all of its associated effects should now work as you've intended.
 
Last edited:

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
@Lucidious89 Wow! Thank you so much, you have really thought this through. It will probally take me some time to make all the changes, but I should have everything altered and a few tests ran Friday. My only question is you mentioned It would be best if the item type was not a berry (item type 5) but in order for the megaberry to be planted and picked doesn't it need to be item type 5? The concept was the player would lose megaberries sometimes but could spend time to grow some more. I know its possible to copy the berry scripts and create a new item type that would work like a berry and I could still call it a berry but the game would not reconize it as such. I am just hoping it can still be grown without item type 5? Also thank you for all this effort, you deffinetly gave me an outline to follow and after reading your reply I don't have any questions thus far. I will get back to you with some results in a day or so.
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
@Lucidious89 I made the script changes and ran a couple of play tests. My Mega Berry is not triggering, I am testing with Venusaur and it faints. It does the whole primal revertion on entry and the mega evolve animation. It is holding the mega berry. I will post the codes that deal with the items. If you need any other scripts or have further questions just let me know. The second script is in the middle of defpbEndureKOMessage underneath the Focus Sash script.

EDIT: So I tested with some other pokemon and everything works like it should, It seems to be only Venusaur who would rather faint than use the mega berry. I posted the Primal Revertion script. I am using Venusaur as the base for multiple forms in that script but I don't see how that would be related?

Mega Berry Script:
Expand Collapse Copy
        elsif target.hasActiveItem?(:MEGABERRY) && if damage>=target.hp && target.primal?
          target.damageState.megaBerry = true
          damage -= 1

def pbEndureKOMessage(target):
Expand Collapse Copy
    elsif target.damageState.megaBerry
      @battle.pbCommonAnimation("UseItem",target)
      @battle.pbDisplay(_INTL("{1} used its power to stay in the fight!",target.pbThis))
      if target.primal?
        target.pokemon.makeUnprimal
        target.pbChangeForm(target.pokemon.form,_INTL("{1}'s Primal Reversion ended!",target.pbThis))
      end
      target.pbConsumeItem
      target.battle.pbCommonAnimation("EatBerry",target)

Primal Reversion Script:
Expand Collapse Copy
MultipleForms.register(:VENUSAUR,{
  "getPrimalForm" => proc { |pkmn|
    next 1 if pkmn.hasItem?(:MEGABERRY)
    next
  }
})

MultipleForms.copy(:VENUSAUR, :CHARIZARD, :BLASTOISE, :BEEDRILL, :PIDGEOT, :ALAKAZAM,
:SLOWBRO, :GENGAR, :KANGASKHAN, :PINSIR, :AERODACTYL, :MEWTWO, :AMPHAROS,
:STEELIX, :SCIZOR, :HERACROSS, :HOUNDOOM, :TYRANITAR, :SCEPTILE, :BLAZIKEN,
:SWAMPERT, :GARDEVOIR, :SABLEYE, :MAWILE, :AGGRON, :MEDICHAM, :MANECTRIC,
:SHARPEDO, :CAMERUPT, :ALTARIA, :BANETTE, :ABSOL, :GLALIE, :SALAMENCE,
:METAGROSS, :LATIAS, :LATIOS, :RAYQUAZA, :LOPUNNY, :GARCHOMP, :LUCARIO,
:ABOMASNOW, :GALLADE, :AUDINO, :DIANCIE, :BUTTERFREE)
 
Last edited:

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
Well if everything works as intended with all the other Pokemon, then clearly something is in conflict with Venusaur in particular. I have no idea what other stuff you have going on, so there's no real way to tell. But im sure if you removed Venusaur as your test subject from all the other stuff you've got going on, it would probably resolve itself.

Only thing I would note in your code is that it probably isn't necessary to have BOTH the "UseItem" and "EatBerry" animations, that seems a bit redundant. Everything else seems pretty much perfect, though.

Also, if you plan on making this item function like a berry in terms of planting/growing them, then I suppose it's necessary that you keep it classified as a true berry. At that point I suppose you have two options. Just leave everything as-is and just live with the potential of some niche interactions with berries that may lead to some unintended effects, or just go through everything in the battle code related to berries, and implement some kind of exception for the Mega Berry for each instance, if necessary. Off the top of my head, the most noteworthy ones would probably be the Harvest Ability, Natural Gift, BugBite/Pluck, and Incinerate. Fling probably shouldn't be a problem, because that move fails on un-losable items anyway, which Mega Berry would already be.
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
I will try removing venusaur from

Ruby:
Expand Collapse Copy
MultipleForms.register(:VENUSAUR,{
  "getPrimalForm" => proc { |pkmn|
    next 1 if pkmn.hasItem?(:MEGABERRY)
    next
  }
})

and try it with a different pokemon to see if everything works as intended or if the script still maintains the issue.

I will go through the berry scripts and add try to add an exception for the Mega Berry. Also I had missed the fact that the use item animation was still in the script. I will remove it as well.

I will let you know what I figure out, thank you for helping out.
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
@Lucidious89 I swaped the multiple form pokemon to a beedrill and the beedrill worked fine. The venusaur when tested with the script modified in this way could not use its primal revertion and still fainted. I than reverted the script back to venusaur being the top multiple form pokemon and created a new game. Venusaur used its primal reversion like it did originally and still faints when holding the item. I have ran a search all for Venusaur with no strange scripts appearing. I'm out of ideas, I have no idea why this is happening with Venusaur. Any suggestions?
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
@Lucidious89 I swaped the multiple form pokemon to a beedrill and the beedrill worked fine. The venusaur when tested with the script modified in this way could not use its primal revertion and still fainted. I than reverted the script back to venusaur being the top multiple form pokemon and created a new game. Venusaur used its primal reversion like it did originally and still faints when holding the item. I have ran a search all for Venusaur with no strange scripts appearing. I'm out of ideas, I have no idea why this is happening with Venusaur. Any suggestions?
To be clear, when you have Venusaur as the base species in the MultipleForms code, all the other Pokemon work as intended? Like Charizard, Blastoise, Beedrill, etc. all seem to function correctly?
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
To be clear, when you have Venusaur as the base species in the MultipleForms code, all the other Pokemon work as intended? Like Charizard, Blastoise, Beedrill, etc. all seem to function correctly?
@Lucidious89 Yes they do. I may have just found the problem. Venusaur is listed in my Alpha Pokemon script which was turned on. I turned it off and the script worked with Venusaur. It must be conflicting but I don't understand why or where. Alpha script below.

Alpha Pokemon Code:
Expand Collapse Copy
  Events.onWildPokemonCreate+=proc {|sender,e|
   pokemon=e[0]
   if rand(1) < 500 && $game_switches[115]
    case pokemon.species_data.id
   when :BULBASAUR, :IVYSAUR, :VENUSAUR # I have a long list of pokemon and reduced it for easy viewing.
      pokemon.species = :VENUSAUR
      pokemon.pbLearnMove(:POLLENPUFF)
      pokemon.pbLearnMove(:SHOCKWAVE)
      pokemon.pbLearnMove(:MOONBLAST)
      pokemon.pbLearnMove(:LEAFSTORM)
      if rand(100) < 25
        pokemon.item = :HEARTSCALE
      elsif rand(100) > 75
        pokemon.item = :VENUSAURITE
      end
            else next
    end
     items = [:HEARTSCALE, :SITRUSBERRY, :LUMBERRY, :LEPPABERRY, :MEGABERRY]
     if !pokemon.item && rand(100) < 25
       pokemon.item = items.sample
     else
       pokemon.item = nil
     end
     pokemon.markings = 16
     pokemon.name = "#{pokemon.speciesName.upcase}"
     alpha = NPCTrainer.new("Alpha", pokemon.gender)
     pokemon.owner = Pokemon::Owner.new_from_trainer(alpha)
     new_level = pbBalancedLevel($Trainer.party) + rand(4)
     new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
     pokemon.level = new_level
     pokemon.obtain_level = new_level
     pokemon.record_first_moves
     pokemon.calc_stats
   end
}
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
@Lucidious89 Yes they do. I may have just found the problem. Venusaur is listed in my Alpha Pokemon script which was turned on. I turned it off and the script worked with Venusaur. It must be conflicting but I don't understand why or where. Alpha script below.

Alpha Pokemon Code:
Expand Collapse Copy
  Events.onWildPokemonCreate+=proc {|sender,e|
   pokemon=e[0]
   if rand(1) < 500 && $game_switches[115]
    case pokemon.species_data.id
   when :BULBASAUR, :IVYSAUR, :VENUSAUR # I have a long list of pokemon and reduced it for easy viewing.
      pokemon.species = :VENUSAUR
      pokemon.pbLearnMove(:POLLENPUFF)
      pokemon.pbLearnMove(:SHOCKWAVE)
      pokemon.pbLearnMove(:MOONBLAST)
      pokemon.pbLearnMove(:LEAFSTORM)
      if rand(100) < 25
        pokemon.item = :HEARTSCALE
      elsif rand(100) > 75
        pokemon.item = :VENUSAURITE
      end
            else next
    end
     items = [:HEARTSCALE, :SITRUSBERRY, :LUMBERRY, :LEPPABERRY, :MEGABERRY]
     if !pokemon.item && rand(100) < 25
       pokemon.item = items.sample
     else
       pokemon.item = nil
     end
     pokemon.markings = 16
     pokemon.name = "#{pokemon.speciesName.upcase}"
     alpha = NPCTrainer.new("Alpha", pokemon.gender)
     pokemon.owner = Pokemon::Owner.new_from_trainer(alpha)
     new_level = pbBalancedLevel($Trainer.party) + rand(4)
     new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
     pokemon.level = new_level
     pokemon.obtain_level = new_level
     pokemon.record_first_moves
     pokemon.calc_stats
   end
}
Was the Venusaur you were performing these Mega Berry tests with a wild Pokemon?
 

Lucidious89

Champion
Member
Joined
Nov 12, 2020
Posts
1,232
@Lucidious89 Yes I was just testing against wild pokemon

For clarification I had the venusaur and I was testing against a wild charizard
Well then that's why, then. Your Alpha script must have been triggering and randomizing Venusaur's item to something that wasn't a Mega Berry. There wasn't anything wrong with any code, you were just getting unlucky.

Edit: Oh wait, the Venusaur WASN'T wild? Lol ok then idk.
 

Pokemon Liberator

Cooltrainer
Member
Joined
Jul 18, 2021
Posts
145
@Lucidious89 I checked the held item during the battles and it was still the Mega Berry. The Alpha code should only be working on an encounter not the player's pokemon. Also why is it only Venusaur?
 
Back
Top