• 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!
Rechargeable item that restores your party.

Rechargeable item that restores your party. 1.0

What can I find here?
In this thread you will learn how to add an item like the Temessence Vial from Tem Tem.

unknown.png


What will I be able to do with this?
With this item you can fully heal your party but is limited to a few charges. Then gets refilled at the Pokécenter.

Step 1
Go to your game's root folder and navigate to your PBS folder. Open your items.txt file.

Step 2
Scroll to the bottom and add 2 new items, you can paste them in from the copypasta at the bottom (1) & (2). Don't forget to add in the index number at the start!

Step 3
Navigate to your Graphics/Icons folder and add in sprites for the fully charged item and the empty item with their corresponding names, you are allowed to use the icons I made.
Vial.png
Full Item Icon
EmptyVial.png
Empty Item Icon

Step 4
Open your game in RPG Maker XP and open up the script section.

Step 5
Navigate to PItem_ItemEffects and scroll down to around line 340. You should see the EXPALL item defined around there.

Step 6
Paste the Item Effect (3) in just above the green commented out dashes from the copypasta at the bottom.

unknown.png


Step 7
Create an event in your map that gives you the item, and set the variable #50 to the amount of charges you want the player to have. To make them give you the item, add a script (3rd tab) with the following line:
Code:
Expand Collapse Copy
Kernel.pbReceiveItem(:VIAL)
unknown.png

If you renamed the item to something else or want to give out the empty vial, make sure you change this too.

Step 8
Edit the PokéCenters (or wherever you want them to be recharged) to recharge your item.
To do this you have to add the same variable change you did at step 7.
Also you will have to add the following script to the event:
Code:
Expand Collapse Copy
$PokemonBag.pbChangeItem(:EMPTYVIAL,:VIAL)
unknown.png

This method makes sure your vial changes back to a full one if it is empty, you don't need an item check.

Step 9
You're done! Everything is implemented! If you changed the Internal Name of the items, make sure you change all of the other instances their Internal name is used. Also if $game_variable[50] is already occupied. You can just change every instance of variable 50 from the script.

Copypasta
VIAL,Vial,Vials,8,0,"Heals your party. Recharges at the PokéCenter.",2,0,6,
EMPTYVIAL,Vial,Vials,8,0,"This vial is empty, recharge it at the PokéCenter.",2,0,6,
Ruby:
Expand Collapse Copy
# Vial item
ItemHandlers::UseInField.add(:VIAL,proc{|item|
   case $game_variables[50]
   when 0
     Kernel.pbMessage(_INTL("You do not have any charges left..."))
     $PokemonBag.pbChangeItem(:VIAL,:EMPTYVIAL) #this should never happen btw
   when 1
     Kernel.pbMessage("You have 1 charge left.")
     if Kernel.pbConfirmMessage("Would you like to heal you Pokémon?")
       $game_variables[50] -= 1
       for i in $Trainer.party
        i.heal
       end
       Kernel.pbMessage(_INTL("Your Pokémon were fully healed."))
       Kernel.pbMessage(_INTL("You have no more charges left."))
       $PokemonBag.pbChangeItem(:VIAL,:EMPTYVIAL)
      end
   else
     Kernel.pbMessage(_INTL("You have {1} charge(s) left.",$game_variables[50]))
     if Kernel.pbConfirmMessage("Would you like to heal you Pokémon?")
       $game_variables[50] -= 1
       for i in $Trainer.party
        i.heal
       end
       Kernel.pbMessage(_INTL("Your Pokémon were fully healed."))
       Kernel.pbMessage(_INTL("{1} charge(s) remain!",$game_variables[50]))
      end
    end
   next 1
})
Pastebin
Credits
Voltseon (Not Required)
Author
Voltseon
Views
3,290
First release
Last update

Ratings

5.00 star(s) 1 ratings

More resources from Voltseon

Back
Top