[Rseding91] [2.0.7] Cannot create LogisticFilter with non-zero value

We are aware of them, but they have low priority. We have more important things to do. They go here in order not to take space in the main bug thread list.
sparr
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[Rseding91] [2.0.7] Cannot create LogisticFilter with non-zero value

Post by sparr »

Attempting to create a logistic filter with a non-zero value on a constant combinator control behavior produces an error "Can't specify non zero request with non trivial item filter condition."
  1. build a constant combinator
  2. game.player.selected.get_control_behavior().get_section(1).set_slot(1, {value={type="virtual",name="signal-X"}})
  3. observe first slot of first (only) section has signal X with count 0
  4. game.player.print(game.player.selected.get_control_behavior().get_section(1).get_slot(1).min)
  5. observe min of 0, the count of the signal
  6. manually set signal X count to 1
  7. game.player.print(game.player.selected.get_control_behavior().get_section(1).get_slot(1).min)
  8. observe min of 1, the count of the signal
  9. optionally build a new constant combinator for the next step, this will not affect the outcome
  10. game.player.selected.get_control_behavior().get_section(1).set_slot(1, {value={type="virtual",name="signal-X"},min=1})
  11. observe error
PS: Also note that the signal/filter successfully created has a quality icon on it, which I don't think is appropriate or possible to achieve in this context in the normal UI.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14408
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [Rseding91] [2.0.7] Cannot create LogisticFilter with non-zero value

Post by Rseding91 »

Thanks for the report. The issue seems to be that the quality condition is defaulting to "any" which is not valid for values in constant combinators. If you add quality="normal" directly after the name="signal-x" it fixes it. That's not a great fix - since quality things are mostly meant to default to the correct values so they can be omitted when the quality prototypes are not being used.
If you want to get ahold of me I'm almost always on Discord.
User avatar
hgschmie
Inserter
Inserter
Posts: 48
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [Rseding91] [2.0.7] Cannot create LogisticFilter with non-zero value

Post by hgschmie »

This is also an issue when assigning a signal as output signal e.g. in a decider combinator (`set_output(idx, { signal = ... }`)
User avatar
hgschmie
Inserter
Inserter
Posts: 48
Joined: Tue Feb 06, 2024 5:18 am
Contact:

Re: [Rseding91] [2.0.7] Cannot create LogisticFilter with non-zero value

Post by hgschmie »

While this ended up in "minor issues", it is a pain in the neck to remember to add quality = 'normal' to any signal assigned to a constant combinator in a mod. Lots of older mods break because they never bothered with quality before.

Any change to make LuaLogisticSection::set_slot use "normal" as the default value. The current default ("any") causes the crash ("Can't specify non zero request with non trivial item filter condition."). Honestly, I don't even know what that means. ;-)
Post Reply

Return to “Minor issues”