Regarding disabled prerequisites still blocking

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
thesixthroc
Fast Inserter
Fast Inserter
Posts: 103
Joined: Wed Apr 29, 2020 9:53 pm
Contact:

Regarding disabled prerequisites still blocking

Post by thesixthroc »

As of the latest release (2.0.52), if a prerequisite LuaTechnology has enabled=false, it still blocks its successors unless researched=true. Such prerequisites are normally hidden from the player.

For modders who at runtime want to disable a technology and prevent it blocking successors such that it no longer affects the tech tree, we find one of two unpleasant effects:
  • The technology's effects will apply despite the technology being disabled, because researched=true must be set;
  • A hidden scripted technology with no effects must be inserted between the technology and its successors with its researched status controlled by script. This leads to compatibility problems if other mods try to add the original technology as a prerequisite.
The suggestion is to make prerequisites no longer block when disabled to avoid the above, and avoid states where player can be blocked in the UI for no apparent reason. This would be a breaking change. Edit: See below for a better suggestion.
Last edited by thesixthroc on Sat May 31, 2025 2:09 am, edited 10 times in total.
curiosity
Filter Inserter
Filter Inserter
Posts: 656
Joined: Wed Sep 11, 2019 4:13 pm
Contact:

Re: Prerequisites no longer blocking when disabled

Post by curiosity »

I assume you mean when visible_when_disabled is set to false. Surely it's valid to want to deliberately block a part of tech tree (e.g. for mutually exclusive branches).

Ideally, this should be its own separate property altogether, required_when_disabled.
thesixthroc
Fast Inserter
Fast Inserter
Posts: 103
Joined: Wed Apr 29, 2020 9:53 pm
Contact:

Re: Prerequisites no longer blocking when disabled

Post by thesixthroc »

Yes required_when_disabled would be even better, that would not be a breaking change.
Post Reply

Return to “Modding interface requests”