[Mod] Advanced Trains [advtrains] [1.13]

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

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

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

by Andrey01 » Sat May 12, 2018 18:06

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?
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

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

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

by Andrey01 » Sat May 12, 2018 18:26

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

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

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

by Phoenixflo44 » Sat May 12, 2018 18:32

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

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

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

by Andrey01 » Sat May 12, 2018 18:41

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.
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

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

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

by Phoenixflo44 » Sat May 12, 2018 18:57

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.
 

User avatar
orwell
Member
 
Posts: 680
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

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

by orwell » Mon May 14, 2018 08:52

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: 510
Joined: Fri Jul 28, 2017 15:01
Location: Behind my PC, in Germany
In-game: Phoenixflo44

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

by Phoenixflo44 » Mon May 14, 2018 17:18

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
 

User avatar
orwell
Member
 
Posts: 680
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

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

by orwell » Tue May 29, 2018 14:03

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
Member
 
Posts: 539
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob

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

by v-rob » Tue May 29, 2018 23:32

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?
 

User avatar
orwell
Member
 
Posts: 680
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

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

by orwell » Wed May 30, 2018 09:21

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: 30
Joined: Thu Feb 15, 2018 15:24
Location: Germany | Deep South East
GitHub: maxxmodding
In-game: maxx or MrNobody

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

by maxx » Wed May 30, 2018 10:37

And what about the problem with restarting the server?
visit https://forum.minetest.net/viewtopic.php?f=9&t=19743 to get more information about trainblocks
 

User avatar
orwell
Member
 
Posts: 680
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

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

by orwell » Wed May 30, 2018 11:25

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 » Thu May 31, 2018 15:51

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
 

User avatar
orwell
Member
 
Posts: 680
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

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

by orwell » Thu May 31, 2018 21:25

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
 

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

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

by imcasper » Tue Jun 05, 2018 00:33

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: 680
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

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

by orwell » Tue Jun 05, 2018 06:00

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 » Tue Jun 05, 2018 09:46

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: 2123
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

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

by Andrey01 » Wed Jun 06, 2018 07:16

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

User avatar
maxx
Member
 
Posts: 30
Joined: Thu Feb 15, 2018 15:24
Location: Germany | Deep South East
GitHub: maxxmodding
In-game: maxx or MrNobody

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

by maxx » Wed Jun 06, 2018 08:01

3. Or you could increase the number of tracks which can be on one stack. Like in the currency mod.
visit https://forum.minetest.net/viewtopic.php?f=9&t=19743 to get more information about trainblocks
 

User avatar
gpcf
Member
 
Posts: 251
Joined: Fri May 27, 2016 10:48
In-game: gabriel

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

by gpcf » Wed Jun 06, 2018 08:58

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

User avatar
orwell
Member
 
Posts: 680
Joined: Wed Jun 24, 2015 18:45
Location: Raxacoricofallapatorius
In-game: orwell

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

by orwell » Thu Jun 07, 2018 09:37

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: 5455
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

PreviousNext

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 2 guests