• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Our friends from the Johto Times are hosting a favorite Pokémon poll - and we'd love for you to participate! Click here for information on how to vote for your favorites!
  • Serena, Kris, Dawn, Red - which Pokémon protagonist is your favorite? Let us know by voting in our grand final favorite protagonist poll!
  • PokéCommunity supports the Stop Killing Games movement. If you're a resident of the UK or EU, consider signing one of the petitions to stop publishers from destroying games. Click here for more information!
  • 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.

[Scripting Question] [16.2] How do I change the effect of each nature?

  • 8
    Posts
    5
    Years
    • Seen Sep 24, 2022
    Hi. First of all, English is not my native language, sorry if I don't write correctly.

    What I would like to do is that, for example, the Modest nature, instead of increasing the SPA by 10% and reducing the ATA by 10%, that the user of this ability is not affected by critics, or or prevent the Pokémon from flinching, or increase by 10 % the power of contact movements, etc. That is to say, they are examples, you do not have to do some of these effects exactly.

    I would like to transform natures into abilities, this way each pokemon can have 2 abilities. And do this with every nature. I clarify that the natures do not want them to continue working the same. I don't want stats to increase and decrease and also act as a ability. Only the second. And since no stats would increase or decrease anymore, the names of the stats should no longer appear in red and blue.

    I do not find in which "section" is where it indicates what each nature does. And I don't know if this would be viable either.

    I have many more questions because I am a novice in this, but I will ask that at another time if I don't know how to do it myself.

    Thanks for all beforehand.
     
    If you want to remove the damage boost/reduction, I believe that is under 'def calcStats' in Pokebattle_Pokemon. Just remove this section in the method:
    Code:
        if nd5!=nm5
          pvalues[nd5]=110
          pvalues[nm5]=90
        end
    If you want to have natures work as abilities, instead of using 'hasWorkingAbility(:ABILITYNAME)', just use 'nature==x', where x is the integer value corresponding to the nature. For example, if you want Modest nature to prevent Critical Hits, in Pokebattle_Move, under 'def pbIsCritical?(attacker,opponent)', you would add the part in red to the code segment below:
    Code:
          if opponent.hasWorkingAbility(:BATTLEARMOR) ||
             [COLOR="Red"]opponent.nature==15 ||[/COLOR]
             opponent.hasWorkingAbility(:SHELLARMOR)
            return false
          end
    If you didn't want Mold Breaker to disable this effect, then you would have to put it outside of the if statement surrounding this block of code.
     
    Thanks, investigating I thought about using pokemon.nature == PBNatures :: X (X is nature), but I will try in the way that you have commented.
    Thank you.
     
    PBNatures::NATURE_NAME returns the numeric value of that nature. For instance, PBNatures::MODEST would be equal to 15. So that's also possible.
     
    I used this to change the nature's stat boost:
    if nature==PBNatures::NATURE_NAME
    pvalues=[100,100,100,100,100]

    pvalues in the array are [Atk,Def,Spd,SpA,SpD]. just change these to increase or decrease the stat.
    It's not what you asked, but It might be useful to you.
     
    Back
    Top