• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • 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!

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.
 

Swdfm

Game Developer
Member
Joined
Sep 3, 2018
Posts
25
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