[MOD 0.12.x] Item Collectors

Topics and discussion about specific mods
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

[MOD 0.12.x] Item Collectors

Post by Rseding91 »

This is a very simple mod I quickly made for someone that collects items off the ground in a 50x50 area centered on the chest.

No screenshot of it because it's a simple chest (it uses the smart chest icon) - just place it where you want it to pick up stuff and it will do its thing.

Changelog:

Code: Select all

1.1.6: updated for Factorio 0.12.11
1.1.5: updated for 0.12 and full multi-surface support
1.1.4: improved performance
1.1.3: fixed MP desync bug
1.1.2: 0.11 compatible
1.1.1: collectors no-longer pick up items off belts
1.0.0: initial release
Current version: 1.1.6

Download [0.12+]:
Item Collectors_1.1.6.zip
(15.52 KiB) Downloaded 1429 times
Download [0.11.16+]:
Item Collectors_1.1.4.zip
(15.5 KiB) Downloaded 957 times
Last edited by Rseding91 on Mon Mar 02, 2015 10:34 pm, edited 5 times in total.
If you want to get ahold of me I'm almost always on Discord.
starxplor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Sun May 18, 2014 11:25 pm
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by starxplor »

Does it know the difference between items on a belt and items on the ground?
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by Rseding91 »

starxplor wrote:Does it know the difference between items on a belt and items on the ground?
It doesn't, but I have a version that I'll be uploading tomorrow that does.

EDIT: updated to 1.1.1 - the collectors now won't pick up items if they're on belts.
If you want to get ahold of me I'm almost always on Discord.
starxplor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Sun May 18, 2014 11:25 pm
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by starxplor »

Sweet, I will try this tonight after work, thanks!
SHarper
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Aug 15, 2014 10:35 am
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by SHarper »

Isn't this also included in the DY-Tech Demo ?

Does the in my opinion bugfix:

Code: Select all

table.remove(glob.itemCollectors, k)
if #glob.itemCollectors == 0 then
glob.itemCollectors = nil
Fix the Problem with Collectors not working if one is removed (seems to still be in the newest Release of Dy-Tech)

edit:

I also have a little Bug that some Items which seem to be on a belt get collected,
I'have tried to fix that using a bigger box (1.0 instead of 0.4 eg. 0.5) but this fix results in constantly happening Mirco-Laags.
I thinks its because every "Pickup-Tick" all ITEMS are checked if they are on a belt.

Maybe there is a way to exclude the Tiles with Belt before all items on Ground are counted.
Last edited by SHarper on Thu Aug 21, 2014 6:14 am, edited 1 time in total.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by Rseding91 »

SHarper wrote:Isn't this also included in the DY-Tech Demo ?

Does the in my opinion bugfix:

Code: Select all

table.remove(glob.itemCollectors, k)
if #glob.itemCollectors == 0 then
glob.itemCollectors = nil
Fix the Problem with Collectors not working if one is removed (seems to still be in the newest Release of Dy-Tech)

DyTech demo? I know DyTech has item collectors but they're over complicated for what a item collector needs to do and someone wanted a item collector so I wrote this :)
If you want to get ahold of me I'm almost always on Discord.
SHarper
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Aug 15, 2014 10:35 am
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by SHarper »

Sorry, not Tech Demo its in the Core-Module....

I had a Bug with the Item-Collectors from DY-Tech stopping to Work for "no Reason".

So i dug into the Code (pretty much identical to ur code) and then fixed the problem by resetting the global var for the Collector (if entity mined)
I thought of the "glob.itemColl = nil" beeing the source of all evil, but didn't have time to test this.

Still there is the Question with the "item-on-belt" performance Issue, i think i will look for a method to avoid checking items that are on a "belt-tile"
e.g. create an Array for the Search-Box excluding Belt-Tiles which should increase performance. (but uses a little more memory)
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by Rseding91 »

SHarper wrote:Still there is the Question with the "item-on-belt" performance Issue, i think i will look for a method to avoid checking items that are on a "belt-tile"
e.g. create an Array for the Search-Box excluding Belt-Tiles which should increase performance. (but uses a little more memory)
The only method I've thought of that might work would be a rotatable pickup range so you simply don't have it checking an area with belts (or a very small area with belts instead of a large section of your base).
If you want to get ahold of me I'm almost always on Discord.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by Boogieman14 »

I noticed this mod still seems to pick up items from underground belt exits. With my very limited lua skills, it looks like those should get skipped but looks like they don't.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.10.x] Item Collectors

Post by Rseding91 »

Boogieman14 wrote:I noticed this mod still seems to pick up items from underground belt exits. With my very limited lua skills, it looks like those should get skipped but looks like they don't.
I should be able to fix that later today but in general it's best to keep the item collectors away from any belts if you value game performance at all :)
If you want to get ahold of me I'm almost always on Discord.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by Rseding91 »

Updated to 0.11 and fixed a bug with MP desyncing while using the mod.
If you want to get ahold of me I'm almost always on Discord.
MrDrummer
Fast Inserter
Fast Inserter
Posts: 132
Joined: Sat Nov 22, 2014 2:51 pm
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by MrDrummer »

Great mod! I would like one feature though... when you hover over the collector, for it to show the area.

Also, to make the area bigger, woulf i just change the "25"s in:

Code: Select all

~control.lua, line 59 and 60
		if collector.valid then
			items = game.findentitiesfiltered({area = {{x = collector.position.x - 25, y = collector.position.y - 25}, {x = collector.position.x + 25, y = collector.position.y + 25}}, name = "item-on-ground"})
to the radius i wish? I know the radius graphic would be wrong, but hey!

(I wama use this to collect artifacts when i attack mega bases, so then i don't have 100 large biters attacking me!
Dodging_Rain
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Nov 13, 2014 5:48 pm
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by Dodging_Rain »

Yes that works though be warned that if you make the search radius too large and place it too near your base, it may grab stuff from nearby underground belts.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by Rseding91 »

Updated to 1.1.4 - significant performance improvements and hopefully fixed the bug where it picked up items on belt-to-grounds.
If you want to get ahold of me I'm almost always on Discord.
Nagshell
Long Handed Inserter
Long Handed Inserter
Posts: 63
Joined: Wed Feb 25, 2015 1:53 pm
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by Nagshell »

So, would you recommend it to a friend using DyTech to collect bitters bodies? This friend of my who totally isn't me is not fond of making huge areas of belts and doing fancy stuff with walls to try to controll items laying on ground.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by Rseding91 »

Nagshell wrote:So, would you recommend it to a friend using DyTech to collect bitters bodies? This friend of my who totally isn't me is not fond of making huge areas of belts and doing fancy stuff with walls to try to controll items laying on ground.
It does work well for that use.
If you want to get ahold of me I'm almost always on Discord.
User avatar
darkshadow1809
Filter Inserter
Filter Inserter
Posts: 306
Joined: Thu Jan 15, 2015 10:13 pm
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by darkshadow1809 »

Awesome man! Putting it in the modpack if you dont mind :) Great work!
ShadowsModpackDevelopment
User avatar
nfcc08
Burner Inserter
Burner Inserter
Posts: 17
Joined: Tue Feb 24, 2015 3:12 pm
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by nfcc08 »

Going to be so nice for collection of bodies on Dytech. I am curious though, does it act as a normal chest? (wooden/iron/steel)? The reason I ask is it would be nice if it would be possible to have a upgraded version as well that could be used in a Logistics system with robots as that could be a fully automated production of bodies in Dytech then :D
Rseding91
Factorio Staff
Factorio Staff
Posts: 14264
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by Rseding91 »

nfcc08 wrote:Going to be so nice for collection of bodies on Dytech. I am curious though, does it act as a normal chest? (wooden/iron/steel)? The reason I ask is it would be nice if it would be possible to have a upgraded version as well that could be used in a Logistics system with robots as that could be a fully automated production of bodies in Dytech then :D
You could just use an inserter into an active provider chest if that's what you wanted :)
If you want to get ahold of me I'm almost always on Discord.
DOSorDIE
Filter Inserter
Filter Inserter
Posts: 255
Joined: Sat Oct 11, 2014 3:43 pm
Contact:

Re: [MOD 0.11.x] Item Collectors

Post by DOSorDIE »

Is it possible to make a Filter what I want to collect?
Its Ok when i must change it in the .lua ... but who and what? (make 2 or 3 as sample)

Thanks
Post Reply

Return to “Mods”