• 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.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!

Is there any way to make it so items aren't consumed after a battle? (Think sitrus berry, balloons etc.)

Voxet

Rookie
Member
Joined
Mar 3, 2024
Posts
7
The title, basically it would be nice if items where one use per battle instead of completely used up. Is there any way to do this by editing the scripts? I heard S/V has this aswell (i dont have the game to confirm) and it would just be nice to have.
 
Yes!
So, basically there might be a shorter way to do this but
Before a battle, put
Code:
Expand Collapse Copy
$teams_items = []
for i in $player.party
  $teams_items.push(i.item)
end

And after the battle, put

$player.party,each_with_index do |p, i|
  p.item = $teams_items[i]
end
If you want this with every battle, place it in the TrainerBattle and WildBattle modules, in the relevant places

Also, if you want things to be neater, add teams_items to Game_Temp, and change
[imath]teams_items to[/imath]game_temp.teams_items
In the above lines

NOTE: This may affect the abilities Pickup and Ball Fetch if you put the second half in the wrong place

EDIT: I got the code slightly wrong because of course I did. I have made the edit
 
Last edited:
Back
Top