• 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.
An Item to increase IVs

Resource An Item to increase IVs 2021-07-04

YagariFox

Rookie
Member
Joined
Jul 3, 2021
Posts
1
YagariFox submitted a new resource:

An Item to increase IVs - A very simple script for an item that increases individual IVs

Hey, first time posting anything like this.

When I was looking for this I only found it as an answered question at www.pokecommunity.com. Thinking that someone could find it helpful I decided to post this here.

In the script "Item_Effects". I put it just above the EV vitamins. I put a bunch of comments so I can find where I put things faster. And so I don't forget what I was doing.

Item_Effects:
Expand Collapse Copy
## Item that change IVs...

Read more about this resource...
 

AiurJordan

twitch.tv/aiurjordan
Member
Joined
Aug 10, 2019
Posts
83
Hey there, great resource!

I've expanded it a bit to show the result of the IV change and also I think you should always calc stats on a pokemon after modifying it.

Ruby:
Expand Collapse Copy
ItemHandlers::UseOnPokemon.add(:HPVITAMIN,proc{|item,pkmn,scene|

   if pkmn.iv[:HP]>=31

     scene.pbDisplay(_INTL("It won't have any effect."))

     next false

   else

     pkmn.iv[:HP]=(pkmn.iv[:HP]==30) ? 31 : pkmn.iv[:HP]+2

     scene.pbRefresh

     scene.pbDisplay(_INTL("{1}'s HP IV increased to #{pkmn.iv[:HP]}",pkmn.name))

     pkmn.changeHappiness("vitamin")
    
     pkmn.calc_stats

     next true

   end

})

Here are some graphics which match the color-scheme for HPUP, ZINC, PROTEIN, CARBOS.. etc
HPVITAMIN.png
ATTACKVITAMIN.png
DEFENSEVITAMIN.png
SPECIALATTACKVITAMIN.png
SPECIALDEFENSEVITAMIN.png
SPEEDVITAMIN.png
 

Savage7590

Novice
Member
Joined
Apr 11, 2021
Posts
15
Hello! thank you for this great resource! I also was wondering on making a specific item to make my game more challenging if had idea or a pointer. If I wanted make it so could use it one time on a specific type of pokemon like rock type how would I make that possible in the script or PBS file. Also was wondering with this item be able to increase all IV stats by 2. I'm very new to this and if could point me right direction would greatly appreciate it.
 
Last edited:
Back
Top