Page 1 of 8

[0.17]AutoTrash 4.1.5

Posted: Wed Sep 09, 2015 4:44 pm
by Choumiko
Auto Trash

Configure different presets for your Logistic request and Auto trash slots

Image

Features:
  • Configure request and trash settings in one window
  • Save and load multiple presets
  • Export/Import the configuration (as a string or blueprint)
  • Display the requests status:
    • Red: missing items
    • Yellow: items are on the way
    • Blue: some items are on the way, but not enough are available
  • Pause requests when dying
  • Load one or more preset after respawning
  • Trash unrequested items
  • Pause autotrash when not in a certain network
  • Pause requests
  • Shift click configured items in the gui to quickly reorder them:
    Image
Notes:
  • This mod may change your vanilla Logistic and Auto Trash slots at any time (depending on your settings), so i suggest to configure them only in the mods gui if you don't want to loose your changes
  • Export/Import: I suggest to keep the created strings as a blueprint in the blueprint library. If you have modded items configured and import the string in a save without these items you might even loose items that are still available. Importing from a blueprint from the library will only remove the missing items, keeping everything else intact.
Hotkeys:
  • Shift + P: Pauses Autotrash
  • Shift + O: Pause logistic requests
  • Shift + T: Add item on cursor to temporary trash. Pause/Unpause Autotrash if cursor is empty
Commands:
  • Show/Hide buttons: /at_hide and /at_show
Todo:
  • Temporary requests
  • Order blueprint items
  • Support multiple networks where Autotrash will be paused automatically (will be a gui/display nightmare)
  • Export/Import all presets as a blueprint book

Re: [0.12.6+]AutoTrash 0.0.1

Posted: Wed Sep 09, 2015 4:55 pm
by waduk
Another awesome mod.
I'm definitely gonna test / use this.
Edit :
OK, stupid question, i don't see autotrash GUI/button on current game. Or any research to unlock it.

Using new game->test mode, the AutoTrash GUI is showing up though..

Re: [MOD 0.12.6+]AutoTrash 0.0.1

Posted: Thu Sep 10, 2015 8:52 am
by LuziferSenpai
You need a migration Folder, because when guys install that they Gui show up ;)

Re: [MOD 0.12.6+]AutoTrash 0.0.1

Posted: Thu Sep 10, 2015 9:36 am
by Boogieman14
This sounds like a useful thing :) Is there a reason you're not simply using the default item picker that's also used for requesters and filters? And it could probably also do with a few more slots :lol: (I play bob's mods, so I would probably add all 10+ ore types, 7 artifacts, 7 small artifacts, wood, and probably w few more) - perhaps add multiple tiers of research to add more pages?

Re: [0.12.6+]AutoTrash 0.0.1

Posted: Thu Sep 10, 2015 7:31 pm
by Choumiko
waduk wrote:OK, stupid question, i don't see autotrash GUI/button on current game. Or any research to unlock it.

Using new game->test mode, the AutoTrash GUI is showing up though..
It unlocks with the first tier for the trash slots. If you already had it researched when using the mod for the first time it should appear after the first auto/manual save. At least that was the case for me. Altough it really should appear right after loading the save for the first time.
CookieGamerTV wrote:You need a migration Folder, because when guys install that they Gui show up ;)
Doesn't work for multiplayer. Migration files are run only once per save. I need the button to show for multiple players of (possibly) different forces.
Boogieman14 wrote:Is there a reason you're not simply using the default item picker that's also used for requesters and filters? And it could probably also do with a few more slots :lol: (I play bob's mods, so I would probably add all 10+ ore types, 7 artifacts, 7 small artifacts, wood, and probably w few more) - perhaps add multiple tiers of research to add more pages?
The reason is simple: You can't create a custom gui like that (or add stuff to vanilla guis)
So ~ 30 slots? I'll most likely tie them to the trash slot research and maybe add a few more of those while i'm at it

Yesterday i stumpled upon this thread: https://forums.factorio.com/forum/vie ... 80&t=15337
Guess that could serve as a sort of todo list (at least parts of it) :) :shock:

Re: [0.12.6+]AutoTrash 0.0.1

Posted: Thu Sep 10, 2015 7:37 pm
by Boogieman14
Choumiko wrote: The reason is simple: You can't create a custom gui like that (or add stuff to vanilla guis)
And it also isn't available as a function to call? That's a shame, might be a nice thing to ask for as a modding interface request :)
So ~ 30 slots? I'll most likely tie them to the trash slot research and maybe add a few more of those while i'm at it
That'd be great! maybe 10 autotrash slots per level of research?
Yesterday i stumpled upon this thread: https://forums.factorio.com/forum/vie ... 80&t=15337
Guess that could serve as a sort of todo list (at least parts of it) :) :shock:
That's bound to keep you busy for a while :lol:

Re: [MOD 0.12.6+]AutoTrash 0.0.1

Posted: Thu Sep 10, 2015 9:40 pm
by waduk
OK, it appears after save, thanks.

Re: [MOD 0.12.6+]AutoTrash 0.0.1

Posted: Fri Sep 11, 2015 5:52 pm
by ssilk
It took a while, but finally it appeared. Should be fixed after alpha.

I think this is a great addition, which should come to vanilla game, cause it "just works" silently in the background. Nice. All that trees are gone, all that raw iron, copper: Gone! I'm happy. :)


Edit: I would bind the number of available AutoTrash-slots to the number of Trash-slots (or is it already?).

Re: [MOD 0.12.6+]AutoTrash 0.0.1

Posted: Sun Sep 13, 2015 12:28 am
by ssilk
When removing an item out of the game, which was formerly registered in the autotrash, I get the error

Code: Select all

__AtoTrash__/control.lua:82: Unknow item name: small-alien-artefact
It's clear, that is this line

Code: Select all

          local count = player.get_item_count(item.name)
When the item-name is not longer present get_item_count() fails.....

(... how can I check if an item is present in the game?...)

Re: [MOD 0.12.7]AutoTrash 0.0.3

Posted: Sun Sep 13, 2015 12:39 pm
by Choumiko
Updated to 0.0.3
  • remove invalid items on load
  • bind # of slots to trash/logistics research
  • clicking the trash icon with an item in hand adds it to temporary trash
  • add gui to configure requests
  • save/load different request setups
There are now 2 buttons, one for handling your trash settings, the other one for your character logistics slots. You can save/load different request setups, pause/unpause the requests.

Clicking the trash button with an item in the hand now adds that item to a temporary trash instead of saving it permanent. Once the item is completly removed from your inventory it will be removed from AutoTrash again.
That change is mainly in preparation for making temporary requests (next release), which will also work by clicking the logistics button with an item.
I'm unsure what amount the request should be, a stack, 10 items, default_request_amount? Clicking repeatedly would continously increase the requested amount.

Re: [MOD 0.12.7]AutoTrash 0.0.3

Posted: Tue Sep 15, 2015 12:30 pm
by Ranakastrasz
In multiplayer at lest, the third version, added to a existing save which had 0.0.1 already running, does not have the extra tab show up.

Re: [MOD 0.12.7]AutoTrash 0.0.3

Posted: Wed Sep 16, 2015 6:10 pm
by Choumiko
Ranakastrasz wrote:In multiplayer at lest, the third version, added to a existing save which had 0.0.1 already running, does not have the extra tab show up.
The trash buttons shows up and works though?

I haven't mentioned it, but the new one should show up if you have character logistics slots researched.
Can you try loading the save without AutoTrash, save it, add/enable Autotrash and load again? You'll loose your saved config though.

Re: [MOD 0.12.7]AutoTrash 0.0.3

Posted: Wed Sep 16, 2015 7:02 pm
by Ranakastrasz
The tab doesn't show up at all, making it no different from playing without the mod.

Will disable, load, save, and re-enable to see if it helps.

Edit: As it turns out, I was still running 12.6, which caused it to be disabled innately. Oops.

Re: [MOD 0.12.7]AutoTrash 0.0.3

Posted: Wed Sep 16, 2015 7:43 pm
by Ranakastrasz
Would be preferable if the set locations of the items didn't change when you closed the tab.

Re: [MOD 0.12.7]AutoTrash 0.0.3

Posted: Sat Oct 10, 2015 6:51 pm
by Ranakastrasz
If you try to trash items that you have in your ammo slots (with drop-trash, not automatic) it will keep trying and failing to move them, causing that ammo to be created repeatedly, causing free ammo creation.

Re: [MOD 0.12.7]AutoTrash 0.0.3

Posted: Sat Oct 10, 2015 11:06 pm
by Choumiko
Ranakastrasz wrote:If you try to trash items that you have in your ammo slots (with drop-trash, not automatic) it will keep trying and failing to move them, causing that ammo to be created repeatedly, causing free ammo creation.
Uh thanks, that was the sort of bug i was afraid of, item duping :D

AutoTrash 0.0.4 requires Factorio > 0.12.8
  • fix ammo duplicating
  • fix errors when 0 items could be moved to trash
Ranakastrasz wrote:Would be preferable if the set locations of the items didn't change when you closed the tab.
They stay in place for me.

Re: [MOD 0.12.7]AutoTrash 0.0.4

Posted: Tue Oct 13, 2015 11:42 am
by waduk
I think something is broke in 0.0.4.
Previously construction bot can be sent to the trash slot. Now it's being ignore by the mod.

Edit :
Instead of being sent to trash, the game detected as new quest to refill construction bot when they were out working.
Dunno is this a new vanilla bug or a bug from AutoTrash 0.0.4.

Re: [MOD 0.12.7]AutoTrash 0.0.4

Posted: Tue Oct 13, 2015 9:51 pm
by Choumiko
waduk wrote:I think something is broke in 0.0.4.
Previously construction bot can be sent to the trash slot. Now it's being ignore by the mod.

Edit :
Instead of being sent to trash, the game detected as new quest to refill construction bot when they were out working.
Dunno is this a new vanilla bug or a bug from AutoTrash 0.0.4.
This seems like a bug/issue with vanilla. I just added 50 construction bots to my vanilla requests and stood close to a roboport and send them to work. The logistics bots came to refill the ones that where out working. Trashing works fine for me. Put Autotrash into pause, fill your inventory with bots, unpause and watch your trash slots get filled :D

Re: [MOD 0.12.7]AutoTrash 0.0.4

Posted: Wed Oct 14, 2015 5:00 am
by waduk
Confirm,. the construction bot refill bug is a vanilla bug.

Also, turns out the AutoTrash i reported earlier was due the fact it happen because AutoTrash only look for things in inventory, not in toolbar.
My bad, i misinterpret how AutoTrash work (i thought it look for the total in bot inventory and toolbar)

Edit:
Now i'm confused, AutoTrash is also calculating how much item in toolbar ?
Some item is removed.
If we request item, but also set them to be sent to trash, that item was being excluded ?

Edit 2 :

Here's the case:

Request 50 construction bot, wait to arrive.
Set AutoTrash to retain 50 construction bot.
Manually adding another 50 construction bot from roboport/chest.

Result: no construction bot was sent to trash slot. It remain at 100 construction bot.

The behavior is not the same like any entities (i tested it same with above, but with 50 express belt)

Re: [MOD 0.12.7]AutoTrash 0.0.4

Posted: Wed Oct 14, 2015 8:40 am
by Choumiko
waduk wrote:Edit:
Now i'm confused, AutoTrash is also calculating how much item in toolbar ?
Some item is removed.
If we request item, but also set them to be sent to trash, that item was being excluded ?

Edit 2 :

Here's the case:

Request 50 construction bot, wait to arrive.
Set AutoTrash to retain 50 construction bot.
Manually adding another 50 construction bot from roboport/chest.

Result: no construction bot was sent to trash slot. It remain at 100 construction bot.

The behavior is not the same like any entities (i tested it same with above, but with 50 express belt)
It also accounts for items in the toolbar.
What might get you confused is: Autotrash adds the requested amount to the number it should keep. So in your example it will trash bots over 100.
Perhaps it would be better to not add them up but use the maximum instead?