Page 1 of 1

Regarding disabled prerequisites still blocking

Posted: Wed May 28, 2025 3:54 pm
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.

Re: Prerequisites no longer blocking when disabled

Posted: Fri May 30, 2025 2:03 pm
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.

Re: Prerequisites no longer blocking when disabled

Posted: Fri May 30, 2025 10:02 pm
by thesixthroc
Yes required_when_disabled would be even better, that would not be a breaking change.