Page 1 of 1

Some new signals

Posted: Wed Jun 24, 2020 2:27 pm
by pletiplot
Hello,
There would be good to add some more signals to the logistic network:
Day/night:
I noticed that lamps switch on and off depending on day/night condition. But I would like to switch off other things by a day/night condition. Lets say I am in a later early game, I have solar panels but not accumulators yet. I want to decrease polution (to keep some peace with biters) so I would like to decrease electricity consumption in night since it is on steam engines. So I would like to switch off radars and some miners during night. Maybe there could be a possilbility to cast day/night status from every lamp since they obviously can read that condition from the world anyway.
Number of buildings:
I want to have 150 logistic and 150 construction drones for every port. How many roboports do I have? I could make a calculation and switch of the production on and off. This could be a bit tricky to implement however.

Re: Some new signals

Posted: Thu Jun 25, 2020 6:04 am
by PiggyWhiskey
You could have localised Solar power for mining sites/Radars.
Disconnect them from the primary network using Copper Cables and when the Solar runs out, you won't drain your Steam Power.

2x Mining Drill = 3x Solar Panels (180 kW) (Calculate out for how many Mining Drills are in your Ore Field)
1x Radar = 5x Solar (300 kW)

Re: Some new signals

Posted: Thu Jun 25, 2020 8:56 am
by pletiplot
I can actualy measure the current power of solar plant and then control the other devices, but I think that reading day/night status would be "cleaner". And making isolated electricity networks is annoying anyway.

Re: Some new signals

Posted: Thu Jun 25, 2020 10:22 am
by darkfrei
pletiplot wrote:
Thu Jun 25, 2020 8:56 am
I can actualy measure the current power of solar plant and then control the other devices, but I think that reading day/night status would be "cleaner". And making isolated electricity networks is annoying anyway.
Not day/night status, but insolation percentage value from 0 in the night up to 100 in the midday.

Re: Some new signals

Posted: Thu Jun 25, 2020 11:05 pm
by ssilk
Day/night-cycle does not correlate with amount of power usage. State of accumulator does.

Re: Some new signals

Posted: Fri Jun 26, 2020 2:13 pm
by pletiplot
ssilk wrote:
Thu Jun 25, 2020 11:05 pm
Day/night-cycle does not correlate with amount of power usage. State of accumulator does.
I see, but this would be usefull mostly in pre-acumulator game.

Re: Some new signals

Posted: Sat Jun 27, 2020 7:54 am
by ssilk
https://mods.factorio.com/mod/Circuit_P ... Combinator

Or you can try this:

A) make a circuit that counts the number of ticks for day and night. See wiki for exact numbers. But this is not reliable, when power goes down. So you need an extra power source for that in an own electric system, which has guaranteed always power, but doesn’t need much.

B) Make an own electric system with some solar panels as producer and a radar as consumer. Now you can play around with inserters, belts and chests to make some circulating item stream, that jams the belts, when the inserters gets too slow. Then you can take the count for number of items on belt/in chest as signal, that solar goes down. I’m sure there are some ideas around this in viewforum.php?f=208

There is really no need to have day-night cycle in game. Which is result of very old discussions long ago.

Re: Some new signals

Posted: Sat Jun 27, 2020 8:16 am
by Pi-C
ssilk wrote:
Sat Jun 27, 2020 7:54 am
A) make a circuit that counts the number of ticks for day and night. See wiki for exact numbers.
How would you prime that thing? Can you get the current game.tick somehow? Sure, you can make a clock (a counter resetting itself after x ticks), but what if you build it in the middle of the day? Most of the time, start of the counter won't be in sync with start of a Factorio day.

Re: Some new signals

Posted: Sat Jun 27, 2020 8:24 am
by darkfrei
Pi-C wrote:
Sat Jun 27, 2020 8:16 am
ssilk wrote:
Sat Jun 27, 2020 7:54 am
A) make a circuit that counts the number of ticks for day and night. See wiki for exact numbers.
How would you prime that thing? Can you get the current game.tick somehow? Sure, you can make a clock (a counter resetting itself after x ticks), but what if you build it in the middle of the day? Most of the time, start of the counter won't be in sync with start of a Factorio day.
The counter resetting on the time point by difference of this tick and last tick value. So, the difference value will be positive while dawn and negative while sunset.
You can get two last positions of it: last tick of dawn or last tick of sunset, the value will be changed from 1 to 0 or from -1 to 0.

Re: Some new signals

Posted: Sun Jun 28, 2020 4:41 am
by ssilk
Pi-C wrote:
Sat Jun 27, 2020 8:16 am
How would you prime that thing? Can you get the current game.tick somehow? Sure, you can make a clock (a counter resetting itself after x ticks), but what if you build it in the middle of the day? Most of the time, start of the counter won't be in sync with start of a Factorio day.
- you can add an offset to your counter, that corrects it, or you wait until the night begins and reset this by hand.

- you can make an auto-reset; you need a timer a solar panel and a pulsator. The pulsator is connected to the timer and resets it every nth tick. The power for the pulsator comes from the solar panel, so when night falls the pulsator goes slower and slower, until the timer has the chance to run out, which resets your day/night timer (to offset). Ah, I forget you need a rs-latch. Hm. Complicated.

- when I thought of that there comes a much simpler method into my mind: you just need to know if you have full solar power or lower. So take some solar panel, some lamps and a fast (!) inserter in one electric circuit. That inserter puts some item into a chest (you need not more than 10 items in that chest). The items comes from a belt which the other side of the chest and are outputted from that chest by a basic (!) inserter connected to a reliable electric network. When night falls lights turn on. Fast Inserter goes slower and is not longer able to input the items into the chest. Items in chest goes down below 2, which is the signal, that is now “night”.

Re: Some new signals

Posted: Mon Jun 29, 2020 10:53 am
by pletiplot
Guys, thanks for nice discussion.
I have seen some videos, how to make tickers, NAND and SR circuits with logic circuits in Factorio. I dont know much about it, actualy I know we learned at school about it and these are logic base for every electronic digital computer (non-quantum).
I could count ticks infinitely and compute modulo some value which represents the length of day. But it is like building a subfactory for measuring day/night.
The good idea is to have a separate solar panel - radar pair and measure the power produced, and use this value for the whole network.
But there is very simple solution which I like - make lamp able to report its state on the channel of the respective color. An uncontroled lamp should report 1 on white channel every night.

Re: Some new signals

Posted: Wed Jul 15, 2020 3:53 am
by Ajedi32
IMO more signals is a good idea in general. Ideally you should be able to connect pretty much anything to the circuit network to perform some useful function. More ideas:
  • Read power output of power-producing structures (doing this with a solar panel would let you easily sense daytime)
  • Read status of machines (running, input bottlenecked, output bottlenecked, etc)
  • Toggle beacons on/off
  • Read expected yield of mining drills
  • Sense temperatures of heat exchangers and reactors
  • Read types of science packs required for current research from Labs