[0.17]AutoTrash 4.1.5

Topics and discussion about specific mods
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.17]AutoTrash 4.1.2

Post by Choumiko »

Hm yeah, i clear the name (accidentally) a bit too often/soon.

I'll think it would be better to only clear it if you select multiple presets and for all other gui clicks/actions it can stay and clicking inside the textfield will select the complete text so it's quick to delete.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

Version: 4.1.5
Date: 23. 06. 2019
Changes:
  • Preset textfield only gets cleared when selecting multiple presets
  • Select all text when clicking the preset textfield
  • Adding AutoTrash to an existing save will import existing request/trash filters
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by slippycheeze »

Thanks! After playing with this for a while, it works perfectly. Changes are trivial to save.

I occasionally find myself coming back in to save a change after clicking the green tick button, when I had intended this to be "forever", but that is a small concern, and I'm not sure I'd appreciate an "unsaved changes" prompt when I did that in the long term...

Anyway, great stuff. Solved my one last problem. :)
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

slippycheeze wrote: Sun Jun 23, 2019 12:12 pm I occasionally find myself coming back in to save a change after clicking the green tick button, when I had intended this to be "forever", but that is a small concern, and I'm not sure I'd appreciate an "unsaved changes" prompt when I did that in the long term...
Not 100% sure i get what you mean, but there is a "Close on apply" mod setting, which you can disable to keep the gui open.
And saving a preset saves what is shown in the gui, you don't have to apply before saving (E.g. you can create a hundred presets without ever actually applying)

Does anyone feel like it would be useful to add 2 new actions to the "Quick actions" drop down?
  • Add X to requests
  • Add X to trash
The X value would come from a small textfield in the gui, which you'd have to set before choosing the option and add/subtract the value to all configured items
That should allow something like that old old request:
justarandomgeek wrote: Sun Jun 05, 2016 6:15 pm With the auto-trash-above-logistics mode, would it be possible to have an offset before it auto-trashes? For example, let it pile up one extra stack in my inventory beyond what's requested, then start getting rid of it, and maybe then trash it a whole stack at a time. This would lead to less silliness where I'm picking up and placing the same things over and over, trying to get the layout I want (or reworking combinators), and the bots just keep taking one and two at a time back and forth to storage to make sure I only ever have exactly 50 of the thing.
Just set your requests, then use "Set trash to requests" and then "Add X to trash" with X being 5.
I actually had a mod setting that would have added a fixed number to the trash amount if the "Trash above requested" checkbox was ticked, but the above seems more flexible and transparent?
jinks
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Jun 29, 2019 2:28 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by jinks »

I still don't get how the different settings are supposed to work.

What I want is the following (using plates as an example):
  • keep me supplied with up to 200 iron plates if I have less than that
  • if I manually add more than 200 plates to my inventory, don't trash until I exceed 400 plates
  • trash everything above 400 plates
I tried to set Requests to 200 and Trash to 400 which intuitively would achieve the above, but it doesn't.

In the default configuration it doesn't trash any plates, ever. I can merrily add stacks of plates until I have a few thousand of them and nothing happens.
If I set "Autotrash above requests" (What does that even mean? Does "above" refer to the grid above or to the number being higher than requests?) it trashes every plate down to 400 as intended, but it also fills up my inventory up to 400 plates, despite requests being set to 200.

What I want to have is a way to set a lower and upper bound for items in my inventory, but currently the two sliders seem to have a more or less "random" relationship with what's actually happening. Without "Autotrash above requests" it apparently never trashes anything at all. With it on it just ignores the requests value completely and keeps your inventory exactly at the "Trash" value.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

jinks wrote: Sat Jun 29, 2019 2:43 pm I tried to set Requests to 200 and Trash to 400 which intuitively would achieve the above, but it doesn't.
Works for me:
Peek 2019-06-29 17-14.gif
Peek 2019-06-29 17-14.gif (1.67 MiB) Viewed 5832 times
In the default configuration it doesn't trash any plates, ever. I can merrily add stacks of plates until I have a few thousand of them and nothing happens.
This sounds like you didn't click the green button after setting stuff up?
If I set "Autotrash above requests" (What does that even mean? Does "above" refer to the grid above or to the number being higher than requests?) it trashes every plate down to 400 as intended, but it also fills up my inventory up to 400 plates, despite requests being set to 200.
"Autotrash above requests" is meant as a quick/temporary way to get rid of unwanted items. If you set all items up with a Trash value that is not infinite it will have absolutely no effect, else it will set the trash value for each item to the request value. "Above" refers to the request values you had setup after you last applied changes in the gui or whatever is stored in the presets you have loaded.

I can't reproduce Autotrash filling up to 400 plates with "Autotrash above requests" on. Can you upload the buggy save somewhere?
jinks
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Jun 29, 2019 2:28 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by jinks »

Did some more testing, it's definitely behaving weird for me...

Clip 1:

I can add as many plates as I want, it only ever takes some away if I manually go into the GUI and klick the green button again.

Clip 2:

Have 400 Plates -> activate autotrash above -> remove all -> nothing happens -> take 200 -> get 200 more.

Clip 3:

Have 400 -> remove 200 via shift-click -> nothing -> remove 200 via click and drag -> get 400

It seems to make a large difference if you shift-click items over or use click-and-drag. I also notice different behaviour based on when I click the apply button. If I currently have more than the trash value, it always keeps me at the trash value, if I have less it fills me up to the the request value, but doesn't care how much I add on top.

I can try uploading the save, but I'll have to clean out some non-public mods first and even then, be prepared to download about ~1GB of mods :|

Edit: I'm playing this on a LAN MP server, in case that makes any difference.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

In Clip 2 i notice the vanilla logistics gui only having 2 items set at one point, as opposed to the Autotrash gui having o items set.
So there is definitely something going on.
jinks wrote: Sat Jun 29, 2019 7:57 pm I can try uploading the save, but I'll have to clean out some non-public mods first and even then, be prepared to download about ~1GB of mods :|
Don't clean up any mods, just upload a save (no need to upload the mods) I'll simply sync mods with the save and get the public ones if i don't have them already.
jinks
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Jun 29, 2019 2:28 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by jinks »

Alright, the raw, unedited save it is.
https://cloud.mended-drum.net/index.php ... jycGpE4eaT

Maybe it's just me using it wrong, but I tried several combinations of settings and the best I could get to work was with some manual intervention.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

Found the issue.

Picker Inventory Tools has 2 settings that change how requests/trash work that interfere with AutoTrash:
Screenshot from 2019-06-30 07-52-30.png
Screenshot from 2019-06-30 07-52-30.png (8.51 KiB) Viewed 5818 times
Disabling the first should fix the issues you are having. You can/should also disable the second one, since AutoTrash already prevents the trash value being lower than the request value and that's all the setting does.

I'll get in contact with the Picker team to properly resolve the conflict

BTW: you don't need to click apply when changing checkboxes in the AutoTrash gui. I was hoping the thin borders around the 2 areas would be enough to indicate that. I'll update the pictures and text on the portal to make that more clear.
jinks
Burner Inserter
Burner Inserter
Posts: 8
Joined: Sat Jun 29, 2019 2:28 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by jinks »

Oh. My. God.

Thank you so much! I would never have spotted that. Picker wasn't even on my radar for messing with those settings.

Finally some sanity in my personal logistics. :)
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by slippycheeze »

I've notice an oddity with AutoTrash that ... I'm not quite sure if it is a bug, or a player-is-dumb issue, or something else getting in and messing stuff up, but anyway:
  • I die. To a train, of course.
  • AutoTrash turns off auto trash on death.
  • I collect my stuff
  • I turn auto trash back on.
  • auto trash turns off again.
  • go back two steps and repeat until reload or whatever.
Besides that, I have a handful of things that I'd like the mod to do, and that I can't find an existing way to have happen:

On death, I'd actually like to disable all my logistics, specifically:
  • Remove all requests, full stop. - found the hidden setting, cunningly named "disable requests on death"
  • Remove all autotrash, full stop.
  • Grab everything in my trash back into inventory.
I can't figure out how to do the first or last; the middle one works OK, other than the issue at the top ;)

There are a bunch of items that wind up in my inventory for annoying reasons, and which I just want to get rid of entirely. As far as I can tell, setting a request for "0 / 0" request/trash doesn't do what I want - it definitely at least places it into the request section as well, even if it is at zero. Basically, exactly what would happen if you put an item in a vanilla auto trash filter, with zero count: it always goes to trash.

Because I don't want to carry around 12 stupid iron ore that I got while fixing a belt annoyance, or that one random copper ore that I dropped forever ago, and my robots finally picked up for me. ...or that darn pistol. No. None of them. Never. It can go direct to recycling and turn into something useful, not clog my inventory.

I guess in terms of UI I'm really looking for something like "no requests, only trashing", but I don't *think* you can do that now? As I say, it seems like a zero request quantity puts a zero count request in, and I guess that messes stuff up, because it doesn't trash the pistol even when everything else is empty.


Finally, I'm sure it is a pain, but I keep hitting the "close this window" key to close off AutoTrash, and it doesn't work. No idea how hard it would be, but if it behaved more like the regular inventory and entity-configuration GUI windows, that'd be great. I mean, I can't stop using it, because I tried one competitor, and vanilla again, and damn, I just ... I just can't.

You have ruined vanilla personal logistics for me forever! ;)
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

slippycheeze wrote: Thu Jul 04, 2019 6:53 am I've notice an oddity with AutoTrash that ... I'm not quite sure if it is a bug, or a player-is-dumb issue, or something else getting in and messing stuff up, but anyway:
  • I die. To a train, of course.
  • AutoTrash turns off auto trash on death.
  • I collect my stuff
  • I turn auto trash back on.
  • auto trash turns off again.
  • go back two steps and repeat until reload or whatever.
The bug being that autotrash (The trashing part, not requests) turns off on it's own?
The only way that it should turn off on its own is when you have "Autotrash only in main network" set and are outside off the network (also when you are not in any network, since that saves me from moving your trash inventory into the regular one when you enter a network that isn't the main network)
On death, I'd actually like to disable all my logistics, specifically:
  • Remove all requests, full stop.
  • Remove all autotrash, full stop.
  • Grab everything in my trash back into inventory.
First two can be done by saving a preset with no requests and trash and then marking it as a death preset:
Screenshot from 2019-07-04 09-27-52.png
Screenshot from 2019-07-04 09-27-52.png (7.94 KiB) Viewed 5779 times

This will load the preset when respawning, effectively pausing requests and trash. (I guess the pause requests on death setting isn't really necessary then)
As for the 3rd point; i'm not really sure how you end up with anything in your trash inventory after respawning? When dying your trash inventory is moved into your corpse.
There are a bunch of items that wind up in my inventory for annoying reasons, and which I just want to get rid of entirely. As far as I can tell, setting a request for "0 / 0" request/trash doesn't do what I want - it definitely at least places it into the request section as well, even if it is at zero. Basically, exactly what would happen if you put an item in a vanilla auto trash filter, with zero count: it always goes to trash.

Because I don't want to carry around 12 stupid iron ore that I got while fixing a belt annoyance, or that one random copper ore that I dropped forever ago, and my robots finally picked up for me. ...or that darn pistol. No. None of them. Never. It can go direct to recycling and turn into something useful, not clog my inventory.
The 0 requests shouldn't prevent stuff from being trashed, but yeah it looks a bit strange once you have a few of these items showing up in your requests. I'll change it in the next update.
Screenshot from 2019-07-04 09-53-33.png
Screenshot from 2019-07-04 09-53-33.png (351.93 KiB) Viewed 5779 times

This setup should be what you're after. When selected as a death preset and you respawn it immediately thrashes the pistol and ammo. And you can then combine it with another preset for regular use (Shift clicking presets combines them)
Finally, I'm sure it is a pain, but I keep hitting the "close this window" key to close off AutoTrash, and it doesn't work. No idea how hard it would be, but if it behaved more like the regular inventory and entity-configuration GUI windows, that'd be great.
I think that's possible, i'll see what i can do. It will probably close only after all vanilla guis are closed but that should be ok.
I mean, I can't stop using it, because I tried one competitor, and vanilla again, and damn, I just ... I just can't.

You have ruined vanilla personal logistics for me forever! ;)
You're welcome :mrgreen:
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

slippycheeze wrote: Thu Jul 04, 2019 6:53 am
  • Remove all requests, full stop. - found the hidden setting, cunningly named "disable requests on death"
You mean "Pause requests on death" ? That's on by default (at least it should be)
But that makes me wonder even more about the "maybe bug" of autotrash turning off on it's own. Can you maybe provide a save where i can reproduce it?

Edit: About closing the gui: You mean the default "E" right? Because i just noticed that i got used to pressing ESC to close windows, probably because i'm only wanting to pause the game before switching back to the desktop.
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by slippycheeze »

Choumiko wrote: Thu Jul 04, 2019 8:12 am
slippycheeze wrote: Thu Jul 04, 2019 6:53 am
  • Remove all requests, full stop. - found the hidden setting, cunningly named "disable requests on death"
You mean "Pause requests on death" ? That's on by default (at least it should be)
But that makes me wonder even more about the "maybe bug" of autotrash turning off on it's own.
Yes, that is what I mean. I don't recall turning that off, but clearly I did. Given that, I looked suspiciously at the fool reporting this too, and found out that the vast majority of it is just that I am a fool.

The "trash" stuff was because when autotrash was reactivated it'd push all the extra bits I got from logistics after death into trash, and I didn't even think about it. Using the "empty preset on death" works fine, and with the option restored to default, none of that is an issue.

I also wasn't able to reproduce the effect I had where it'd turn off autotrash after I turned it on, which annoyed me, because that was definitely reproducible. It then occurred to me that one change I had made since was to turn off "autotrash only in main network", which may be related, but isn't helping repro it right now either.

So ... IDK. I'm gonna write that one off as me being an idiot or something until I can find a decent way to reproduce it. I did get to wondering if I had somehow accidentally established my "main network" as something other than my, well, main network. Like, maybe set it when something split the network or something?

I couldn't figure out a way to see what AutoTrash thought my main network was, though, or if I was standing in it. Is there an easy way to get at that, and by easy I mean "easier than reading the source code and poking into your data structures myself."
Choumiko wrote: Thu Jul 04, 2019 8:12 am Edit: About closing the gui: You mean the default "E" right? Because i just noticed that i got used to pressing ESC to close windows, probably because i'm only wanting to pause the game before switching back to the desktop.
Yes, that is correct. Remapped to 'A' for me, but the "Close window" binding.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by Choumiko »

slippycheeze wrote: Fri Jul 05, 2019 1:05 am I also wasn't able to reproduce the effect I had where it'd turn off autotrash after I turned it on, which annoyed me, because that was definitely reproducible. It then occurred to me that one change I had made since was to turn off "autotrash only in main network", which may be related, but isn't helping repro it right now either.

So ... IDK. I'm gonna write that one off as me being an idiot or something until I can find a decent way to reproduce it. I did get to wondering if I had somehow accidentally established my "main network" as something other than my, well, main network. Like, maybe set it when something split the network or something?

I couldn't figure out a way to see what AutoTrash thought my main network was, though, or if I was standing in it. Is there an easy way to get at that, and by easy I mean "easier than reading the source code and poking into your data structures myself."
It probably was the "only in main network setting", the network is checked whenever the player moves into a new tile (or something like that), so for it to pause after unpausing you'd have to move around a bit.
It's entirely possible that there's a bug when splitting a network. When setting the network it stores the closest roboport. When you mine that it sort of randomly looks for other roboports in the network. If the roboport you mined results in a split network there's no way of telling which of the 2 networks it chooses as your new network. I'll check that code and maybe add a message when it changes the network, right now you only get one when the network is being completely unset.

One of the next changes will be the possibility to allow defining multiple networks, so at least then there will be some sort of display (or markers on the map?) to see the networks.

The "A" key, interesting :) What's your keybinding for opening the character screen then? By default it's also the close gui key, which is giving me some troubles.
In my current version pressing E keeps closing all windows including autotrash, but then when i open the Autotrash gui and then want to open my character it closes the gui, which is slightly annoying (i think)
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by slippycheeze »

Choumiko wrote: Fri Jul 05, 2019 6:51 am
slippycheeze wrote: Fri Jul 05, 2019 1:05 am I also wasn't able to reproduce the effect I had where it'd turn off autotrash after I turned it on, which annoyed me, because that was definitely reproducible. It then occurred to me that one change I had made since was to turn off "autotrash only in main network", which may be related, but isn't helping repro it right now either.
It probably was the "only in main network setting", the network is checked whenever the player moves into a new tile (or something like that), so for it to pause after unpausing you'd have to move around a bit.
Yah. I'm, uh... I wouldn't call myself exactly disciplined in getting from the early start to the logistic driven mall stage there, so I probably did that to myself.
Choumiko wrote: Fri Jul 05, 2019 6:51 am The "A" key, interesting :) What's your keybinding for opening the character screen then? By default it's also the close gui key, which is giving me some troubles.
In my current version pressing E keeps closing all windows including autotrash, but then when i open the Autotrash gui and then want to open my character it closes the gui, which is slightly annoying (i think)
I use ESDF for movement, A for close, G for open, and more or less every other keybind is on Q. (Well, it isn't, but that is the pippette tool, clear hand, etc, etc)
The WRT keys are also easily accessible for whatever. I actually click more GUI slots in Factorio than most games, so I'm not pressed for keybindings. :)
blizgerg
Inserter
Inserter
Posts: 31
Joined: Thu Apr 28, 2016 11:18 pm
Contact:

Re: [0.17]AutoTrash 4.1.5

Post by blizgerg »

This mod is awesome. I like a lot of your mods Choumiko.

I have encountered a crash with importing blueprints for the requests that are not in the player inventory and only in the blueprint library.

https://imgur.com/a/13l6Swt
Image

The steps: Grab blueprint from blueprint library, click on import button with blueprint.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [0.17]AutoTrash 4.1.7

Post by Choumiko »

Thanks for the report, should be fixed in the latest update.
Glad you like it, and congratulations on being the first one to import a blueprint/string! :D
Version: 4.1.7
Date: 08. 07. 2019
Changes:
- Requests with 0 amount are no longer set in the vanilla gui
Bugfixes:
- Fixed crash when importing a blueprint with requests
slippycheeze
Filter Inserter
Filter Inserter
Posts: 587
Joined: Sun Jun 09, 2019 10:40 pm
Contact:

Wishlist: quick set trash to request value for one item

Post by slippycheeze »

The "Quick actions" feature of setting trash values equal to request values is nice, but much more often I find myself wanting to set that for a single item. I suggest adding a button onto the UI to do that -- fill down, as it were, the request count to the trash count.

Illustrated example:
autotrash suggestion - set trash to requests.jpg
autotrash suggestion - set trash to requests.jpg (10.03 KiB) Viewed 5676 times
For bonus points, a 2x, 5x, and 10x button next to it that would set the trash amount to the appropriate multiplier, seems like a good idea. I certainly find myself, for example, setting a few things that I mostly use for touch-up (rails, walls, etc) while building to request one stack, trash at two to five stacks.

That way I don't need to change anything if I grab a pile for a big manual build, but I also don't gather infinite stacks into my inventory and fill it up. For the in-between I just manually trash a stack or two to get rid of it.

edit: I have never felt the need to set the request level from trash, largely because the slider handles that pretty well.
Post Reply

Return to “Mods”