[MOD 1.1] Inventory Sensor

Topics and discussion about specific mods
Sadawys
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Aug 21, 2020 4:56 pm
Contact:

[MOD 1.0] Inventory Sensor 1.8.3

Post by Sadawys »

Hi,
there is a (potential) bug, or not supported:
- blueprints
- copy/paste
does not work. If placed manually everything is fine, but if blueprinted or copy paste the sensor simply is broken and shows the value from the "copy" always without changing.

Best regards,
Sadawys

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

Re: [MOD 0.17 - 0.18] Inventory Sensor

Post by Optera »

Blueprinting works perfectly fine for me.

Sadawys
Manual Inserter
Manual Inserter
Posts: 4
Joined: Fri Aug 21, 2020 4:56 pm
Contact:

Re: [MOD 1.0] Inventory Sensor

Post by Sadawys »

I added you two attachments where you can see after blueprinting and placing the old value will shown and the sensor will not be updated anymore :/
Attachments
427520_20200904220150_1.png
427520_20200904220150_1.png (1.69 MiB) Viewed 5690 times
427520_20200904220151_1.png
427520_20200904220151_1.png (1.69 MiB) Viewed 5690 times

User avatar
Yuri
Manual Inserter
Manual Inserter
Posts: 2
Joined: Sat May 06, 2017 6:40 am
Contact:

Possible desync cause

Post by Yuri »

My modded server is getting plagued by occasional, seemingly random desyncs. I've been comparing the scripts.dat files and the only thing that seems consistent are some sporadic differences just by a bit or two and they all seem to be around areas referring to scripts that Inventory sensor uses such as ScanArea and SkipEntityScanning.
Hex and plaintext images
I honestly can't say for sure that it's Inventory Sensor causing it and I'm not 100% sure how to understand these files but I'm shooting in the dark in case this is a known issue.

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

Re: [MOD 1.0] Inventory Sensor

Post by Optera »

No idea how to parse desync report files either.
That's the first time I hear of IS producing desyncs in a very long time, so I'd assume it's a different mod.

catsup8
Manual Inserter
Manual Inserter
Posts: 4
Joined: Mon Nov 18, 2019 10:49 am
Contact:

Re: [MOD 1.0] Inventory Sensor

Post by catsup8 »

I found a bug after the latest update. I have a train with opposing locomotives, and when I tried to decouple it, the game threw an error

Code: Select all

Error while running event Inventory Sensor::script_raised_built (ID 77)
__Inventory Sensor__/control.lua:105: attempt to index field 'created_entity' (a nil value)
stack traceback:
	__Inventory Sensor__/control.lua:105: in function <__Inventory Sensor__/control.lua:104>
stack traceback:
	[C]: in function 'raise_event'
	__Robot256Lib__/script/carriage_replacement.lua:223: in function 'replaceCarriage'
	__MultipleUnitTrainControl__/control.lua:147: in function 'ProcessReplacement'
	__MultipleUnitTrainControl__/control.lua:222: in function 'ProcessTrain'
	__MultipleUnitTrainControl__/control.lua:324: in function 'ProcessTrainQueue'
	__MultipleUnitTrainControl__/control.lua:352: in function <__MultipleUnitTrainControl__/control.lua:349>
There seems to be a conflict with Multiple Unit Train Control, but I'm not sure why

Xoro
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jun 29, 2016 5:33 am
Contact:

Re: [MOD 1.0] Inventory Sensor

Post by Xoro »

A bug/unsupported feature request. When using the inventory sensor on a chest in the Space Exploration mod when the sensor changes location on a spaceship (flys to orbit for example) the sensor stops working and has to be removed and re-added before it starts reading from the chest correctly again.
I am trying to use the sensor to read the contents from a requester chest that is also being used to set requests so I can't read from the chest using the normal method.

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

Re: [MOD 1.0] Inventory Sensor

Post by Optera »

catsup8 wrote:
Sat Dec 26, 2020 11:49 am
I found a bug after the latest update. I have a train with opposing locomotives, and when I tried to decouple it, the game threw an error
Fixed in 1.10.2
Xoro wrote:
Sun Dec 27, 2020 5:20 pm
A bug/unsupported feature request. When using the inventory sensor on a chest in the Space Exploration mod when the sensor changes location on a spaceship (flys to orbit for example) the sensor stops working and has to be removed and re-added before it starts reading from the chest correctly again.
I am trying to use the sensor to read the contents from a requester chest that is also being used to set requests so I can't read from the chest using the normal method.
I don't have time and will to play test Space Exploration.

salbee
Manual Inserter
Manual Inserter
Posts: 1
Joined: Wed Jan 20, 2021 1:49 am
Contact:

Re: [MOD 1.0] Inventory Sensor

Post by salbee »

I'm struggling to get this mod working. I've installed the mod, and researched it so Inventory Sensor appears in my inventory. I can place them on the map, but nothing works after that. I don't get an inventory, when I click on the sensor it says "not operable".

I checked my log file and I see the mod being loaded:

Code: Select all

  0.718 Loading mod settings Inventory Sensor 1.8.3 (settings.lua)
   0.719 Loading mod settings VehicleSnap 1.18.3 (settings.lua)
   0.724 Loading mod core 0.0.0 (data.lua)
   0.907 Loading mod base 1.0.0 (data.lua)
   1.829 Loading mod Inventory Sensor 1.8.3 (data.lua)
   1.983 Loading mod VehicleSnap 1.18.3 (data.lua)
   2.135 Loading mod base 1.0.0 (data-updates.lua)
   2.308 Checksum for core: 2630831588
   2.308 Checksum of base: 3509992273
   2.308 Checksum of Inventory Sensor: 230805478
   2.308 Checksum of VehicleSnap: 726116391
I don't see anything in the logs that looks like an error. What am I doing wrong?

User avatar
adamwong246
Fast Inserter
Fast Inserter
Posts: 148
Joined: Tue Dec 01, 2020 5:01 am
Contact:

Re: [MOD 1.0] Inventory Sensor

Post by adamwong246 »

I'm getting the same "Not Operable" error. https://github.com/Yousei9/Inventory-Sensor/issues/19

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

Re: [MOD 1.0] Inventory Sensor

Post by Optera »

Honestly this mod worked for years now without needing to spell out the obvious.
Look at the pictures. Place next to a valid target with the flat side facing towards it and hook it up to the circuit network.

PS: I replaced the ancient beta screenshot of a furnace in case that was confusing you guys.

Costin32121311
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Feb 20, 2021 4:20 pm
Contact:

Re: [MOD 1.1] Inventory Sensor

Post by Costin32121311 »

Hi, I seem to be having trouble with the mod, inventory sensors sense wagons belonging to the same trains at different times and are generally unreliable in terms of time needed to sense a stopped wagon and it's inventory, sometimes taking a few ticks and sometimes more, it's not too big of a problem but I want to ask, is there anything that can be done about this?

DaleStan
Filter Inserter
Filter Inserter
Posts: 368
Joined: Mon Jul 09, 2018 2:40 am
Contact:

Re: [MOD 1.1] Inventory Sensor

Post by DaleStan »

You can change the mod settings (on the map tab) to increase the update frequency, but this will also reduce performance.

Costin32121311
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sat Feb 20, 2021 4:20 pm
Contact:

Re: [MOD 1.1] Inventory Sensor

Post by Costin32121311 »

Hi, thanks for all the help, I'd like to ask another question, how can I diferentiate between an empty cargo wagon and an empty fluid wagon? The signals seem to be the same and I can't think of anything else.

RaasKaler
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Jul 19, 2021 6:15 pm
Contact:

Re: [MOD 1.0] Inventory Sensor

Post by RaasKaler »

Optera wrote:
Sun Feb 14, 2021 6:02 pm
Honestly this mod worked for years now without needing to spell out the obvious.
Look at the pictures. Place next to a valid target with the flat side facing towards it and hook it up to the circuit network.

PS: I replaced the ancient beta screenshot of a furnace in case that was confusing you guys.
Sorry for my english... This mod looks like a solution to all my problems. But if I click on this device I see message "does not work"
What can be raeason? is it work o 1.1.36??

aklesey1
Smart Inserter
Smart Inserter
Posts: 1862
Joined: Sun May 18, 2014 3:45 pm
Contact:

Re: [MOD 1.1] Inventory Sensor

Post by aklesey1 »

Hi optera
Is it possible to make item wagon and fluid wagon detection separately?
Can you add rotation of sensor with button like normal combinator?
Nickname on ModPortal - Naron79

Trigun
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Sep 23, 2021 4:24 pm
Contact:

Re: [MOD 1.1] Inventory Sensor

Post by Trigun »

is possible to read the temperature of a storage tank for liquids? (liquid temps?)

Trigun
Burner Inserter
Burner Inserter
Posts: 5
Joined: Thu Sep 23, 2021 4:24 pm
Contact:

Re: [MOD 1.1] Inventory Sensor

Post by Trigun »

a fix can be by copypaste the temp function inside the fluid part, the only problem should be that in this way if u have multiple fluids (no idea why) the temps get sum, but i don't think in that case u care about temps
easiest way can be to check only if you have 1 fluid only

ORIGINAL

Code: Select all

  --get temperature
  local temp = connectedEntity.temperature
  if temp then
    signals[signalIndex] = {index = signalIndex, signal = signal_temperature ,count = floor(temp+0.5)}
    signalIndex = signalIndex+1
  end
  
  
  -- get all fluids
  for i=1, #connectedEntity.fluidbox, 1 do
    local fluid = connectedEntity.fluidbox[i]
    if fluid then
      signals[signalIndex] = { index = signalIndex, signal = {type = "fluid",name = fluid.name}, count = ceil(fluid.amount) }
      signalIndex = signalIndex+1
    end
  end
EDITED

Code: Select all

  --get temperature
  local temp = connectedEntity.temperature
  if temp then
    signals[signalIndex] = {index = signalIndex, signal = signal_temperature ,count = floor(temp+0.5)}
    signalIndex = signalIndex+1
  end
  
  
  -- get all fluids
  for i=1, #connectedEntity.fluidbox, 1 do
    local fluid = connectedEntity.fluidbox[i]
    if fluid then
      signals[signalIndex] = { index = signalIndex, signal = {type = "fluid",name = fluid.name}, count = ceil(fluid.amount) }
      signalIndex = signalIndex+1
      --get temperature
      local temp = connectedEntity.fluidbox[i].temperature
      if temp then
        signals[signalIndex] = {index = signalIndex, signal = signal_temperature ,count = floor(temp+0.5)}
        signalIndex = signalIndex+1
      end
    end
  end

Post Reply

Return to “Mods”