Berry Watering Animation
Current Version: 1.0
Current Version: 1.0
-------
I missed the little watering can animation that Ruby, Sapphire, and Emerald had, so I decided to make one for the FireRed/LeafGreen protagonist sprites.
To use this, place the sprite files into the "Graphics/Characters" folder, and follow the instructions below on how to implement the script portion of this resource:
Instructions:
Code:
In the script section "PField_BerryPlants", under "def pbBerryPlant", find the line "when 1, 2, 3, 4" and replace everything from that line to the end of the function with the following:
when 1, 2, 3, 4
for i in watering
if i!=0 && $PokemonBag.pbQuantity(i)>0
if Kernel.pbConfirmMessage(_INTL("Want to sprinkle some water with the {1}?",PBItems.getName(i)))
if berryData.length>6
# Gen 4 berry watering mechanics
berryData[4]=100
else
# Gen 3 berry watering mechanics
if berryData[2]==false
berryData[4]+=1
berryData[2]=true
end
end
#=======#
meta=pbGetMetadata(0,MetadataPlayerA+$PokemonGlobal.playerID)
if meta
trainer=$Trainer if !trainer
outfit=trainer ? trainer.outfit : 0
if outfit==0
$game_player.setDefaultCharName(BerryWateringSprites::WateringSprites[$PokemonGlobal.playerID], $game_player.fullPattern)
else
$game_player.setDefaultCharName(BerryWateringSprites::WateringSprites[$PokemonGlobal.playerID]+"_"+outfit.to_s, $game_player.fullPattern)
end
$game_player.step_anime = true
end
#-------#
interp.setVariable(berryData)
Kernel.pbMessage(_INTL("{1} watered the plant.\\wtnp[40]",$Trainer.name))
if NEWBERRYPLANTS
Kernel.pbMessage(_INTL("There! All happy!"))
else
Kernel.pbMessage(_INTL("The plant seemed to be delighted."))
end
#=======#
if meta
$game_player.setDefaultCharName(pbGetPlayerCharset(meta,1), $game_player.fullPattern)
$game_player.step_anime = false
end
#-------#
end
break
end
end
end
end
------------
Inside the same function, after:
if NEWBERRYPLANTS
Kernel.pbMessage(_INTL("There! All happy!"))
else
Kernel.pbMessage(_INTL("The plant seemed to be delighted."))
end
...Paste the following code:
if meta
$game_player.setDefaultCharName(pbGetPlayerCharset(meta,1), $game_player.fullPattern)
$game_player.step_anime = false
end
------------
Lastly, somewhere in the same script section, paste the following code:
class Game_Player
attr_accessor :step_anime
end
module BerryWateringSprites
WateringSprites = [
"boy_watering", # Player A
"girl_watering", # Player B
]
end
*This can go anywhere as long as it's outside of any other functions or classes. I put it at the very bottom of the script section myself.
**If you have more than 2 playable characters, make sure to add them to the array!
Pastebin Mirror:
- Credits
- Ulithium_Dragon