[Mod] Advanced Trains [advtrains] [2.4.3]
-
- Member
- Posts: 11
- Joined: Sat Oct 31, 2015 10:02
- GitHub: nitro2010
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Hello everyone,
I have question: How send the data from ATC Controller to digiline LCD?
I wrote e.g.:
digiline_send("0", string.format("SPEED: %s", atc_speed))
and I don't see any the data on LCD screen (channel: 0).
Thanks for help.
I have question: How send the data from ATC Controller to digiline LCD?
I wrote e.g.:
digiline_send("0", string.format("SPEED: %s", atc_speed))
and I don't see any the data on LCD screen (channel: 0).
Thanks for help.
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
1: check the connection between the lcd and the atm controller (I think you need Lua controller but ok)nitro2012pl wrote: ↑Mon Sep 14, 2020 14:13Hello everyone,
I have question: How send the data from ATC Controller to digiline LCD?
I wrote e.g.:
digiline_send("0", string.format("SPEED: %s", atc_speed))
and I don't see any the data on LCD screen (channel: 0).
Thanks for help.
2: try: digiline_send("0", "SPEED: 123")
3: if that shows SPEED: 123 then you got the lcd linked.
4: digiline_send("0", string.format("SPEED: %s", atc_speed)) -> atc_speed, is that set??
5: Maybe I can join the server (if it is an server, else please send the world download as zip) and help
-
- Member
- Posts: 128
- Joined: Sun Aug 05, 2018 12:37
- In-game: Maverick2797
- Location: Poking about here and there...
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
You need to use the Lua ATC track, the basic ATC track has no external IO (mesecon or digiline) aside from the rightclick formspec.
To use luaautomation components you need to first create an environment. See the readme.txt in the advtrains_luaautomation for more info. To do anything with LuaATC you need the "atlac" privilege, which is generally reserved for moderators and administrators on most public servers.
Assuming lcd channel = "0":
To use luaautomation components you need to first create an environment. See the readme.txt in the advtrains_luaautomation for more info. To do anything with LuaATC you need the "atlac" privilege, which is generally reserved for moderators and administrators on most public servers.
Assuming lcd channel = "0":
Code: Select all
if event.train then
digiline_send("0","Speed: "..atc_apeed)
end
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]
-
- Member
- Posts: 11
- Joined: Sat Oct 31, 2015 10:02
- GitHub: nitro2010
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Yes, it is working
Thank you very much ;)
I also I tried with wireless mesecons and it is working
I only copy & paste screenshot with connections.
;)
Thank you very much ;)
I also I tried with wireless mesecons and it is working
I only copy & paste screenshot with connections.
;)
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Working on a setup for a terminal station an idea come to my mind: would it be possible to have an ATC (or LUA) command to force players off a train?
The use case would be: a train arrives at a terminal station, enters an arrivals platform and stops at the station track to let passengers off. It then departs for a waiting/parking area where it'll wait for the next slot, before entering the departures platform.
I had situations in which players didn't get off the train and kept waiting while there was another one ahead of it departing, or other players who boarded the train at the arrival platform instead... Hence would be nice to have a way to force them off (could also be added as a checkbox to the station track I think).
What do you think of this?
The use case would be: a train arrives at a terminal station, enters an arrivals platform and stops at the station track to let passengers off. It then departs for a waiting/parking area where it'll wait for the next slot, before entering the departures platform.
I had situations in which players didn't get off the train and kept waiting while there was another one ahead of it departing, or other players who boarded the train at the arrival platform instead... Hence would be nice to have a way to force them off (could also be added as a checkbox to the station track I think).
What do you think of this?
Quando omni flunkus, moritati.
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Hi,
I got an issue, I downloaded the last version of advtrains, I'm under thelmast version of minetest for my server but I don't see TCB in my inventory, I don't understand :(
Thanks !
Edit : forgot to enable the feature, sorry :) problem resolved !
I got an issue, I downloaded the last version of advtrains, I'm under thelmast version of minetest for my server but I don't see TCB in my inventory, I don't understand :(
Thanks !
Edit : forgot to enable the feature, sorry :) problem resolved !
My server : 188.165.239.63:30000 - My website : http://minetest.amelieonline.net
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Sounds like a good idea. I'll keep this on my list.hlqkj wrote: ↑Fri Sep 25, 2020 17:59Working on a setup for a terminal station an idea come to my mind: would it be possible to have an ATC (or LUA) command to force players off a train?
The use case would be: a train arrives at a terminal station, enters an arrivals platform and stops at the station track to let passengers off. It then departs for a waiting/parking area where it'll wait for the next slot, before entering the departures platform.
I had situations in which players didn't get off the train and kept waiting while there was another one ahead of it departing, or other players who boarded the train at the arrival platform instead... Hence would be nice to have a way to force them off (could also be added as a checkbox to the station track I think).
What do you think of this?
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Thanks for your feedback, I'm glad you liked it! :)
Quando omni flunkus, moritati.
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I've watched a few YouTube videos and read through the atc_command.txt file, but I can't figure this out. I want to automate a train line to be like this example...
I tried using the point speed restriction track to slow the train down for a certain segment of track, but it slows it down only for that point. The train immediately speeds up again.
Finally, I can't figure out the Lua automation track at all. I tried putting in something like "B3" to tell the train to brake to speed 3, but I just got the error "Not an existing environment" when the train went over it.
Any help on how to set up some simple automation would be appreciated. I'm not looking for anything fancy like setting routes or switches. I'm just trying to get two trains to run along the tracks (it's a dual-track system the whole way) in opposite directions between the termini. The idea is that the trains will reach and depart opposite termini at the same time. The track itself is about 2000 blocks long, with turns and elevation changes to fit the terrain.
- Start from station A at full speed.
- Slow down to half-speed along a certain segment of track.
- Speed up to full speed again after slow segment.
- Stop at station B for 30 seconds, then start again at half-speed.
- Stop at station C for 30 seconds, then go slowly through a turnaround to go back.
I tried using the point speed restriction track to slow the train down for a certain segment of track, but it slows it down only for that point. The train immediately speeds up again.
Finally, I can't figure out the Lua automation track at all. I tried putting in something like "B3" to tell the train to brake to speed 3, but I just got the error "Not an existing environment" when the train went over it.
Any help on how to set up some simple automation would be appreciated. I'm not looking for anything fancy like setting routes or switches. I'm just trying to get two trains to run along the tracks (it's a dual-track system the whole way) in opposite directions between the termini. The idea is that the trains will reach and depart opposite termini at the same time. The track itself is about 2000 blocks long, with turns and elevation changes to fit the terrain.
- Blockhead
- Member
- Posts: 1688
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Hi, let's break a few concepts down. First is the units of speed: although your driver's cab shows km/h, the internal units are m/s. The subway wagon has a max speed of 56 km/h which is actually 16 m/s (to convert, divide by 3.6). Whenever you set speed, like on a station/stop rail, point speed restriction rail or in ATC commands, it's in m/s.T6C wrote: ↑Sun Oct 11, 2020 19:36I've watched a few YouTube videos and read through the atc_command.txt file, but I can't figure this out. I want to automate a train line to be like this example...I see three types of special track: the station stop track, the Lua automation track, and the point speed restriction track. I've figured out how to make a train stop at a station, name the station, and tell it how long to stay stopped. But, I can't figure out how to tell it what speed to start again after the departure time. It always leaves the station at full speed.
- Start from station A at full speed.
- Slow down to half-speed along a certain segment of track.
- Speed up to full speed again after slow segment.
- Stop at station B for 30 seconds, then start again at half-speed.
- Stop at station C for 30 seconds, then go slowly through a turnaround to go back.
I tried using the point speed restriction track to slow the train down for a certain segment of track, but it slows it down only for that point. The train immediately speeds up again.
Finally, I can't figure out the Lua automation track at all. I tried putting in something like "B3" to tell the train to brake to speed 3, but I just got the error "Not an existing environment" when the train went over it.
Any help on how to set up some simple automation would be appreciated. I'm not looking for anything fancy like setting routes or switches. I'm just trying to get two trains to run along the tracks (it's a dual-track system the whole way) in opposite directions between the termini. The idea is that the trains will reach and depart opposite termini at the same time. The track itself is about 2000 blocks long, with turns and elevation changes to fit the terrain.
The first thing you need is departure speed. In the Station/Stop rail, there is a field for departure speed. This is equivalent to the ATC command "S<x>" where x is the speed in that box; and of course it is in m/s. To start a train at half of it's top speed, take the top speed in m/s and divide it by two. For the subway wagon, 56 km/h = 16 m/s. 16 m/s / 2 = 8 m/s. So put 8 in the departure speed field.
The second thing you need can be phrased or implemented two ways: you want to train to accelerate to full service speed, or you want the train speed limit to become higher. The simplest way to achieve this is to use an ATC rail with an S command. Say our train is at a speed of 8 already and we want to go up to 16, then we give it the command "S16". What if we want the train to go all the way to its full speed, no matter what specific speed the train has? The special value "M" helps us there. "SM" will set the target speed to maximum. This is how we manage speed in terms of "set speed to this at this point" - by putting ATC rails down in the train's path.
So what about speed limits? Well, for this we have two types: The Point Speed Restriction rail, which you already familiar with. The train will pass through that rail at a maximum speed according to the restriction. The second way to manage this is the signs included with advtrains in the module advtrains_signals_ks. In your inventory they will be called the "Signal Sign". These signs can be placed and then assigned an influence point like many other components that are part of the interlocking system. Place the sign next to the track, then while holding the special key from minetest (default: E, my binding: F) right-click on the sign. This will open the formspec to assign an influence point (tip: this also works for all signals: red signals will stop a train, green will let it continue; but I digress, this is about speed right now). As per the in-game instructions, put the influence point facing the way the train will approach the sign. Now when the train hits that point, it will obey the speed in m/s posted on the sign. You can left-click with the trackworker on the speed sign to change the speed limit (there is also the special red S "stop for shunt" sign, you can ignore it, it has a special purpose), and right-click to rotate it in the same increments as the track - so if you have diagonal tracks, you can line it up nicely. The speed limit "E" means "end of speed limit".
So: put a speed limit of 8 sign where you want your subway wagons to go half speed, and put a speed limit "E" where the speed limit ends. If you have trains that go 72 km/h (=20 m/s), sadly we have the limitation that the speed limit signs only come in 8, 12, 16 and E varieties at the moment; yes I know, I would love to be able to enter any speed limit on them too.. request for improvement. Now at this point it's important to note if you have a signalling system: passing any green signal will remove any speed restriction! The Ks signals can show a yellow and impose a speed limit of 6 m/s (sorry this is a bit hard to describe, and anyway this is already a wall of text...)
You might ask what advantages having the speed limit would have over ATC commands. Well, trains physically cannot be made to disobey a speed limit that has been imposed, even when driven manually. You can only remove the speed restriction with a green signal or end speed restriction sign. This is good to enforce speed limits in areas where trains might hit people, because it forces train drivers to slow down.
I hope that addresses everything to do with speed. Now as for the turnaround: You have two options, a balloon loop or a single track terminus that the train enters and comes back out of. To make the single track terminus work, you will need to control the turnouts properly, or have them set up properly so that the train enters with the turnout set the wrong way and exits the other way after it reverses. I'm guessing you want to put your platform next to this terminus track. The station/stop rail can be used to make the train reverse after stopping. Below the departure speed field is a dropdown with options --- and Reverse. Choose the reverse option and the train will reverse when it leaves the station.
As for turnout control: you either manage it with interlocking or with LuaATC. For the interlocking approach, I recommend my video. For the LuaATC approach, I recommend you read the manual in advtrains/advtrains_luaautomation/README.txt. This post is already too long to cover basic LuaATC as well. I think I'm gonna go put some of this on the advtrains wiki now.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Blockhead
- Member
- Posts: 1688
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Train catalogue
Greetings all advtrains users! Today I started the train catalogue on the advtrains wiki. The aim is to document all available trains for advtrains, including screenshots and statistics on speed as well as features like sound. You are welcome to contribute. I will be adding those trains I know about over time, especially any posted in this thread. Help doing this would be appreciated, but also if you know of any other trains available, you can help out by adding those to the catalogue too.*
I'm also interested in adding other addons like signal sets. Let's help spread some knowledge about what great stuff is available for this mod!
*One caveat is wiki signup is currently disabled to prevent spam, ask orwell for a wiki account.
Contributors please note: To make images with transparent backgrounds I'm using the greenscreen mod with anti-aliasing disabled and keying out the green with the select by colour tool in GIMP. Please take screenshots of the front of each wagon. and please! use a 5.2.0 client or newer and enable shaders so we get the nice smooth shading! No flat entities pretty please, or I'm just going to have to redo the screenshot myself.
I'm also interested in adding other addons like signal sets. Let's help spread some knowledge about what great stuff is available for this mod!
*One caveat is wiki signup is currently disabled to prevent spam, ask orwell for a wiki account.
Contributors please note: To make images with transparent backgrounds I'm using the greenscreen mod with anti-aliasing disabled and keying out the green with the select by colour tool in GIMP. Please take screenshots of the front of each wagon. and please! use a 5.2.0 client or newer and enable shaders so we get the nice smooth shading! No flat entities pretty please, or I'm just going to have to redo the screenshot myself.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
-
- Member
- Posts: 11
- Joined: Sat Oct 31, 2015 10:02
- GitHub: nitro2010
- takao-san
- New member
- Posts: 1
- Joined: Sun Oct 18, 2020 06:17
- GitHub: takao-soramu
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
hello advtrains !
I created a japan Tram.
(NO Animation. Yes Sound. Yes Lights)
https://github.com/takao-soramu/advtrai ... _jpntlr600
I have uploaded texture sample and PSD file, you can create original textures !
I created a japan Tram.
(NO Animation. Yes Sound. Yes Lights)
https://github.com/takao-soramu/advtrai ... _jpntlr600
I have uploaded texture sample and PSD file, you can create original textures !
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I was just schooled by a blockhead. ;)
Apologies for the delay. My work schedule allows me Minetest time only a few hours each week (that was today).
Your explanation is exceptionally helpful! Of all the YouTube videos and various threads I've read about this mod, your post above was by far the most informative. Thank you! :) I now know how to use the speed signs, ATC controller (I'd been trying to use the LuaATC Rail by mistake), and station stops to add some realism to my train line.
Here's a new one I haven't seen before. I built a new bridge this afternoon, and it required me to modify the track placement slightly. No biggie; I've done it before. However, this time, the trains don't seem to notice that the track has moved, so I get situations like this (screenshot). Have you seen this before? If so, know of any way to fix this? Once it leaves the track like this, it stops (ATC tells it to, somehow), and it will never move again, so I have to destroy and re-place it. Every train tries to use the old track that isn't there anymore.
- Attachments
-
- FlyingTrain.png (209.83 KiB) Viewed 1695 times
- Blockhead
- Member
- Posts: 1688
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Yep this has happened on the odd occasion. Once in multiplayer I had a floating train after the advtrains files were rolled back while the world was left forward. What happens in these events is the state of advtrains is out of sync with the state of the world. Advtrains has a file called the node database that keeps track of where all the tracks are; this is how trains are able to travel in unloaded areas. Unfortunately it's completely separate from the ordinary world data in your map file (e.g. map.sqlite).
Any train that is off-track will be stopped, I think. It's related to the feature '-!- Safety override' that you see as you approach the end of the rails to stop the train derailing. I'm guessing advtrains knows the train isn't on tracks because that area is loaded, and was probably loaded when you made the modifications.
Trains are trying to use the old track because your advtrains node database is out of sync with the world. Apart from the floating train, the other main clue to this is that trains are following the old alignment. I can only think of one logical explanation at the moment - did you use worldedit to move the bridge? Typically there's no way to remove the tracks out from under a train without moving the train. If you did use worldedit, the node database won't have been updated. There is a command for sticky situations like this: /at_sync_ndb. In English that's "advtrains, please synchronise the node database". It will go through everything in the nodedb and if that area is loaded it's going to find where rails used to be and aren't - 'ghosts' - and delete them; and it's also going to find where rails are and add those spots to the node database.
So how do you make advtrains stuff without worldedit? My personal two mod recommendations for this are digtron and tunnelmaker.
Also: Looking at your bridge it looks like it makes a sharp 90 degree turn after going down. Are you aware there are diagonal slope blocks? You can use the slope placer for 45 degree slopes, just place on the 2nd diagonal block away like so:
Code: Select all
XXXX
X\
X o <- here
X
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Re: Advanced Trains, Digtron
Digtron is buggy. Work began on Digtron 2, but it was never released. A pity because Digtron was a fun idea.
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
No, I place and remove all blocks and items in the game manually (I'm a glutton for punishment, LOL).
That's what I do. Or I just make sure the train isn't on that section of track to begin with. ;)
I'll give that a shot the next time I get a chance to play.
I place everything manually, one node/item at-a-time.
I didn't know that. I tried a few times earlier, but couldn't get it to work right, so all my slopes are on 90° angles. You're right that I would have preferred to make the turn more gradual on the bridge approach ramp.
If anyone's curious, here's the new bridge.
Spoiler
- Attachments
-
- 14 - Bridge Desk Complete.png (254.7 KiB) Viewed 1695 times
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Blockhead's explanation is pretty complete. If you remove tracks using worldedit or dig the node under the rail, the node database still thinks that the rails are there. In most situations, this is not a problem, but in some special cases advtrains will find the old alignment. A common pitfall is when the track was initially straight and then you add a slope down.T6C wrote: ↑Mon Oct 19, 2020 16:55No, I place and remove all blocks and items in the game manually (I'm a glutton for punishment, LOL).That's what I do. Or I just make sure the train isn't on that section of track to begin with. ;)I'll give that a shot the next time I get a chance to play.I place everything manually, one node/item at-a-time.I didn't know that. I tried a few times earlier, but couldn't get it to work right, so all my slopes are on 90° angles. You're right that I would have preferred to make the turn more gradual on the bridge approach ramp.
If anyone's curious, here's the new bridge.Spoiler
The solution is to drive the train off the "ghost tracks" and execute the /at_sync_ndb command.
The opposite case, placing tracks with worldedit, should work, as advtrains falls back to checking the nodes in the world if the node database has no entry and then adds the track to the node database as soon as a train drives over the new tracks.
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
That must have been it. If I don't remove a segment of track before I remove the block underneath it, the database won't update. Like I said in my previous post, I'll give Blockhead's command a try the next time I play, and I'll be careful to remove tracks before removing the supporting dirt going forward.
- orwell
- Member
- Posts: 958
- Joined: Wed Jun 24, 2015 18:45
- GitHub: orwell96
- IRC: orwell96_mt
- In-game: orwell
- Location: Raxacoricofallapatorius
Re: [Mod] Advanced Trains [advtrains] [2.1.4]
Release 2.1.4
Advtrains 2.1.4 has been released. Important changes include:
Advtrains 2.1.4 has been released. Important changes include:
- LuaATC interface to split and join trains based on "freight codes" that can be set per wagon
- Added diamond crossings, wyes and 3-way turnouts (Blockhead)
- Fix node database saving on windows
-
- Member
- Posts: 20
- Joined: Tue Jun 27, 2017 04:15
- In-game: Parnikkapore
Re: [Mod] Advanced Trains [advtrains] [2.1.4]
Can you give me an example of how freight codes can be used?
-
- Member
- Posts: 128
- Joined: Sun Aug 05, 2018 12:37
- In-game: Maverick2797
- Location: Poking about here and there...
Re: [Mod] Advanced Trains [advtrains] [2.1.4]
https://github.com/Maverick2797/Advtrai ... nting_YardParnikkapore wrote: ↑Sat Nov 14, 2020 00:34Can you give me an example of how freight codes can be used?
Here's a small repo with some of the code used on the LinuxForks server for automatic shunting. Please note that I was in the process of converting as much as I could to environment functions rather than individual trackside programs when I semi-abandoned it. Best stop by LinuxForks for a demonstration if needed.
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]
Re: [Mod] Advanced Trains [advtrains] [2.1.4]
I removed a turnaround, and added some new track to my current line. The trains are following the track just fine, but they're completely ignoring the speed limit signs on the new section of track. It's been a few weeks since I worked with track, so I'm sure I'm just forgetting something. I put the speed limit signs just to the right of the track. There aren't any nodes between the track and the sign. I ran the /at_sync_ndb command, but it said it didn't correct anything, and I was careful to remove tracks before the underlying nodes where necessary. The speed limit signs are facing the right way, and have the speed I want on them. What am I forgetting?
-
- Member
- Posts: 128
- Joined: Sun Aug 05, 2018 12:37
- In-game: Maverick2797
- Location: Poking about here and there...
Re: [Mod] Advanced Trains [advtrains] [2.1.4]
Have you added the influence point like you do for the signals? Advtrains doesn't care about the position relative to the track, only the IP. You could have a room somewhere with all the signals completely separate from the track and it would still work so long as the IP is set for each signal. (would make troubleshooting a PITA though)
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]
Re: [Mod] Advanced Trains [advtrains] [2.1.4]
Ah, thank you. LOL I completely forgot to set the influence points! I knew I had forgotten something simple.Maverick2797 wrote: ↑Sun Nov 22, 2020 03:48Have you added the influence point like you do for the signals?
Who is online
Users browsing this forum: No registered users and 69 guests