• Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
IV vitamins

Resource IV vitamins 1.0

Astefia

Cooltrainer
Member
Joined
Feb 22, 2021
Posts
193
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:
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
12
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
103
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
193
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