Page 1 of 1

disable building certain buildings?

Posted: Sat Sep 18, 2021 11:22 pm
by lawnknome
hello i have a question and i dont know if its possible but i would like to find out. i want to disable the ability to build a certain building, is there a way to make some buildings restricted? if so how do i do it? thank you

Re: disable building certain buildings?

Posted: Sun Sep 19, 2021 12:58 am
by Silari
You can't do it with permissions AFAIK but you could do it via a mod (by disabling the recipe to make the building and removing it from any technology) or a scenario (by disabling the recipe any time a force completes a research).

Slightly more complicated if it's a building that's still needed otherwise (to make something else). It's also possible for a mod/scenario to catch the build event for the building you don't want and then destroy the building. Sometimes doesn't get everything though if playing with instant build mods or such.

Re: disable building certain buildings?

Posted: Sun Sep 19, 2021 11:31 pm
by eradicator
Silari wrote: Sun Sep 19, 2021 12:58 am Slightly more complicated if it's a building that's still needed otherwise (to make something else). It's also possible for a mod/scenario to catch the build event for the building you don't want and then destroy the building.
It would be far easier to remove the items_to_place_this relationship between item and entity. I.e. by setting the item prototype place_result to nil. This wouldn't effect recipes, items or existing buildings. It would only prevent building new ones. Drawback is that it's not controllable per-player.