SnowMV - Simple Gathering

Discussion in 'JS Plugin Releases (RMMV)' started by Sn0wCrack, Oct 24, 2015.

  1. Sn0wCrack

    Sn0wCrack Veteran Veteran

    Messages:
    82
    Likes Received:
    48
    Location:
    Australia
    First Language:
    英語
    Update the script, I've pushed a new version that should fix this issue hopefully
     
  2. Helyx

    Helyx Villager Member

    Messages:
    20
    Likes Received:
    2
    First Language:
    French
    It's done, and I have exactly the same error :/
     
  3. Iliketea

    Iliketea Tea lover Veteran

    Messages:
    848
    Likes Received:
    934
    Location:
    Germany
    First Language:
    German
    This is a really great plugin, but it just doesnt work....

    This is my set up and the error massage I get:

    [​IMG]

    [​IMG]

    [​IMG]
    I hope you can help me getting this awesome plugin to work ><

    Edit: it works fine if I set the true/false part of the plugin command to true and use the Hand-"tool". However the item in question are herbs and I dont really want to have to pick a tool for it, so basically use the "false" part. but that sadly doesnt work.  
     
    Last edited by a moderator: Nov 17, 2015
    Maebius likes this.
  4. DarkSlayerEX

    DarkSlayerEX Veteran Veteran

    Messages:
    95
    Likes Received:
    9
    First Language:
    English
    By default, SnowGather uses item 10 as the "by hand" item. If your item database is lower than 10, it will most likely be your issue.

    Setting tool requirement to true, might automatically overlook the hand tool, unless the item would have normally had a harvest chance for said herbs.

    If that IS your issue, you can remedy it by changing the plugin parameter's "By Hand" setting, or increase your item database.

    This of course, is my opinion on the possible solution. I may be wrong still, but I figure I could try to help.
     
    Last edited by a moderator: Nov 17, 2015
  5. Maebius

    Maebius Veteran Veteran

    Messages:
    40
    Likes Received:
    2
    I get the same "Length" error as above, and use 25 items (hand being #10).   Seems I have the same setup for the function call too. though use SnowGather false [20,21] this    which shouldn't really change things.   items#20 and #21 are the sticks and Stones that are harvestable.

    They both have notetags that read

    <Harvest Chance>

    20: 100%

    21: 80%

    </Harvest Chance>

    <Harvest Minimum: 1>

    <Harvest Maximum: 4>

    I did just re-download both the MVCommons and SnowGather today, from their respective links... so,  should be the most current version of each
     
    Last edited by a moderator: Nov 17, 2015
  6. Sn0wCrack

    Sn0wCrack Veteran Veteran

    Messages:
    82
    Likes Received:
    48
    Location:
    Australia
    First Language:
    英語
    Sorry guys, I've been busy recently with exams and such, but that's all over now.

    I'll be getting back into fixing any issues now

    I hope you can help me getting this awesome plugin to work ><

    Edit: it works fine if I set the true/false part of the plugin command to true and use the Hand-"tool". However the item in question are herbs and I dont really want to have to pick a tool for it, so basically use the "false" part. but that sadly doesnt work.  
    Dark Slayer is correct, you need a hand tool defined in your database, you can change the item id in the script's parameters. And you need them to have defined chances for gathering the items in their note tags.

    Harvest Chance is defined on the Tool, in your case the hand.

    And Harvest Min and Max on the Items.

    I've made the documentation in the script in caps so people can't misunderstand where these tags go, and people seem to always overlook the documentation being in the script and accessed by the right clicking on a plugin in the plugin manager and simply pressing the Help button. I don't want my documentation to go to waste and have to repeat it all here for no reason.
     
    Last edited by a moderator: Nov 17, 2015
  7. Iliketea

    Iliketea Tea lover Veteran

    Messages:
    848
    Likes Received:
    934
    Location:
    Germany
    First Language:
    German
    I do have a hand tool in my database, it ID 35 and I set it up with harvest chances and so on. that is why it works if i set the plugin call to be "SnowGather true [3,17] this", but I wanted to make it so that i dont have to choose a tool or that it does not require one. 

    Well, in the end I accepted that it woundt work that way and just went with " SnowGather true [3,17] this" .
     
  8. Maebius

    Maebius Veteran Veteran

    Messages:
    40
    Likes Received:
    2
    Thanks!  I did read the Helpdocumentation, but apparently mis-understood it.   Totally my bad.  

    Weird, still getting the error,

    Here's a new project with VERY minimal changes.  I re-downloaded both the MVcommons and the SnowGather scripts, just before making this project, so are "current".   the only changes to the database were to add 3 more items. (hand, sticks, stones).

    The only change I made to any settings within the plugin, were to make the hand tool #17, which was the next "new unused item slot".

    See the screenshots for details.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    No worries.    I can run the plugin without errors if I require tools, and having the event call:    SnowGather true [##] this

    However setting it to False is what causes the errors.  
     
    Last edited by a moderator: Nov 18, 2015
  9. Sn0wCrack

    Sn0wCrack Veteran Veteran

    Messages:
    82
    Likes Received:
    48
    Location:
    Australia
    First Language:
    英語
    Sorry if I came off as rude before, been stressful these past few weeks.

    I have no clue how, but this never occurred during my testing, but I've updated the script and all should be well.
     
  10. MuteDay

    MuteDay Mutation Engine Veteran

    Messages:
    253
    Likes Received:
    39
    First Language:
    English
    more then likely you need to put mcv below all the yep engine and then put this below that and it should help clear up the problems
     
  11. Malacay2k11

    Malacay2k11 Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    German
    can anyone tell me where is my Misstake??

    Item to gather (Pick) ID: 28

    The Farmable Item (Plant) ID: 32

    Plugin order:

    MVCommons.js

    OrangeEventManager.js

    OrangeTimeSystem.js

    SnowGather.js   v2

    Snowgather Config:

    Hand Tool ID : 0

    Hand Tool Last : false

    Respawning Events : true

    Manual Self Switches : true

    Last Result Store : false

    Last Result Variables : 70

    -----------------------------------------

    in the "Event" i add a "Plugin Command" with this Command:   "  SnowGather true [32] this "

    Pick Notetags:

    <Harvest Chance Boost: 1%>

    <Harvest Chance>

    32:100%

    </Harvest Chance>

    <Chance Break>

    </Chance Break>

    Farmable Item Notetags:

    <Harvest Minimum: 1>

    <Harvest Maximum: 3>

    Event Notetags:

    <Respawn Time: 0.1> (OrangeTimeSystem.Js is included)

    at Eventpage 2. Self Switch A is ture

    ...

    At Game:

    at interaction with the Event > get only the Message, Cannot read property "harvestChance" of null

    EDIT:

    im edit some notetags, but same ERROR:

    Pick Notetags:

    <Harvest Chance Boost: 1%>

    <Chance Break>

    </Chance Break>

    Farmable Item Notetags:

    <Harvest Chance: 90%>

    <Harvest Minimum: 1>

    <Harvest Maximum: 3>

    ... makes me craaaaazyyyy

    Error Report:

    TypeError: Cannot read property 'harvestChance' of null
    at Object.Snow.Gather.Gather [as Gather] (/C:/Projekt/MV/js/plugins/SnowGather.js:438)


            if (!MVC.Boolean(Snow.Gather.Parameters["Hand Tool Last"])) {
                for (var j = 0; j < recievableItems.length; j++) {
                    for (var k = 0; k < hand.harvestChance.length; k++) {
                        if (hand.harvestChance[k].itemId == recievableItems[j]) {
                            if (!playerUsableItems.contains(hand)) {
                                playerUsableItems.push(hand);


    at Game_Interpreter.pluginCommand (/C:/Projekt/MV/js/plugins/SnowGather.js:565)


        if (command === "SnowGather") {
            if (args.length == 4) {
                Snow.Gather.Gather(JSON.parse(args[0]), JSON.parse(args[1]), JSON.parse(args[2]), eval(args[3]));
            } else if (args.length == 3) {
                Snow.Gather.Gather(JSON.parse(args[0]), JSON.parse(args[1]), 0, eval(args[2]));
            } else {
                Snow.Gather.Gather(JSON.parse(args[0]), JSON.parse(args[1]))

    at Game_Interpreter.command356 (rpg_objects.js:10444)
    at Game_Interpreter.executeCommand (rpg_objects.js:8894)
    at Game_Interpreter.update (rpg_objects.js:8802)
    at Game_Map.updateInterpreter (rpg_objects.js:6080)
    at Game_Map.update (rpg_objects.js:5987)
    at Scene_Map.updateMain (rpg_scenes.js:417)
    at Scene_Map.updateMainMultiply (rpg_scenes.js:409)
    at Scene_Map.update (rpg_scenes.js:398)


    Hope i submitted enough informations^^
     
    Last edited by a moderator: Nov 19, 2015
  12. Sn0wCrack

    Sn0wCrack Veteran Veteran

    Messages:
    82
    Likes Received:
    48
    Location:
    Australia
    First Language:
    英語
    Okay, a few things, the way you had it set up first was completely correct.

    You may want to change the chance harvest to this:

    <Harvest Chance>

    32: 100%

    </Harvest Chance>

    Note the space.

    Also, the Hand Tool is required, so creating one is needed, so set the item id, and make an item. I'll probably change this at some point...

    Respawn Time is positive integers only (positive whole numbers).

    You don't have to include the Chance Break if you don't plan on it break, don't think it'll do anything weird, but just a note.

    To get some better debug info for me, press F8 when the error appears and tell me what shows up in the console. (that is if none of this worked...)

    EDIT: With that new edit of yours, it's defiantly the lack of the Hand tool.
     
    Last edited by a moderator: Nov 19, 2015
  13. Malacay2k11

    Malacay2k11 Warper Member

    Messages:
    3
    Likes Received:
    0
    First Language:
    German
    FINALY! its works now :D thx u so much^^

    how can i setup more than 1 Tool for diffrent items to harvest?

    e.x. Pickaxe for rocks and maybe sickle for herbs?
     
    Last edited by a moderator: Nov 19, 2015
  14. Sn0wCrack

    Sn0wCrack Veteran Veteran

    Messages:
    82
    Likes Received:
    48
    Location:
    Australia
    First Language:
    英語
    You'd just create a new tool that harvests those particular items.

    So the Pickaxe would have:

    <Harvest Chance>

    rockItemId: 100%

    </Harvest Chance>

    and the Sickle would be

    <Harvest Chance>

    herItemId: 100%

    </Harvest Chance>

    Of course you can change the percentages as well and add more items by using a new line, look over the help section in the script or in the first post for more information on this.
     
  15. Blue001

    Blue001 Veteran Veteran

    Messages:
    231
    Likes Received:
    110
    Location:
    Maine, USA
    First Language:
    English
    Primarily Uses:
    RMMV
    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)
     
    Last edited by a moderator: Dec 2, 2015
    Iliketea likes this.
  16. EFizzle

    EFizzle Rum aficionado Veteran

    Messages:
    294
    Likes Received:
    61
    Location:
    Richmond
    First Language:
    English
    Primarily Uses:
    N/A
    Ohp, nevermind I solved it.

    I think there's a compatibility issue with the "recently" updated MVcommons plugin.

    I spent hours trying to get this to work and reading every issue above, yet I still get a game breaking bug.

    When I start up the game I get

    No parameters could be found for 'SnowGather' !!/C:/.../Documents/Games/Project2/js/plugins/MVCommons.js:964 $.parametersThen when I go and try to gather I get this

    TypeError: Cannot read property 'harvestChance' of undefined at Object.Snow.Gather.Gather [as Gather] (SnowGathering.js:438) at Game_Interpreter.pluginCommand (SnowGathering.js:567) at Game_Interpreter.command356 (rpg_objects.js:10445) at Game_Interpreter.executeCommand (rpg_objects.js:8895) at Game_Interpreter.update (rpg_objects.js:8803) at Game_Map.updateInterpreter (rpg_objects.js:6080) at Game_Map.update (rpg_objects.js:5987) at Scene_Map.updateMain (rpg_scenes.js:417) at Scene_Map.updateMainMultiply (rpg_scenes.js:409) at Scene_Map.update (rpg_scenes.js:398)SceneManager.catchException rpg_managers.js:1618 SceneManager.update rpg_managers.js:1579 I even created a fresh project with only MVCommons and your script below it, and it's the same issue. I'm 100% positive I've got my items set up correctly.

    My "hand" item is set to 29 in the plugin manager and it has this in the notetag

    <Harvest Chance>45: 100%46: 100%</Harvest Chance>and my items 45 and 46 have this in the notetag

    <Harvest Minimum: 1><Harvest Maximum: 3>My event's plugin command has

    SnowGather false [45,46]I even tried it as true with other tools in my inventory and I still get the same error. Any idea what could be causing this?

    -[EDIT]-

    Ohp, I'm a dumb blonde. Ignore above, I solved the issue.

    If anyone else comes across this same issue, it was caused by me renaming SnowGather.js. I found out MVCommons get's pissy when you change the names of some plugins and gives an error but doesn't close the game.

    Lesson learned: Don't change the name of SnowGather.js
     
    Last edited by a moderator: Jan 4, 2016
  17. Sn0wCrack

    Sn0wCrack Veteran Veteran

    Messages:
    82
    Likes Received:
    48
    Location:
    Australia
    First Language:
    英語
    Nah, that' not an MVCommons thing, it's an Engine Limitation with how it gets script parameters, which is based on the filename of the script itself.
     
  18. EFizzle

    EFizzle Rum aficionado Veteran

    Messages:
    294
    Likes Received:
    61
    Location:
    Richmond
    First Language:
    English
    Primarily Uses:
    N/A
    Oh! Good to know! I read about it somewhere in the MVCommons thread, but I didn't know it was a engine wide limitation.

    Another thing, is there anyway to show the icon of the item gathered in the Successful Harvest message? Or would I need a separate plugin (or variable stuff) for something like that?
     
  19. IL RASTA

    IL RASTA Villager Member

    Messages:
    8
    Likes Received:
    1
    Hello to all

    Sorry I am the most ignorant of all ....

    I just can not get it started ... there would be a kind soul that I would achieve a mini demo ?? please help  :(   :(

     

     


    No one who can help me?

    I tried in every way but I do not even part
     
    Last edited by a moderator: Jan 18, 2016
  20. solaris1111

    solaris1111 Veteran Veteran

    Messages:
    115
    Likes Received:
    19
    First Language:
    French
    Hi Sn0wCrack,


    I noticed a problem with respawn, and someone correct me if i'm wrong :


    If i gather something, for exemple, a fruit from a bush. It disappear and reapper after 3 hours. I tested it, everything is fine. But if after i gathered it, i save and leave the game, when i come back after, the fruit bush will never reappear again. Gone forever. Do you think there is something wrong somewhere? Is there a way to fix it? Or it's me, having a problem? The plugins are in the right orders. The tag is the following : <Respawn Time: 3>


    Thank you for your support!


    EDIT: I found a temporary fix that need the second page to be a parallel process that check if it's X hours later than the last gathering. If not, it reset it turning off the A self-switch. In the best world, if i could avoid using Parallel Process it would be nice. 
     
    Last edited by a moderator: Mar 29, 2016

Share This Page