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

[Scripting Question] Removing 100 EV limit from vitamins

princessyiris

Banned
34
Posts
4
Years
    • Seen Feb 6, 2020
    I'd like to make it so vitamins (HP Up, Protein, etc.) can increase stats above 100 EVs. I can't tell where this limit is implemented in the scripts, or how to remove it.
     
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    Have you tried searching (with Ctrl+Shift+F to look at all the script sections) for 100?
     
    1,682
    Posts
    8
    Years
    • Seen today
    A good start is seeing what the vitamin code calls!
    Code:
    ItemHandlers::UseOnPokemon.add(:HPUP,proc{|item,pokemon,scene|
       if [B][U]pbRaiseEffortValues[/U][/B](pokemon,PBStats::HP)==0
         scene.pbDisplay(_INTL("It won't have any effect."))
         next false
       else
         scene.pbRefresh
         scene.pbDisplay(_INTL("{1}'s HP increased.",pokemon.name))
         pokemon.changeHappiness("vitamin")
         next true
       end
    })

    this pbRaiseEffortValues looks promising, let's check that one out!
    There's a couple of spots where 100 shows up there, so if you change all of them, that should do the trick!
     
    Last edited:

    princessyiris

    Banned
    34
    Posts
    4
    Years
    • Seen Feb 6, 2020
    Did a bunch of searches for things like "HPUP" and "vitamin" and never thought to search for 100. Problem solved. Thanks!
     
    1,682
    Posts
    8
    Years
    • Seen today
    I know you've already found your answer, and I've already volunteered one but there's also pbJustRaiseEffortValues which only raises the EVs without checking the 100 limit. You do have to pass the amount of EVs gained, it doesn't have a default value like pbRaiseEffortValues.
     
    Back
    Top