[Mod] Advanced Trains [advtrains] [2.4.3]

User avatar
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.4.1]

by orwell » Post

Latest master nouw has a 2-position wagon placement system. This means that the wagon's wheels are placed correctly and long wagons now look better.
DlxTrains and other train addition mods will have to add a "wheel_positions" field to the wagon definition. See advtrains/api_doc.txt how to use it, or take basic_trains as example.

EDIT: videos
Before: http://advtrains.de/forumimg/wagon2pos_before.webm
After: http://advtrains.de/forumimg/wagon2pos_after.webm
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

orwell wrote:
Wed Feb 09, 2022 22:15
Latest master nouw has a 2-position wagon placement system. This means that the wagon's wheels are placed correctly and long wagons now look better.
DlxTrains and other train addition mods will have to add a "wheel_positions" field to the wagon definition. See advtrains/api_doc.txt how to use it, or take basic_trains as example.

EDIT: videos
Before: http://advtrains.de/forumimg/wagon2pos_before.webm
After: http://advtrains.de/forumimg/wagon2pos_after.webm
Nice! Although now it shows much accurately how small the minimum radius is in advtrains. Do you think it would be possible in future to finally add rotating bogies (trucks) for newer trains? Now that the body of the train is correctly positioned and the wheel positions identified, the bogie entities can be put in an appropriate location (maybe they need a y offset?) and rotated appropriate so they are parallel to the track (could be the same logic as the old wagon-centred code applied to each bogie?) This is a step in the right direction anyway.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ 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

orwell wrote:
Wed Feb 09, 2022 22:15
Latest master nouw has a 2-position wagon placement system. This means that the wagon's wheels are placed correctly and long wagons now look better.
DlxTrains and other train addition mods will have to add a "wheel_positions" field to the wagon definition. See advtrains/api_doc.txt how to use it, or take basic_trains as example.

EDIT: videos
Before: http://advtrains.de/forumimg/wagon2pos_before.webm
After: http://advtrains.de/forumimg/wagon2pos_after.webm
Brilliant! I'm developing a mod with really long carriages, and this will really help.
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

Why does track separation differ so much? On my server it's 3 (1 in railyards and non-public lines), but on LF and other servers, 2 and even 1 is server standard?

I don't see why so few use 3. Sure, it uses more ballast, but it's odd (meaning it has a centre) and allows decoration, such as pillars in the middle of tunnels. 3 also allows "interlocking clovers", with TCBs next to the track, and signals in the centre. This allows for an ambiguous driving direction. I don't see the reason for 2. it has no centre.
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:
Sat Feb 12, 2022 09:58
Why does track separation differ so much? On my server it's 3 (1 in railyards and non-public lines), but on LF and other servers, 2 and even 1 is server standard?
1m is more or less the minimum that is needed for the setup to look somewhat nice. It does work quite well with subway trains, and can be used in places where space is very tight.

2m is the value where the spacing of trains (especially with wider trains like the E231) looks sane while still being a relatively tight setup.

3m is a nice choice in some cases. In particular, you can put a "passing track" at certain places, which I do.
Sure, it uses more ballast, but it's odd (meaning it has a centre) and allows decoration, such as pillars in the middle of tunnels.
It's not just the ballast that matters. If you are in a survival server and want to build a tunnel that looks nice, the choice of 2m means you can save materials, which can matter if you are building e.g. a large subway network. Of course, this matters less if you on a creative server or have a lot of materials.
3 also allows "interlocking clovers", with TCBs next to the track, and signals in the centre.
Keep in mind that some servers do have requirements/standard on signal placement. At least on German rail lines, signals should usually be place on the right side of the track (i.e. away from the center - trains drive on the right side here). I think the rail lines on LF are influenced by this.
I don't see the reason for 2. it has no centre.
There is not necessarily the need for a center. Pillars can also be made for tracks/bridges where the width is divisible by two. Be creative.

Another consideration to make is that, when adding a rail line to the network, you generally want the distance between the tracks to be consistent unless you have a particular reason not to. On servers where the distance between tracks is usually 2 nodes, you are obviously also expected to build track like this. This means that you can't (easily) build pillars in the middle of tunnels, but you can also build nice tunnels without having a pillar in the middle.

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:
Sat Feb 12, 2022 11:15
1m is more or less the minimum that is needed for the setup to look somewhat nice. It does work quite well with subway trains, and can be used in places where space is very tight.
On British track, often the rails are just little more then one sleeper width apart. This is comparable to 1.5 blocks.
2m is the value where the spacing of trains (especially with wider trains like the E231) looks sane while still being a relatively tight setup.

3m is a nice choice in some cases. In particular, you can put a "passing track" at certain places, which I do.
Image

I can kind of get where you're coming from, but i like having 3. It is nicer that aerodynamic stress between two trains is more diffused. I have been on a train where the doors slammed because another train was passingby, and it almost gave me a heart attack.

As for "passing tracks", i have built a traffic-saving extension using the gap:

Image
It's not just the ballast that matters. If you are in a survival server and want to build a tunnel that looks nice, the choice of 2m means you can save materials, which can matter if you are building e.g. a large subway network. Of course, this matters less if you on a creative server or have a lot of materials.
Oh yeah. I have built a 5 km tunnel using worldedit, and the numbers which came out were massive.

Another consideration to make is that, when adding a rail line to the network, you generally want the distance between the tracks to be consistent unless you have a particular reason not to. On servers where the distance between tracks is usually 2 nodes, you are obviously also expected to build track like this. This means that you can't (easily) build pillars in the middle of tunnels, but you can also build nice tunnels without having a pillar in the middle.
I have a gallery of tunnels split in two. These always look nicer then other tunnels, and give trains a more personal feel. I personally think sandstone is too weak for making tunnels 7 blocks wide. It may be able to survive 6 block tunnels with 2-void, but i doubt it.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
mbb
Member
Posts: 256
Joined: Sat Jan 17, 2015 17:47
GitHub: mbruchert
IRC: mBb
In-game: MBB

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

by mbb » Post

W3RQ01 wrote:
Sat Feb 13, 2021 14:23
mbb wrote:
Fri Feb 12, 2021 22:35
uh, nice things happened here:)
Wb mbb!
A question: where i can download the steam locomotive that i saw on page 3?
Oh I don't think I ever uploaded it anywhere, I think the files are unfortunately lost:(
cdb_2fcfab1b41f9

pheonixfire
Member
Posts: 94
Joined: Sun Oct 21, 2012 06:25
In-game: pheonix
Location: Australia

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

by pheonixfire » Post

If it's the one I think it is I have a copy of the blender files, just no idea how to use
them.

I've attached them in a zip file incase someone else knows how to use them

Best Regards
pheonixfire
Attachments
tender locomotive.zip
(269.56 KiB) Downloaded 36 times

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

orwell wrote:
Wed Feb 09, 2022 22:15
Latest master nouw has a 2-position wagon placement system. This means that the wagon's wheels are placed correctly and long wagons now look better. [...]
Very nice! I have implemented that in my mod now.
wheel_positions.png
wheel_positions.png (165.42 KiB) Viewed 3307 times
On “smooth” curves it actually looks better than before.

But another problem: it appears to be no longer possible to couple (or event collide) wagons on newly constructed tracks.
I don’t know if this is related to the wheel_positions feature.

Tracks which I have built some days ago allow coupling just fine.
When I built the depicted test track, I had to build a connection to existing tracks, to get a train on it.

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

doxygen_spammer wrote:
Mon Feb 14, 2022 15:22
But another problem: it appears to be no longer possible to couple (or event collide) wagons on newly constructed tracks.
I don’t know if this is related to the wheel_positions feature.

Tracks which I have built some days ago allow coupling just fine.
When I built the depicted test track, I had to build a connection to existing tracks, to get a train on it.
I haven't had time to look at this on the latest master but I filed a bug report about a similar issue that had to do with curves, like in your screenshot.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
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.4.1]

by orwell » Post

Blockhead wrote:
Mon Feb 14, 2022 17:20
doxygen_spammer wrote:
Mon Feb 14, 2022 15:22
But another problem: it appears to be no longer possible to couple (or event collide) wagons on newly constructed tracks.
I don’t know if this is related to the wheel_positions feature.

Tracks which I have built some days ago allow coupling just fine.
When I built the depicted test track, I had to build a connection to existing tracks, to get a train on it.
I haven't had time to look at this on the latest master but I filed a bug report about a similar issue that had to do with curves, like in your screenshot.
While playing around with the wagon positioning, I also noticed that the new coupling system has a problem when there is a track loop. The problem is that due to the loop, tracks are on the train's path twice and the path projection function selects the wrong path position apparently. I need to find a way to fix this. Workaround is to not build loops.

On the bogies: yes, that would be the next logical step, and should be pretty simple to implement. Someone maybe give me a wagon model with separate bogie models, then I can try this out.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

My ghost train problem is getting really large. Every line has an average of 1.5 "ghost train sections", where the section:
  • Registers a train has arrived
    Does not register it has left
    Only has this error every few trains
Every few hours, the ghosts come back. I must go to the location of the TCB and reset the sections.

Is this normal on multiplayer servers with few players?
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

orwell wrote:
Sat Feb 19, 2022 17:45
On the bogies: yes, that would be the next logical step, and should be pretty simple to implement. Someone maybe give me a wagon model with separate bogie models, then I can try this out.
If you are interested, I can split the bogies off the Konstal 105.

I am not sure if this is very useful.
Rotating bogies is somewhat small details, and I think it emphasizes the sharp corners more that it looks fancy.
And if the tracks get smoother curves, the rotation would be barely noticeable.

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

It would be nice if the signals API gave information on routes and their points. British railway signalling, unlike European "speed signalling", gives information on routes. If someone was to make a britishsignals mod, this wouldbe a significant pain point.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

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:
Mon Feb 21, 2022 13:22
It would be nice if the signals API gave information on routes and their points. British railway signalling, unlike European "speed signalling", gives information on routes. If someone was to make a britishsignals mod, this wouldbe a significant pain point.
Yes, for a while I've wanted route indicators such as feather indicators (widely used in the UK) and arrows that are used for points and lettered indicators used for junctions on the Victorian Railways. All types mentioned are pictured here. I assume they can be made co-acting with the main signal node just like the Ks speed indicators. I should get back to my Victorian Railways signal set that I once started..
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ 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

I am working on a mod which adds elements to advtrains. Hopefully i can get british signals inside and add some wires. Maybe even a few british trains.
Spoiler
screenshot_20220221_175630.png
screenshot_20220221_175630.png (570.69 KiB) Viewed 3087 times
Live rails warning and instructions to class 755
screenshot_20220221_175623.png
screenshot_20220221_175623.png (678.91 KiB) Viewed 3087 times
Neutral section warning and instructions to class 755
screenshot_20220221_175610.png
screenshot_20220221_175610.png (881.67 KiB) Viewed 3087 times
OLE, no wires
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

I also thought about adding route information (mostly the route name), mostly for a Zs 2 indicator. I have never actually worked on it, however, largely because I was working on other things around Ks signals - it was around the time I worked on the new-ks branch.

IMO (from what I have read on Wikipedia) the hard part of British (and subsequently also Japanese) signaling is the fact that the "distant" aspect refers to a signal aspect and not just the speed. From my understanding of the signal aspect table, this could be supported, but there may be certain issues.

This is my proposal for implementing this:

The "alternative" table should have the __type field containing the string kv. The rest of the table should have the the aspect identifiers as keys of type string and values that may be
  • A string, to create an alias (e.g. if something from the signal is not yet supported by advtrains). An error is signaled if there is a circular dependency (A -> B (-> ...) -> A)
  • A regular aspect table, but the dst field may be an index to the table of supported signal aspects. It is an error if the index does not map to a valid value.
Then the function setting the aspect should, for a signal with the possible aspects defined as above, accept an index to the above table instead of a signal aspect table.

However, I am not sure whether I am going to pick this up anytime soon, considering that I have enough feature/maintenance branches to work on at the moment.

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 am working on a mod which uses British signals, and i can't set distant distant signals using the API. There is the aspect Y (next signal at danger) and Y-Y (signal after next signal is at danger). I belive there should be an arbituary number of dst = [/code]s accessible through adding numbers to the variable such as dst3 = , which means the third distant section. This way, my own [url=https://gitlab.com/56independent/britsi ... ic-signals] 8-aspect signal idea can be brought into existence.
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 am working on a mod which uses British signals, and i can't set distant distant signals using the API. There is the aspect Y (next signal at danger) and Y-Y (signal after next signal is at danger). I believe there should be an arbitrary number of dst = s accessible through adding numbers to the variable such as dst3 = , which means the third distant section. This way, my own 8-aspect signal idea can be brought into existence.
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:
Wed Feb 23, 2022 20:41
I am working on a mod which uses British signals, and i can't set distant distant signals using the API. There is the aspect Y (next signal at danger) and Y-Y (signal after next signal is at danger).
This could, at least to an extent, be possible if my proposal was actually implemented, which I am, unfortunately, not particularly interested in doing at the moment. The proposal on implementing distant signaling may also be of interest on this topic.

What I had in mind with the proposal I wrote in the previous post (on an alternative representation of supported signal aspects) was that the dst field would be a key that would be present in the table of supported aspects. This means that you would be able to "chain" signals together to form the order of (for example) preliminary caution -> caution -> stop.
I believe there should be an arbitrary number of dst = s accessible through adding numbers to the variable such as dst3 = , which means the third distant section. This way, my own 8-aspect signal idea can be brought into existence.
This does need some further consideration. A strict "expect the nth upcoming signal to have this aspect regardless of the aspects of the first (n-1) signals" (n>=2) use case is extremely rare (and I assume this is not what you actually want) and can be problematic to handle if distant signaling was implemented.

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

Is there a way to make trains kill at a specific speed, such as 6? I want to make my railways more realistic, where you die if you don't cross carfully.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

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:
Thu Feb 24, 2022 12:10
Is there a way to make trains kill at a specific speed, such as 6? I want to make my railways more realistic, where you die if you don't cross carfully.
They already do, step 8b is to kill players when the train's velocity is > 3, as long as you have advtrains_overrun_mode not set to "none" in your Minetest configuration. You could make the exact speed configurable with a setting and submit a patch if you like.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ 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

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

56independent_actual wrote:
Thu Feb 24, 2022 13:44
I've made my first two patches to advtrains at the mailing list:
FYI the advtrains mailing list has been deprecated and split into advtrains-devel and advtrains-discuss to minimise patches etc getting lost in lengthy threads. There's a notice on the advtrains list page (here for reference) and your git-send-email config should probably be adjusted to use the advtrains-devel address instead.
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

56independent_actual wrote:
Thu Feb 24, 2022 13:44
Change cumbersome texture
Rather than add another texutre/another file/another image for a simple colour change, you can use texture modifiers

Code: Select all

base_texture.png^[­colorize:#ff00dc
will use the texture base_texture.png and apply colour (in this case pink) to it afterwards.

Search for "Texture modifiers" in lua_api.txt for more info on how to use them.
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 18 guests