Jump to content

[Mod Request] Reduce the allocation size of constructions

Recommended Posts

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
Share on other sites

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 :p

Link to comment
Share on other sites

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:



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 by IcyTheWhite
Link to comment
Share on other sites

@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
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

  • Create New...