Как поменять цвет фонаря в factorio

Обновлено: 04.07.2024

21 янв. 2018 в 16:49 Need help using ONE lamp to output multiple colors

I have a project in mind where lamps will light up in different colors based off of the distance of the train (project 1) or nearest train (project 2).

Edit: I just managed to learn how to use 3 combinators to change the lamp color of one lamp taking advantage of color priorities, but is there a simpler way of changing different colors based off of conditions?

Does anyone have some basic tips, reading, or a blueprint I can use to learn

22 янв. 2018 в 0:34

There are a few ways, but without understanding / seeing your project it is hard to recommend any specific setups.

Couple of different ideas / approaches:

send the trigger signals to the inputs of a pair of combis, with both outputs connected to a lamp. Have 1 combi set to "if A > B, output Red" & the other combi set to "if B >= A, output Green". Simple, but not very expandable.
As this only outputs 1 colour at a time, it avoids the colour priority entirely.

2> Use a "lookup table" in a constant combi wired into a decider combi. Have each colour preset in the table using a different signal value, & set the decider to "if Each = <control signal>, output Each"

so it will only pass-through colour signals that match the trigger signal value.
(This works best if you keep the colour priority in mind, & can then use ">=" or "=<" in the decider

to output multiple colours for later processing.)

3> Using colour signals as part of the circuitry, carrying the data values

set the combis up so only the correct (coloured) signal is output based on whichever input conditions / signals you require.
This approach can simplify some contraptions, if you are careful to avoid "signal bleed".

22 янв. 2018 в 9:28

First off thank you very much for the replies and I do apologize for not being more specific with my question. I'll do my best to explain the ideal goals of my project, though I do apologize for the giant wall of text in doing so!

There's basically two end goals for me with what I'm trying to accomplish. The first and easiest is to light up the nearby area as far ahead as possible in red by the rails when a train is nearby. Basically, it's a visual warning system. I think I already have a nice simple solution to this using rail/chain signals.

The second goal, which is the problematic one and the main reason for this post, is using a different (and very preferably multiple colors) that follow a train both for looks and as a final visual warning. The first problem with this setup as I see it I need a very responsive 'trigger' as you guys put it and the best idea I've come up with so far is using gates over the tracks as the trigger. I can see turns and train stations being problematic with this methodology, but I can't think of anything better at the moment.

23 янв. 2018 в 1:53

Ok, that gives a good idea of what you are after, thanks.
(I am assuming a spacing of roughly 1 wagon length between lamps along the track, for the rest of this post.)

Eg: signal at position 1 outputs "A" if a train is in its block, signal at 2 outputs "B", signal 3 ouputs "C", etc.
Lamp at position 5 activates if it sees an "A" signal, lamp at 6 lights up if it sees a "B", & so on.

This would allow a single wire connecting all of the signals and lamps to carry the data channels, & requires only a single constant combi if you want a non-white colour.

I can see one method that might work, involving a "step up" counter, to add +1 per detector passed by the train along that section of track.
Using a "bit shifting" combi setup would allow that count to trigger the correct lamps to match the train position, & it should be possible to encode the colour signal data alongside the trigger signal (so you won't need 1 colour picker combi setup, per lamp, just 1 per track section).

It's much like building a scrolling colour display, in how you would need to program the combis & lamps. But instead; using the train position to increment the lamp data, rather than via a clock signal as in most displays.


Can somebody explain me with pictures how to on and off lamp and change color??

New comments cannot be posted and votes cannot be cast


You need a lamp and a color signal. Setup as follows:

To connect a lamp to a circuit network, you will need to use a wire (green or red wire) to connect it to some sort of "controller". Then you set some condition on your lamp to make it decide if it should be on or off.

You might want to control the lamp with more advanced conditions. For example, say you have two chests; you want the lamp to be on whenever the top chest has more than 300 belts in it, and the bottom chest has no belts in it. In that case, we will need a bit of combinator help.

Here is such a setup. The top combinator outputs "1 Green" whenever the top chest has more than 300 belts in it. The bottom combinator outputs "1 Green" whenever the bottom chest has no belts in it. The lamp is connected to both combinators, and will only be on when it gets 2 or more green signals, i.e. only when both the top chest has > 300 belts and the bottom chest is empty.

If all you want is to have a lamp constantly emit a certain color (for aesthetic purposes), just connect a constant combinator emitting whichever color signal you want. For example, this setup gives constant red light. You will need to set some on/off condition on the lamp; the easiest is to just set "Anything > 0", which will make the lamp be on as long as it gets any (positive) signal - in this case, it is getting the red signal, so it is on and is red.

Hope this helps! Lamps are a neat and visually appealing way to both learn and practice the circuit network; have fun exploring!

Алексей Амелин

|Petro], так стоят часто и все равно поезда тормозят хотя другой поезд едет далеко

Тимур Ненашев

DELETED

Алексей, получается ваши поезда видят поезда , которые далеко, это возможно в двух случаях, либо между ними нет больше семафоров, либо стоят проходные , а нужны обычные

Дмитрий Вихорев

Алексей Амелин

Petro, вот у меня по всему пути стоят проходные. нужно на простые поменять везде? на развилках поставил на въезде проходной на выезде обычный светофор

Виктор Андреев

Алексей, проходной работает так: стоп если следующий за ним участок занят или следующий светофор показывает стоп.

DELETED

DELETED

Алексей, по всему пути заменить проходные на простые, на развилках ничего не менять.

Максим Мороз

Petro, именно так. если у тебя будет стоять подряд 5-10-900 проходных, и последний будет показывать СТОП, все что ДО него будут так же показывать СТОП. так что меняй их все на простые

Максим Мороз

DELETED

Максим,
товарищь , вы меня с кем-то спутали. я не нуждаюсь в обучении :)
Напишите это лучше Алексею Амелину.

Максим Мороз

Алексей Амелин

Максим, обучение проходил но там вроде не пишут какие светофоры на прямом длинном участке ставить

Алексей Амелин

всем спасибо за помощь поменял проходные на простые светофоры и поезда ездят друг за другом как надо

Сергей Герасименко

подскажите цистерну поезда можно нефтью наполнить(или другими жидкостями) и как,заранее спасибо

Евгений Тришин



Factorio

24 окт. 2020 в 9:51 перепробовал уже все, кидаю на броню 2 батареи и 3 солнечных панели. эффекта ноль.


24 окт. 2020 в 12:56 25 окт. 2020 в 0:43 25 окт. 2020 в 0:45 Если заряда нет, значит твои системы жрут больше, чем вырабатывается в портативной солнечной панели. Ставь еще больше панель. 25 окт. 2020 в 9:13 Если заряда нет, значит твои системы жрут больше, чем вырабатывается в портативной солнечной панели. Ставь еще больше панель.

Верно. Я так же не мог понять почему у меня личные дроны не строят ничерта.

Читайте также: