[Mod] Advanced Trains [advtrains] [2.1.1]

User avatar
orwell
Member
Posts: 818
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

Chemnitzer Linux-Tage

I will be present at the Chemnitzer Linux-Tage on 14.-15. March. The event takes place in Chemnitz, Saxony. The language is mostly german.

Here's the german forum thread: viewtopic.php?f=21&t=24011

You are very welcome to participate. I invite you to discuss with me about ideas and issues with advtrains.

EDIT: The CLT have been cancelled.
Last edited by orwell on Tue Mar 10, 2020 21:51, edited 1 time in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
Blockhead
Member
Posts: 19
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead
Location: Land Down Under

Train Copy+Paste Tool

by Blockhead » Post

As per this feature request. I've added a tool to copy and paste trains.

GitHub repository: https://github.com/Montandalar/advtrains
Branch: copytrains

Edit: Has now been merged into master. Go furth and multiply (your trains)!

beaufils
New member
Posts: 6
Joined: Sun Oct 06, 2019 15:06

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

by beaufils » Post

I use minetest-server on Debian buster taken from the buster-backports archive. It is version 5.1.1+repack-1~bpo10+1.

I installed the advtrains from git master branch.

Each time I start the server I get a lot of warnings in the log file, some are from advtrains. For instance these :

Code: Select all

2020-03-23 23:19:58: WARNING[Main]: intllib.Getter is deprecated. Please use intllib.make_gettext_pair instead. (called from ...etest-server/.minetest/mods/advtrains/advtrains/init.lua:27) (at ...etest-server/.minetest/mods/advtrains/advtrains/init.lua:27)
2020-03-23 23:19:58: WARNING[Main]: intllib.Getter is deprecated. Please use intllib.make_gettext_pair instead. (called from ....minetest/mods/advtrains/advtrains_train_subway/init.lua:3) (at ....minetest/mods/advtrains/advtrains_train_subway/init.lua:3)
2020-03-23 23:19:58: WARNING[Main]: intllib.Getter is deprecated. Please use intllib.make_gettext_pair instead. (called from .../.minetest/mods/advtrains/advtrains_train_steam/init.lua:3) (at .../.minetest/mods/advtrains/advtrains_train_steam/init.lua:3)
2020-03-23 23:19:58: WARNING[Main]: intllib.Getter is deprecated. Please use intllib.make_gettext_pair instead. (called from .../.minetest/mods/advtrains/advtrains_train_japan/init.lua:3) (at .../.minetest/mods/advtrains/advtrains_train_japan/init.lua:3)
2020-03-23 23:19:58: WARNING[Main]: intllib.Getter is deprecated. Please use intllib.make_gettext_pair instead. (called from ...etest/mods/advtrains/advtrains_train_industrial/init.lua:4) (at ...etest/mods/advtrains/advtrains_train_industrial/init.lua:4)
2020-03-23 23:19:58: WARNING[Main]: intllib.Getter is deprecated. Please use intllib.make_gettext_pair instead. (called from ...minetest/mods/advtrains/advtrains_luaautomation/init.lua:7) (at ...minetest/mods/advtrains/advtrains_luaautomation/init.lua:7)
2020-03-23 23:19:58: WARNING[Main]: intllib.Getter is deprecated. Please use intllib.make_gettext_pair instead. (called from /usr/share/games/minetest/mods/unifieddyes/init.lua:39) (at /usr/share/games/minetest/mods/unifieddyes/init.lua:39)
Any ideas how to get rid how them?

beaufils
New member
Posts: 6
Joined: Sun Oct 06, 2019 15:06

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

by beaufils » Post

Removing the minetest-mod-intllib package (and thus the corresponding mods) remove a lot of warning message, but I still have the next one:

Code: Select all

2020-03-23 23:37:32: WARNING[Main]: Undeclared global variable "intllib" accessed at ...minetest/mods/advtrains/advtrains_luaautomation/init.lua:6
Is it that serious?

User avatar
theFox
Member
Posts: 185
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

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

by theFox » Post

beaufils wrote:Removing the minetest-mod-intllib package (and thus the corresponding mods) remove a lot of warning message, but I still have the next one:

Code: Select all

2020-03-23 23:37:32: WARNING[Main]: Undeclared global variable "intllib" accessed at ...minetest/mods/advtrains/advtrains_luaautomation/init.lua:6
Is it that serious?
It means that the mod is trying to use intllib and fails at doing so.
But if you don't get any errors it is probably just a check if intllib available, so it is not serious.
Modders can remove this warning by using

Code: Select all

if rawget(_G,"intllib") then
  -- it is avalible
end
my mods and subgames (ง'̀-'́)ง

User avatar
orwell
Member
Posts: 818
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

Oof.

Yes, advtrains used to use intllib. But since 2 years I haven't updated any of the strings or the intllib code.
I opened an issue, and will remove the old intllib code soon. In the long term, I should re-add localization for all parts of the mod.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
Hume2
Member
Posts: 534
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

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

by Hume2 » Post

You can't assign a TCB to a rail switch. However, you can assign it to a straight track and then use the track worker tool to change it to switch. The same works with influence points.
If you lack the reality, go on a trip or find a job.

User avatar
Blockhead
Member
Posts: 19
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead
Location: Land Down Under

Old version on Content DB doesn't work on windows

by Blockhead » Post

The version on the content DB still has this line:

Code: Select all

os.rename(temppath, advtrains.fpath.."_"..name)
which doesn't work on windows, and was fixed in commit 1bb1d825f46af3562554c12fba35a31b9f7973ff by replacing it with a call to the minetest API. I found this out when piet was trying to use it and asked about the error on linuxforks. Given that the current version doesn't work, can we pretty please get a new version on the content DB soon? You shouldn't need git to install a working advtrains if you use windoze. And please tag the releases on git going forwards. Thanks :)

beaufils
New member
Posts: 6
Joined: Sun Oct 06, 2019 15:06

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

by beaufils » Post

orwell wrote:I opened an issue, and will remove the old intllib code soon. In the long term, I should re-add localization for all parts of the mod.
Thank's for that and all your work. I will subscribe to the issue.
Last edited by beaufils on Tue Mar 31, 2020 14:21, edited 1 time in total.

beaufils
New member
Posts: 6
Joined: Sun Oct 06, 2019 15:06

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

by beaufils » Post

In my server log I get a lot of such messages :

Code: Select all

ACTION[Server]: [advtrains]Train 425468 get_occupations requested off-track -3
I guess some users misplaced a train.

Is it possible to easily find where or simply to remove them via some minetest commands?

beaufils
New member
Posts: 6
Joined: Sun Oct 06, 2019 15:06

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

by beaufils » Post

The bugtracker does not seems to offer a way to follow an issue. I will check your announcement here.

Thank's again.

BTW: the SSL/TLS certificat of the bugtracker web site has expired.

Joachim
New member
Posts: 1
Joined: Tue Mar 31, 2020 17:16
In-game: Jokke
Location: Finland

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

by Joachim » Post

This is a cool mod. I downloaded and started to build tracks a couple of days ago but hit a snag now when I try to create routes.

How should one delete TCB after they have been assigned track sections and signals?

I did remove it without removing signals and track sectons and now I seem to have ghost TCBs on several places.

Any way to clean up my mess?

User avatar
Hume2
Member
Posts: 534
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

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

by Hume2 » Post

I'm now trying to optimise pathfinding. The idea is that the path will contain only the useful track pieces like signal influence points, curves, switches etc. but not straight tracks. I already implemented the graph and all necessary functions around it but there are still many bugs. You can see my progress here: https://gitlab.com/Hume2/advtrains/-/tree/graph (branch graph) I don't know why it's so buggy when the only thing I actually changed was that I don't put the nearest track piece to the path but a farther one. It looks like I don't fully understand the rest of the code. Maybe you will identify and fix the bugs faster than me.
If you lack the reality, go on a trip or find a job.

User avatar
JackGruff
Member
Posts: 14
Joined: Sat Sep 21, 2013 21:44

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

by JackGruff » Post

A link to the tutorial should be in the OP and perhaps on the wiki landing page.

User avatar
orwell
Member
Posts: 818
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

beaufils wrote:In my server log I get a lot of such messages :

Code: Select all

ACTION[Server]: [advtrains]Train 425468 get_occupations requested off-track -3
I guess some users misplaced a train.

Is it possible to easily find where or simply to remove them via some minetest commands?
quick hack using worldedit lua command:

Code: Select all

//lua minetest.chat_send_all(dump(advtrains.trains["425468"].last_pos))
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
orwell
Member
Posts: 818
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

Joachim wrote:This is a cool mod. I downloaded and started to build tracks a couple of days ago but hit a snag now when I try to create routes.

How should one delete TCB after they have been assigned track sections and signals?

I did remove it without removing signals and track sectons and now I seem to have ghost TCBs on several places.

Any way to clean up my mess?
Uh, yes, this is very buggy.
- You can not remove a TCB when a signal is assigned to it. Click "unassign signal" on the bottom of the signal dialog
- When you have a "ghost TCB" i.e. a TCB on a rail but no yellow TCB block anymore, you can remove it by placing down a new TCB block and assigning (punching) it to the same location as the ghost TCB, then digging the TCB block again.
- If you really screwed it all up and your world doesn't have any interlocking stuff except the broken things, delete all the advtrains_interlocking_* files from the world folder.

I wonder why there is no issue for this.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

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

by Hupfi1 » Post

Hey Guys,
if you want to see a map mostly based on advtrains, just download my map "Karsthafen Subway"
Image
viewtopic.php?f=12&t=14962

User avatar
HimbeerserverDE
New member
Posts: 3
Joined: Thu May 14, 2020 07:10
GitHub: HimbeerserverDE
IRC: HimbeerserverDE
In-game: HimbeerserverDE
Contact:

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

by HimbeerserverDE » Post

When can we expect to see distant signals?

EDIT: I managed to implement this myself. If you want my modified file, please let me know, then I'll publish it.

User avatar
Blockhead
Member
Posts: 19
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead
Location: Land Down Under

Distant Signals

by Blockhead » Post

HimbeerserverDE wrote:please let me know, then I'll publish it.
Please do, that would be interesting to see.

User avatar
HimbeerserverDE
New member
Posts: 3
Joined: Thu May 14, 2020 07:10
GitHub: HimbeerserverDE
IRC: HimbeerserverDE
In-game: HimbeerserverDE
Contact:

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

by HimbeerserverDE » Post

I added this somewhere around line 470 in advtrains_interlocking/signal_api.lua:

Code: Select all

if suppasp.dst.free == nil then
	local st = 2
	if isasp and not isasp.dst.free then st = 1 end
	form = form.."label[2.3,3;== Distant Signal ==]"
	form = form.."dropdown[3,3.5;2;dst_free;danger,free;"..st.."]"
end
In line 529, I replaced

Code: Select all

free = true,
with

Code: Select all

free = usebool(psl.suppasp.dst.free, fields.dst_free, "free"),

User avatar
orwell
Member
Posts: 818
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

This makes the distant signal aspect settable from the menu, right.
However, I've reworked that dialog anyways in an upcoming merge (currently branch new_lzb).

The problem is rather that there is no useful concept to use distant signals, like linking it to a main signal. When done right, a distant signal should announce the aspect of the next main signal on the line.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
HimbeerserverDE
New member
Posts: 3
Joined: Thu May 14, 2020 07:10
GitHub: HimbeerserverDE
IRC: HimbeerserverDE
In-game: HimbeerserverDE
Contact:

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

by HimbeerserverDE » Post

Great to see you're updating this! I've been waiting for this feature for ages. I really like the idea of interlocking systems. What about a seperate simple distant signal (not a Ks one)? Also I noticed one problem: I cannot activate the new_lzb version for some reason.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests