If you set the hand tool up to be used to grab harvest chances from when no tool is used... do you need to actually have that hand item in your inventory? Or is it just there to store the harvest chance data?
Also, if you want the player to use their hands, should you have false listed in the call or just leave it blank?
I keep getting "Can't read property 0 of undefined."
I have hand item set to id10 with that item listing the following.
<Harvest Chance>
6: 100%
</Harvest Chance>
and on item 6 (my kindling), I have...
<Harvest Minimum: 1>
<Harvest Maximum: 3>
and the script call is....
SnowGather false [6] this
yet I still get the error.
My event has <Repspawn Time: 1> in the note box, and a second page with Switch A set (with blank contents).
EDIT : So I got this to work, by setting it to 'true' in the plugin command. But that brings up the window to choose what tool to use. I don't want that to happen, since only hands can be used to grab this item... Is there any way to have 'false' work so that window doesn't pop up???
Might I suggest a change to the functions in the plugin command to have the following options instead of true/false.
- SnowGather choose [id] this ("choose" would have you choose the tool to use from the avail tools that will work on this item)
- SnowGather best [id] this ("best" would use the tool that has the best chance of yields.)
- SnowGather tool [id] this (would automatically use tool (replaced with a number id of the tool itself) if you have it in your inventory, if not, failed to harvest message would display. could put X,Y,Z for multiple tools being checked. Would always use X first, Y second, Z third etc...)
- SnowGather hands [id] this (Would use the hands, automatically)
Also, instead of having the items themselves set the harvested min and max, wouldn't it make more sense to have the tool call everything? This way you could set different chances for each tool, and differing drop rates for each item. Like this...
<SnowHarvest>
4: 50%, 1,3
</SnowHarvest>
so this would mean, this tool would have a 50% chance to harvest 1-3 of resource 4.
and if you put ....
<SnowHarvest>
4: 50%, 1,3
4: 50%, 1,1
</SnowHarvest>
That means you would have a 50% chance to get 1-3 and another 50% chance to get an extra 1 each time you harvest with that tool. So sometimes (rarely) you could get 4.
Also could set up multiple resources to get, with different chances for each.
<SnowHarvest>
4: 50%, 1,3
4: 50%, 1,1
7: 100%, 1,4
</SnowHarvest>
Putting all the tags on the tool itself, also simplifies it, and doesn't make the user have to remember what tag goes where.
Also, any thought of making equipped Gear and States be able to improve percent chances of getting a resource? So equip a miners helmet and it would improve all chances to harvest X item?
Tag could look like this...
<SnowHarvest>
4: chance + 5%
</SnowHarvest>
would mean, if you have the gear or state equipped you would have 5% more of a chance every time you harvest resource 4 with any tool. (could allow a minus chance too)
and...
<SnowHarvest>
4: yield + 1
</SnowHarvest>
would increase the yield by 1 IF already successful. (could allow a minus yield too)