• 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.
Berry Planting Improvements

Resource Berry Planting Improvements 1.8.5

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
Update on this: it seems to be dependency-related. I commented out the following lines from the meta.txt file and now it compiles just fine...

Optional = Arcky's Region Map,1.1
Optional = TDW Berry Core and Dex,1.1
It's an issue with Marin's plugin (if you look at the crash log, their plugin is the one crashing). Looking at that plugin's discussion thread, Thunderbirdgames reported the same crash in 2022. If you're not using Arcky's region map or my Berry Core plugins, then removing those dependencies is a fine temporary fix. Otherwise, you may run into issues by removing them.

EDIT: I looked at this to diagnose the problem. Marin's plugin overwrites the Array.swap function in a way that breaks the function if used elsewhere (like when the plugin order is determined by base Essentials).

The original takes the values of an array, then defines the index of those values first:
Original Swap:
Expand Collapse Copy
  def swap(val1, val2)
    index1 = self.index(val1)
    index2 = self.index(val2)
    self[index1] = val2
    self[index2] = val1
  end

Marin's doesn't do this, instead treating the array's value as the index, which results in the String not an Integer error.
Marin's Swap:
Expand Collapse Copy
  def swap(index1, index2)
    new = self.clone
    tmp = new[index2].clone
    new[index2] = new[index1]
    new[index1] = tmp
    return new
  end

So yeah, that's the plugin causing the issue, and will be an issue for any plugin that includes the Optional dependency in their plugins. It's not caused by mine.
 
Last edited:

Gardenette

Cooltrainer
Member
Joined
May 30, 2022
Posts
156
It's an issue with Marin's plugin (if you look at the crash log, their plugin is the one crashing). Looking at that plugin's discussion thread, Thunderbirdgames reported the same crash in 2022. If you're not using Arcky's region map or my Berry Core plugins, then removing those dependencies is a fine temporary fix. Otherwise, you may run into issues by removing them.

EDIT: I looked at this to diagnose the problem. Marin's plugin overwrites the Array.swap function in a way that breaks the function if used elsewhere (like when the plugin order is determined by base Essentials).

The original takes the values of an array, then defines the index of those values first:
Original Swap:
Expand Collapse Copy
  def swap(val1, val2)
    index1 = self.index(val1)
    index2 = self.index(val2)
    self[index1] = val2
    self[index2] = val1
  end

Marin's doesn't do this, instead treating the array's value as the index, which results in the String not an Integer error.
Marin's Swap's Swap:
Expand Collapse Copy
  def swap(index1, index2)
    new = self.clone
    tmp = new[index2].clone
    new[index2] = new[index1]
    new[index1] = tmp
    return new
  end

So yeah, that's the plugin causing the issue, and will be an issue for any plugin that includes the Optional dependency in their plugins. It's not caused by mine.
I appreciate it greatly!
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
wrigty12 updated Berry Planting Improvements with a new update entry:

Quick Patch 1.8.3 - Pest fixes

Change Log
  • 🛠️Fixed a crash caused by some of my custom code making its way into the Pest handling.
  • 🛠️Fixed some things that changed with v21 involving flutes and encounter rates so it wont crash in v21 anymore.
The only changes were done in the 001_BerryPlantingImprovements and 003_PestEncounters files. You only need to replace those files for this patch.

Read the rest of this update entry...
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
wrigty12 updated Berry Planting Improvements with a new update entry:

Update 1.8.4 - Quick changes for Arcky's Region Map

Change Log
  • 🛠️Removed some unnecessary code due to the latest update to Arcky's Region Map.
  • 📄 Removed the Optional requirement in the meta file for Arcky's Region Map since it's supported natively now.
The only changes were done in the 001_BerryPlantingImprovements and the meta.txt files. You only need to replace those files for this patch.

Read the rest of this update entry...
 

srcwolf1

Novice
Member
Joined
Jan 30, 2024
Posts
38
how can i get the berrys icon to show up on the map and how can i turn weeds on
and got this too
 

Attachments

  • Screenshot 2024-02-05 205638.png
    Screenshot 2024-02-05 205638.png
    52.7 KB · Views: 17
Last edited:

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
how can i get the berrys icon to show up on the map and how can i turn weeds on
and got this too
Berry icons and weeds should both appear by default, but are controlled in the Settings. They should appear once you start planting your own berries (note, these features do not occur with pre-planted berries you define through an event; they must be planted by the player first).

As for the crash, somehow your berry plant has pests but no berry. Not sure how that's happening... but I'll add handling to hopefully not crash when a berry isn't defined.
 
Last edited:

Juno and Ice

Rookie
Member
Joined
Jun 14, 2018
Posts
9
Do we have to restart the game in order for icons to work on the map? The console keeps saying I don't have the map(region,x,y) defined despite having them defined. Only one of my events actually show on map.
 

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
Do we have to restart the game in order for icons to work on the map? The console keeps saying I don't have the map(region,x,y) defined despite having them defined. Only one of my events actually show on map.
Did you save the game after you've entered the map with planted berries, but before you went back and added the map(region,x,y) tag? It's likely the berryplant data has already been saved off with the event without that tag. Short answer: yes you should make a new save file.
 

Mark9312

Rookie
Member
Joined
Sep 12, 2024
Posts
2
I planted a berry tree and now that It is grown up, when I pick the berries It doesn't disappear allowing me to pick them endlessly, why?
 
Last edited:

wrigty12

Tester-Coder Hybrid
Member
Joined
Jul 24, 2022
Posts
547
I planted a berry tree and now that It is grown up, when I pick the berries It doesn't disappear allowing me to pick them endlessly, why?
You're going to have to give me more info. Can you send me what your Settings look like for the plugin? And also the berry plant data entry in PBS for the berry facing the issue?
 

Mark9312

Rookie
Member
Joined
Sep 12, 2024
Posts
2
You're going to have to give me more info. Can you send me what your Settings look like for the plugin? And also the berry plant data entry in PBS for the berry facing the issue?
Sorry I fix It, I found an existing plugin (Item Find Description) that overwrites the pbPickBerry method, now everything seems to work perfectly thanks!
 
Back
Top