Is there an established way to 'remove' a prototype from the base game?
Posted: Sat Sep 27, 2025 8:15 am
Heya,
I'm trying to remove an item from the base game, so I can replace it with some other set of items without relying on overriding it.
Is there a way to remove an item from the base game when modding in a new one? For example, at some point I make:
data.raw["recipe"]["solid-fuel-from-petroleum-gas"] = nil
data.raw["item"]["solid-fuel-from-petroleum-gas"] = nil
removing this solid fuel recipe out.
I get an error:
Failed to load mods: Error in assignID: recipe with name 'solid-fuel-from-petroleum-gas' does not exist. It was removed by [modname].
Source: oil-processing (technology).
I tried to remove the entry in the base game technology to remove it:
table.removetablewithmatchingentry(data.raw["technology"]["oil-processing"].effects, "unlock-recipe", "solid-fuel-from-petroleum-gas")
(this is a helper function to find and remove entries that match and ultimately using the table.remove() function to do the dirty work )
It still throws up the error still. I tried the ordering of what is getting removed and when; but alas it still remains.
Is there a way out of this rabbit hole, or is it just better to have it exist and don't refer to it so it sits idle, or just override it completely?
Cheers!
I'm trying to remove an item from the base game, so I can replace it with some other set of items without relying on overriding it.
Is there a way to remove an item from the base game when modding in a new one? For example, at some point I make:
data.raw["recipe"]["solid-fuel-from-petroleum-gas"] = nil
data.raw["item"]["solid-fuel-from-petroleum-gas"] = nil
removing this solid fuel recipe out.
I get an error:
Failed to load mods: Error in assignID: recipe with name 'solid-fuel-from-petroleum-gas' does not exist. It was removed by [modname].
Source: oil-processing (technology).
I tried to remove the entry in the base game technology to remove it:
table.removetablewithmatchingentry(data.raw["technology"]["oil-processing"].effects, "unlock-recipe", "solid-fuel-from-petroleum-gas")
(this is a helper function to find and remove entries that match and ultimately using the table.remove() function to do the dirty work )
It still throws up the error still. I tried the ordering of what is getting removed and when; but alas it still remains.
Is there a way out of this rabbit hole, or is it just better to have it exist and don't refer to it so it sits idle, or just override it completely?
Cheers!