[MOD 1.1] Inventory Sensor

Topics and discussion about specific mods
benmunday
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue May 17, 2016 10:28 am

Re: [MOD 0.16] Inventory Sensor 1.6.3

Post by benmunday »

Hi,

I'm wondering if you would consider making your mod compatible with the warehousing mod. Especially the requester storehouse and requester warehouse.

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

Re: [MOD 0.16] Inventory Sensor 1.6.3

Post by Optera »

benmunday wrote:Hi,

I'm wondering if you would consider making your mod compatible with the warehousing mod. Especially the requester storehouse and requester warehouse.
Seems compatible to me.
IS reads contents of any adjacent logistic-container, regardless size and capacity.

benmunday
Manual Inserter
Manual Inserter
Posts: 3
Joined: Tue May 17, 2016 10:28 am

Re: [MOD 0.16] Inventory Sensor 1.6.3

Post by benmunday »

Optera wrote:
benmunday wrote:Hi,

I'm wondering if you would consider making your mod compatible with the warehousing mod. Especially the requester storehouse and requester warehouse.
Seems compatible to me.
IS reads contents of any adjacent logistic-container, regardless size and capacity.
Thanks for your reply.
It seems that I was using it wrong.
I thought I tried to place it next to the warehouse in all 4 orientations. Must not have, 'cause as soon as I rotated the sensor, the inventory of the warehouse displayed.

It very neatly lets me work around the limitation of only using one of the 2 settings for requester chests when connected to a circuit network.

Well done on the fantastic mods. Couldn't live without LTN now!

User avatar
ShinoHarvest
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue May 08, 2018 3:29 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.3

Post by ShinoHarvest »

possible add grid sensor if Bob's Warfare detected ? i want block my train with not upgraded grid in my depot ^^

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

Re: [MOD 0.16] Inventory Sensor 1.6.3

Post by Optera »

Good idea. Between Bob's and my own Vehicle Grid I guess most players will have grids enabled anyway.

It'll list all equipment in vehicles without distinction if they are in cargo hold or grid.
I'll add a runtime setting to toggle this on/off just in case someone is starving for ups too.

User avatar
ShinoHarvest
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue May 08, 2018 3:29 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.5

Post by ShinoHarvest »

not possible have individual switch option on sensor for scan inventory or grid or 2 different sensor

PS: just have mad idea probaly not for this mod, need make other mod. Is grid filter inserter/extracter for automated grid update/build combined with this sensor and AAI possibility is unlimited can make automated chain of upgrade car/tank/plane. xd

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

Re: [MOD 0.16] Inventory Sensor 1.6.5

Post by Optera »

In the end that would boil down to splitting it into two sensors for inventory and grid.
I prefer having all in one. It's not like vehicles are often used to ferry around equipment in their inventory.

One thing i could do is generate a virtual signal for every possible equipment and display those virtual signals. I really don't like spamming signals though.


Automatically filling grids will require heavy scripting.
Grids are really barebones. No entity in Factorio can interact with grids and grids don't even know what entity they belong to.

Another problem for automatically filling grids will be an algorithm for optimally utilizing grid space with different sizes of equipment.
Unless you opt for copying grids from another vehicle, similar to how automatic train spawner works.

User avatar
ShinoHarvest
Long Handed Inserter
Long Handed Inserter
Posts: 50
Joined: Tue May 08, 2018 3:29 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.5

Post by ShinoHarvest »

In the end that would boil down to splitting it into two sensors for inventory and grid.
other solution inspired by ltn disable warning can make 2 virtual signal for sensor 1 for ignor grid element second for ignor inventory element
ps: other solution use only 1 signal with code exemple 0 = all 1 = inventory 2 = grid ... and other solution more power full use encoded option bit by bit default 0 is activated 1 is ignored with this list : inventory, grid, object contner(wagon, loco, car...), Temperature, craft progress.
Another problem for automatically filling grids will be an algorithm for optimally utilizing grid space with different sizes of equipment.
Unless you opt for copying grids from another vehicle, similar to how automatic train spawner works.
not need this, player need use brain for choise order of inserted element generaly if you enter first big -> small element you gris is optimal you can up this in specific situation with more complex insert order.
Otional advanced settinf give 2 signal x/y (can choise existing virtual signal base game no need add) and inserter check if item can be put in coord and do it if possible
Automatically filling grids will require heavy scripting.
Grids are really barebones. No entity in Factorio can interact with grids and grids don't even know what entity they belong to.
For make logic system and insert good number best solution use only 1 inserter per vehicule (stack size 1max) and probaly player not use all time this inserter just little time after unlock new mk lv. Not problem if code is heavy compared base game inserter because it work rarely in low number compared.

kurtzilla
Inserter
Inserter
Posts: 26
Joined: Tue Feb 26, 2019 6:54 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by kurtzilla »

What is "Remaining Fuel (MJ)" indicative of? I am receiving a value of 604 for MJ.

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

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by Optera »

kurtzilla wrote:
Sun Mar 10, 2019 6:33 pm
What is "Remaining Fuel (MJ)" indicative of? I am receiving a value of 604 for MJ.
604 MJ fuel remaining. https://wiki.factorio.com/Fuel

kerboom
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Mar 05, 2019 8:43 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by kerboom »

I'm making a rail yard and it would be really useful to distinguish empty cargo wagons from empty fluid wagons. Have you considered adding this, or is it even possible in the game?

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

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by Optera »

I can do that.
Though you'd get much better performance if you use LTN stops for this. They output train composition also for trains that are not LTN managed.

kerboom
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Mar 05, 2019 8:43 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by kerboom »

I tried the LTN stops and that's just what I need. Thank you!

On an unrelated note, I am also using your Trains & Fuel Overhaul mod. One think I wish was that my engine consists did not need a dead-weight engine to let them back into a train when they couple onto it--if the backwards one helps accelerate forwards, then I get more power for the same length train.

I understand from the archived discussions that the game won't let you enable power coming from backwards locomotives. But I also saw a mod that changes wagon weight according to its contents.

Do you think it would be possible to detect when there are backwards locomotives in a train (when traveling in a given direction), and increase the forwards locomotives' power to make it act like the reverse ones are helping drive forwards?

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

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by Optera »

I tried balancing Train Overhaul so the dead weight doesn't hinder those locomotives too much.

You could give Noxys_Multidirectional_Trains a try, it rotates engines in driving direction. I've tried it on L(nuclear)-6C(heavy)-L(nuclear) trains and instead of a somewhat realistic acceleration they started going from 0 to 260 in half a train length like ottd maglevs. :lol:

kerboom
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Mar 05, 2019 8:43 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by kerboom »

I'll give that a try, thanks! It may have trouble with my switching yard, though, since there are stops and signals in random places to make coupling work.

Update: Noxy's Multidirectional Trains does work as advertised. But something about how it reassembles the trains after flipping the locomotives shifts the decoupled cars a few pixels, far enough to obscure a signal that it did not before. It can still work if you space out the stops and signals, but then you see a 2-tile teleport when the train connects again. Without Multidirection, it looks pretty realistic, so I think I'll keep it that way.

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

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by Optera »

Multidirectional Trains is as good as we can get with the current api, but it has some issues keeping me from using it myself.
It can fail silently to couple trains back together.
It counts train.id up rapidly, making it useless for any setup where you read train.id from stops.

kerboom
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Mar 05, 2019 8:43 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by kerboom »

Automatic Coupling System makes trains id count up too, but slower. I'm at 45000 after a few dozen hours, with about 30 trains. Is there a point where high train IDs will cause problems? Or will they roll over a 4 billion or something?

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

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by Optera »

kerboom wrote:
Wed Mar 13, 2019 7:22 pm
Automatic Coupling System makes trains id count up too, but slower. I'm at 45000 after a few dozen hours, with about 30 trains. Is there a point where high train IDs will cause problems? Or will they roll over a 4 billion or something?
No idea if internally factorio uses signed or unsigned, 32 or 64 bit integer for train id.
It could overflow as early as 2^31 = 2147483648 or as late as 2^64 = 18446744073709551616. The circuit network will certainly overflow at 2^31.

kerboom
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Mar 05, 2019 8:43 pm
Contact:

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by kerboom »

Ah, then I guess I'm good for 4,086 couplings per minute for a full year of runtime... :D

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

Re: [MOD 0.16] Inventory Sensor 1.6.6

Post by robot256 »

(this is kerboom, on my new non-throwaway account that won't let me PM yet.)

Hey Optera, I made a mod to replace Multidirectional Trains! I'm going to post it soon, but I used your "copyPrototype.lua" file for my first hack-job and won't include that without getting your permission. Would that be okay with you? Reading your mod (and Noxy's) was really helpful to learn what I'm doing. Thanks again for maintaining some awesome mods!

Post Reply

Return to “Mods”