[Mod] Advanced Trains [advtrains] [2.4.3]

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] [1.12]

by mbb » Post

new PR
please merge or review
cdb_2fcfab1b41f9

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

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

by Codesound » Post

Hi,

I tried the 1.12 latest release but the "Trains dropped to 0" problem remains...

I realized that when the level is rendered, I often see the train off the track for a very short time, (especially in the curves), then it is re-positioned correctly but his velocity is clipped to 0;

I still see that when a train has to stop (after an ATC command), its "slowdown" is made with many and many LAGs;

finally, I often wait a long time for the arrival of a train, (which does not arrive (also 10 minutes)), until I begin to fly along the rails: the level is rendered and only then I see the train coming...

all these problems seem to be related to the Minetest rendering engine...

I hope I was helpful...

R

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] [1.12]

by mbb » Post

cdb_2fcfab1b41f9

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] [1.12]

by mbb » Post

how i can set the number?
cdb_2fcfab1b41f9

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

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

by gpcf » Post

Wow, the zugspitzbahn really looks nice. The number is set using overlay textures. setting it on non-subway trains might require a small change in the core mod, though.

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

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

by Codesound » Post

Hi,

thanks for this .... in the next few days I try to use this ...

a simple question:

to use it, I simply have to put it in the Advanced-Train folder and enable it? quite right?

thanks again...

R

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

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

by gpcf » Post

just put it in your mods folder and enable it. You don't need to put it in the advtrains folder.

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] [1.12]

by orwell » Post

Codesound wrote:Hi,

I tried the 1.12 latest release but the "Trains dropped to 0" problem remains...

I realized that when the level is rendered, I often see the train off the track for a very short time, (especially in the curves), then it is re-positioned correctly but his velocity is clipped to 0;
IMO this is caused by some sort of bug in my tracks database.
advtrains keeps a database of all tracks in the world, independent of the Minetest node storage.
Whenever a train drives into (or inside) terrain that is not loaded(there's no player near), the train relies on this database. It might occur that nodes are not registered in the track database, esp. when WorldEdit has been used. Then trains are considered off-track and stop.
There is an LBM (loading block modifier) that finds those missing tracks when the MapBlock is loaded. This means that your tracks should work once you flew along all your rails. (note:should, if not there's a bug either in Minetests LBM handling or in my mod)
Codesound wrote: I still see that when a train has to stop (after an ATC command), its "slowdown" is made with many and many LAGs;
This is certainly caused by your computer.
Codesound wrote: finally, I often wait a long time for the arrival of a train, (which does not arrive (also 10 minutes)), until I begin to fly along the rails: the level is rendered and only then I see the train coming...
Also related to the track database:
Every train only saves 2 positions when stored to disk. When advtrains starts up, it checks whether those positions are rails. If this cannot be determined, the train step code just aborts before doing anything, waiting for the position to become loaded. Therefore the train does not move at all, until the position gets loaded.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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] [1.12]

by mbb » Post

ok
Last edited by mbb on Fri Dec 29, 2017 12:28, edited 1 time in total.
cdb_2fcfab1b41f9

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] [1.12]

by mbb » Post

gpcf wrote:Wow, the zugspitzbahn really looks nice. The number is set using overlay textures. setting it on non-subway trains might require a small change in the core mod, though.
like

Code: Select all

core.override item adtrains:subway{ 
     tiles = "advtrains_subway.png^1.png"
}
cdb_2fcfab1b41f9

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] [1.12]

by mbb » Post

cdb_2fcfab1b41f9

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] [1.12]

by mbb » Post

mbb wrote:
gpcf wrote:Wow, the zugspitzbahn really looks nice. The number is set using overlay textures. setting it on non-subway trains might require a small change in the core mod, though.
like

Code: Select all

core.override item adtrains:subway{ 
     tiles = "advtrains_subway.png^1.png"
}
please send me the hole code
thx
cdb_2fcfab1b41f9

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

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

by Codesound » Post

gpcf wrote:just put it in your mods folder and enable it. You don't need to put it in the advtrains folder.
Hi,

many thanks....

R

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

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

by Codesound » Post

orwell wrote:
Codesound wrote:Hi,

I tried the 1.12 latest release but the "Trains dropped to 0" problem remains...

I realized that when the level is rendered, I often see the train off the track for a very short time, (especially in the curves), then it is re-positioned correctly but his velocity is clipped to 0;
IMO this is caused by some sort of bug in my tracks database.
advtrains keeps a database of all tracks in the world, independent of the Minetest node storage.
Whenever a train drives into (or inside) terrain that is not loaded(there's no player near), the train relies on this database. It might occur that nodes are not registered in the track database, esp. when WorldEdit has been used. Then trains are considered off-track and stop.
There is an LBM (loading block modifier) that finds those missing tracks when the MapBlock is loaded. This means that your tracks should work once you flew along all your rails. (note:should, if not there's a bug either in Minetests LBM handling or in my mod)
Codesound wrote: I still see that when a train has to stop (after an ATC command), its "slowdown" is made with many and many LAGs;
This is certainly caused by your computer.
Codesound wrote: finally, I often wait a long time for the arrival of a train, (which does not arrive (also 10 minutes)), until I begin to fly along the rails: the level is rendered and only then I see the train coming...
Also related to the track database:
Every train only saves 2 positions when stored to disk. When advtrains starts up, it checks whether those positions are rails. If this cannot be determined, the train step code just aborts before doing anything, waiting for the position to become loaded. Therefore the train does not move at all, until the position gets loaded.
Hi,

thanks for your reply..
I have one alienware area 51v2 (Intel i7 esacore + geforce gtx980 on Win10) if this PC is little for minetest.... I think I'll have to change computer.... ;-)

thanks again for all your work!

R

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] [1.12]

by orwell » Post

mbb wrote:
gpcf wrote:Wow, the zugspitzbahn really looks nice. The number is set using overlay textures. setting it on non-subway trains might require a small change in the core mod, though.
like

Code: Select all

core.override item adtrains:subway{ 
     tiles = "advtrains_subway.png^1.png"
}
No...
I need to explain the line numbers.
- implemented only on the subway train
- NOT settable via any menu
- The only way to set them is to write the following code into a LUA-ATC controller:

Code: Select all

set_line(<line number>)
... and driving the train over it
IDK if it's possible to clear the line number once it has been set...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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] [1.12]

by mbb » Post

orwell wrote:
mbb wrote:
gpcf wrote:Wow, the zugspitzbahn really looks nice. The number is set using overlay textures. setting it on non-subway trains might require a small change in the core mod, though.
like

Code: Select all

core.override item adtrains:subway{ 
     tiles = "advtrains_subway.png^1.png"
}
No...
I need to explain the line numbers.
- implemented only on the subway train
- NOT settable via any menu
- The only way to set them is to write the following code into a LUA-ATC controller:

Code: Select all

set_line(<line number>)
... and driving the train over it
IDK if it's possible to clear the line number once it has been set...

thx orwell
cdb_2fcfab1b41f9

User avatar
SonosFuer
Member
Posts: 104
Joined: Sun Jul 09, 2017 00:32
GitHub: apachano
IRC: SonosFuer
In-game: SonosFuer

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

by SonosFuer » Post

It would be really cool to add sounds to the trains. There should be engine and rail sounds when the train moves and air sounds for breaks and the doors opening/ closing. I also thing being able to use the ATC rails to make a whistle/ air horn sound would be cool.
Working on a content database for minetest mods, servers, and etc Check it out and give me feedback at viewtopic.php?f=14&t=18137

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] [1.12]

by orwell » Post

The subway train already has some sounds.
Horn via ATC would be cool of course, but it's difficult to implement because of reasons.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

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

by Codesound » Post

Hi,

I inform you that with the latest version 0.5.0-9146c6a-win64 the power line above the rails is finally gone....

thanks for you patience...

R

Image


EDIT:
when I downloaded the latest version of Minetest, all the video settings are disabled: this is the reason why the power line is hidden. When I set any type of Mipmaps in the global main settings window, the power line is showed....the problem therefore is if I set any mipmap value. It is enough then that I leave it disabled

thanks again for all....

R

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] [1.13]

by orwell » Post

1.13
I've been changing the controls for driving trains. The key assignment did not change at all, but you now need to hold keys to accelerate/roll. It's now more or less like a virtual 'lever' as found in many trams.
Hold Down and Jump at the same time to use the (somewhat overpowered) emergency brake.
Also: Added bord computer to trains
Features:
- couple/decouple trains from a driver stand
- new couple lock system (owner based, overridable by 'train_remove' privilege)
- all train operators can now change the inside/outside text, allows for multilines
Accessible via right-click menu or by pressing Sneak+Jump keys

@codesound: the models currently include the powerlines, although they are set to a transparent texture. I decided to implement them in a different manner, however. The reason why they still do exist is simply because it is NOT FUN to export 48 different .obj files from Blender. So I always try to avoid to change the rail models because of this.
When I get to implement power lines (which will be after I finished the automatic track section signalling system), i might reexport the models (note, might)
If you are very annoyed of them, feel free to do that work for me, the blender files with the rails should be in the assets directory on the repository.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

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

by Codesound » Post

orwell wrote: @codesound: the models currently include the powerlines, although they are set to a transparent texture. I decided to implement them in a different manner, however. The reason why they still do exist is simply because it is NOT FUN to export 48 different .obj files from Blender. So I always try to avoid to change the rail models because of this.
When I get to implement power lines (which will be after I finished the automatic track section signalling system), i might reexport the models (note, might)
If you are very annoyed of them, feel free to do that work for me, the blender files with the rails should be in the assets directory on the repository.
Hi, thanks for reply.
I'm sorry for my feeds on power line. I did not understand that they were part of the project.
I'm not a programmer and I do not use blender. I do not know how to help you. I thought the only thing I could do was to inform you of possible problems with the mod.... Sorry again and thanks for all

R

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] [1.13]

by orwell » Post

No problem. I really like your level crossing bell!
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

user
Member
Posts: 18
Joined: Sat Mar 18, 2017 10:56
In-game: user

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

by user » Post

moin moin,

i tested the version 1.13 they don't start and i get follow error:

Code: Select all

2018-01-12 02:13:28: ERROR[Main]: ModError: Failed to load and run script from /home/minetest/.minetest/mods/advtrains/advtrains/init.lua:
2018-01-12 02:13:28: ERROR[Main]: /home/minetest/.minetest/mods/advtrains/advtrains/wagons.lua: Datei oder Verzeichnis nicht gefunden
2018-01-12 02:13:28: ERROR[Main]: stack traceback:
2018-01-12 02:13:28: ERROR[Main]: 	[C]: in function 'dofile'
2018-01-12 02:13:28: ERROR[Main]: 	/home/minetest/.minetest/mods/advtrains/advtrains/init.lua:152: in main chunk
that's all!

edit:
Looks like a mistake of myself, i must show if i come home!


mfg user

user
Member
Posts: 18
Joined: Sat Mar 18, 2017 10:56
In-game: user

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

by user » Post

Hi,

everything ist OK!

Sorry my mistake :(

The sound of the green steam engine, the new conrol and boardcomputer are great!

Tanks for all!

Best regards

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] [1.13]

by orwell » Post

user wrote: Tanks for all!
Image
TANKS FOR ALL!!!
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 16 guests