[Mod] Digilines [digilines]

User avatar
Linuxdirk
Member
Posts: 3416
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Digilines [digilines]

by Linuxdirk » Post

I wonder if the mod is still in development.

Despite being basically undocumented, the last commit was July 2021.

User avatar
Miniontoby
Member
Posts: 621
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Digilines [digilines]

by Miniontoby » Post

Is it me or is the texture of the LCD backwards now which also makes the text not visible.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

How can I control the "Lane control lights" with the Lua controller and Digiline cable?
I like building and programming!

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

How can I control the "Lane control lights" with the Lua controller and Digiline cable?
I like building and programming!

User avatar
Blockhead
Moderator
Posts: 2991
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Digilines [digilines]

by Blockhead » Post

NicoKaiserHello wrote:
Sat Jul 06, 2024 17:59
How can I control the "Lane control lights" with the Lua controller and Digiline cable?
I'd like to help but I really don't know what mod the "Lane control lights" are from, as they're not in digilines or ltc4000e. Do you mean the "Lane Use Signal" from cheapie's roads/streets?
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

Yes
I like building and programming!

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

And I need the commands for the LUA controller, such as for the screens digiline_send("a","Hello")
I like building and programming!

User avatar
Blockhead
Moderator
Posts: 2991
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Digilines [digilines]

by Blockhead » Post

NicoKaiserHello wrote:
Mon Jul 29, 2024 12:56
And I need the commands for the LUA controller, such as for the screens digiline_send("a","Hello")
Alright, so as usual the "documentation" is in the source code (this is typical for far too many digilines devices!):

Code: Select all

        digiline = {
            receptor = {},
            effector = {
                action = function(pos, node, channel, msg)
                    local setchan = minetest.get_meta(pos):get_string("channel")
                    if setchan ~= channel or type(msg) ~= "string" then
                        return
                    end
                    msg = string.lower(msg)
                    if (msg=="off") then
                        node.name = "infrastructure:lane_control_lights_1"
                    elseif (msg=="green") then
                        node.name = "infrastructure:lane_control_lights_3"
                    elseif (msg=="red") then
                        node.name = "infrastructure:lane_control_lights_2"
                    elseif (msg=="yellowleft") then
                        node.name = "infrastructure:lane_control_lights_5"
                    elseif (msg=="yellowright") then
                        node.name = "infrastructure:lane_control_lights_4"
                    elseif (msg=="yellow") then
                        node.name = "infrastructure:lane_control_lights_6"
                    end
                    minetest.set_node(pos,node)
                    minetest.get_meta(pos):set_string("channel",setchan)
                end
            }
(from cheapie's roads mod, roads/infrastructure/advanced_lane_control_lights.lua)

The lane control light accepts 6 string states as input:
  • "off"
  • "red"
  • "green"
  • "yellowleft"
  • "yellowright"
  • "yellow"
The original mod did not have the left and right yellow modes.

For example to set the light on channel "lane" to the "red" state, the Luacontroller line of code would be:

Code: Select all

digiline_send("lane", "red")
The channel is set like most other digilines devices by right-clicking the node and using the formspec.

I hope that helps. For any other devices see the source code or ask if needed :)
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

Thanks
I like building and programming!

TigerMask
New member
Posts: 1
Joined: Sun Dec 29, 2024 09:16
GitHub: TigerMask1
IRC: TigerMask
In-game: TigerMask

Re: [Mod] Digilines [digilines]

by TigerMask » Post

where can i get some good build machines?? blueprint :)

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

I'm again. Where can i find the code for toutch screen? Because i want do a display to see which track is selected for the bus (line track) and i need lines to do that.
I like building and programming!

User avatar
Blockhead
Moderator
Posts: 2991
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Digilines [digilines]

by Blockhead » Post

NicoKaiserHello wrote:
Wed Feb 18, 2026 23:52
I'm again. Where can i find the code for toutch screen? Because i want do a display to see which track is selected for the bus (line track) and i need lines to do that.
That's part of digistuff, not the base digilines
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

Blockhead wrote:
Thu Feb 19, 2026 05:52
NicoKaiserHello wrote:
Wed Feb 18, 2026 23:52
I'm again. Where can i find the code for toutch screen? Because i want do a display to see which track is selected for the bus (line track) and i need lines to do that.
That's part of digistuff, not the base digilines
Ok thanks. I will beter and beter in lua... i already can javascript, html and python
I like building and programming!

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

Blockhead wrote:
Thu Feb 19, 2026 05:52
NicoKaiserHello wrote:
Wed Feb 18, 2026 23:52
I'm again. Where can i find the code for toutch screen? Because i want do a display to see which track is selected for the bus (line track) and i need lines to do that.
That's part of digistuff, not the base digilines
But do you know how to add a line? With command="addline" it didnt worked. Tipp: im using this time 5.9
I like building and programming!

User avatar
Blockhead
Moderator
Posts: 2991
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Digilines [digilines]

by Blockhead » Post

NicoKaiserHello wrote:
Thu Feb 19, 2026 12:30
Blockhead wrote:
Thu Feb 19, 2026 05:52
NicoKaiserHello wrote:
Wed Feb 18, 2026 23:52
I'm again. Where can i find the code for toutch screen? Because i want do a display to see which track is selected for the bus (line track) and i need lines to do that.
That's part of digistuff, not the base digilines
But do you know how to add a line? With command="addline" it didnt worked. Tipp: im using this time 5.9
Ah, setting or setting a line on a train, bus or ferry is doable with get_line() and set_line(line). This has to be done with LuaATC components specifically: The LuaATC tracks go under the trains, and then to send messages, you use digilines connected to a LuaATC Operation Panel. Those can be connected to touchscreens and Luacontrollers, but, try not to make something that needs human intervention or the chunks to be loaded. I recommend you read the wiki pages including the examples. If that doesn't make sense, I can give an example maybe, though I'm still not 100% sure what program you want.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
NicoKaiserHello
Member
Posts: 84
Joined: Sat Jul 06, 2024 17:34
GitHub: Nico K
In-game: NicoKaiser
Location: Germany/Bavaria
Contact:

Re: [Mod] Digilines [digilines]

by NicoKaiserHello » Post

Blockhead wrote:
Thu Feb 19, 2026 17:29
NicoKaiserHello wrote:
Thu Feb 19, 2026 12:30
Blockhead wrote:
Thu Feb 19, 2026 05:52


That's part of digistuff, not the base digilines
But do you know how to add a line? With command="addline" it didnt worked. Tipp: im using this time 5.9
Ah, setting or setting a line on a train, bus or ferry is doable with get_line() and set_line(line). This has to be done with LuaATC components specifically: The LuaATC tracks go under the trains, and then to send messages, you use digilines connected to a LuaATC Operation Panel. Those can be connected to touchscreens and Luacontrollers, but, try not to make something that needs human intervention or the chunks to be loaded. I recommend you read the wiki pages including the examples. If that doesn't make sense, I can give an example maybe, though I'm still not 100% sure what program you want.
No i mean add a line on toutchscreen from digistuff (for example button: command="addbutton")
I like building and programming!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest