Page 1 of 1
delete/disable prototype
Posted: Mon Aug 10, 2015 7:14 am
by Blu3wolf
G'day all!
Im curious as to how I would go about disabling a technology added in the base game. Similarly, a recipe, item, etc.
Ive worked out that I can modify the existing ones, but there are some I want to disable entirely. Is this possible? I tried just setting them to nil but that started giving errors on starting the game.
Cheers!
Re: delete/disable prototype
Posted: Mon Aug 10, 2015 9:32 am
by Choumiko
For recipes you could do sth. like (in data-final-fixes.lua or data-updates.lua)
Code: Select all
data.raw["recipe"]["train-stop"].enabled = false
local unlocks = data.raw["technology"]["automated-rail-transportation"].effects
for i, eff in pairs(effects) do
if eff.name == "train-stop" then
table.remove(data.raw["technology"]["automated-rail-transportation"].effects, i)
break
end
end
Or try what
https://forums.factorio.com/wiki/inde ... ipe#hidden does, discovered it a few days ago
If you disable all recipes for items/entities you don't want there's no way to create them, so it sort of works.
For techs you don't want you could remove all effects/costs/prerequisites, that way they are useless and researched as soon as clicked. Not nice but works
Code: Select all
local makeMeUseless = data.raw["technology"]["automated-rail-transportation"]
makeMeUseless.unit= { count = 0, ingredients = { }, time = 0}
makeMeUseless.prerequisites = nil
makeMeUseless.effects = nil
Re: delete/disable prototype
Posted: Tue Aug 11, 2015 1:23 am
by Blu3wolf
Ive made use of the hidden setting for recipes, but I see that one doesnt work for technologies. I guess Ill have to leave them visible in the tech list and modify the costs/effects as suggested.
Cheers for the help!
Re: delete/disable prototype
Posted: Tue Aug 11, 2015 4:35 pm
by Rseding91
Blu3wolf wrote:Ive made use of the hidden setting for recipes, but I see that one doesnt work for technologies. I guess Ill have to leave them visible in the tech list and modify the costs/effects as suggested.
Cheers for the help!
https://forums.factorio.com/wiki/inde ... gy#enabled
Re: delete/disable prototype
Posted: Tue Aug 11, 2015 6:47 pm
by Choumiko

I'll start looking at the wiki first from now on

Re: delete/disable prototype
Posted: Tue Aug 11, 2015 7:05 pm
by ratchetfreak
looking at the return value of the help() usually also helps. There's one for each object.
Re: delete/disable prototype
Posted: Tue Aug 11, 2015 8:40 pm
by Rseding91
ratchetfreak wrote:looking at the return value of the help() usually also helps. There's one for each object.
The wiki is far more helpful than that output

it's updated for 0.12 (all except the LuaEntity which i'll be updating shortly here).