• Having trouble receiving email verification when signing up? Contact an administrator via our Discord server!
  • Consider joining our Discord server if you haven't already! Discord is a free voice and text chat platform that's more or less a combination of Skype and Teamspeak. Using Discord, you can chat with other Relic Castle members in real-time! Wowza! Click here for the details!
Resource icon

Berry Watering Animation 1.0

Berry Watering Animation
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: https://pastebin.com/raw/zbY0e6ij
Credits
Ulithium_Dragon
Author
Ulithium_Dragon
Downloads
118
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Ulithium_Dragon

Top