[Train] Better signals, need help

This is the place to request new mods or give ideas about what could be done.
Post Reply
Tami
Fast Inserter
Fast Inserter
Posts: 157
Joined: Tue Nov 19, 2013 11:29 am
Contact:

[Train] Better signals, need help

Post by Tami »

Hi, i want to program something new about signal behavior, but i cant find the normal current used signal system to learn something about, how it works. I have never used LUA so far, but if i can see the original source about signals, it might possible i can learn something about it and change something there.

My goals is to improve the range of a signal so it checks not only the next block after this signal, it also checks the next block after the next signal on the Path, the train goes, not on pathes the train dont go.

signal2.jpg
signal2.jpg (222.93 KiB) Viewed 2733 times
Block1 is red when Block2 is red. You can change the deepth of the sidnals. 1 is standard (Block after Signal). 2 is Block after the Signal after upcomming Block after the Signal and so on.

User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [Train] Better signals, need help

Post by FreeER »

the rail signals are in the data\base\prototypes\entity\entities.lua file with a type (and name) of "rail-signal", however you won't be able to do what you want with lua. The signal functionality is hard coded with C++...

Post Reply

Return to “Ideas and Requests For Mods”