[Mod] Advanced Trains [advtrains] [2.4.3]

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Fri Feb 04, 2022 20:57
So say the routing code to go to Bangor was "LJW BGRT" (BGRT meaning taking a hypothetical ballon track at Bangor). If i set the route at Llandudno which went west to "RC LJW" and the one that went south at Llandudno was "RC LJE", would the train be directed to the correct track? If not, could you provide the correct configuration?
Then the route with the ARS rule "RC LJW" would be set because the "LJE" routing code is not present in the train. The "correctness" of your setup depends on what you want to achieve with this.

It should also be pointed out that you can try out ARS rule matching in singleplayer.
Can Luacontrollers parse Freight codes and split the train at the correct posistion, so i can send different parts of the train to different parts of the world, so one player gets their bannas and the other their diamonds?
RTFM. As of commit ef8391a60d8221f883d54c68373607d7bb3cf4c7 there is the split_at_fc function that does what I suppose you want to do.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

yw05 wrote:
Fri Feb 04, 2022 21:11
Then the route with the ARS rule "RC LJW" would be set because the "LJE" routing code is not present in the train. The "correctness" of your setup depends on what you want to achieve with this.

It should also be pointed out that you can try out ARS rule matching in singleplayer.
Makes sense. Would "LJE" then be removed from the train?
RTFM. As of commit ef8391a60d8221f883d54c68373607d7bb3cf4c7 there is the split_at_fc function that does what I suppose you want to do.
Thank you!
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Fri Feb 04, 2022 21:17
yw05 wrote:
Fri Feb 04, 2022 21:11
Then the route with the ARS rule "RC LJW" would be set because the "LJE" routing code is not present in the train. The "correctness" of your setup depends on what you want to achieve with this.

It should also be pointed out that you can try out ARS rule matching in singleplayer.
Makes sense. Would "LJE" then be removed from the train?
Routing codes do not get removed by ARS. Also it is obviously not possible to remove a routing code from a train when that particular code is not present in the first place.

Maverick2797
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.4.1]

by Maverick2797 » Post

FYI there's also the advtrains-discuss mailing list that doesn't seem to have been used yet.
Mailing list for end-user discussion and questions related to the advtrains project.
Possibly a better place for FAQ and future reference than searching through past forum posts.
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
Blockhead
Member
Posts: 1622
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.4.1]

by Blockhead » Post

56independent_actual wrote:
Fri Feb 04, 2022 20:18
Can i have a quick guide on how to use:
  • Wagon road numbers
  • Freight codes
  • Routing codes and how to format them
Just to comment a little further:

Wagon road numbers are just for players to identify a particular wagon with something more logical than the random 6-digit wagon number, which also isn't visible by default anywhere. Also, they aren't required to be globally unique and I don't think they have any functionality like LuaATC, ARS etc. outside of the onboard computer (which shows the wagon number above each wagon) & wagon properties. I added them at the same time as some other related change to the wagon properties formspec. Think of them as like identifiers you would paint on the side of a wagon in real life, for example you might number your wood wagons WW-xxx (three digit number starting at 001) sequentially as you acquire them.

Apart from what others have said, freight codes, which span a single wagon, are also integrated with loading/unload tracks in the latest versions, meaning you can set a loading/unloading track to only act on wagons that have that freight code set.

My recommended practice: Use line numbers as a globally unique identifier to send trains that travel a certain well-established route from one point to another. On all signals those trains might encounter, use the appropriate LN in an ARS rule (also on all station/stop tracks that line is meant to stop at, which might be not every station for express trains). For route deviations on a specific line, for example different versions of the tube's 'northern line' which is actually a bunch of different termini, work with LN on the trunk and RC for the junctions where different routes split. For special running like freight trains that are not regularly scheduled or a 'rail taxi', have some plans of the entire railway you plan to travel on hand (I draw them in GIMP), and string together all the routing codes you will need at each signal.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Blockhead wrote:
Sat Feb 05, 2022 01:28
Wagon road numbers are just for players to identify a particular wagon with something more logical than the random 6-digit wagon number, which also isn't visible by default anywhere. Also, they aren't required to be globally unique and I don't think they have any functionality like LuaATC, ARS etc. outside of the onboard computer (which shows the wagon number above each wagon) & wagon properties. I added them at the same time as some other related change to the wagon properties formspec. Think of them as like identifiers you would paint on the side of a wagon in real life, for example you might number your wood wagons WW-xxx (three digit number starting at 001) sequentially as you acquire them.
Ahh, thanks.
Apart from what others have said, freight codes, which span a single wagon, are also integrated with loading/unload tracks in the latest versions, meaning you can set a loading/unloading track to only act on wagons that have that freight code set.
Thats cool. Maybe wood gets sent to a factory in one place, and sticks to another, with no need for sorting tubes. I love this idea.
My recommended practice: Use line numbers as a globally unique identifier to send trains that travel a certain well-established route from one point to another. On all signals those trains might encounter, use the appropriate LN in an ARS rule (also on all station/stop tracks that line is meant to stop at, which might be not every station for express trains). For route deviations on a specific line, for example different versions of the tube's 'northern line' which is actually a bunch of different termini, work with LN on the trunk and RC for the junctions where different routes split. For special running like freight trains that are not regularly scheduled or a 'rail taxi', have some plans of the entire railway you plan to travel on hand (I draw them in GIMP), and string together all the routing codes you will need at each signal.
I'll take notes. I've been thinking of adding a summarised version of this text to the wiki of my server. Am i allowed?
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

Blockhead wrote:
Sat Feb 05, 2022 01:28
Wagon road numbers are just for players to identify a particular wagon with something more logical than the random 6-digit wagon number, which also isn't visible by default anywhere. Also, they aren't required to be globally unique and I don't think they have any functionality like LuaATC, ARS etc. outside of the onboard computer (which shows the wagon number above each wagon) & wagon properties. [...]

Apart from what others have said, freight codes, which span a single wagon, are also integrated with loading/unload tracks in the latest versions, meaning you can set a loading/unloading track to only act on wagons that have that freight code set.
I should add this to the manual.

User avatar
Blockhead
Member
Posts: 1622
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.4.1]

by Blockhead » Post

Consider my comments in my last post as free to use, I don't care about copyright on them at all: paraphrase them, summarise them or even copy them verbatim. Attribute them to yourself if you do this though.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Blockhead wrote:
Sun Feb 06, 2022 01:07
Consider my comments in my last post as free to use, I don't care about copyright on them at all: paraphrase them, summarise them or even copy them verbatim. Attribute them to yourself if you do this though.
I have done the summary on my wiki.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Deleted due to Repepepepetition
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

I have written a short tutorial on interlocking in my wiki. This is the first interlocking tutorial started this year.

I would accept constructive criticism of what i already wrote, to make it less ambiguous and more helpful to new users.

I will add more later, but for now, i feel this is good enough.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Sun Feb 06, 2022 11:26
I have written a short tutorial on interlocking in my wiki. This is the first interlocking tutorial started this year.

I would accept constructive criticism of what i already wrote, to make it less ambiguous and more helpful to new users.

I will add more later, but for now, i feel this is good enough.
There are some minor things that I would like to point out (without (yet) actually following the instructions):
Sections are partitions of tracks defined by two Track Circuit Breaks at either end.
The boundary of a track section does not need to be defined by exactly two TCBs. It can be defined by a single TCB (if the section leads to a dead end) or by more than two TCBs (at junctions). What I think you mean by "1 in, 1 out" tracks do involve only sections limited by two TCBs, though.
Routes are ways of traversing a section.
... or multiple sections, and these set up passive components to the appropriate state. This is less relevant for the particular setup you are documenting, though, but the definition itself needs to be generalized (like the one above).
ARS rules dictate what trains do.
This is incorrect. ARS rules do not have any control over the train itself. ARS rules are a set of "filters" that can be used to match a train.

It should also be pointed out that ARS rules short-circuit, i.e. the train matches if any of the rules is satisfied.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

yw05 wrote:
Sun Feb 06, 2022 12:06
There are some minor things that I would like to point out (without (yet) actually following the instructions):
I have since fixed the issues you have brought up.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

@56independent_actual: I tried to reproduce the "2in1out" setup you described and it did not work.
You need three TCBs, each for the arm of the section. The steps are the same as above.
Ensure you build one tailing segment which is 1in1out.
Do not build a signal on the TCB directly after the point. This will either be redundant or will stop traffic
So I created the following setup:

Code: Select all

^
|
+--- P2
|
+--- P1
|
|\
| \
| |
| +- Q1
| |
| +- Q2
| |
| ^
|
+--- R1
|
+--- R2
|
^
(The ^ indicates the driving direction)

And then I followed the instructions for the "1in1out" setup you described earlier in the page, starting from Q1:
Find the arrow pointing to the other TCB
There are two other TCBs at the junction (R1 and P1).
Press “Finish route at end of NEXT section”.
This button does not appear at Q1.
Press “Enable Automatic Working”.
Ok. I set up the Q1-P1-P2 and R1-P1-P2 routes (in that order) and placed a train before R1. The train can't pass because the signal is red.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

yw05 wrote:
Sun Feb 06, 2022 12:49
@56independent_actual: I tried to reproduce the "2in1out" setup you described and it did not work.
It should work now i have made maps. Sorry for the slow response, but that final map took so long to take.

http://56i.duckdns.org/dokuwiki/doku.ph ... sidebyside
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

doxygen_spammer
Member
Posts: 70
Joined: Wed Dec 16, 2020 16:52
GitHub: doxygen-spammer

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by doxygen_spammer » Post

doxygen_spammer wrote:
Thu Jan 27, 2022 10:29
What is the current state with the eye_offset bug workaround? I see you opened https://github.com/minetest/minetest/issues/5013 and mentioned the dummy_entities branch, but at that time you wrote that it doesn’t work well. Have you checked it again?
Small update: I have commented directly on that issue with my observations using my own implementation of the workaround.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

I seriously don't understand loading and unloading tracks. I built a loading track with FC "SB" and put a gold chest underneath it. Then i ran a wagon of FC "SB" over it, and nothing came into it from the chest.

I had PSRs at 1 m/s both after and before the loading tracks.

Is there a quick fix i'm missing?
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Maverick2797
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.4.1]

by Maverick2797 » Post

Did you have the "" in either of the FC fields? That would then match to "SB" instead of SB. And try an ATC track that enforces S1 after the TSR, as the train will want to accelerate to its normal speed between the TSR's
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

Maverick2797
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.4.1]

by Maverick2797 » Post

Also FC's aren't like ARS, which match to any word in the string. FC's only match against the currently active FC (viewable in the Wagon Properties form below the FC field)
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Maverick2797 wrote:
Tue Feb 08, 2022 22:59
Did you have the "" in either of the FC fields? That would then match to "SB" instead of SB. And try an ATC track that enforces S1 after the TSR, as the train will want to accelerate to its normal speed between the TSR's

Also FC's aren't like ARS, which match to any word in the string. FC's only match against the currently active FC (viewable in the Wagon Properties form below the FC field)
I did not use quote marks in any of the fields. I also kept the train manually at 1 m/s as it was crossing the tracks after an unsuccessful first try. Manual control also didn't work.

And both the track and cab had an FC of exactly SB. Is it the chest? I'm not sure if it was locked or not.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Maverick2797
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.4.1]

by Maverick2797 » Post

cab: of the locomotive or the wagon? FC's go in each wagon separately
Other than selective activaton by FC, nothing changed in terms of what triggers the load/unload process. Default chests and technic chests (and possibly others) should work fine
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

Maverick2797
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.4.1]

by Maverick2797 » Post

The only other thing I can think of is that you didn't press Submit when saving the FC in the track? You should have gotten a chat message confirming the new FC
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Maverick2797 wrote:
Tue Feb 08, 2022 23:11
cab: of the locomotive or the wagon? FC's go in each wagon separately
Other than selective activaton by FC, nothing changed in terms of what triggers the load/unload process. Default chests and technic chests (and possibly others) should work fine
The gondola wagon of FC "SB" ran over the track. Do locked chests work?

The chat did broadcast the correct FC of "SB".
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Maverick2797
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.4.1]

by Maverick2797 » Post

Locked chests do work.

Did you run the whole train over it or just the gondola? They've always had to have the very front of a train pass over it to trigger the loading. The FC filter only puts the items in the wagons that match, regardless of their position relative to the loading track.

You can load a long train instantly assuming your chest has the inventory capacity to match. I'm not sure how easy it would be to load passing wagons individually without some potentially laggy checks.
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Maverick2797 wrote:
Tue Feb 08, 2022 23:26
Locked chests do work.

Did you run the whole train over it or just the gondola? They've always had to have the very front of a train pass over it to trigger the loading. The FC filter only puts the items in the wagons that match, regardless of their position relative to the loading track.

You can load a long train instantly assuming your chest has the inventory capacity to match. I'm not sure how easy it would be to load passing wagons individually without some potentially laggy checks.
It worked! Turns out you just have to run the front of the train.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests