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

by orwell » Post

fireglow wrote:Hey, a user just used the PC Naming Tool and the server crashed:

Code: Select all

ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): /srv/minetest/world/worldmods/protector/init.lua:282: bad argument #1 to 'get_player_by_name' (string expected, got nil)
ERROR[Main]: stack traceback:
ERROR[Main]:       [C]: in function 'get_player_by_name'
ERROR[Main]:       /srv/minetest/world/worldmods/protector/init.lua:282: in function 'is_protected'
ERROR[Main]:       ...advtrains/advtrains/advtrains_luaautomation/pcnaming.lua:37: in function <...advtrains/advtrains/advtrains_luaautomation/pcnaming.lua:26>
I'm on the latest rev (a091ac2e1da07b442c8f58237667287714adc838).
OK, the problem lies primarily in the protector mod. It can't handle playername to be nil in is_protected. Normally, protection mods should deal with this. However, I will resolve why the player name is not passed to the function.
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] [1.7.1]

by orwell » Post

ABJ wrote:orwell, can you make a simpletrains mod as well? That runs on normal rails? We could have steam wagons that burn things similarly to the furnace, chest carts, player carts, and the like? It would be really appreciated as it would probably find a place on more servers as well as maybe even get in the default game? You seem to be a very good modder, that's why I ask. :)
Someone made a mod that allows to link carts, so that they form a simple train. That would be better-suited for your purpose, I think.
There's a YT video, sth. like 'minetest cart linking'
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] [1.7.1]

by orwell » Post

user wrote:hi orwell,

very very nice mod!

It is possible to make wagons like the shared chests?
And it is possible to make an "all drop button"?

mfg user
All drop? I don't know what you mean.
The box wagon has a large inventory, as well as the wood wagon and the tank wagon.
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.7.1]

by mbb » Post

fireglow wrote:Hey, a user just used the PC Naming Tool and the server crashed:

Code: Select all

ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): /srv/minetest/world/worldmods/protector/init.lua:282: bad argument #1 to 'get_player_by_name' (string expected, got nil)
ERROR[Main]: stack traceback:
ERROR[Main]:       [C]: in function 'get_player_by_name'
ERROR[Main]:       /srv/minetest/world/worldmods/protector/init.lua:282: in function 'is_protected'
ERROR[Main]:       ...advtrains/advtrains/advtrains_luaautomation/pcnaming.lua:37: in function <...advtrains/advtrains/advtrains_luaautomation/pcnaming.lua:26>
I'm on the latest rev (a091ac2e1da07b442c8f58237667287714adc838).
I WAS THE USER :-(
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.7.1]

by mbb » Post

orwell wrote:
user wrote:hi orwell,

very very nice mod!

It is possible to make wagons like the shared chests?
And it is possible to make an "all drop button"?

mfg user
All drop? I don't know what you mean.
The box wagon has a large inventory, as well as the wood wagon and the tank wagon.
I and user (and fireglow) are playing on fireglows server user asked me the thing with the chests
I said that he can post this in sheforum and when he is there he could post my idea with the dropp all button too.
so, I have a trainstation on fireglows server and I set hoppers under the rails .
the button could dropp all items of the boxwagonś inventorry
cdb_2fcfab1b41f9

User avatar
fireglow
Member
Posts: 93
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow
Location: Germany

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

by fireglow » Post

Klugscheiss:
It's bad practice to have the advtrains.zip in the git repo.
GitHub makes it easy for you, users can always download the current repo (master branch) using https://github.com/orwell96/advtrains/a ... master.zip

User avatar
Desour
Member
Posts: 1473
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

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

by Desour » Post

Suggestion (perhaps bad): Make an advtrains organization (like the minetest organization). Then the user doesn't have to download also every source file. Then just make the asserts thing an extra repository.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

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

by orwell » Post

fireglow wrote:Klugscheiss:
It's bad practice to have the advtrains.zip in the git repo.
GitHub makes it easy for you, users can always download the current repo (master branch) using https://github.com/orwell96/advtrains/a ... master.zip
I know that. But the git repo also includes the assets directory which is not part of the mod, and AFAIK Github doesn't allow to download parts of the repo as zip.
DS-minetest wrote:Suggestion (perhaps bad): Make an advtrains organization (like the minetest organization). Then the user doesn't have to download also every source file. Then just make the asserts thing an extra repository.
I had made a separate assets repo some time ago, but if I remember right, it was disliked. However, using an organization could do the trick
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.7.1]

by mbb » Post

just a small question: when will the next realice be?
cdb_2fcfab1b41f9

Hupfi1
Member
Posts: 33
Joined: Sat Jun 18, 2016 15:47
GitHub: Hupfi1
IRC: Hupfi1
In-game: Hupfi

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

by Hupfi1 » Post

Hello Orwell,
can you please make a tutorial how to Lua Automation ATC rail / controller ?
If I understand it, I would use it in the new version of the Karsthafen- Map, which will be released soon.
Thank you


my map: viewtopic.php?f=12&t=14962&hilit=karsthafen

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

by orwell » Post

mbb wrote:just a small question: when will the next realice be?
Don't know, but probably next week or so.
EDIT: no maglevs! but power lines.
Last edited by orwell on Fri Mar 24, 2017 20:02, edited 1 time in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

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

by ABJ » Post

Maglev! :)

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

by mbb » Post

orwell wrote:Image
This mod adds good-looking, realistic trains to minetest. It introduces rails that make turns of only 30 degrees instead of 90. The trains can be highly automated.

Until now are supported:
- tracks and switches, based on angles of 30(!) degrees
- wagons that drive on these rails and collide with nodes in the environment(they need 3x3x3 space)
-> a steam engine (with smoke(using latest dev)!)
-> a regular green wagon
-> a box wagon
-> a subway train
-> engine and wagon for a passenger train (the 'japanese train')
- coupling /discoupling of wagons/trains
- trains can travel through unloaded map chunks (but I don't recommend you to do so unless you have them automated with ATC, watch the movie 'unstoppable', it is really hard to stop a fast moving train, even with fly/fast)
- head-up display for train speed and nice controls when sitting in locomotive
- signals and bumpers
- switches and signals controllable by mesecons
- wagons have an owner, only this owner can destroy or discouple wagons.
- Automatic train control (ATC) (currently only static commands, but these are powerful enough)
- Automation with LUA code
- API to add custom wagons
- doors on subway train that can be opened
- Amazing railway automation features. For examples search this topic for videos.

Manual:
https://github.com/orwell96/advtrains/b ... manual.pdf
- Use the 'track' item to place tracks. In most cases it will adjust rails in the direction you need them.
- use the trackworker tool (doctor who sonic screwdriver) to rotate tracks(right-click) and to change normal rails into switches(left-click)
- to overcome heights you need the ramped rails, place them and you will understand.
- right-click switches to change direction
- place locomotives or wagons by picking the item and placing it on a track.
- right-click a wagon or locomotive to sit onto it.
- drive two trains together and they will connect by right-clicking that green icon that appears.
- punch the red couple icon between wagons to discouple them
For the syntax of ATC commands see atc_commands.txt

Have fun!
Spoiler
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Video: https://youtu.be/e1ZrCUz5Vd4
Dependencies: default

Download latest: https://github.com/orwell96/advtrains/r ... trains.zip
(this contains only the files needed to run the mod)
The latest version may contain bugs and should not be used on servers until it has been tested.
Unpack the archive directly into the "mods" directory.
This has changed!

Github: https://github.com/orwell96/advtrains/
License of code: LGPL 2.1
License of media: CC-BY-SA 3.0

Suggested configuration (minetest.conf):

Code: Select all

active_block_range = 5
active_object_send_range_blocks = 5
With lower values, trains appear out of nothing when they approach.
(I got scared many times when trains suddenly stood in the station on my automated subway map without these settings)

Also check out mbb's trains. Just download, add into the modpack and enable them
https://mbblp.github.io/advanced-trains ... index.html
@orvel can you make this map to download
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.7.1]

by mbb » Post

ABJ wrote:Maglev! :)
yeei maglev
cdb_2fcfab1b41f9

User avatar
Andrey01
Member
Posts: 2577
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

Will you add new rains by mbb?

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

by orwell » Post

I will not include more trains in the modpack, but keep this handled like mobs redo instead: a core mod plus some basic trains included, and then individual extension packs that users can download, such as mbb's trainhub or your trains.
When I do the next release, I will clarify this in the forum post. Meanwhile, you and mbb, please post your trains (and only your trains, including neither the 'advtrains' core nor any of the trains already included in the advtrains core pack) as modpacks on the WIP mods forum and get them moved into Mod Releases, I will redirect users there in many ways.
The advantage is that you can do changes and additions independent from me.
I can't upload the map in the video for reasons I don't want to explain. I might create another demo map.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
fireglow
Member
Posts: 93
Joined: Fri Mar 28, 2014 11:36
IRC: fireglow
In-game: fireglow
Location: Germany

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

by fireglow » Post

We've encountered a crash when a player without the atcatl priv open and then closes the advtrains_luaautiomation:dtrack_st window.
According to the users, the crash happens on them closing the window with ESC.

Code: Select all

2017-03-26 00:24:02: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback node_on_receive_fields(): ...advtrains/advtrains/advtrains_luaautomation/atc_rail.lua:89: attempt to index a nil value
2017-03-26 00:24:02: ERROR[Main]: stack traceback:
2017-03-26 00:24:02: ERROR[Main]:       ...advtrains/advtrains/advtrains_luaautomation/atc_rail.lua:89: in function  ...advtrains/advtrains/advtrains_luaautomation/atc_rail.lua:83>

User avatar
Andrey01
Member
Posts: 2577
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

orwell wrote:I will not include more trains in the modpack, but keep this handled like mobs redo instead: a core mod plus some basic trains included, and then individual extension packs that users can download, such as mbb's trainhub or your trains.
When I do the next release, I will clarify this in the forum post. Meanwhile, you and mbb, please post your trains (and only your trains, including neither the 'advtrains' core nor any of the trains already included in the advtrains core pack) as modpacks on the WIP mods forum and get them moved into Mod Releases, I will redirect users there in many ways.
The advantage is that you can do changes and additions independent from me.
I can't upload the map in the video for reasons I don't want to explain. I might create another demo map.
I compile mbb`s trains in one modpack to would can download all trains just, that`s why i do these builds.
My trains i will ever add maybe, but at the moment i don`t can much make my models in Blender and that`s why i am learning gradually

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

by orwell » Post

fireglow wrote:We've encountered a crash when a player without the atcatl priv open and then closes the advtrains_luaautiomation:dtrack_st window.
According to the users, the crash happens on them closing the window with ESC.

Code: Select all

2017-03-26 00:24:02: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback node_on_receive_fields(): ...advtrains/advtrains/advtrains_luaautomation/atc_rail.lua:89: attempt to index a nil value
2017-03-26 00:24:02: ERROR[Main]: stack traceback:
2017-03-26 00:24:02: ERROR[Main]:       ...advtrains/advtrains/advtrains_luaautomation/atc_rail.lua:89: in function  ...advtrains/advtrains/advtrains_luaautomation/atc_rail.lua:83>
This only happens when the rail is uninitialized, means it was placed but no one ever opened the formspec. You can avoid the crash by just right-clicking each new luaautomation rail at least once after placed
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] [1.7.2]

by orwell » Post

1.7.2
fix stuff regarding protection
add basic suppport for train displays
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

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

by ABJ » Post

I think you should add support for different rails. So we could have monorail and maglev.

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

by orwell » Post

There is support. There is just no one who wants to create such rails, because it is sophisticated like hell...
Maybe some day...
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

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

by ABJ » Post

Anyway it could be made simpler?

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

by orwell » Post

It's very simple: Just create models for
- straight rails in 4 rotations(0°, 30°, 45°, 60°)
- curved rails in 4 rotations(0°, 30°, 45°, 60°)
- left switches in 4 rotations(0°, 30°, 45°, 60°) and in either st and cr state
- right switches in 4 rotations(0°, 30°, 45°, 60°) and in either st and cr state
=24 models in total
- some slopes, how you want them

and then send them to me, I can do the rest. That's all, isn't it simple?
The 60° rails are in most(not all) cases mirrors of other rails
How the layout should be, just look in assets/blender/gleis/rail_redo.blend
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

ABJ
Member
Posts: 3015
Joined: Sun Jan 18, 2015 13:02
GitHub: ABJ-MV
In-game: ABJ
Location: In Earth orbit, with a perigee of 1048 km and an apogee of 1337 km and an inclination of 69 degrees.

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

by ABJ » Post

smbdy mk mglv

Post Reply

Who is online

Users browsing this forum: No registered users and 70 guests