IcyTheWhite Posted April 26, 2015 Share Posted April 26, 2015 Hello guys,These past few days I was wondering - is there a way to make a mod that would reduce the necessary space constructions require by per say 50%? This would be especially helpful for constructions like Lightning Rod, where for example I would love to build it right next to a stone wall, but I can't because it demands so much space.So then I have to break at least 5 of already built wall pieces, place the Rod in the right spot, and build the wall back again (as the wall pieces demand much less space than other constructions do). I assume it would have to be modified for each and every construction, but I would be willing to do so, if you could show me how (for one or two constructions as a reference). Anyway, I'm awaiting your feedback and every bit of help is greatly appreciated!Thank you. Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/ Share on other sites More sharing options...
Sarcen Posted April 26, 2015 Share Posted April 26, 2015 AllRecipes["lightning_rod"].min_spacing = 1 You can type this in the console, or make a mod that executes that after the recipes have been initialized.Apparently this works for clients and the server has no verification checks.On a random server I set my min_spacing of all recipes to 0 and it allowed me to place a lightning rod on top of a science station Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632343 Share on other sites More sharing options...
DarkXero Posted April 26, 2015 Share Posted April 26, 2015 AllRecipes["lightning_rod"].min_spacing = 1 Now you can cramp your base under a flingomatic! Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632346 Share on other sites More sharing options...
IcyTheWhite Posted April 26, 2015 Author Share Posted April 26, 2015 Thank you SO MUCH Sarcen! It's super easy and yet so effective...Now I will work on a little mod that will tweak all the constructions soon. Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632370 Share on other sites More sharing options...
IcyTheWhite Posted April 26, 2015 Author Share Posted April 26, 2015 (edited) Ok, I have no idea how to execute the command after recipe initialization in my mod..Can you give me a hint please? Edit: Oh and how did you generally set it for all the recipes (structures)? Edit 2: Hey I found a solution by much searching and thinking. This page helped me as well:http://forums.kleientertainment.com/topic/17552-solved-change-objects-so-they-fit-closer-together/ Uncle google knows all the answers, but you'll have to find a way to ask him properly. My logic in action:AllRecipes["lightning_rod"].min_spacing = 1+GLOBAL.Recipes["lightning_rod"].min_spacing = 1 =GLOBAL.AllRecipes["lightning_rod"].min_spacing = 1*tink* it works! It's 2AM though..Don't forget about that. And I'm not a coder whatsoever.. Edited April 27, 2015 by IcyTheWhite Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632389 Share on other sites More sharing options...
DarkXero Posted April 27, 2015 Share Posted April 27, 2015 -- For all recipesfor k, v in pairs(GLOBAL.AllRecipes) do v.min_spacing = 1end-- For a certain recipeGLOBAL.AllRecipes["lightning_rod"].min_spacing = 1No Recipes in there. Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632398 Share on other sites More sharing options...
IcyTheWhite Posted April 27, 2015 Author Share Posted April 27, 2015 And is there a way to somehow scale the already existing number? Like *0.5 for all recipes for example..And where can I see the present values of structures? Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632475 Share on other sites More sharing options...
Kzisor Posted April 27, 2015 Share Posted April 27, 2015 @IcyTheWhite, using @DarkXero's for loop. v.min_spacing = v.min_spacing * 0.5 Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632512 Share on other sites More sharing options...
IcyTheWhite Posted April 27, 2015 Author Share Posted April 27, 2015 @IcyTheWhite, using @DarkXero's for loop. v.min_spacing = v.min_spacing * 0.5 But if I define min_spacing = 1 then it already changes the default values, don't I? Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632521 Share on other sites More sharing options...
DarkXero Posted April 27, 2015 Share Posted April 27, 2015 @IcyTheWhite, no, the default min_spacing is in the constructor, which is 3.2.That is, if there isn't a min_spacing provided when the Recipe constructor gets called.The chest has 1 on that parameter. All other changes apply to concrete recipes, be it one of them, or all of them.By running the loop you are changing all values of all recipes, not establishing a new default. Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632523 Share on other sites More sharing options...
IcyTheWhite Posted April 27, 2015 Author Share Posted April 27, 2015 Gotcha. Well thanks guys for your help. Link to comment https://forums.kleientertainment.com/forums/topic/53209-mod-request-reduce-the-allocation-size-of-constructions/#findComment-632603 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