Questions About Removal

Place to get help with not working mods / modding interface.
Post Reply
Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Questions About Removal

Post by Suf »

Hi

First Question: I was trying to remove the automation technology from the vanilla, but doing so requires removing every subsequent technology.
Is there a code that i can use to remove all of that in one command?

Second Question: I've been searching for Internal names for crafting tabsImage and how to remove them as well,but i couldn't find them in the Factorio category folder
So how to do that?

Thanks in Advance.

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

Re: Questions About Removal

Post by DaveMcW »

Code: Select all

data.raw.technology["automation"].enabled = false

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Questions About Removal

Post by Suf »

DaveMcW wrote:
Sat Apr 17, 2021 3:11 pm

Code: Select all

data.raw.technology["automation"].enabled = false
That worked,but it didn't remove every subsequent technology.

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

Re: Questions About Removal

Post by DaveMcW »

You don't need to remove them, leave them for mod compatibility.

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Questions About Removal

Post by Suf »

DaveMcW wrote:
Sat Apr 17, 2021 3:26 pm
You don't need to remove them, leave them for mod compatibility.
Those removals are just temporary so i can re-arrange the technology tree later,but for now i need to clear the technology tree.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Questions About Removal

Post by Deadlock989 »

Suf wrote:
Sat Apr 17, 2021 2:25 pm
Hi

First Question: I was trying to remove the automation technology from the vanilla, but doing so requires removing every subsequent technology.
Is there a code that i can use to remove all of that in one command?
No. You have to recursively search for prerequisites yourself.
Second Question: I've been searching for Internal names for crafting tabsImage and how to remove them as well,but i couldn't find them in the Factorio category folder
They're not categories, they are item groups, defined in base/prototypes/item-groups.lua.
Image

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Questions About Removal

Post by Suf »

Deadlock989 wrote:
Sat Apr 17, 2021 7:15 pm
Suf wrote:
Sat Apr 17, 2021 2:25 pm
Hi

First Question: I was trying to remove the automation technology from the vanilla, but doing so requires removing every subsequent technology.
Is there a code that i can use to remove all of that in one command?
No. You have to recursively search for prerequisites yourself.
Second Question: I've been searching for Internal names for crafting tabsImage and how to remove them as well,but i couldn't find them in the Factorio category folder
They're not categories, they are item groups, defined in base/prototypes/item-groups.lua.
And how to remove those item groups?

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Questions About Removal

Post by Deadlock989 »

Suf wrote:
Sat Apr 17, 2021 7:41 pm
And how to remove those item groups?
You can replace any prototype with nil to "remove" it. There are a small-ish collection of essential prototypes that the core game requires to exist, I don't have a reference list handy, but I'm 99.9% sure that any of the item groups are not among them.

However this is generally not the best idea since it pretty much guarantees conflicts between your mod and other mods. If you don't intend to publish your mod and you don't intend to use it alongside other mods that require those prototypes then no problem.

In the case of item groups, the big group button is simply not shown to the player if all of the recipes in all of the subgroups in the group are either not unlocked (not "enabled") or hidden - for the latter you can use the hidden property of recipes which stops the recipe showing up in both the player menu and any crafting machine, or hide_from_player_crafting which keeps the recipe enabled and shows it in machine recipe selection menus but hides it from the player crafting menu. Alternatively you could just put all of the subgroups and/or recipes in the group into some other group - an empty item group isn't shown either.
Image

Suf
Long Handed Inserter
Long Handed Inserter
Posts: 76
Joined: Fri Jul 10, 2020 5:07 am
Contact:

Re: Questions About Removal

Post by Suf »

Deadlock989 wrote:
Sat Apr 17, 2021 8:01 pm
Suf wrote:
Sat Apr 17, 2021 7:41 pm
And how to remove those item groups?
You can replace any prototype with nil to "remove" it. There are a small-ish collection of essential prototypes that the core game requires to exist, I don't have a reference list handy, but I'm 99.9% sure that any of the item groups are not among them.

However this is generally not the best idea since it pretty much guarantees conflicts between your mod and other mods. If you don't intend to publish your mod and you don't intend to use it alongside other mods that require those prototypes then no problem.

In the case of item groups, the big group button is simply not shown to the player if all of the recipes in all of the subgroups in the group are either not unlocked (not "enabled") or hidden - for the latter you can use the hidden property of recipes which stops the recipe showing up in both the player menu and any crafting machine, or hide_from_player_crafting which keeps the recipe enabled and shows it in machine recipe selection menus but hides it from the player crafting menu. Alternatively you could just put all of the recipes in the group into some other group - an empty item group isn't shown either.
Would hiding but not removing the item group make a confliction with other mods? As i understood it if the recipe don't have anywhere to belong under certain item group it will be automatically under "the unsorted" item group,although i'm going to remove everything temporary to re-arrange recipes and items,but maybe in the process some items will be in different item-groups if not a modded one, wouldn't that make a confliction/multi versions of the same recipe either way?
E.G if you have a mod that process wood to coal and you have another mod that does the same ;you will see them both in different item-group in worst cases
and in the best they could be in the same item-group.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: Questions About Removal

Post by Deadlock989 »

Suf wrote:
Sat Apr 17, 2021 8:19 pm
Would hiding but not removing the item group make a confliction with other mods? As i understood it if the recipe don't have anywhere to belong under certain item group it will be automatically under "the unsorted" item group,although i'm going to remove everything temporary to re-arrange recipes and items,but maybe in the process some items will be in different item-groups if not a modded one, wouldn't that make a confliction/multi versions of the same recipe either way?
E.G if you have a mod that process wood to coal and you have another mod that does the same ;you will see them both in different item-group in worst cases
and in the best they could be in the same item-group.
This is a really open-ended and subjective question. My opinion, and it's only an opinion, is that the TL;DR answer is "yes".

"Removing" / deleting / setting an item group prototype to nil is quite a destructive action to take and it will cause the kind of in-yer-face mod conflict that stops a particular mod combo from even loading because other modders generally tend to assume that "vanilla" (i.e. base mod) prototypes exist even though they don't actually have to.

Doing anything else less destructive like moving stuff around, or changing innocent-seeming properties, in any mod, has the potential to create subtler incompatibilities that a player may not even discover until they are hours deep into a game. Is that actually better than the above? Arguably not.

The problem is more that people expect any two random mods pulled off the portal to be "compatible" in the first place. There isn't much that can be done about that.
Image

Post Reply

Return to “Modding help”