Starofdeath Posted September 2, 2015 Share Posted September 2, 2015 I drew a scythe. How to make, when a scythe equiped, the speed of pick up grass grew?Speed of chop or mine adjust easy ("inst.components.tool:SetAction(ACTIONS.CHOP, 10)"). But pick up... Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/ Share on other sites More sharing options...
Starofdeath Posted September 2, 2015 Author Share Posted September 2, 2015 For example there is mod called "PickyPickyPicky" with follow code: function PPP_QuickPick(inst) if inst.components.pickable then inst.components.pickable.quickpick = true endend---------------AddPrefabPostInit("sapling", PPP_QuickPick)AddPrefabPostInit("marsh_bush", PPP_QuickPick)AddPrefabPostInit("reeds", PPP_QuickPick)AddPrefabPostInit("grass", PPP_QuickPick)AddPrefabPostInit("berrybush2", PPP_QuickPick)AddPrefabPostInit("berrybush", PPP_QuickPick)AddPrefabPostInit("flower_cave", PPP_QuickPick)AddPrefabPostInit("red_mushroom", PPP_QuickPick)AddPrefabPostInit("green_mushroom", PPP_QuickPick)AddPrefabPostInit("blue_mushroom", PPP_QuickPick) May be there is method use this code (or its part) for my mode? Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-668853 Share on other sites More sharing options...
Starofdeath Posted September 2, 2015 Author Share Posted September 2, 2015 Here's a little preview for you to understand that I'm not kidding.)) Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-668855 Share on other sites More sharing options...
Starofdeath Posted September 3, 2015 Author Share Posted September 3, 2015 Still need help.http://forums.kleientertainment.com/files/file/1299-scythe/ Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-669016 Share on other sites More sharing options...
Madman666 Posted September 5, 2015 Share Posted September 5, 2015 (edited) Here's a mod that allows to use a spear to slash grass (using attack animation). It introduces new action, that is faster than generic harvesting of grass and twigs. I think you could use it as an example to add your own action, that will replace generic picking of grass to shorter "pick up version" when the scythe is equipped. I am actually trying to do exactly that for my own gardening tools mod. (I wish my drawing didn't suck though.) As of now unfortunately I don't know how to modify existing "pick up" action to do a short version of animation, when a specific item is equipped. Introducing new action is more bothersome, but it should work. Hope that helps. If you manage to do something, please send me a message, I am quite interested in creating a set of tools that speeds up harvesting of twigs, grass and plants (and their gold version, that'll last longer and prevent the damage from picking cacti). UPD: Maybe actually you don't even need to change the animation from Slash Grass mod. Using "attack" animation while holding scythe is more fitting, then picking the grass up, like its just lying on the ground. In that case all you need to do is just copy the action code, change its name from "slash" to something like "reap" and add the tag "slasher" (you can change its name to custom one too) to your scythe's prefab file. Edited September 5, 2015 by Madman666 Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-669887 Share on other sites More sharing options...
Starofdeath Posted September 6, 2015 Author Share Posted September 6, 2015 Madman666, oh, big thanks. If in "Slash Grass" mod only change "spear" to "scythe", scythe alredy starts mowing...))) ...AddPrefabPostInit("scythe",makeSlash)--AddPrefabPostInit("spear",makeSlash)-- add "Slash" action to CollectScenceActionslocal function replaceCollectAction(inst)... With this can work. It remains only to assemble all in one mode.)) Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-670033 Share on other sites More sharing options...
Madman666 Posted September 6, 2015 Share Posted September 6, 2015 Madman666, oh, big thanks. If in "Slash Grass" mod only change "spear" to "scythe", scythe alredy starts mowing...))) ...AddPrefabPostInit("scythe",makeSlash)--AddPrefabPostInit("spear",makeSlash)-- add "Slash" action to CollectScenceActionslocal function replaceCollectAction(inst)... With this can work. It remains only to assemble all in one mode.)) Yup, that should work. I think that every time you mow grass the scythe needs to lose durability though or it will be somewhat out of place in Don't Starve's "everything ends" concept. I still did not figure it out how to chain durability loss to specific character's action though. If I think of something - will post here. Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-670058 Share on other sites More sharing options...
Starofdeath Posted September 6, 2015 Author Share Posted September 6, 2015 (edited) Madman666, job is done. In .lua files of my mod there are several --comments specially for you. Edited September 6, 2015 by Starofdeath Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-670111 Share on other sites More sharing options...
Madman666 Posted September 6, 2015 Share Posted September 6, 2015 (edited) Perfect. Thanks a bunch. Will check it out immediately. UPD: Oh, I've got it. You attached finite uses through the "tool" component. Thanks, that'll help in my mod a lot. By the way - your art is damn good. Could I perhaps ask you to help me out with my mod's art? That's of course if you have time and interested. Edited September 6, 2015 by Madman666 Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-670119 Share on other sites More sharing options...
Madman666 Posted September 8, 2015 Share Posted September 8, 2015 (edited) Madman666, job is done. In .lua files of my mod there are several --comments specially for you. Tested out - this code does not work. Grass and etc. collects faster, but nor scythe's nor my mod's tools durability does not decrease while collectig resources. UPD: This code works fine if you use "action button" (spacebar) to pick grass and etc., then tool's durability properly decreases. But if you use mouse to do action - it does not. Trying to figure it out. Edited September 9, 2015 by Madman666 Link to comment https://forums.kleientertainment.com/forums/topic/57579-speed-of-pick-up-grass/#findComment-670769 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now