Hey guys!
I'm sorry for showing up just now, I've been trying to get my account validated since yesterday hahaha.
I've been following
@Strobe and Deluxe Auto-grabber and I managed to get it to work with 1.5
without the need to replant any crops, with Global Forage set to ON and without causing issues with Golden Walnuts, I've uploaded my version below, it uses the source from here:
https://github.com/Pathoschild/smapi-mod-dump/tree/1a8bafc1b62b8cb99f59384a0e9679366339803e/source/Deluxe%20Auto-Grabber/DeluxeGrabber
TL/DR:
-This version will not cause the DivideByZero Exception and will work 100% to collect global forage, it will not attempt to collect Golden Walnuts in the Island maps.
-This version does not yet attempt to grab new items from 1.5, if you guys could provide me a list of new item Id's of the new forageable items, I'd be glad to make this update.
I'd like to get in touch with
@Strobe to make sure I'm using the same source he's using and collaborate to fully update the Mod, if you get this, PM me plz :)
Long story/Technical details:
-The DivideByZero Exception is caused by the
maxHarvestIncreasePerFarmingLevel property of the Crop object being returned as 0 for Coffee beans and perhaps other Crops too. I don't know the previous version values (if anyone knows, let me know), so right now I've changed it so it either uses the existing value or, if it is zero, reverts to 1. This Exception literally stops the processing of the grabber on the start of each day, hence why we didn't get all the fruits from trees or forageable items, but still got a few.
-The Golden Walnuts are collected from a Bush Object, the original mod author coded Bushes to be collected when blooming, but made the types of berries static in code, so, in Sping, it collects Salmonberries, and in Fall, it collects Blackberries. However, this causes an issue with the new Golden Walnuts, because they are also collected from Bushes (the first one you get and a few others) but are neither Salmonberries nor Blackberries. If you are in either Spring or Fall, the previous code would just create the respective berry in your global grabber and delete the Walnut - So some of your Berries would actually be the Golden Walnut. - In case you already played in 1.5 with your savefile, you cannot get the Walnuts to be placed back, however, you can spawn them with CJB Item Spawner or, if you want, get a previous save from 1.4.5 and load into that one, your Golden Walnuts will be correctly in place when using this version of Deluxe Auto-Grabber.
I hope this can be helpful and I'd like to get your feedback, I plan on updating the mod to gather the new items and work better with the Islands, but for now, this will be functional.