SnowMV - Simple Gathering

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語

SnowMV - Simple Gathering v2.3.1


by Sn0wCrack


Introduction
Simple Gathering is a way to easily setup an item gathering event, including requirements for gathering (such as Pickaxes, Axes, Shovels, etc.) and highly customisable odds based upon what you are gathering and what tools you are using.
 
How to Use
 
Since people don't know how to use the Help section, here's the full documentation.

/*
* ============================================================================
* Introduction
* ============================================================================
*
* Welcome to the Simple Gathering System by Sn0wCrack, this script allows you
* to create gathering events in which you players to search for resources using
* tools (or not if you want!)
*
* Please see https://github.com/Sn0wCrack/SnowMV/blob/master/LICENSE for license
* details.
*
* If you use this script, please give credit!
*
* ============================================================================
* Setup
* ============================================================================
* In your items database you can tag any item (this means only normal items,
* not weapons, armour, etc.) with the following tags:
*
* Havesting Tools:
* THESE ARE PUT ON THE ITEMS YOU WANT TO USE TO HARVEST WITH IN THE NOTE TAG SECTION
*
* <Harvest Chance Boost: x%> - Not Required
* This tag allows you to set an amount this particular item will boost
* the chances of you finding items.
*
* <Harvest Chance>
* itemId: percentage%
* </Harvest Chance>
*
* You can set the chance for harvesting different materials for an item
* by something like this:
* <Harvest Chance>
* 7: 100%
* 8: 10%
* </Harvest Chance>
*
* <Chance Break>
* </Chance Break>
*
* Same as above however the values are how often the item will break when
* trying to harvest the resource.
*
* Harvestables:
* THESE ARE PUT ON THE ITEMS YOU WANT TO BE GATHERED IN THE NOTE TAG SECTION
*
* <Harvest Minimum: x> - Required
* The minimum amount of the item to be found upon the successful harvesting of
* it.
*
* <Harvest Maximum: x> - Required
* The maximum amount of the item to be found upon the successful harvesting of
* it.
*
* Events:
* THESE ARE PUT ON EVENTS (in the event editor page) YOU WANT TO RESPAWN IN THE NOTE TAG SECTION
*
* <Repspawn Time: x> - Required if you want respawing events (Requires OrangeTimeSystem)
* Sets how long in hours you want the event to respawn in
*
* ============================================================================
* Usage
* ============================================================================
* To call the script, create an event with a plugin command
* SnowGather require tools [recieveable item ids] commonEventId this
*
* Replace require tools with true if you want the player to need tools to gather
* items at this event, or false if you don't want them to use any tools on this
* particular event spot.
*
* Recievable item ids is an array that you replace with something like [7,8]
* please note how there are not spaces in this, keep it this way or it will not
* function correctly. This sets the items taht you can get from this event.
*
* commonEventId is the id of the common event you want to run after selecting a tool
* to harvest with. You may ignore this if you don't want to use it.
*
* this is well, always the word this, this is only required if you're using
* a time system.
*
* Repsawning Events:
*
* In order for an event to actually despawn and then respawn after the allotted
* time, you must first create second event page, on this page you just have to
* have the self switch for "A" checked as a condition, leave everything else
* blank.
*
*/




Future Plans

  • None right now

Bugs
 
v1:

  • Newlines not working on Incorrect Tools Message  - Fixed as of 1.2.4
  • Stalling on startup, CPU throttling, etc. - Fixed as of 1.3.0
  • Doubling up of "Failed to Harvest Resources" message - Fixed as of 1.3.3

v2:

  •  Chance break was required - Fixed as of 2.0.1

Download
 
Ensure that you rename the scripts to "SnowGather.js" if they are not named that in your plugins folder

v1:
https://github.com/Sn0wCrack/SnowMV/blob/master/SnowGather/SnowGather.v1.js 

v2:
https://github.com/Sn0wCrack/SnowMV/blob/master/SnowGather/SnowGather.js
 
Dependencies


Compatibility


Credits

  • Yanfly for the note tag reading function
  • Kane Hart for requesting the plugin
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
38,807
Reaction score
12,225
First Language
English
Primarily Uses
RMMV
Any reason why you've provided access via a script call rather than a plugin call? That's inconsistent and is going to confuse a lot of people
 

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語
Any reason why you've provided access via a script call rather than a plugin call? That's inconsistent and is going to confuse a lot of people
Well, I'm not really sure how I'd even do that in the first place to be honest, especially with it taking in arrays.

And I do see a few scripts already posted here that do script calls rather than Plugin Commands, unless I'm completely misunderstanding what a Plugin Command actually is (a simple alias to a function in a Plugin)

EDIT: I've figured out how to perform a plugin command with Array inputs, I'll update the OP with the new instructions
 
Last edited by a moderator:

MuteDay

Mutation Engine
Veteran
Joined
Oct 19, 2015
Messages
253
Reaction score
39
First Language
English
awsome thank you for releasing this to the community
 

Bernkastel

Veteran
Veteran
Joined
Dec 13, 2012
Messages
75
Reaction score
15
First Language
English
Primarily Uses
Well, I'm not really sure how I'd even do that in the first place to be honest, especially with it taking in arrays.

And I do see a few scripts already posted here that do script calls rather than Plugin Commands, unless I'm completely misunderstanding what a Plugin Command actually is (a simple alias to a function in a Plugin)

EDIT: I've figured out how to perform a plugin command with Array inputs, I'll update the OP with the new instructions
can you explain this to me? what is a script call and plugin command and why would it confuse normal users?
 

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語
can you explain this to me? what is a script call and plugin command and why would it confuse normal users?
A script call is directly using JavaScript to run the script, whereas a Plugin Command (which is new to MV) is a simple non-Programmingy way for users to call scripts.

Like before it was

Snow.Gather.Gather([2, 5], [5. 4]);to call the script using a Script event command, and now it's just simply

SnowGather [2,5] [5,4]to call with a Plugin Command event command.

Shaz was probably just worried people could get confused with this activating differently than most other fairly simple scripts, I don't think it would confuse many considering my instructions, but I implemented it because it was simple enough (but semi-restricting in someways)
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
@Sn0wCrack thank you for this I can't wait to try it out. I love your idea there of time of day. I could see that really exciting feature later on and adding more complexity. I know some my fav MMO's I wanted to see is a seasons/time based gathering / fishing. I think FF14 has that time of day effects + weather based effects.

Anyways thanks again I can't wait to give this a try!
 

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語
@Sn0wCrack thank you for this I can't wait to try it out. I love your idea there of time of day. I could see that really exciting feature later on and adding more complexity. I know some my fav MMO's I wanted to see is a seasons/time based gathering / fishing. I think FF14 has that time of day effects + weather based effects.

Anyways thanks again I can't wait to give this a try!
Glad you like it, was a good exercise in getting to know MV.

I've just updated the script to support custom messages.
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
So I'm not sure if I'm doing anything wrong here. I for testing sake using 100 (stone) to mine 101 (coal)

Then for coal I add these tags:

<Chance Harvest: 100%>

<Harvest Minimum: 1>

<Harvest Maximum: 5>

I add nothing for stone since I don't need a harvest boost for example just testing so I leave stone notes blank.

This was the plugin event:

SnowGather [100] [101]

I can't harvest I think says failed to harvest. Now if I set it to false so

SnowGather false [101]

It works and randomly mines 1-5 ores :)

I also have a small suggestion it would be cool rather then doing chance based on the ore having one on the picks. (Stone) as an example in my case during the testing.

Stone Pick Note:

<Harvest Chance [101]: 100%>

<Harvest Chance [102]: 70%>

<Harvest Chance [103]: 40%>

<Harvest Chance [104]: 0%> - Can't mine it period.

Maybe something similar to chance break. But making a higher pick on a low item never break or less so here we go.

<Chance Break: [101] 0%>

<Chance Break: [102] 5%>

<Chance Break: [103] 10%>

<Chance Break: [104] 40%>

Not sure if these are bad ideas it seems overall it be nice to put most of the control of what you do via the items that way they can become slightly easier to change and work with.

I also might just doing stuff wrong but loving it so far!
 

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語
So I'm not sure if I'm doing anything wrong here. I for testing sake using 100 (stone) to mine 101 (coal)

Then for coal I add these tags:

<Chance Harvest: 100%>

<Harvest Minimum: 1>

<Harvest Maximum: 5>

I add nothing for stone since I don't need a harvest boost for example just testing so I leave stone notes blank.

This was the plugin event:

SnowGather [100] [101]

I can't harvest I think says failed to harvest. Now if I set it to false so

SnowGather false [101]

It works and randomly mines 1-5 ores :)

I also have a small suggestion it would be cool rather then doing chance based on the ore having one on the picks. (Stone) as an example in my case during the testing.

Stone Pick Note:

<Harvest Chance [101]: 100%>

<Harvest Chance [102]: 70%>

<Harvest Chance [103]: 40%>

<Harvest Chance [104]: 0%> - Can't mine it period.

Maybe something similar to chance break. But making a higher pick on a low item never break or less so here we go.

<Chance Break: [101] 0%>

<Chance Break: [102] 5%>

<Chance Break: [103] 10%>

<Chance Break: [104] 40%>

Not sure if these are bad ideas it seems overall it be nice to put most of the control of what you do via the items that way they can become slightly easier to change and work with.

I also might just doing stuff wrong but loving it so far!
You need to include a chance boost, just leave it at 0%, I'll fix this now actually.

Some fairly good suggestions, I'll look into how to actually implement a per item system, originally a percentage chance of actually mining the items would have been passed in with the items required and the receiving item.
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Thanks for that info.

Yeah it's all cool I can see being item based more then ore based would make a big difference just giving more control over to items. But it's a suggestion nonetheless. 

I'm really happy you were able to make this. I should ask for plugin suggestions for Ace I spend 1000 hours in Ace and did a lot of things event based and it was killing me a lot. 
 

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語
I've just updated the script with support for OrangeTimeSystem

It all seems to work fine so far, all you have to do is setup a second event page with the selfswitch check for "A".
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Last edited by a moderator:

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語
Tried latest version using the same setup as I always did now with mvcommons.

I get this error when going up to the ore. It should tell me I have no tool etc.

http://i.imgur.com/KjFr83k.png

This was the version I used last that worked fine besides of course that report I made.

https://github.com/Sn0wCrack/SnowMV/commit/389eb3cac63c5cf2af22303b39c5c4531484978e

I see you added the event stuff at the end not sure if it matters but I did not add it to my event:

SnowGather [100] [101]
Odd, I can't seem to reproduce this, perhaps edit the Plugin's parameters in the Plugin Manager, perhaps since that version didn't have any parameters its not loading anything in. And as a second measure ensure you plugin is called SnowGather.js

EDIT: I fixed a bug with the time system override not getting read in properly as well
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Odd, I can't seem to reproduce this, perhaps edit the Plugin's parameters in the Plugin Manager, perhaps since that version didn't have any parameters its not loading anything in. And as a second measure ensure you plugin is called SnowGather.js

EDIT: I fixed a bug with the time system override not getting read in properly as well
That worked. I had to delete the plugin and add it again.

It all seems to work great now :)

Tomorrow I will start testing out the timed based stuff I need to edit a bunch of art to make each ore color hehe :)
 

Hudell

Dog Lord
Veteran
Joined
Oct 2, 2014
Messages
3,340
Reaction score
3,042
First Language
Portuguese
Primarily Uses
RMMV
You don't need to replace OrangeTimeSystem._onChangeHour, you can do this:
 

OrangeTimeSystem.on('changeHour', Snow.Gather.onChangeHour); 
and then Snow.Gather.onChangeHour will be called every hour (This is done by Orange Event Manager)
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
You guys are great. I spend half my time clicking like :)
 

Sn0wCrack

Veteran
Veteran
Joined
Aug 2, 2015
Messages
82
Reaction score
48
First Language
英語
Fixed a bug where the generated number wouldn't be only 2 decimal places (due to it applying harvest chance bonuses).

This could lead to instances where 0.51111 would be generate and the chance is 0.51 to get it, you wouldn't receive the items, minor but a bug to kill nonetheless.

EDIT:

Also fixed a bug with the Incorrect Tools Message not using new lines correctly (probably needs a bit more work).
 
Last edited by a moderator:

??????

Diabolical Codemaster
Veteran
Joined
May 11, 2012
Messages
6,271
Reaction score
2,333
First Language
Binary
Primarily Uses
RMMV
Yanfly for the note tag reading function
MVC has a notetag reading function.. a single function that can be called with absolute ease!

Edit:

Code:
MVC.getTag(text, tag /*, defaults */)
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

Writing out an idea for the No Travel Game Jam. I have a general plot and challenge written out, it's just a matter of filling the rest in and making it interesting.
A definite difficult time right now. How is everyone doing during this pandemic? I already have seen furloughs and layoffs.
Hollow 1977 wrote on Archeia's profile.
Hope you and your family are doing well during this difficult time. :)
My elderly neighbor whom I've been buying groceries for just got carried out of his home on a stretcher by guys with hazmat suits. Considering I've been his only point of contact for the past month it's probably safe to say my boss was right to tell me to stay home once I developed a mild cough after all.
Damn. All these new features to the forums. Takes some getting used to.

Forum statistics

Threads
95,642
Messages
930,676
Members
125,963
Latest member
highchloride
Top