Jump to content

[HELP] Increase to gathering speed?


Wisteria

Recommended Posts

Hi, everyone! I'm looking to increase the gathering speed of plant-related items (berries, saplings, etc) for my custom character. Problem is, I have no idea where to start searching in terms of the code. I've dug around here on the forums and on google to no avail.

If possible, I'd like to just make it an increase to gathering speed and not instant.

If not, is there a way to perhaps double what can be collected from these plants?

I'd greatly appreciate the help! ♥

Link to comment
Share on other sites

I'm not too good at explaining, but here goes...

 

I use stategraphs. What I did was copy the "SGwilson" file from the Stategraphs folder, put it in my own Stategraphs folder in my mod's folder (in scripts). then I just renamed it SGwilliam. Inside the stategraphs you find all the animations, sound-ques, all neatly packed into their own actionhandlers and eventhandlers and what-not. I'm sure you can figure it out on your own. If not, I kind of know how to work them...after about 30 tries before finally realizing I forgot to add an "end".  I may be able to help.

Link to comment
Share on other sites

All you'd have to do is change:

    ActionHandler(ACTIONS.PICK,         function(inst, action)            if action.target.components.pickable then                if action.target.components.pickable.quickpick then                    return "doshortaction"                else                    return "dolongaction"                end            end        end),   
 
to:
    ActionHandler(ACTIONS.PICK, "doshortaction")

in the Stategraph. Unless you just want the animation to play really fast. Don't know how to do that.

Link to comment
Share on other sites

@Mr. Tiddles Alright, cool! Thank you so much! I'm going to give this a shot!

@GalloViking I considered that, but for some reason I feel getting two of the same material at one may make it a bit OP. I'll have to play around with it some more. :-)

EDIT:
I tried changing that bit of code and I placed the file in a stategraphs folder in the mod folder, like you said to. Is there something I need to change in another file to link the mod to the SG file? 

And I keep that final 'end,' right?

Link to comment
Share on other sites

you can just put this in your character's fn function

 

local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK]

handle.deststate = function(inst) return "doshortaction" end

 

this way you don't have to change SGwilson.lua

That would probably work better for this, yeah.

Link to comment
Share on other sites

you can just put this in your character's fn function

 

local handle = inst.sg.sg.actionhandlers[ACTIONS.PICK]

handle.deststate = function(inst) return "doshortaction" end

 

this way you don't have to change SGwilson.lua

Amazing! That did the trick! Thank you so much for the help, guys! :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...