• 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.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Berry Planting Improvements

Resource Berry Planting Improvements 1.9.5

Thank you! After updating I'm getting a different error. Not sure if I'm planting the berries wrong or something, but I'm currently just copy/pasting them from other maps where they work fine.

=================

[2025-03-17 22:41:58 -0400]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `growth_stage' for 946756877:Integer

Backtrace:
Overworld_BerryPlants:229:in `initialize'
Overworld_BerryPlants:299:in `new'
Overworld_BerryPlants:299:in `block (2 levels) in <main>'
Overworld_BerryPlants:296:in `each'
Overworld_BerryPlants:296:in `block in <main>'
Event_Handlers:89:in `block in trigger'
Event_Handlers:89:in `each_value'
Event_Handlers:89:in `trigger'
Event_HandlerCollections:63:in `trigger'
Spriteset_Map:62:in `initialize'
 
Thank you! After updating I'm getting a different error. Not sure if I'm planting the berries wrong or something, but I'm currently just copy/pasting them from other maps where they work fine.

=================

[2025-03-17 22:41:58 -0400]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `growth_stage' for 946756877:Integer

Backtrace:
Overworld_BerryPlants:229:in `initialize'
Overworld_BerryPlants:299:in `new'
Overworld_BerryPlants:299:in `block (2 levels) in <main>'
Overworld_BerryPlants:296:in `each'
Overworld_BerryPlants:296:in `block in <main>'
Event_Handlers:89:in `block in trigger'
Event_Handlers:89:in `each_value'
Event_Handlers:89:in `trigger'
Event_HandlerCollections:63:in `trigger'
Spriteset_Map:62:in `initialize'
Probably the same thing just in an old bit of code. Somewhere on your map you have an event's variable being saved as an integer which is the cause. I thought the only thing that ever used that system was berry plants which is why I never ran into these crashes in all my development time.

I'll have to fix it later since I already logged off for the day
 
Alright, thanks!
Oh wait I just noticed your new crash isn't with my plugin, it's with the vanilla berry plant code.

So yeah somehow one of your events had an integer saved to its variable attribute and it's breaking things

My recommendation is to start a new save file, so the variable for all events are reset. Other than that, there is a way to check which event has the issue, but I'd have to write that up later tomorrow
 
Last edited:
Hello again,

Sorry but I'm back. I started a new save file, and it worked for a bit. But now I'm getting the crash below. I'm guessing it's something to do with when the berries are growing?


=================

[2025-03-18 22:00:37 -0400]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `+' for #<BerryPlantData>

Backtrace:
Game_Event:105:in `expired?'
Game_Event:118:in `cooledDown?'
(eval):1:in `switchIsOn?'
Game_Event:82:in `eval'
Game_Event:82:in `switchIsOn?'
Game_Event:186:in `block in refresh'
Game_Event:184:in `each'
Game_Event:184:in `refresh'
ParticleEngine:583:in `refresh'
Game_Event:28:in `initialize'
 
Hello again,

Sorry but I'm back. I started a new save file, and it worked for a bit. But now I'm getting the crash below. I'm guessing it's something to do with when the berries are growing?


=================

[2025-03-18 22:00:37 -0400]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]

Exception: NoMethodError
Message: undefined method `+' for #<BerryPlantData>

Backtrace:
Game_Event:105:in `expired?'
Game_Event:118:in `cooledDown?'
(eval):1:in `switchIsOn?'
Game_Event:82:in `eval'
Game_Event:82:in `switchIsOn?'
Game_Event:186:in `block in refresh'
Game_Event:184:in `each'
Game_Event:184:in `refresh'
ParticleEngine:583:in `refresh'
Game_Event:28:in `initialize'
Oh I see. Do you have an event that's a Berry Plant but has a cooledDown script switch condition on one of its pages? You would also have the script call pbSetEventTime somewhere in that event. I don't think those are compatible as it looks like they both use an event's variable attribute for different things (pbSetEventTime sets it to an integer, while it being a Berry Plant relies on it being a BerryPlantData object). Berry Plant events shouldn't have any cooledDown script switch in any of its pages and shouldn't use the pbSetEventTime script call anywhere.
 
Last edited:
Hm, all of my berryplant events are just copies of the example ones used in the essentials files. I started making this game back in 1.18 though, so maybe I'm still using an incredibly antiquated event. Seriously, thank you for your help.

I did just go check 1.20.2 berries and they weren't changed or anything. This is the event I'm using.

View: https://imgur.com/a/9hsoMwQ
 
Hm, all of my berryplant events are just copies of the example ones used in the essentials files. I started making this game back in 1.18 though, so maybe I'm still using an incredibly antiquated event. Seriously, thank you for your help.

I did just go check 1.20.2 berries and they weren't changed or anything. This is the event I'm using.

View: https://imgur.com/a/9hsoMwQ
 
Hm, all of my berryplant events are just copies of the example ones used in the essentials files. I started making this game back in 1.18 though, so maybe I'm still using an incredibly antiquated event. Seriously, thank you for your help.

I did just go check 1.20.2 berries and they weren't changed or anything. This is the event I'm using.

View: https://imgur.com/a/9hsoMwQ
 
Hm, all of my berryplant events are just copies of the example ones used in the essentials files. I started making this game back in 1.18 though, so maybe I'm still using an incredibly antiquated event. Seriously, thank you for your help.

I did just go check 1.20.2 berries and they weren't changed or anything. This is the event I'm using.

View: https://imgur.com/a/9hsoMwQ
Hmm. Does your map have any event that has that cool down condition?

I went through my code and tried to identify anywhere it sets the variable attribute to a BerryPlantData and they should all be locked behind the event having berryplant in the name and/or pbPickBerry/pbBerryPlant as a script in their page. I don't know how you have something mixing up setting the variable as an integer and then being checked if a berry plant or vice versa, but I'm 76% confident it doesn't have anything to do with my plugin. I also haven't heard of this coming up for anyone else that has used my plugin.

Since it's not obviously an issue with my plugin, it's hard for me to help troubleshoot this.

First, you can track down which events are problematic by adding the following:
In the Game_Event script in the script editor, add the following lines (you can use CTRL + SHIFT + F to search for each line)
  • after the line def variable add echoln "Reading from event " + @event.id.to_s as a new line
  • after the line def setVariable(variable) add echoln "Setting variable for " + @event.id.to_s as a new line

This will log things to the console. When the crash occurs, hopefully it helps point to what event is the problem.

If that doesn't make things obvious, you can try uninstalling my plugin, starting a new game, and seeing if the issue happens again. If it does, then that confirms that it's not my plugin. If it doesn't after a good amount of time, try reinstalling my plugin, then see if the issue all of a sudden starts happening.
 
Last edited:
wrigty12 updated Berry Planting Improvements with a new update entry:

Update 1.10 - Berry Seeds and crash fix

BEFORE UPDATING ANY FILES: If you have made any edits to the 000_Settings file, make sure to make a backup of that files before updating the plugin. If you copy over files to update, it will overwrite your changes.

Shout out to Zia222 for the idea that lead to me adding Berry Seeds to this plugin.

Change Log
  • ⭐New feature: Berry Seeds. You can make it so Berry Seeds are planted instead of the Berries themselves. Once a...

Read the rest of this update entry...
 
I have both berry pots and your improvements plugin. I did the setup in installation to swap lines of code. I'm not sure what's happening with the two plugins. Berry Pots doesn't open and crashes the game.

Ruby:
Expand Collapse Copy
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NoMethodError
Message: undefined method `move_speed' for nil:NilClass

Backtrace:
[TDW Berry Planting Improvements] 001_BerryPlantingImprovements.rb:36:in `tdw_new_init'
[TDW Berry Planting Improvements] 001_BerryPlantingImprovements.rb:31:in `initialize'
[BerryPots for Essentials] BerryPots.rb:76:in `new'
[BerryPots for Essentials] BerryPots.rb:76:in `block in pbStartScene'
[BerryPots for Essentials] BerryPots.rb:75:in `each'
[BerryPots for Essentials] BerryPots.rb:75:in `pbStartScene'
[TDW Berry Planting Improvements] 005_CompatibilityPatches.rb:44:in `pbStartScene'
[BerryPots for Essentials] BerryPots.rb:59:in `pbStartScreen'
[BerryPots for Essentials] BerryPots.rb:28:in `block in pbBerryPots'
MessageConfig:575:in `pbFadeOutIn'

Edit: Somehow the berry pots is working now. I repasted the watering code. Compiled it. Maybe between the many tests, it finally worked.
  • item scene from bag
  • register scene
  • pb script event call
all worked with berry pots and no errors with the improvement scripts.
 
Last edited:
wrigty12 updated Berry Planting Improvements with a new update entry:

Update 1.9.4 - Prevent Planting Flag and Pest Battle Bug Fix

The only change was done in the 001_BerryPlantingImprovements file. You only need to replace that file for this patch.

Change Log
  • ⭐New feature: Prevent Planting. Add the "NoPlant" flag to any berry (or seed) item to prevent it from being planted.
  • 🛠️Added proper handling of whiting out during a pest wild battle.

Read the rest of this update entry...
 
Thanks for this...

A question. If I add pbDropBerrySeeds(berry_id, berry_yield) after the pbPickBerry(berry_id, berry_yield) script call in that event page, the player can grab seeds even when it does not pick any berries. Am I doing something wrong?
 
Thanks for this...

A question. If I add pbDropBerrySeeds(berry_id, berry_yield) after the pbPickBerry(berry_id, berry_yield) script call in that event page, the player can grab seeds even when it does not pick any berries. Am I doing something wrong?
Ah, good catch. You'll have to put pbPickBerry in a conditional branch script check instead, so it only runs things if the player picks berries (returns true). It would look like this when looking at the event page:
Code:
Expand Collapse Copy
Conditional Branch: Script: pbPickBerry(:ORANBERRY,3)
  Script: pbDropBerrySeeds(:ORANBERRY,3)
 
  Branch End
 
I have both berry pots and your improvements plugin. I did the setup in installation to swap lines of code. I'm not sure what's happening with the two plugins. Berry Pots doesn't open and crashes the game.

Ruby:
Expand Collapse Copy
[Pokémon Essentials version 21.1]
[v21.1 Hotfixes 1.0.9]

Exception: NoMethodError
Message: undefined method `move_speed' for nil:NilClass

Backtrace:
[TDW Berry Planting Improvements] 001_BerryPlantingImprovements.rb:36:in `tdw_new_init'
[TDW Berry Planting Improvements] 001_BerryPlantingImprovements.rb:31:in `initialize'
[BerryPots for Essentials] BerryPots.rb:76:in `new'
[BerryPots for Essentials] BerryPots.rb:76:in `block in pbStartScene'
[BerryPots for Essentials] BerryPots.rb:75:in `each'
[BerryPots for Essentials] BerryPots.rb:75:in `pbStartScene'
[TDW Berry Planting Improvements] 005_CompatibilityPatches.rb:44:in `pbStartScene'
[BerryPots for Essentials] BerryPots.rb:59:in `pbStartScreen'
[BerryPots for Essentials] BerryPots.rb:28:in `block in pbBerryPots'
MessageConfig:575:in `pbFadeOutIn'

Edit: Somehow the berry pots is working now. I repasted the watering code. Compiled it. Maybe between the many tests, it finally worked.
  • item scene from bag
  • register scene
  • pb script event call
all worked with berry pots and no errors with the improvement scripts.
im getting the same error and cant seem to fix it
 
Back
Top