- 2,531
- Posts
- 5
- Years
- बिहार, भारत। Bihar, India.
- Seen Mar 19, 2025
GALAR BERRY TREE
This script replicates the Berry Tree from Galar
Features:
- Complete Pulg-n-Play
- Get a random Berry from the tree or encounter a Pokemon.
- Choose weather you want realistic time-based Berry Tree event or a simple Tree.
- Modify the Berries that you want to be fallen by editing the array `vbberries`
Usage:
- Goto `PField_Encounters` and add BerryTree Encounter type:-
In `module EncounterTypes` add in the bottom-
Code:BerryTree = 13
Code:"BerryTree"
Code:[20,20,10,10,10,10,5,5,4,4,1,1]
In `EnctypeCompileDens` array add ,0 after last value
The `PField_Encounters` would look like the following:-
Spoiler:Code:module EncounterTypes Land = 0 Cave = 1 Water = 2 RockSmash = 3 OldRod = 4 GoodRod = 5 SuperRod = 6 HeadbuttLow = 7 HeadbuttHigh = 8 LandMorning = 9 LandDay = 10 LandNight = 11 BugContest = 12 BerryTree = 13 Names = [ "Land", "Cave", "Water", "RockSmash", "OldRod", "GoodRod", "SuperRod", "HeadbuttLow", "HeadbuttHigh", "LandMorning", "LandDay", "LandNight", "BugContest", "BerryTree" ] EnctypeChances = [ [20,20,10,10,10,10,5,5,4,4,1,1], [20,20,10,10,10,10,5,5,4,4,1,1], [60,30,5,4,1], [60,30,5,4,1], [70,30], [60,20,20], [40,40,15,4,1], [30,25,20,10,5,5,4,1], [30,25,20,10,5,5,4,1], [20,20,10,10,10,10,5,5,4,4,1,1], [20,20,10,10,10,10,5,5,4,4,1,1], [20,20,10,10,10,10,5,5,4,4,1,1], [20,20,10,10,10,10,5,5,4,4,1,1], [20,20,10,10,10,10,5,5,4,4,1,1] ] EnctypeDensities = [25, 10, 10, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 0] EnctypeCompileDens = [ 1, 2, 3, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0] end
- Add BerryTree Encounters in the PBS/Encounters.txt
Code:BerryTree CHERUBI,5,7 PIDGEY,5,7 SPEAROW,5,7 BURMY,5,7 SCYTHER,6,7 ARON,5,7 ODDISH,6,8 HOOTHOOT,4,7 HOOTHOOT,1,6 CHIMCHAR,5,6 PANSAGE,4,8 PANPOUR,5,6
- Add the following script above Main and below Compiler
Spoiler:Code:#==============================================================================# # # GALAR BERRY TREE Script # By BhagyaJyoti # Originally By #Not Important # Help from Zeak6464 # For Essentials v18 # Complete plug-n-play # #==============================================================================# BERRY_TREE_GALAR = true #Disable this if you only want to use a single script command for the Berry Tree. #Enable this if you want realistic time-based berry tree. See example event. def pbBerryTreeMain vbberries=[:CHERIBERRY,:CHESTOBERRY,:PECHABERRY,:RAWSTBERRY,:ASPEARBERRY,:LEPPABERRY,:ORANBERRY,:PERSIMBERRY,:LUMBERRY,:SITRUSBERRY,:FIGYBERRY,:WIKIBERRY,:MAGOBERRY,:AGUAVBERRY,:IAPAPABERRY,:RAZZBERRY,:BLUKBERRY,:NANABBERRY,:WEPEARBERRY,:PINAPBERRY,:POMEGBERRY,:KELPSYBERRY,:QUALOTBERRY,:HONDEWBERRY,:GREPABERRY,:TAMATOBERRY,:CORNNBERRY,:MAGOSTBERRY,:RABUTABERRY,:NOMELBERRY,:SPELONBERRY,:PAMTREBERRY,:WATMELBERRY,:DURINBERRY,:BELUEBERRY,:OCCABERRY,:PASSHOBERRY,:WACANBERRY,:RINDOBERRY,:YACHEBERRY,:CHOPLEBERRY,:KEBIABERRY,:SHUCABERRY,:COBABERRY,:PAYAPABERRY,:TANGABERRY,:CHARTIBERRY,:KASIBBERRY,:HABANBERRY,:COLBURBERRY,:BABIRIBERRY,:CHILANBERRY,:LIECHIBERRY,:GANLONBERRY,:SALACBERRY,:PETAYABERRY,:APICOTBERRY,:LANSATBERRY,:STARFBERRY,:ENIGMABERRY,:MICLEBERRY,:CUSTAPBERRY,:JABOCABERRY,:ROWAPBERRY,:ROSELIBERRY,:KEEBERRY,:MARANGABERRY] chanceBerry=rand(6) #Encounters 2/10 of the time if chanceBerry==0 || chanceBerry==2 || chanceBerry==3 || chanceBerry==5 vbberry = vbberries[rand(67)] pbItemBall(vbberry) elsif chanceBerry==1 || chanceBerry==4 pbEncounter(EncounterTypes::BerryTree) pbMessage("Other pokemon took the berries left on the tree away...") end end def pbBerryTree pbMessage("This is a Berry Tree.") if pbConfirmMessage(_INTL("Would you like to shake it?")) if !BERRY_TREE_GALAR pbBerryTreeMain else return true end else pbMessage(_INTL("Left it alone.")) end end #==============================================================================# #==============================================================================#
- Create an event, and enjoy the script.
Events:
There can be two type of Event based on the BERRY_TREE_GALAR switch in the script.
If set to false, it is used to make a simple GALAR BERRY TREE Script, which will either drop berry or encounter a Pokemon every time you interact.
Spoiler:
![[PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18] [PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18]](https://i.imgur.com/Y9csj5V.png)
If set to true, you can create a BerryTree which drops berry or encounter Pokemon only after a certain time.
Spoiler:
![[PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18] [PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18]](https://i.imgur.com/bpjFgcN.png)
![[PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18] [PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18]](https://i.imgur.com/4947pxT.png)
![[PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18] [PokeCommunity.com] GALAR BERRY TREE [ESSENTIALS V18]](https://i.imgur.com/OckYiIz.png)
The switch that I use is 60, and it gives Berries after every 100 seconds. Name a switch- s:cooledDown?(x) where x is the time in seconds after which you want the event to trigger.
Credits:
- BhagyaJyoti (Made for v18 with Berry Array fix and made more Plug-n-Play)
- #NotImportant (Original Script for v17.2)
Last edited: