[Mod] Advanced Trains [advtrains] [2.4.3]

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Codesound » Post

Linux Mint 19.2 Cinnamon, Minetest 5.1.0, ADVT cloned with GIT today

@Orwell, Hi,

it is possible to fix this visualization problem?


Image

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Imk » Post

by Codesound » Thu Nov 07, 2019 21:27
@Orwell, Hi,

it is possible to fix this visualization problem?
I have a problem with that, too.

and with the boat, horses as well.
Spoiler
Image
Maybe you know why this happens?
3d_armor installation field appeared.
Our character visually failed lower than we were physically
viewtopic.php?f=23&t=21514

They advised to update 3d armor the error disappeared but appeared as on the screen
If you ride a horse, the train will also be a block higher
3d armor updated Sun Dec 02, 2018 20:38 link https://github.com/stujones11/minetest- ... _0.5.0-dev and no longer changed


That's not the problem mods Advanced Trains .

Maybe we should create a new theme
with these questions. I also want to find a solution.

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by gpcf » Post

that is the fix of the broken attachment in 0.4.... It needs a bugfix for the workaround around the broken attachment.... It will surely be done once Linuxworks is on 5.0

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

by Miniontoby » Post

I have the opposit of that problem.

I mean that I walk in a block and all the things you have in a block
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Imk » Post

gpcf wrote:that is the fix of the broken attachment in 0.4.... It needs a bugfix for the workaround around the broken attachment.... It will surely be done once Linuxworks is on 5.0
version 5.2.0-dev-0df646e-dirty

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.0.1 TSS]

by orwell » Post

Imk wrote:Help all
Tell me what to do.
I want privacy two blocks below the rail.

/home/imk/minetest/mods/advtrains/advtrains
settingtypes.txt

Code: Select all

#    Track protection range (down)
#    Players without the 'track_builder' privilege can not build within a box around any tracks determined by these range settings
#    This setting determines the lower y bound of the box, a value of 1 means that the rail and 1 node below it are protected  
advtrains_prot_range_down (Track protection range [down]) int 1 0 10
int 1 0 10

int 2 0 10 it doesn't work out.

У меня под рельсами гравий и если обычные игроки капают блок ниже гравия он осыпается с приват и падает рельса. Помогите правильно поставить приват на 2 блока ниже рельс.
No. Do not change this file. settingtypes.txt contains information on what settings exist and what type they are. Their actual value is set in minetest.conf.
What you need to do is either
- go to the "Advanced Settings" menu, under "Mods" find "advtrains" and set "Track protection range [down]" to 2
or
- open your minetest.conf and add "advtrains_prot_range_down = 2"
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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.0.1 TSS]

by orwell » Post

gpcf wrote:that is the fix of the broken attachment in 0.4.... It needs a bugfix for the workaround around the broken attachment.... It will surely be done once Linuxworks is on 5.0
I imagine there even was a branch for it:
http://git.bananach.space/advtrains.git ... =mt5-fixes
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Imk » Post

orwell wrote: - open your minetest.conf and add "advtrains_prot_range_down = 2"
Orwell Thank you. Everything's fine now!

Image
Attachments
screenshot_20191111_192649.jpg
screenshot_20191111_192649.jpg (101.94 KiB) Viewed 1352 times

Heraclitus
Member
Posts: 25
Joined: Tue Oct 11, 2016 17:14

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Heraclitus » Post

First, thank you so much for this amazing mod. I've been experimenting with it over the past few months, finally took the time to figure out interlocking (with the help of the great video tutorial recently posted), and this mod is absolutely fantastic.

I have one question: is there any convenient way to adjust the distance subway trains can be heard from? Or even the volume? I have begun building stations through an existing city (and now have an appreciation for the challenges real-world subway designers have when digging through an old city with its pre-existing underground structures). And perhaps the distance that trains can be heard from makes sense if you are in the direct line of sight from them.

But since Minetest doesn't test for barriers when playing sounds (as I understand it), the subway trains end up producing rather loud noise on the surface even when they are quite far underground and completely hidden from view. Is there any way of adjusting this or at least making the volume decrease with distance in a more realistic way? If not, unless I'm missing something, my choices seem to be to live with loud subway noises everywhere in the city or else place the subways many, many stories underground.

Is there any sort of suggested workaround? Thanks so much.

User avatar
h-v-smacker
Member
Posts: 115
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by h-v-smacker » Post

Heraclitus wrote:First, thank you so much for this amazing mod. I've been experimenting with it over the past few months, finally took the time to figure out interlocking (with the help of the great video tutorial recently posted), and this mod is absolutely fantastic.

I have one question: is there any convenient way to adjust the distance subway trains can be heard from? Or even the volume? I have begun building stations through an existing city (and now have an appreciation for the challenges real-world subway designers have when digging through an old city with its pre-existing underground structures). And perhaps the distance that trains can be heard from makes sense if you are in the direct line of sight from them.

But since Minetest doesn't test for barriers when playing sounds (as I understand it), the subway trains end up producing rather loud noise on the surface even when they are quite far underground and completely hidden from view. Is there any way of adjusting this or at least making the volume decrease with distance in a more realistic way? If not, unless I'm missing something, my choices seem to be to live with loud subway noises everywhere in the city or else place the subways many, many stories underground.

Is there any sort of suggested workaround? Thanks so much.
You can always use the silent bullet trains )))
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

Heraclitus
Member
Posts: 25
Joined: Tue Oct 11, 2016 17:14

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Heraclitus » Post

You can always use the silent bullet trains )))
I might consider them, if I could craft them. I'd have to come up with crafting recipes. I tend to operate in a purely survival world (it's the way I've been playing with my son for years, and we appreciate the challenge of limited resources). I've already had to bend the rules a bit to get automated trains working, as many things in this mod don't have crafting recipes.

But I understand that those seem to be a low priority for many folks who just build in creative, so I wasn't originally going to mention that. It is another feature that would be on my personal wishlist.

Anyhow, I know you were joking a bit. I do like the subway train sounds. It's just odd to have them sounding loudly through 20 meters of solid rock between the train and the surface.

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Imk » Post

Code: Select all

2019-12-03 02:48:58: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'advtrains_train_track' in callback node_on_dig(): ...etest/bin/../mods/advtrains/advtrains/occupation.lua:222: attempt to index local 'train' (a nil value)
2019-12-03 02:48:58: ERROR[Main]: stack traceback:
2019-12-03 02:48:58: ERROR[Main]:       ...etest/bin/../mods/advtrains/advtrains/occupation.lua:222: in function 'get_trains_at'
2019-12-03 02:48:58: ERROR[Main]:       ...etest/bin/../mods/advtrains/advtrains/trainlogic.lua:1114: in function 'get_train_at_pos'
2019-12-03 02:48:58: ERROR[Main]:       .../minetest/bin/../mods/advtrains/advtrains/tracks.lua:281: in function 'can_dig'
2019-12-03 02:48:58: ERROR[Main]:       /home/imk/minetest/bin/../builtin/game/item.lua:542: in function </home/imk/minetest/bin/../builtin/game/item.lua:537>
2019-12-03 02:48:58: ERROR[Main]:       (tail call): ?

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.0.1 TSS]

by orwell » Post

Heraclitus wrote:
You can always use the silent bullet trains )))
I might consider them, if I could craft them. I'd have to come up with crafting recipes. I tend to operate in a purely survival world (it's the way I've been playing with my son for years, and we appreciate the challenge of limited resources). I've already had to bend the rules a bit to get automated trains working, as many things in this mod don't have crafting recipes.

But I understand that those seem to be a low priority for many folks who just build in creative, so I wasn't originally going to mention that. It is another feature that would be on my personal wishlist.

Anyhow, I know you were joking a bit. I do like the subway train sounds. It's just odd to have them sounding loudly through 20 meters of solid rock between the train and the surface.
Right, MT doesn't really test for barriers when playing sounds. To make the sounds realistic, major effort would have to be spent. Additionally, I would like to make the sound calculations client-side since the server is already heavily loaded on multiplayer servers doing the train movement calculations.

I don't really see a way to have the sound played realistically except by calculating them individually per player.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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.0.1 TSS]

by orwell » Post

Imk wrote:

Code: Select all

2019-12-03 02:48:58: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'advtrains_train_track' in callback node_on_dig(): ...etest/bin/../mods/advtrains/advtrains/occupation.lua:222: attempt to index local 'train' (a nil value)
2019-12-03 02:48:58: ERROR[Main]: stack traceback:
2019-12-03 02:48:58: ERROR[Main]:       ...etest/bin/../mods/advtrains/advtrains/occupation.lua:222: in function 'get_trains_at'
2019-12-03 02:48:58: ERROR[Main]:       ...etest/bin/../mods/advtrains/advtrains/trainlogic.lua:1114: in function 'get_train_at_pos'
2019-12-03 02:48:58: ERROR[Main]:       .../minetest/bin/../mods/advtrains/advtrains/tracks.lua:281: in function 'can_dig'
2019-12-03 02:48:58: ERROR[Main]:       /home/imk/minetest/bin/../builtin/game/item.lua:542: in function </home/imk/minetest/bin/../builtin/game/item.lua:537>
2019-12-03 02:48:58: ERROR[Main]:       (tail call): ?
Hm, this must have happened right after a train was deleted from that position. Does this appear often? If not, a server restart always fixes this.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

gpcf
Member
Posts: 382
Joined: Fri May 27, 2016 10:48
GitHub: gpcf
In-game: gabriel

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by gpcf » Post

orwell wrote: I don't really see a way to have the sound played realistically except by calculating them individually per player.
Exactly. The missing Doppler effect really ruins the train sounds. This is a major oversight in the minetest engine, which is excusable since all the entities they had in mind originally were low-speed where the effect is barely noticeable.

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Imk » Post

Does this appear often?
no
I realized one thing. You can't mark a traffic light if the rails uphill.
you can't go any further.
doesn't even help disabling the tags
traffic light removal, too.
the train doesn't want to go any further than that, as if it remembered there was a mark

Image
didn't help setting a tag in another revenge
removed the rails ascent
tore down the mountain.
made the rails straight
the train didn't want to drive by the old non-existent marker.
disassembling the rails unfortunate place
got the server crash by the mistake viewtopic.php?f=11&t=14726&p=362765#p362673
reloaded
and the evil marker is missing.
rebuilt the slope
Everything's working properly now.
Don't mark traffic lights the slopes!
Attachments
screenshot_20191204_051240.jpg
screenshot_20191204_051240.jpg (273.3 KiB) Viewed 1352 times

User avatar
h-v-smacker
Member
Posts: 115
Joined: Wed Nov 29, 2017 23:04
GitHub: h-v-smacker
In-game: Smacker

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by h-v-smacker » Post

I have many signal marks on the slopes. They work.

Why wouldn't it work? (a) the mark was for a signal attached to the wrong side of the TCB or (b) the new tracks weren't registered by the game or train yet.

How does (a) happen?

Consider this scheme: ========A|B=(:)=====[<—]=======[<<<][<<<][<<<]=====

You want to use the signal (:) to control the train [<<<]. You need the signal to reflect the state of the segment A. But you attach it by accident to B. So it's always red then, because B is occupied by any oncoming train.

How does (b) happen? When you build tracks in front of a train, mostly. /at_reroute and /at_sync_ndb will help to refresh the track system.
Linux Forks, the Best Forks: linux-forks.de // Play @ LinuxWorks Next Generation

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.1.0]

by orwell » Post

Hi,
just noticed that I haven't updated the content db version for ages...

advtrains 2.1.0 released

There are no major new features, but a couple of small changes, additions and fixes which I don't want to summarize now. Have a look at the commit log if interested.

Notable: The packaged version contains the mt5-fixes branch and so is tagged for 5.0+. This doesn't mean that advtrains has dropped support for 0.4. It still works perfectly using the master branch downloadable from bananach.space
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
Imk
Member
Posts: 490
Joined: Mon Nov 05, 2018 19:15
In-game: Imk
Location: Crimea, Russia
Contact:

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

by Imk » Post

mt5-fixes updated and the head isn't sticking out :)

Image

Thank you.
Attachments
screenshot_20191205_235856.jpg
screenshot_20191205_235856.jpg (199.96 KiB) Viewed 1352 times

Heraclitus
Member
Posts: 25
Joined: Tue Oct 11, 2016 17:14

Re: [Mod] Advanced Trains [advtrains] [2.0.1 TSS]

by Heraclitus » Post

orwell wrote: Right, MT doesn't really test for barriers when playing sounds. To make the sounds realistic, major effort would have to be spent. Additionally, I would like to make the sound calculations client-side since the server is already heavily loaded on multiplayer servers doing the train movement calculations.

I don't really see a way to have the sound played realistically except by calculating them individually per player.
Thank you very much for your reply; I really appreciate it. I guess, lacking that level of control over sound, perhaps some sort of setting or API implementation that would allow easier control over the distance sounds can be heard from with a particular train? I understand the Minetest sound playing function does allow a distance to be set for sounds to be heard -- I wish there were an easy way to adjust that here. (I assume for the subway train that it's just the default distance.)

That is, lacking realistic sound implementation to avoid sound going through heavy barriers, etc., I'd personally prefer just to hear sounds when I'm rather close to trains, as opposed to hearing them longer distances away when they aren't even visible. If there were some way to easily tweak that, I'd personally find it helpful. (But I also realize this may not be trivial to implement, and I'm grateful for all the work already done on this mod. It's just an idea.)

On another topic, I've continued installing my subway system and now have roughly a dozen stations on two different lines. Everything is going smoothly, except for one particular section of track where sporadic collisions occur, and I cannot for the life of me figure out why. I've torn out the signals and reset tcbs (including recreating the interlocking sections to ensure they're correct) several times and redid them. I first suspected it might have something to do with an incline near one of the track breaks, so I moved that break (and spent 20 minutes trying to get rid of the "ghost" section that was only a couple meters long, but eventually did).

The section and signals seem to work fine for long periods, and then I'll walk away from that section and come back in 10 minutes or an hour or several hours later, and there's a collision. No warning. It seems a train will pull out of a station and move up to the exit signal from that station, and sometimes the previous signal will let a train through into the station, then causing a collision. Sometimes when I've arrived (I think most of the time), the exit signal appears to be green, so the first train should have continued into the new section, but it apparently doesn't sometimes. And the previous signal for some reason lets a second train into the still-occupied section of track. (Note this is all located on a section of track going one-way. There are no junctions or anything like that in this section. Just a station stop, as well as inclines coming in and a curve followed by an incline going out. The current setup has the route beginning before the downward incline coming into the station and ending before the train exits the station to begin the curve and upward incline going out.)

I've spent several hours rebuilding this section, trying to add additional signals, and trying to relocate things to avoid this problem, but it still happens. I even tore up most of the track, tcbs, signals, everything and relocated the whole interlocking section break about 15 meters earlier, but now the collision just occurs 15 meters sooner, still in the same section of track. And I've never actually witnessed the collision. Is it possible something changes when the I'm not present and the map block is unloaded that could contribute to this? I've checked and rechecked the way tcbs, signals, routes, etc. are assigned over a dozen times now, so I can't imagine I've programmed something wrong. And I've successfully set up at least two dozen other routes, signals, stations, etc. everywhere else (including much more complicated things involving junctions) that aren't doing this.

Any thoughts on troubleshooting this?

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.1.0]

by orwell » Post

Hm... this sounds really strange.
There might be two things that you could check for:
1. Have you ever used WorldEdit on any of the tracks? If so try running /at_sync_ndb near the place. (Could be useful in any case)
1. Is there some sort of "duplicate section" such as the same track section (same id) in 2 different places, possibly by another track connection you aren't aware of? The current implementation has a problem when a train has entered the same section in multiple places and will free it once the train leaves the first of those. Most probable case: same section on both sides of a specific TCB will certainly not work.
(Note, there is no problem if there are multiple distinct track portions, as long as a single train can't enter them simultaneously, such as for crossing tracks)

If nothing helps, do you mind sending me the world and/or the advtrains files in the world directory?
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

Heraclitus
Member
Posts: 25
Joined: Tue Oct 11, 2016 17:14

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

by Heraclitus » Post

orwell wrote: 1. Have you ever used WorldEdit on any of the tracks? If so try running /at_sync_ndb near the place. (Could be useful in any case)
I have never used WorldEdit on the tracks. But I just ran that command, which said it removed six "ghost nodes." As I mentioned, I did fiddle with some of the TCB locations before, because I thought the collisions might have something to do with behavior around inclines. (I was just guessing, because I couldn't figure out what was happening or why and was getting desperate to fix it.) Maybe I hadn't successfully gotten rid of some "ghost" that was messing with something?
1. Is there some sort of "duplicate section" such as the same track section (same id) in 2 different places, possibly by another track connection you aren't aware of? The current implementation has a problem when a train has entered the same section in multiple places and will free it once the train leaves the first of those. Most probable case: same section on both sides of a specific TCB will certainly not work..
I had checked for that, but just looked again, and I don't see anything like that. Though I'm not sure what the effect of the "ghost nodes" might have been. Thanks for the command, in any case. I saw it mentioned in couple of previous posts but wasn't quite sure what all it does.
If nothing helps, do you mind sending me the world and/or the advtrains files in the world directory?
The world file is quite large (been working in it for years), but I appreciate the offer. I'll see if your command did the trick; if not, I can definitely send you the advtrains files. In any case, for whatever reason there have been no collisions in the past six hours since I posted earlier today... which seems to be the most stable that part of the system has been. I'll let you know if I see further weird behavior. Thanks again so much for your help.

Heraclitus
Member
Posts: 25
Joined: Tue Oct 11, 2016 17:14

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

by Heraclitus » Post

Orwell - I just wanted to let you know I finally think I found the issue, which seems to have been a station node (with a reverse) placed too close to a junction. This was in the section immediately following the problematic section. I'm guessing what was happening was that train was stopping too close to the junction and confusing the signaling? Then maybe the train re-entered the junction (after the reverse), causing it to send a red signal to the previous section after it had been given a green. But that previous section apparently already let the next train in?

I don't know for certain, but what ultimately solved the problem was moving the station farther down the line from the junction. (Running your commands to get rid of ghosts may have helped too, though I still had trains get stuck around that junction -- with a green signal, but they just weren't moving -- but I don't think any collisions. So maybe it was a combination of the station too close to a junction and some ghost thing that was originally causing the collisions.)

Anyhow, thanks so much for your help.

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.1.1]

by orwell » Post

2.1.1
Alongside with a couple of fixes, it is now possible to trigger LuaATC rails on a train approach, and to temporarily disable the use of ARS per train. The stop rail now no longer reserves the next section (via ARS) when a train stops in front of the signal.

(Note: archive includes the luaatc_extensions branch)
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

bontaurean
New member
Posts: 2
Joined: Thu Oct 10, 2019 20:09

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

by bontaurean » Post

DELETED.

Sorry, had problem with track_slope, but rebuilding a path has resolved it.
Last edited by bontaurean on Wed Jan 08, 2020 13:44, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 77 guests