Any way to make an entity unbuildable?

Place to get help with not working mods / modding interface.
Post Reply
thedudxo
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Nov 24, 2020 2:06 am
Contact:

Any way to make an entity unbuildable?

Post by thedudxo »

Trying to create a barrel only mod, and remove pipes. I'd rather not break the existing recipes so the best way seems to be maks them unplaceable, but I couldn't find how to do this?


why? well because its nopipe november...
https://www.reddit.com/r/factorio/comme ... _november/

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Any way to make an entity unbuildable?

Post by DaveMcW »

Code: Select all

data.raw["item"]["pipe"].place_result = nil
data.raw["item"]["pipe-to-ground"].place_result = nil
For the refinery problem, you can move some recipes to the chemical plant in data-updates.lua

Code: Select all

data.raw["recipe"]["fill-heavy-oil-barrel"].category = "chemistry"
data.raw["recipe"]["empty-heavy-oil-barrel"].category = "chemistry"
data.raw["recipe"]["fill-petroleum-gas-barrel"].category = "chemistry"
data.raw["recipe"]["empty-petroleum-gas-barrel"].category = "chemistry"

thedudxo
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Nov 24, 2020 2:06 am
Contact:

Re: Any way to make an entity unbuildable?

Post by thedudxo »

DaveMcW wrote:
Tue Nov 24, 2020 2:29 am

Code: Select all

data.raw["item"]["pipe"].place_result = nil
data.raw["item"]["pipe-to-ground"].place_result = nil
For the refinery problem, you can move some recipes to the chemical plant in data-updates.lua

Code: Select all

data.raw["recipe"]["fill-heavy-oil-barrel"].category = "chemistry"
data.raw["recipe"]["empty-heavy-oil-barrel"].category = "chemistry"
data.raw["recipe"]["fill-petroleum-gas-barrel"].category = "chemistry"
data.raw["recipe"]["empty-petroleum-gas-barrel"].category = "chemistry"
superfast reply, ty
it's now called "unknown key blah blah..."
https://prnt.sc/vot96a
whats causing the name?
while this isn't game breaking, it's a little unpolished

yeah im thinking i may just make a "barreling machine" or something, for now i've debuffed the pump's speed to discourage it over barrels, so if you wanted to go long distance it's probably not worth it anymore

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Any way to make an entity unbuildable?

Post by DaveMcW »

data-updates.lua

Code: Select all

-- Remove pipes and pumps
data.raw["item"]["pipe"].place_result = nil
data.raw["item"]["pipe"].localised_name = {"entity-name.pipe"}
data.raw["item"]["pipe-to-ground"].place_result = nil
data.raw["item"]["pipe-to-ground"].localised_name = {"entity-name.pipe-to-ground"}
data.raw["item"]["storage-tank"].place_result = nil
data.raw["item"]["storage-tank"].localised_name = {"entity-name.storage-tank"}
data.raw["item"]["pump"].place_result = nil
data.raw["item"]["pump"].localised_name = {"entity-name.pump"}

-- Create chemical plant version of "fill heavy oil barrel"
local recipe = table.deepcopy(data.raw["recipe"]["fill-heavy-oil-barrel"])
recipe.name = recipe.name .. "-chemistry"
recipe.category = "chemistry"
table.insert(data.raw["technology"]["fluid-handling"].effects, {type = "unlock-recipe", recipe = recipe.name})
data:extend{recipe}

-- Create chemical plant version of "fill petroleum gas barrel"
recipe = table.deepcopy(data.raw["recipe"]["fill-petroleum-gas-barrel"])
recipe.name = recipe.name .. "-chemistry"
recipe.category = "chemistry"
table.insert(data.raw["technology"]["fluid-handling"].effects, {type = "unlock-recipe", recipe = recipe.name})
data:extend{recipe}

Post Reply

Return to “Modding help”