Page 1 of 1
Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Thu Oct 11, 2018 8:58 am
by Slothic
Hi there. I'd like to have a barebone factorio so i can start to add in my own items, recipes, technologies, vehicles and such from scratch. In essence, i'm looking to create a complete overhaul. I have my own ideas of how i want production chains to go.
Is there any easy way to remove all of these so i can start from scratch with my mod?
Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Thu Oct 11, 2018 9:54 am
by quyxkh
rewrite `data/base` in your factorio install, the game's "just" a mod the engine loads.
Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Thu Oct 11, 2018 10:20 am
by Rseding91
Set data.raw to an empty table and then add things back as the game complains about them being missing.
Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Thu Oct 11, 2018 10:21 am
by darkfrei
Code: Select all
for i, prot_type in pairs (data.raw) do
prot_type = nil
end
Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Thu Oct 11, 2018 10:35 am
by Rseding91
darkfrei wrote: ↑Thu Oct 11, 2018 10:21 am
Code: Select all
for i, prot_type in pairs (data.raw) do
prot_type = nil
end
Faster to just set data.raw = {}
Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Thu Oct 11, 2018 11:51 am
by darkfrei
Rseding91 wrote: ↑Thu Oct 11, 2018 10:35 am
darkfrei wrote: ↑Thu Oct 11, 2018 10:21 am
Code: Select all
for i, prot_type in pairs (data.raw) do
prot_type = nil
end
Faster to just set data.raw = {}
Here must be an exception list for some prototypes.
Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Fri Oct 12, 2018 8:17 am
by eradicator
Rseding91 wrote: ↑Thu Oct 11, 2018 10:35 am
Faster to just set data.raw = {}
Wouldn't that remove the metatable containing :extend?
I agree with darkfrei that it's useful to delete the table only partially, so you he can keep certain things while developing. I.e the animation-intensive player/train objects. Is data.raw completely in the lua state? If so he could keep a backup references local base = data.raw in case he needs some reference values later.
Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.
Posted: Fri Oct 12, 2018 3:34 pm
by Rseding91
There is no meta table on data.raw.
There's simply a function called "extend" which is setup such that you can call data:extend and it passes data as the first argument. It's just a fancier version of doing: extend(data, ...).