Remove all items, entities, vehicles, recipes and technologies from vanilla.

Place to get help with not working mods / modding interface.
Post Reply
Slothic
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Aug 09, 2014 3:07 pm
Contact:

Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post 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?

quyxkh
Smart Inserter
Smart Inserter
Posts: 1027
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post by quyxkh »

rewrite `data/base` in your factorio install, the game's "just" a mod the engine loads.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post by Rseding91 »

Set data.raw to an empty table and then add things back as the game complains about them being missing.
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post by darkfrei »

Code: Select all

for i, prot_type in pairs (data.raw) do
  prot_type = nil
end

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post 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 = {}
If you want to get ahold of me I'm almost always on Discord.

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post 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.

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post 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.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13173
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Remove all items, entities, vehicles, recipes and technologies from vanilla.

Post 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, ...).
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Modding help”