Chiseledquartz27 Posted June 26, 2018 Share Posted June 26, 2018 I'm making a map where I want most of the trees to be small and stay that way forever. Is there a way to disable the growth cycle for all trees? I've checked the workshop and I couldn't find anything relevant there. Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 26, 2018 Share Posted June 26, 2018 I'd say there are two parts to it. First you have to disable the growth, second you have to transforma all trees to small versions. The latter should be as easy done as: for k, v in pairs(Ents) do if v.prefab == "evergreen" then v.components.growable:SetStage(1) end end The Growth might be a bit more tricky. If you disable/remove the growable parameter of the trees, it'll be back/reativated after each boot. So you either have to issue something like for k, v in pairs(Ents) do if v.prefab == "evergreen" then v:RemoveComponent("growable") end end Issue here is that you have to issue the second command every time you restart the server or plant a new tree, since when a new tree is created it'll have the growable component again. At this point I'd recommend looking into modding yourself, and modifying the evergreens.lua file in a way that Trees always spawn as stage 1 trees (the small ones) and won't ever grow. If you wanna look into the file yourself a bit, it's located in "<DST_Home>/data/databundles/scripts/prefabs/evergreens.lua". Good luck! Link to comment Share on other sites More sharing options...
Chiseledquartz27 Posted June 28, 2018 Author Share Posted June 28, 2018 Thanks very much for the help! It works perfectly, and the replanting thing is not an issue since I'm doing it with lumpy evergreens. Link to comment Share on other sites More sharing options...
Chiseledquartz27 Posted June 29, 2018 Author Share Posted June 29, 2018 I have a another question, for a different situation. Is there a way to remove the wilted stage from the tree growth cycle, so there's only small, medium, and large? Link to comment Share on other sites More sharing options...
Daniel86268 Posted June 29, 2018 Share Posted June 29, 2018 You'd have to do a little modding for this one. I'd say the easiest way to accomplish this would be to override the growth_stages function in the evergreens.lua file and remove the "old" stage. Then the trees should cycle through short, normal, tall while skipping the old/wilted stage. Link to comment Share on other sites More sharing options...
Chiseledquartz27 Posted June 30, 2018 Author Share Posted June 30, 2018 I'll look into modding then, thanks again for all the help! Link to comment Share on other sites More sharing options...
Recommended Posts
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.