Jump to content

Recommended Posts

CSCA Gathering
By: Casper Gaming (Casper667)
Last Update: June 2, 2013
Latest version: 1.0.0

Introduction
Allows you to easily set up and populate your world with gathering nodes. Customize everything from respawn time, to rare finds and an item tier system! Use events with just 1 event command to create nodes on the map. CSCA Professions is optional, but will enable more features of this script.


Screenshots

Item tier system, require higher quality items for higher quality nodes!
gathering2k.png

Mining basic stone:

gatheringd.png


How to Use
Place in your materials section. Setup required. Instructions in script.

 

Script
Text file is found here(copy and paste everything into your script editor in the materials section): LINK
Requires CSCA Core Script to work properly - Get it here!

Optional: For a full profession system that works well with the gathering system, use CSCA Professions! - Get it here!

 

Credit
Casper Gaming

Terms

http://caspergaming.com/terms-of-use/

Edited by casper667
Update link URLs

Share this post


Link to post
Share on other sites

Everything works fine, now this error appear when I try to put 3 nodes with same type and same / different action regardless.

9fqflz.png

def csca_gather_get_node
@list.each do |command|

 

The one that I underline seems to be bugging me and I don't know what to fix.

Share this post


Link to post
Share on other sites

I have tried making 3 of the same nodes on the same map, and I don't get any error. I'm not quite sure what you meant when you said "and same / different action regardless."

Are you using any custom scripts (besides other CSCA scripts) that might affect events / event commands? Also, could you confirm that it is because of the 3 nodes of same type (does 3 nodes with different type also error for you, does 2 nodes error for you?)

Share this post


Link to post
Share on other sites

Here is the setup I have in that section:

  NODE[0] = {
    :type => :mining,
    :symbol => :copper_ore,
    :name => "Copper Ore",
    :actiontext => "Mine",
    :level_req => 1,
    :exp => 4,
    :min_tier => 0,
    :gather_item => [:item, 6, 1],
    :gather_item_rare => [:item, 6, 1],
    :rare_chance => 1,
    :amount_variance => 1,
    :rare_amount_variance => 1,
    :min_amount => 1,
    :rare_min_amount => 1,
    :profession_level_effect => 0.02,
    :start_spawned => true,
    :spawn_time => 300,
    :gather_time => 180,
    :gather_sound => nil,
    :gather_end_sound => nil,
    :gather_anim => 7,
    :color1 => 29,
    :color2 => 29,
    :graphic => ["!Other1", 0, 2],
    :required_switch => nil,
    :note => ""
    }
        NODE[1] = {
    :type => :mining,
    :symbol => :tin_ore,
    :name => "Tin Ore",
    :actiontext => "Mine",
    :level_req => 1,
    :exp => 4,
    :min_tier => 0,
    :gather_item => [:item, 7, 1],
    :gather_item_rare => [:item, 6, 1],
    :rare_chance => 1,
    :amount_variance => 1,
    :rare_amount_variance => 1,
    :min_amount => 1,
    :rare_min_amount => 1,
    :profession_level_effect => 0.02,
    :start_spawned => true,
    :spawn_time => 300,
    :gather_time => 180,
    :gather_sound => nil,
    :gather_end_sound => nil,
    :gather_anim => 7,
    :color1 => 29,
    :color2 => 29,
    :graphic => ["!Other1", 1, 2],
    :required_switch => nil,
    :note => ""
    }

But when the game starts, nothing shows up on that event.

Here is the event page:

help.png

Share this post


Link to post
Share on other sites

Hmm, everything looks correct and I can copy+paste your node[0] into my test project and it works. You have a node type set up as well with :type => :mining, I'm assuming?

Are you using any other custom scripts that affect events? Are you testing with an old save file or a new game?

Share this post


Link to post
Share on other sites

It's a new game, yes, and I do have the type set up for Mining.

I am going to submit the game in a ZIP format because I cannot get this script to work, and I do have MANY, MANY other scripts, but I don't think any of them would affect it. They are all pretty much basic. I hope you can figure out whats wrong because I really like the idea behind this script.

 

https://dl.dropboxusercontent.com/u/58388108/The%20Lost%20World.zip

 

EDIT: The events that have the gather node comment are on the Mountain Village House (Exterior) near the right side.

Edited by TheRPGLPer

Share this post


Link to post
Share on other sites

It's Yami's Patch System

That script overwrites Game_Map#setup, which my script also uses to set up the gathering nodes.

 

To fix this, place that script above the CSCA Gathering script. You'll also need to update the CSCA Core script as the CSCA Gathering script requires 1.0.7+ and you only have 1.0.6. I'd also suggest making your gather events "same as character" or else you'll be able to walk over them.

Share this post


Link to post
Share on other sites

For some reason when I try to put an event on the map that can only apear with a switch condition (event only apear if switch 3 is on), the game crashes giving an error with this script at 593 saying undefind method for 'each'. I did this on a blank project. Along with your Core script, your toast manager script, your Proffesions sript and your Crafting Script.

Share this post


Link to post
Share on other sites

I can't reproduce your error. You'll have to give more information.

To reproduce it just set one of the switches on in the conditions section for an event(meaning a switch has to be on for the event to show up on the map)

It happens even when I use the unmodified version of your scripts. Here is how I have them set up.

 

CSCA Core Script version: 1.0.7

CSCA Toast Manager version: 1.1.0

CSCA Professions version: 1.0.3

CSCA Crafting version: 1.0.4

CSCA Gathering version: 1.0.0

Share this post


Link to post
Share on other sites

That's strange, I even tried this on a blank project with just your core script and your gathering script alone. I keep getting the error on the second line of this part of the script. 

 

 def csca_gather_get_node
    @list.each do |command| (THIS LINE HERE)

    if command.code == 108 && command.parameters[0] =~ /<gather_node: (.*)>/i
        @gather_event = true
        @through = true
        @node = $csca.get_node($1.to_sym)
        @last_gather_time = csca_gather_get_last_gather_time(@map_id, @id)
        break
      end
    end
  end

 

It keeps saying undefined method for 'each'. Do you know any reason it might do that, I might have to upload a demo of it.

Share this post


Link to post
Share on other sites

Try replacing that code with this:

def csca_gather_get_node
  unless @list.nil?
    @list.each do |command| (THIS LINE HERE)
      if command.code == 108 && command.parameters[0] =~ /<gather_node: (.*)>/i
        @gather_event = true
        @through = true
        @node = $csca.get_node($1.to_sym)
        @last_gather_time = csca_gather_get_last_gather_time(@map_id, @id)
        break
      end
    end
  end
end

If that doesn't work, you'll have to upload a demo or something.

Edited by casper667

Share this post


Link to post
Share on other sites

Try replacing that code with this:

def csca_gather_get_node
  unless @list.nil?
    @list.each do |command| (THIS LINE HERE)
      if command.code == 108 && command.parameters[0] =~ /<gather_node: (.*)>/i
        @gather_event = true
        @through = true
        @node = $csca.get_node($1.to_sym)
        @last_gather_time = csca_gather_get_last_gather_time(@map_id, @id)
        break
      end
    end
  end
end

If that doesn't work, you'll have to upload a demo or something.

That seemed to do the trick, It's working perfectly now! Thanks.

Share this post


Link to post
Share on other sites

I seem to get an error whenever I try to add a sound effect to end sound.

:gather_end_sound => "Item3",

Doesn't seem to be working. Everything else in the script is working fine. 

 

The error I get simple says File Not Found.

Share this post


Link to post
Share on other sites

I downloaded this script of your website, have the Core and Professions scripts as well.  I am getting the following error, with one event defined on the map:

 

Script 'CSCA_Gathering' line 652: NoMethodError occurred.

undefined method 'required_switch' for #<Array:0x5ea6b40>

 

My node types is defined as:

 

NODE_TYPES[0] = {
    :type => :mining,
    :item_tiers => [[:item, 80]] , #
    :note => ""
    }

 

I have 3 nodes defined, each with the required_switch property => nil,

 

Any insight on this issue would be great!

Share this post


Link to post
Share on other sites

I downloaded this script of your website, have the Core and Professions scripts as well.  I am getting the following error, with one event defined on the map:

 

Script 'CSCA_Gathering' line 652: NoMethodError occurred.

undefined method 'required_switch' for #<Array:0x5ea6b40>

 

My node types is defined as:

 

NODE_TYPES[0] = {

    :type => :mining,

    :item_tiers => [[:item, 80]] , #

    :note => ""

    }

 

I have 3 nodes defined, each with the required_switch property => nil,

 

Any insight on this issue would be great!

 

I was running into this problem earlier, I found what fixed it was making sure that NO events on the map require a switch on their first page. If they do, simply put a blank page, with no switches required, first.

Share this post


Link to post
Share on other sites

Hi there, I made an account here just to get help with this issue I've been having, as I just can't figure it out. Here's my list of scripts, along with the Error. Most of my scripts with vague names are YanFly.

oIWRGlh.pngvSv6VE0.png

 

 

Here's my gather code:

 

   NODE[0] = {

    :type => :mining,
    :symbol => :stone,
    :name => "Stone",
    :actiontext => "mine",
    :level_req => 1,
    :exp => 10,
    :min_tier => 0,
    :gather_item => [:item, 47],
    :gather_item_rare => [:item, 48],
    :rare_chance => 10,
    :amount_variance => 1,
    :rare_amount_variance => 1,
    :min_amount => 1,
    :rare_min_amount => 1,
    :profession_level_effect => 0.02,
    :start_spawned => true,
    :spawn_time => 0,
    :gather_time => 180,
    :gather_sound => nil,
    :gather_end_sound => nil,
    :gather_anim => 7,
    :color1 => 29,
    :color2 => 29,
    :graphic => ["Miningrocks_1", 0, 2],
    :required_switch => nil,
    :note => ""
    }

 

So basically everything works fine, I can mine the stone and it all works. But if I enter 1 of 3 maps in my game, It crashes and I get that error. There's no stone in those maps, and they worked before. Help?

 

Edit: I removed the gathering script completely, and no Errors on those maps. I've attached the entire thing.

CSCA Gathering.txt

Edited by thelime

Share this post


Link to post
Share on other sites

Would there be a way to run a common event for the gathering or have it pick between a few different items? This looks like it could possibly work better than the common events I've set up for my herb gathering, but if you can only have the chance to get one item per event it wouldnt do me any good as my herbs you have a chance of picking 6 different items.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×