[MOD 1.1] Inventory Sensor

Topics and discussion about specific mods
Post Reply
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

[MOD 1.1] Inventory Sensor

Post by Optera »

Type: Mod
Name: Inventory Sensor
Description: Adds a combinator that reads inventories, fuel and equipment grid of locomotives, wagons, cars, furnaces, assemblers, roboports, rocket silos and reactors.
License: private use, no modification, no redistibution, no commercial use
Source: GitHub
Download: mods.factorio.com
Category: Helper, Train, Vehicle
Tags: Train, Vehicle, Circuit Network, Inventory

Long Description:
If you want to get the inventory of your trains per wagon, build smart furnaces/assemblers control reactor by temperature this mod is for you.
This sensor will read all inventories, fluid boxes (always rounds up to next integer for proper empty detection), crafting progress, temperature and equipment grids.

supported entity types:
  • Car / Tank - leave me a note if you want a modded tank added to the namelist to get the tank detected signal
  • Locomotive
  • Cargo Wagon
  • Fluid Wagon
  • Furnace
  • Assembler - includes Chemical Plant, Refinery, Centrifuge
  • Reactor
  • Logistic Requester Chest
  • Artillery turret
  • storage tank
  • boiler
  • generator (steam-engine)
Signals:
Image Inventory of detected entity
Image Car detected (anything not in tank namelist)
Image Tank detected
Image Locomotive detected
Image Wagon detected (Cargo Wagon and Fluid wagon)
Image reactor temperature
Image crafting progress

Furnace outputs fuel, input, output, crafting progress, modules
Smart train loader using the sensor
Car loader using the sensor
Mod Settings:
  • Inventory update interval
    How often inventories are updated.
  • Entity scan interval
    How often for new/changed entities is scanned. e.g. trains moving out of the station
    This can greatly improve performance if a lot of sensors are looking for vehicles.
  • Read vehicle grids
    Option to disable reading vehicle grids. Minor performance increase.
  • Scan Range & Scan Offset
    Dimensions of the scan rectangle in front of a sensor.
    Changing these it will possible break entity detection!
Credits:
Kikkers - Smarter-Circuitry, initial idea to make this mod
Schorty - Pollution Detector, which i used as guideline for combinator manipulation
Last edited by Optera on Sun Feb 14, 2021 6:14 pm, edited 68 times in total.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor

Post by Optera »

With 1.1.0 I've changed the Sensors to only scan in front of them.
Please let me know if they connect to wrong entities or don't find something they should.

User avatar
hitzu
Filter Inserter
Filter Inserter
Posts: 530
Joined: Tue Sep 09, 2014 5:55 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor

Post by hitzu »

Sometimes I cannot make sensor to scan properly an inventory of a train(locomotive). I try to put it on either side of the train and still it doesn't work.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor

Post by Optera »

hitzu wrote:Sometimes I cannot make sensor to scan properly an inventory of a train(locomotive). I try to put it on either side of the train and still it doesn't work.
Please post some screenshots. Do the locomotives have different hitbox sizes like Yuoki Trains?

Jürgen Erhard
Filter Inserter
Filter Inserter
Posts: 298
Joined: Sun Jun 12, 2016 11:29 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Jürgen Erhard »

"in front". It's missing a clear indicator of what *is* the front. Like what the inserters have when Show Info is on.

Other than: great stuff! I'm sure I'll get many uses (limiting the fuel in a locomotive is something I've wanted for some time).

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Optera »

Jürgen Erhard wrote:"in front". It's missing a clear indicator of what *is* the front. Like what the inserters have when Show Info is on.

Other than: great stuff! I'm sure I'll get many uses (limiting the fuel in a locomotive is something I've wanted for some time).
Feel free to show your creation here.
Constant combinators have a distinct flat "front" side.

Oldhard
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 25, 2016 3:28 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Oldhard »

I don't know why but i got this


http://i.imgur.com/1ypItSH.png


ps.Sorry for my broken english

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Optera »

Oldhard wrote:I don't know why but i got this


http://i.imgur.com/1ypItSH.png


ps.Sorry for my broken english
The only way to get that error would be to connect a sensor to a modded roboport that has no logistic network coverage.
Which mods changing Roboports do you use?

Oldhard
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 25, 2016 3:28 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Oldhard »

I use meny mods.
long list

But all my IS is conected to normal roboport.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Optera »

Oldhard wrote:I use meny mods.
long list

But all my IS is conected to normal roboport.
Testing with modded roboports without any coverage i still cant reproduce the error.
Do any of your mods change roboports or my sensors? (yellow text)

Oldhard
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 25, 2016 3:28 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Oldhard »

Dont know.

But mayby

Chunky_Roboports_0.0.1.zip

or in second order..
RoboCharge_0.0.8.zip
robotarmy_0.2.3.zip
robotMiningSite_0.5.0.zip
Robot_Cleanup_0.1.2.zip
botReplacer_0.14.3.zip

but i dont know what i must looking in?

When you want i uploaded my game with mod to dropbox etc.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Optera »

Oldhard wrote:Dont know.

But mayby

Chunky_Roboports_0.0.1.zip

or in second order..
RoboCharge_0.0.8.zip
robotarmy_0.2.3.zip
robotMiningSite_0.5.0.zip
Robot_Cleanup_0.1.2.zip
botReplacer_0.14.3.zip

but i dont know what i must looking in?

When you want i uploaded my game with mod to dropbox etc.
The yellow text under the item name. Every mod changing or adding something has it's name written there in load order.

hnougher
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sat Jan 21, 2017 10:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by hnougher »

Oldhard wrote:I don't know why but i got this
ps.Sorry for my broken english
I have worked this one out.
It occurs when the roboport being read is in a state with no power.

The roboport UI also reflects this. ie: the sidebar detail shrinks a little as soon as it runs out of power as it has less details.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.5

Post by Optera »

hnougher wrote:
Oldhard wrote:I don't know why but i got this
ps.Sorry for my broken english
I have worked this one out.
It occurs when the roboport being read is in a state with no power.

The roboport UI also reflects this. ie: the sidebar detail shrinks a little as soon as it runs out of power as it has less details.
Thanks for the info. I could reproduce and fix this and another error when networks split.

Rouks
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Mar 10, 2016 9:09 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.6

Post by Rouks »

Apparently, mod doesn't show - can't find the "Inventory sensor" item in the menu
I'm playing French version - localization issue?

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.6

Post by Optera »

Rouks wrote:Apparently, mod doesn't show - can't find the "Inventory sensor" item in the menu
I'm playing French version - localization issue?
You have to research the tech first. It's available after normal combinators.

Rouks
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Mar 10, 2016 9:09 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.6

Post by Rouks »

Optera wrote:
Rouks wrote:Apparently, mod doesn't show - can't find the "Inventory sensor" item in the menu
I'm playing French version - localization issue?
You have to research the tech first. It's available after normal combinators.
Ooops... sorry :-P

folk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Mar 03, 2017 5:00 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.7

Post by folk »

Hi!
Man your LTN and IS mods are so great! I came looking for some off-the-shelf blueprints for generic loader/unloader stations, and I see you've posted some blueprints in the discussion threads around here - thank you! :-)

I went to your mods entries on the factorio mod site, and on your github, to see if you had a repository of these blueprints.
I did not find any. No problem, I will use the ones from the forum threads.

But I found something else. And - besides thanking you for your mods - what I found is the reason I'm writing this post.
  • You relicensed your code recently from GPLv2 to a custom license.
Some caveats before I write what I am going to write:
  • I never looked at your code - I looked at your github to see if there were any blueprints there in the readme.md or GH wiki
  • I have never written any mods for Factorio
  • I have never looked at the code of any Factorio mods
  • I do not know what the normal licensing practices are for Factorio mod authors
  • I do not know why you relicensed your work
  • I do not know if you authored all the code yourself or if you copied anything from other mods to help you start
None of the caveats above are relevant to this post or the information below. They are meant to diffuse any potential for conflict and to highlight that my motive is simply to inform.

The only reason I'm writing this post is to help you. To inform. Because since you changed the license, you must - for whatever reason - care about how you license your code.

So please take the following statements of fact as how I intend them - as informative. I am not challenging you or asking you any questions.
  1. When any piece of work is relicensed, any package releases (or source tags) that pre-date the relicensing effort will still be usable with the old license by any who possess it already or can retrieve it somehow
  2. You can not relicense the work of other people if they are included in your total package without explicit permission from each contributor/author (an email is sufficient)
  3. In the strictest interpretation (as interpreted by the Apache Foundation[1] and Mozilla Corporation[2]), every file that is supposed to be covered by a license needs to include an abbreviated license header at the top of the file.
The last point is really not necessary, and a license.md file in the root of the project folder is sufficient.
Years ago, before source control - with every piece of code being attributed (generally speaking) to a github user account, or email - it was common practice to also enumerate each contributor/author at the top of every individual file.

EDIT: The most important point is A, obviously. Because most authors who relicense their work don't know this.

Anyway; IANAL, but I have taken part in huge relicensing efforts of exceptionally well-distributed (tens of millions of users) two times, so I know what the lawyer-speak resolves to in the actual source repository.

Since this is my first post to the forum, I am apparently not allowed to post URLs. They will follow immediately in the post below - provided the forum allows me to do that. We will find out :-P
Last edited by folk on Fri Mar 03, 2017 5:47 pm, edited 1 time in total.

folk
Long Handed Inserter
Long Handed Inserter
Posts: 96
Joined: Fri Mar 03, 2017 5:00 pm
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.7

Post by folk »


User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2915
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.13/0.14] Inventory Sensor 1.1.7

Post by Optera »

Thanks for the flowers.

The reason why I changed the license is simple. Someone re-branded LTN and re-hosted it on the mods page as his own creation. (without asking ofc, as (L)GPL allows forgoing any form of manners apparently)
I always liked open source, but I also like to get credit for my work, so I pulled the plug and will only release projects where I sink countless hours into under licenses preventing re-hosting or re-branding.

Post Reply

Return to “Mods”