• 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!
IV vitamins

Resource IV vitamins 1.0

Astefia

Cooltrainer
Member
Joined
Feb 22, 2021
Posts
194
Astefia submitted a new resource:

IV vitamins - IV and happiness rising items

This is just the script for IV raising items, with sample names.
How to install:
code:
Expand Collapse Copy
def pbItemRaiseIV(pkmn, stat, scene, ivGain = 2, item = nil, happiness = "")
  if pkmn.iv[stat]>=Pokemon::IV_STAT_LIMIT
    scene.pbDisplay(_INTL("It won't have any effect."))
    return false
  end
  $PokemonBag.pbDeleteItem(item, 1)
  pkmn.iv[stat] += ivGain
  pkmn.iv[stat] = pkmn.iv[stat].clamp(0, Pokemon::IV_STAT_LIMIT)...

Read more about this resource...
 

Asforcia

Novice
Member
Joined
Feb 22, 2022
Posts
13
Quick reminder for everyone: Create the item in the pbs, then paste the code, Otherwise the scripts will not work.
 

Ayrei

Lead developer of Pokemon Vanguard
Member
Joined
Nov 30, 2020
Posts
106
Good script, but I should mention that you don't need "$PokemonBag.pbDeleteItem(item, 1)" in the item utilities script or else two of that item will be consumed instead of one.

The item will delete itself on use if the outside of battle item function code, same as potions, is used when creating the item in the pbs.
1650463588778.png
 

Astefia

Cooltrainer
Member
Joined
Feb 22, 2021
Posts
194
Good script, but I should mention that you don't need "$PokemonBag.pbDeleteItem(item, 1)" in the item utilities script or else two of that item will be consumed instead of one.

The item will delete itself on use if the outside of battle item function code, same as potions, is used when creating the item in the pbs.
View attachment 9926
Thanks a lot for noticing this detail!
 

azmikmak

Novice
Member
Joined
Jun 5, 2022
Posts
10
Hi !
I tried to adapt this to the V20 But I'm no good at Ruby (just yet) so I did what seemed to me to be the next best thing : scripted an event.
It's a normal NPC.
Script IVtrainer.jpg
Hopefully It's gonna be useful to someone ;)
a nice day to you anyway and thanks for the resource above !
PS: Should I post that in a separate resource thread?
 
Back
Top