billw wrote:Hey if this can detect number of robots in a roboport then it solves the issue of resupplying a limited number of construction bots to outposts and you are my hero.
I'm going to test tonight and report back, but if it doesn't then consider this a suggestion!
[MOD 0.12.x] Smarter Circuitry
Re: [MOD 0.12.x] Smarter Circuitry
Re: [MOD 0.12.x] Smarter Circuitry
Encountered an error with the Sensor and the Rail Tanker mod. When the tanker wagon emptys out completely, the sensor crashes with: control.lua:252: Item stack count has to be a positive number.
After attempting to fix it, I also encountered a separate error in which the fluidbox existed in the array but was nil.
After attempting to fix it, I also encountered a separate error in which the fluidbox existed in the array but was nil.
Code Fix
[edit]Looks like it's more than that, the Rail Tanker seems to place a hidden decorative object which doesn't get detected properly.[/edit]Re: [MOD 0.12.x] Smarter Circuitry
I added this to an in progress MP game and can't see the sensor anywhere! What am I missing?
Re: [MOD 0.12.x] Smarter Circuitry
I modified that fluidbox fix slightly more, but it should be stable regardless now. Also had some confusion about migration scripts, fixed that too. The sensor and actuator should appear in in-progress games again.
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: [MOD 0.12.x] Smarter Circuitry
What is the filter for the directional sensor?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: [MOD 0.12.x] Smarter Circuitry
I'm unsure what you mean by filter?Ranakastrasz wrote:What is the filter for the directional sensor?
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: [MOD 0.12.x] Smarter Circuitry
Alterable setting labled filter.Kikkers wrote:I'm unsure what you mean by filter?Ranakastrasz wrote:What is the filter for the directional sensor?
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: [MOD 0.12.x] Smarter Circuitry
Oh, I'm guessing you mean the filter on the actuator or electric switch. Those don't do anything, but need to be there to be able to operate the underlying smart inserter when no wires are connected, or when there isn't a logistics network nearby.Ranakastrasz wrote:Alterable setting labled filter.
I though it was more important that the player can always operate the object, so they can always see what is, or isn't connected.
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: [MOD 0.12.x] Smarter Circuitry
Ah, So that is just a side effect of the workaround.Kikkers wrote:Oh, I'm guessing you mean the filter on the actuator or electric switch. Those don't do anything, but need to be there to be able to operate the underlying smart inserter when no wires are connected, or when there isn't a logistics network nearby.Ranakastrasz wrote:Alterable setting labled filter.
I though it was more important that the player can always operate the object, so they can always see what is, or isn't connected.
Code: Select all
Error while running the event handler: __actuator__/control.lua.138: attempt to compare number with table
I just added an actuator and sensor net to make trains launch as soon as they load and unload.
Next time I loaded the game, it gave this error.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: [MOD 0.12.x] Smarter Circuitry
I'm not sure what causes that, seeing that the code line mentioned doesn't point to a line that can cause that error. I know of one way that this can happen: the actuator (and sensor) maintain a copy of the function they use each tick, which could be from an old version. I thought I had some code functional that refreshes this function on game load, but apparently something's still going wrong and I'm not sure what.Ranakastrasz wrote:Game couldn't load with this error.Code: Select all
Error while running the event handler: __actuator__/control.lua.138: attempt to compare number with table
I just added an actuator and sensor net to make trains launch as soon as they load and unload.
Next time I loaded the game, it gave this error.
Also, I tried loading your save and it did seem to work for me, though I didn't have some of the mods you're using. It could be related to that.
You could always disable the the actuator mod and load the game again if that's the cause, but they'll get removed. I'm sorry for not adequately testing for robustness, I suppose that's the cost of making it crammed with features.
Re: [MOD 0.12.x] Smarter Circuitry
I accidentally put fast inserter on directional sensor, then this happen.
They pulling a virtual item.
So, i'm not sure if this a bug or how this mod work internally.
They pulling a virtual item.
So, i'm not sure if this a bug or how this mod work internally.
Re: [MOD 0.12.x] Smarter Circuitry
I'm aware that this is possible. The reason is that it's impossible in script to prevent an inserter from getting stuff out of a chest. The sensor is basically a hidden smart chest, so that's the problem.waduk wrote:I accidentally put fast inserter on directional sensor, then this happen.
They pulling a virtual item.
So, i'm not sure if this a bug or how this mod work internally.
The only way to prevent inserters doing this is to set the hidden chest to a different force, but this would prevent you from picking up your sensor.
I've attempted multiple times to request this in the modding api, but it seems to not be there yet.
Re: [MOD 0.12.x] Smarter Circuitry
Yeah, this is not problem at all, and i don't think any player will came across this unless they make the same accidental placement as i do.
And i don't even notice if i don't see a strange icon rolling in my belt, and it gives hilarious surprise actually.
i really didn't expect to see a locomotive icon, at first i thought it was electrical engine running wild, that somehow being dropped by logistic bot.
Thank you for this wonderful mod btw.
And i don't even notice if i don't see a strange icon rolling in my belt, and it gives hilarious surprise actually.
i really didn't expect to see a locomotive icon, at first i thought it was electrical engine running wild, that somehow being dropped by logistic bot.
Thank you for this wonderful mod btw.
- Ranakastrasz
- Smart Inserter
- Posts: 2174
- Joined: Thu Jun 12, 2014 3:05 am
- Contact:
Re: [MOD 0.12.x] Smarter Circuitry
Can you make it use virtual items like combinators do? Can you manipulate a constant combinator via script?
Can you have it manipulate a liquid instead, and have it act as a smart tank?
Also, It turns out I had version 4.0 instead of the latest version, so I am updating, Might have been the problem.
Can you have it manipulate a liquid instead, and have it act as a smart tank?
Also, It turns out I had version 4.0 instead of the latest version, so I am updating, Might have been the problem.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Re: [MOD 0.12.x] Smarter Circuitry
If I could manipulate a combinator signal, this problem would be solved. But we can't (yet), and virtual items (signals) can't be added to regular inventories.Ranakastrasz wrote:Can you make it use virtual items like combinators do? Can you manipulate a constant combinator via script?
Can you have it manipulate a liquid instead, and have it act as a smart tank?
If anyone knows of a roundabout way to manipulate a constant combinator, please tell.
Whew, got scared there as I was sure that was a bug I fixed previously.Ranakastrasz wrote:Also, It turns out I had version 4.0 instead of the latest version, so I am updating, Might have been the problem.
Re: [MOD 0.12.x] Smarter Circuitry
here's what I use:Kikkers wrote:If anyone knows of a roundabout way to manipulate a constant combinator, please tell.
Code: Select all
local cargoProxy = self.waitingStation.cargoProxy
local output = cargoProxy.get_circuit_condition(1)
local cargoCount = self:cargoCount()
for c=1,50 do
output.parameters[c]={signal={type = "item", name = nil}, count = 1, index = c}
end
output.parameters[1]={signal={type = "virtual", name = "signal-train-at-station"}, count = 1, index = 1}
output.parameters[2]={signal={type = "virtual", name = "signal-locomotives"}, count = #self.train.locomotives.front_movers+#self.train.locomotives.back_movers, index = 2}
output.parameters[3]={signal={type = "virtual", name = "signal-cargowagons"}, count = #self.train.cargo_wagons, index = 3}
local i=4
for name, count in pairs(cargoCount) do
local type = "item"
if fluids[name] then
type = "fluid"
count = math.floor(count)
end
output.parameters[i]={signal={type = type, name = name}, count=count, index = i}
i=i+1
if i>50 then break end
end
for c=i,50 do
output.parameters[i]={signal={type = "item", name = nil}, count = 1, index = c}
end
cargoProxy.set_circuit_condition(1,output)
Re: [MOD 0.12.x] Smarter Circuitry
Well, there we go. Expect a patch sometime later this week. Hopefully I can prevent any migration problems this time.
Re: [MOD 0.12.x] Smarter Circuitry
Trying this out a bit, I noticed you could just insert any table that has the parameters field into set_circuit_condition. A lot cleaner than resetting each individual signal field in the constant combinator.Choumiko wrote:here's what I use:Kikkers wrote:If anyone knows of a roundabout way to manipulate a constant combinator, please tell.cargoProxy is a constant combinator, cargoCount is a table indexed by item name. The combinator has item_slot_count set to 50 instead the default 15Code: Select all
local cargoProxy = self.waitingStation.cargoProxy local output = cargoProxy.get_circuit_condition(1) local cargoCount = self:cargoCount() for c=1,50 do output.parameters[c]={signal={type = "item", name = nil}, count = 1, index = c} end output.parameters[1]={signal={type = "virtual", name = "signal-train-at-station"}, count = 1, index = 1} output.parameters[2]={signal={type = "virtual", name = "signal-locomotives"}, count = #self.train.locomotives.front_movers+#self.train.locomotives.back_movers, index = 2} output.parameters[3]={signal={type = "virtual", name = "signal-cargowagons"}, count = #self.train.cargo_wagons, index = 3} local i=4 for name, count in pairs(cargoCount) do local type = "item" if fluids[name] then type = "fluid" count = math.floor(count) end output.parameters[i]={signal={type = type, name = name}, count=count, index = i} i=i+1 if i>50 then break end end for c=i,50 do output.parameters[i]={signal={type = "item", name = nil}, count = 1, index = c} end cargoProxy.set_circuit_condition(1,output)
Re: [MOD 0.12.x] Smarter Circuitry
Hello! Great mod!
But i got such error after 12.5 update:
"Error while loading entity prototype "directional-sensor" (decider-combinator): No such node (activity_led_light_offsets)
Modifications: sensor"
I copied activity_led_light_offsets = {...} from vanilla entity configs and game run (but don't know what happen in game)
But i got such error after 12.5 update:
"Error while loading entity prototype "directional-sensor" (decider-combinator): No such node (activity_led_light_offsets)
Modifications: sensor"
I copied activity_led_light_offsets = {...} from vanilla entity configs and game run (but don't know what happen in game)
Re: [MOD 0.12.x] Smarter Circuitry
Yes, that would work. I've already added that bit in the new version, but I'm still working on some other bits until I release it. Expect it in the next 24h. In the meantime, that fix would work just fine.Syriusz wrote:Hello! Great mod!
But i got such error after 12.5 update:
"Error while loading entity prototype "directional-sensor" (decider-combinator): No such node (activity_led_light_offsets)
Modifications: sensor"
I copied activity_led_light_offsets = {...} from vanilla entity configs and game run (but don't know what happen in game)