Mod to enable filter on chest slots

This is the place to request new mods or give ideas about what could be done.
Post Reply
sdgmlj
Fast Inserter
Fast Inserter
Posts: 127
Joined: Sun Jul 04, 2021 11:12 pm
Contact:

Mod to enable filter on chest slots

Post by sdgmlj »

The type of items can be locked in the storage box, just like the operation of a train carriage.

My English is not good. I translated it by computer. I don't know if I can express it clearly.
Attachments
屏幕截图 2022-01-05 153932.jpg
屏幕截图 2022-01-05 153932.jpg (47.95 KiB) Viewed 1174 times

sdgmlj
Fast Inserter
Fast Inserter
Posts: 127
Joined: Sun Jul 04, 2021 11:12 pm
Contact:

Re: Can such module function be realized?

Post by sdgmlj »

By storage box, I mean steel box, iron box and wooden box

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

Re: Can such module function be realized?

Post by DaveMcW »

It does not work for entities with type="container".

But you can use type="car", and make it look like a box.

aka13
Filter Inserter
Filter Inserter
Posts: 383
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: Can such module function be realized?

Post by aka13 »

DaveMcW wrote: ↑
Wed Jan 05, 2022 8:39 am
It does not work for entities with type="container".

But you can use type="car", and make it look like a box.
Was there a reason behind that? I think I remember some old thread where it was discussed, why the devs decided against filters in chests, but for filters in trains.
Pony/Furfag avatar? Opinion discarded.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 1250
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Can such module function be realized?

Post by FuryoftheStars »

aka13 wrote: ↑
Wed Jan 05, 2022 10:46 am
DaveMcW wrote: ↑
Wed Jan 05, 2022 8:39 am
It does not work for entities with type="container".

But you can use type="car", and make it look like a box.
Was there a reason behind that? I think I remember some old thread where it was discussed, why the devs decided against filters in chests, but for filters in trains.
I'm only guessing here, but I wonder if there's a non-zero impact to the game in just having filters available to containers, and seems you can achieve the goal of keeping X amount of something in a container with a simple attached wire, but a train with more than 1 wagon requires a more complex setup, that this is what led to their decision.

User avatar
Silari
Filter Inserter
Filter Inserter
Posts: 397
Joined: Sat Jan 27, 2018 10:04 pm
Contact:

Re: Can such module function be realized?

Post by Silari »

aka13 wrote: ↑
Wed Jan 05, 2022 10:46 am
DaveMcW wrote: ↑
Wed Jan 05, 2022 8:39 am
It does not work for entities with type="container".

But you can use type="car", and make it look like a box.
Was there a reason behind that? I think I remember some old thread where it was discussed, why the devs decided against filters in chests, but for filters in trains.
Can't find it right now but i'm pretty sure there's a thread on the forums somewhere requesting filters be allowed on the container prototype and a dev saying it would add a performance penalty to every interaction (maybe just insertion) with a container, even ones that weren't using a filter. Since chests tend to be incredibly common it's too much of a performance hit, compared to cars/wagons/players which there tend to be much fewer of and much less interactions.

DarkShadow44
Fast Inserter
Fast Inserter
Posts: 168
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Can such module function be realized?

Post by DarkShadow44 »

A bit late to the party, but what about a "filterable chest"? Shouldn't affect normal chests in the slightest. Or simpler, a flag that enables filtering for an individual chest. Would at least limit the filter check to one operation per chest at minimum.

robot256
Filter Inserter
Filter Inserter
Posts: 452
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Can such module function be realized?

Post by robot256 »

"one operation per chest" is precisely the performance penalty that is severe enough to avoid. It would have to be an entirely new class of entity to avoid the penalty. And in fact, I believe you can make a modded "car" entity that behaves exactly like a chest except for that it has filters and can't be wired.

Xorimuth
Filter Inserter
Filter Inserter
Posts: 438
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Can such module function be realized?

Post by Xorimuth »

Request: viewtopic.php?f=28&t=97967
Relevant developer comment: viewtopic.php?f=221&t=89674

DarkShadow44
Fast Inserter
Fast Inserter
Posts: 168
Joined: Thu Jun 01, 2017 12:05 pm
Contact:

Re: Can such module function be realized?

Post by DarkShadow44 »

robot256 wrote: ↑
Mon Apr 11, 2022 3:26 am
"one operation per chest" is precisely the performance penalty that is severe enough to avoid.
Are you sure about that? Because I can't image it being that bad.

robot256
Filter Inserter
Filter Inserter
Posts: 452
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Can such module function be realized?

Post by robot256 »

It's the same reason they give for not filtering LuaInventory objects, and for not connecting certain things to the circuit network. It's always a cost-benefit equation, based on the number of chests in a typical game, versus the number of players who will actually use the filtering feature, versus the effect on gameplay progression and challenges.

Not to say it won't *ever* happen, as other features have been added when faster computers and more optimizations made it practical.

sdgmlj
Fast Inserter
Fast Inserter
Posts: 127
Joined: Sun Jul 04, 2021 11:12 pm
Contact:

Re: Can such module function be realized?

Post by sdgmlj »

robot256 wrote: ↑
Mon Apr 11, 2022 5:26 pm
It's the same reason they give for not filtering LuaInventory objects, and for not connecting certain things to the circuit network. It's always a cost-benefit equation, based on the number of chests in a typical game, versus the number of players who will actually use the filtering feature, versus the effect on gameplay progression and challenges.

Not to say it won't *ever* happen, as other features have been added when faster computers and more optimizations made it practical.
In fact, if this function is added, a lot of signal calculation can be saved. For example, I want to put the material of a machine into one box, so each box needs 2-4 signal lines and multiple arithmetic units. If there are many boxes, it will save more.

I don't understand the game mechanism. I don't know whether the signal calculation will affect the game performance, but it must be lower than the cost of adding this new function. However, this is also a reason for me to request this function. The most important thing is that it can save a lot of work.

robot256
Filter Inserter
Filter Inserter
Posts: 452
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Can such module function be realized?

Post by robot256 »

I did end up making a car-type container mod if you want to experiment with it. I think I left filtering enabled. It would be possible to make a 1x1 grid-snapped version, I suppose.

https://mods.factorio.com/mod/shipping-containers

sdgmlj
Fast Inserter
Fast Inserter
Posts: 127
Joined: Sun Jul 04, 2021 11:12 pm
Contact:

Re: Can such module function be realized?

Post by sdgmlj »

robot256 wrote: ↑
Thu May 19, 2022 12:24 am
I did end up making a car-type container mod if you want to experiment with it. I think I left filtering enabled. It would be possible to make a 1x1 grid-snapped version, I suppose.

https://mods.factorio.com/mod/shipping-containers
OK, I fully support you

sdgmlj
Fast Inserter
Fast Inserter
Posts: 127
Joined: Sun Jul 04, 2021 11:12 pm
Contact:

Re: Can such module function be realized?

Post by sdgmlj »

robot256 wrote: ↑
Thu May 19, 2022 12:24 am
I did end up making a car-type container mod if you want to experiment with it. I think I left filtering enabled. It would be possible to make a 1x1 grid-snapped version, I suppose.

https://mods.factorio.com/mod/shipping-containers
Can I give you a suggestion?
Can the following information be hidden? Because it will look more perfect
Attachments
屏幕截图 2022-05-19 165043.jpg
屏幕截图 2022-05-19 165043.jpg (11.15 KiB) Viewed 531 times

Xorimuth
Filter Inserter
Filter Inserter
Posts: 438
Joined: Sat Mar 02, 2019 9:39 pm
Contact:

Re: Can such module function be realized?

Post by Xorimuth »

sdgmlj wrote: ↑
Thu May 19, 2022 8:54 am
robot256 wrote: ↑
Thu May 19, 2022 12:24 am
I did end up making a car-type container mod if you want to experiment with it. I think I left filtering enabled. It would be possible to make a 1x1 grid-snapped version, I suppose.

https://mods.factorio.com/mod/shipping-containers
Can I give you a suggestion?
Can the following information be hidden? Because it will look more perfect
No, that's the problem with (ab)using different entity types for unintended purposes. Such tooltips are hardcoded into the game.

sdgmlj
Fast Inserter
Fast Inserter
Posts: 127
Joined: Sun Jul 04, 2021 11:12 pm
Contact:

Re: Can such module function be realized?

Post by sdgmlj »

Xorimuth wrote: ↑
Thu May 19, 2022 9:46 am
No, that's the problem with (ab)using different entity types for unintended purposes. Such tooltips are hardcoded into the game.
Thank you. I don't know anything about this. Although this does not affect the use, it always feels imperfect.

However, I found that some mods can add some "false information" here. For example, an electric train mod (I forgot its name) made a new fuel named "power", so that "power consumption" can be displayed in the information bar. It feels more realistic

Post Reply

Return to “Ideas and Requests For Mods”