[Mod] Advanced Trains [advtrains] [2.4.3]

User avatar
Phoenixflo44
Member
Posts: 639
Joined: Fri Jul 28, 2017 15:01
In-game: EvilPhoenix
Location: Behind my PC, in Germany

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

by Phoenixflo44 » Post

I'm looking forward to a new train
Spoiler
I hate my life

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

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

by Andrey01 » Post

Possibly here is an something error. I am trying to connect 7th wagon with other ones. But when i switch direction from "F" to "R" to drive back a bit, it is switching to "F" again itself. Why so?

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

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

by Andrey01 » Post

Still question: how many can i connect wagons with each other? For example, japan train.

User avatar
Phoenixflo44
Member
Posts: 639
Joined: Fri Jul 28, 2017 15:01
In-game: EvilPhoenix
Location: Behind my PC, in Germany

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

by Phoenixflo44 » Post

Many. If I want to connect one wagon to another, it just goes through. That is also a mistake
Spoiler
I hate my life

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

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

by Andrey01 » Post

Phoenixflo44 wrote:Many. If I want to connect one wagon to another, it just goes through. That is also a mistake
Now all works fine after i restarted the server. Also, still strange error was when train was stopping at once and it said the train off track, but actually this train was not off track as there were further laid rails.

User avatar
Phoenixflo44
Member
Posts: 639
Joined: Fri Jul 28, 2017 15:01
In-game: EvilPhoenix
Location: Behind my PC, in Germany

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

by Phoenixflo44 » Post

With me this is so if the train cannot continue because no rails are placed, I place some and want to continue but he still says it is not there.
Spoiler
I hate my life

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

Whenever you placed or removed rails near a train, it may be necessary to run the /at_reroute command.
This requirement will eventually be removed in a future update.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
Phoenixflo44
Member
Posts: 639
Joined: Fri Jul 28, 2017 15:01
In-game: EvilPhoenix
Location: Behind my PC, in Germany

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

by Phoenixflo44 » Post

orwell wrote:Whenever you placed or removed rails near a train, it may be necessary to run the /at_reroute command.
This requirement will eventually be removed in a future update.
OK well
Spoiler
I hate my life

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

Hello guys.
I've just completed a fundamental rewrite of large parts of the advtrains code. I've tested some stuff myself already, but need you to help me testing before I can merge it to the master branch safely.

The rewrite is located on the 'tss' branch: https://github.com/orwell96/advtrains/tree/tss

Please download this version, make a backup copy of your world and try out if everything works as before. If it does not, please let me know either here or on github.

Also, ATM the documentation is still incomplete and partly outdated, so do not rely on what's written there. Code comments are a better alternative.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
v-rob
Developer
Posts: 970
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

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

by v-rob » Post

orwell wrote:Hello guys.
I've just completed a fundamental rewrite of large parts of the advtrains code. I've tested some stuff myself already, but need you to help me testing before I can merge it to the master branch safely.

The rewrite is located on the 'tss' branch: https://github.com/orwell96/advtrains/tree/tss

Please download this version, make a backup copy of your world and try out if everything works as before. If it does not, please let me know either here or on github.

Also, ATM the documentation is still incomplete and partly outdated, so do not rely on what's written there. Code comments are a better alternative.
So, what are the major differences?
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

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

There are no real differences noticable for users, except that some bugs that existed for a long time might now be fixed (while new bugs were introduced). I needed to simplify and clean up a lot of code in order to start with my new signalling and automatic train operation system.
One of the major changes is that train coupling works a lot better now, and that trains do no longer take the wrong track when they reversed behind turnouts, but else there isn't much more noticable on the user side.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
maxx
Member
Posts: 44
Joined: Thu Feb 15, 2018 15:24
GitHub: maxhipp
In-game: maxx or max
Location: Germany | Bavaria

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

by maxx » Post

And what about the problem with restarting the server?
Stay safe! | Don't forget the planet

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

Even before this, I wasn't able to reproduce this problem. But you can tell me if it still exists.
If it does, it might be printing some sort of warning now, if it's caused by what I think.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

I'll say for a start - the mod provides the best train in the game :-)

After restarting the server, really a lot of problems. Specially created a test server:

"creative-mode"
"no damage"
landgen=flat, seed=123,
advtrains mod
unified inventory mod

So, the first start (and only first start) I get an error:
2018-05-31 17:59:34 ERROR [Server]: Failed to read advtrains_luaautomation save data from file c: \ Games \ minetest-0.4.16-win64 \ bin \ .. \ worlds \ train3 / advtrains_luaautomation: c: \ Games \ minetest-0.4.16-win64 \ bin \ .. \ worlds \ train3 / advtrains_luaautomation: No such file or directory
Also eash launch warnings (if you need a mesecon - it is worth pointing in the dependencies):
2018-05-31 03:03:33: WARNING[Main]: Undeclared global variable "mesecon" accessed at ...n64\bin\..\mods\advtrains\advtrains_train_track\init.lua:150
2018-05-31 03:03:33: WARNING[Main]: Undeclared global variable "mesecon" accessed at ...4\bin\..\mods\advtrains\advtrains_luaautomation\init.lua:36
Then I build a part of the road (from 0;8;0 to about -260;8;0) and I leave the game (and close server).
Start server again, fly to (0;0;0), and start build road to (260;8;0)... But error:
2018-05-31 18:11:26: ACTION[Server]: Mike places node default:aspen_wood at (8,8,0)
2018-05-31 18:11:26: ACTION[Server]: Mike places node default:aspen_wood at (7,8,0)
2018-05-31 18:11:38: WARNING[Server]: [advtrains]Lua Error occured: attempt to index a nil value
2018-05-31 18:11:38: WARNING[Server]: [advtrains]stack traceback:
...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:43: in function <...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:41>
[C]: in function 'swap_node'
...-0.4.16-win64\bin\..\mods\advtrains\advtrains/nodedb.lua:136: in function 'swap_node'
...16-win64\bin\..\mods\advtrains\advtrains/trackplacer.lua:213: in function 'placetrack'
...16-win64\bin\..\mods\advtrains\advtrains/trackplacer.lua:285: in function <...16-win64\bin\..\mods\advtrains\advtrains/trackplacer.lua:269>
[C]: in function 'xpcall'
...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:41: in function <...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:38>
2018-05-31 18:11:38: WARNING[Server]: [advtrains]Restoring saved state in 1 second...
2018-05-31 18:11:39: ACTION[Server]: [advtrains]nodedb: read 216 nodes.
2018-05-31 18:11:39: ACTION[Server]: [advtrains][load_all]Loaded advtrains save files
2018-05-31 18:11:39: WARNING[Server]: [advtrains]Reload successful!
2018-05-31 18:11:39: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod '' in callback environment_Step(): ...-0.4.16-win64\bin\..\mods\advtrains\advtrains/nodedb.lua:245: attempt to index local 'ndbnode' (a nil value)
2018-05-31 18:11:39: ERROR[Main]: stack traceback:
2018-05-31 18:11:39: ERROR[Main]: ...-0.4.16-win64\bin\..\mods\advtrains\advtrains/nodedb.lua:245: in function 'restore_all'
2018-05-31 18:11:39: ERROR[Main]: ...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:34: in function 'func'
2018-05-31 18:11:39: ERROR[Main]: ...es\minetest-0.4.16-win64\bin\..\builtin\common\after.lua:18: in function <...es\minetest-0.4.16-win64\bin\..\builtin\common\after.lua:4>
2018-05-31 18:11:39: ERROR[Main]: ...s\minetest-0.4.16-win64\bin\..\builtin\game\register.lua:412: in function <...s\minetest-0.4.16-win64\bin\..\builtin\game\register.lua:392>
2018-05-31 18:11:39: ERROR[Main]: stack traceback:
2018-05-31 18:11:39: ACTION[Server]: Mike leaves game. List of players:
2018-05-31 18:11:39: ACTION[Server]: [advtrains]nodedb: read 216 nodes.
2018-05-31 18:11:39: ACTION[Server]: [advtrains][load_all]Loaded advtrains save files
2018-05-31 18:11:39: WARNING[Server]: [advtrains]Reload successful!
Ok... Start play again:
2018-05-31 18:20:14: WARNING[Server]: [advtrains]Node Database corruption, couldn't determine node to set at (24,9,0)
I'm not sure, but it was exactly this point that caused the crash. Let's build on. Completed without adventure before (260; 8; 0), put a Japanese train (only one engine). Went to it. Go! Near the point (-31; 8; 0) - fully stopped (train off track). Probably the train began to slow down where the rails were built before the server was restarted.
2018-05-31 18:28:50: WARNING[Server]: [advtrains]Train 410218 get_occupations requested off-track 287
2018-05-31 18:28:50: WARNING[Server]: [advtrains]Train 410218 get_occupations requested off-track 284
I changed the direction of travel to "R", then to "F". Message "train off track" lost. We can go (moving to (-260;8;0)). Ok. Restart again, and again errors (show only last messages):
2018-05-31 18:37:23: WARNING[Server]: [advtrains]Restoring saved state in 1 second...
2018-05-31 18:37:24: ACTION[Server]: [advtrains]nodedb: read 45 nodes.
2018-05-31 18:37:24: ACTION[Server]: [advtrains][load_all]Loaded advtrains save files
2018-05-31 18:37:24: WARNING[Server]: [advtrains]Reload successful!
2018-05-31 18:37:24: ACTION[Server]: [advtrains]Restore node database: Replaced 0 nodes, removed 0 ghost nodes.
2018-05-31 18:37:24: WARNING[Server]: [advtrains]Train 410218 : Can't initialize: Waiting for the (yet unloaded) node at (-253,9,0) to be loaded.
2018-05-31 18:37:24: WARNING[Server]: [advtrains]Lua Error occured: ...st-0.4.16-win64\bin\..\mods\advtrains\advtrains/path.lua:246: bad argument #1 to 'atfloor' (number expected, got nil)
2018-05-31 18:37:24: WARNING[Server]: [advtrains]stack traceback:
...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:43: in function <...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:41>
[C]: in function 'atfloor'
...st-0.4.16-win64\bin\..\mods\advtrains\advtrains/path.lua:246: in function 'path_get_index_by_offset'
....16-win64\bin\..\mods\advtrains\advtrains/trainlogic.lua:172: in function 'recalc_end_index'
....16-win64\bin\..\mods\advtrains\advtrains/trainlogic.lua:242: in function 'train_ensure_init'
....16-win64\bin\..\mods\advtrains\advtrains/trainlogic.lua:71: in function 'mainloop_trainlogic'
...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:323: in function <...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:309>
[C]: in function 'xpcall'
...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:41: in function <...st-0.4.16-win64\bin\..\mods\advtrains\advtrains\init.lua:38>
...s\minetest-0.4.16-win64\bin\..\builtin\game\register.lua:412: in function <...s\minetest-0.4.16-win64\bin\..\builtin\game\register.lua:392>
2018-05-31 18:37:24: ACTION[Server]: [advtrains]i: CP Position Dir CN ->Dist->
2018-05-31 18:37:24: WARNING[Server]: [advtrains]Restoring saved state in 1 second...
2018-05-31 18:37:25: ACTION[Server]: [advtrains]nodedb: read 45 nodes.
2018-05-31 18:37:25: ACTION[Server]: [advtrains][load_all]Loaded advtrains save files
2018-05-31 18:37:25: WARNING[Server]: [advtrains]Reload successful!
2018-05-31 18:37:25: ACTION[Server]: [advtrains]Restore node database: Replaced 0 nodes, removed 0 ghost nodes.
Enter in train, move... And again train stopped in the middle of the road without visible obstacles:
2018-05-31 18:38:20: ACTION[Server]: Mike right-clicks object 9: LuaEntitySAO at (-255.487,9,0)
2018-05-31 18:38:30: WARNING[Server]: [advtrains]Train 410218 get_occupations requested off-track 52
2018-05-31 18:38:30: WARNING[Server]: [advtrains]Train 410218 get_occupations requested off-track 49

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

correction for "track-placer":
https://github.com/orwell96/advtrains/pull/121

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

OK, thanks for testing. I can unfortunately look over the errors next week only.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

And very important correct read-write:
https://github.com/orwell96/advtrains/pull/122

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

1. How difficult is it to make need for fuel for train? For example, make a wagon like a chest, with coal, coal dust, wood, planks, etc. and is automatically taken for fuel.

2. Also I want different materials for rails and sleepers. Ideally, you can choose an arbitrary combination:
For the rail - copper, stainless steel, iron.
For sleepers - different groups of planks.
And visual difference of course.

3. And want more expensive recipe (around 5-10 rails instead of 50). Or at least 49 (middle-button 49+49 < 99).

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. not problematic, one just has to code it
2. every combination would require registering 40 new nodes (4xst,4xcr,8xswl,8xswr,4xatc,8xdet,4xlatc) -> not so good
3. on the recipe, what do the others think? I consider 5-10 a bit too expensive, maybe 33 or so(3*33 = 99)
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

1. That would be very cool.
2. I think this is a question of description. I want to try to write a code to specify 10 elements. And the rest will turn out to be a turn.
You can also get by without a visual difference (for different materials).
3. I have 3000 cells built - this is (3000 cell => 50 rail x 60 recipe => 360 iron) with a total of 360 iron. You can safely do up to 10 times more expensive (see for sample mod technic).

4. If you can easily make, a speed limit for rail, then you can make for example two classes of rails:
cheap (33 pieces from the recipe, 36 km / h)
expensive (5 pieces from the recipe, 72 km / h)

PS It may also be better to take the price or price factor in the config.

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

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

by Andrey01 » Post

Orwell, please, move your Advanced Trains mod to content.minetest.net and also mpd mod.

User avatar
maxx
Member
Posts: 44
Joined: Thu Feb 15, 2018 15:24
GitHub: maxhipp
In-game: maxx or max
Location: Germany | Bavaria

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

by maxx » Post

3. Or you could increase the number of tracks which can be on one stack. Like in the currency mod.
Stay safe! | Don't forget the planet

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

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

by gpcf » Post

or decrease the yield of the recipe by 1, so you can craft tracks two times.

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

Andrey01 wrote:Orwell, please, move your Advanced Trains mod to content.minetest.net and also mpd mod.
I remember having done this 2 weeks ago.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

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

by rubenwardy » Post

Advtrains is already there
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

Post Reply

Who is online

Users browsing this forum: No registered users and 22 guests