• 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.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
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...
 
Quick reminder for everyone: Create the item in the pbs, then paste the code, Otherwise the scripts will not work.
 
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
 
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!
 
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