[MOD 0.10.2] Automatic Rail Laying Machine

Topics and discussion about specific mods
Molay
Fast Inserter
Fast Inserter
Posts: 177
Joined: Thu May 01, 2014 8:01 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Molay »

Just concerning this one point Ssilk:
"- a better motor should be nice. I had trains with 6 wagons and it begins to get very slow, and not so fun."
Can you not add one or more normal locomotives behind the setup, to help with speed?

And more generally, how much could you suggest this mod in it's current state? Sounds like it's useable but can crash the game? That's not so good :( I'm in a game with the mod resource spawner overhaul and this mod looks perfect for this (with resources so far away) but after reading the comments I'm not sure.

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Boogieman14 »

After the few changes ssilk posted somewhere above, it will at least lay usable rail. As far as I'm aware, there's only one instance that will still give trouble and that's when you drive the train over an existing diagonal piece of track while it has straight rails in the cargo wagon. Having it lay new diagonal track works fine, but if at any time you find the train stops there, pick up the train and remove the last few diagonal pieces laid (there will likely be a few spots where multiple track pieces are stacked on top of each other)

What I tend to do is to lay straight tracks using this train, when I need to make a turn I lay that manually. Then I remove all tracks from the cargo wagon, drive it over the bend and put the straights back in (need to exit/enter the train for it to recognize it has a fresh supply). Doing it that way hasn't caused me any problems so far (and in my latest game, there's a LOT of railroad ;) )
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

Molay
Fast Inserter
Fast Inserter
Posts: 177
Joined: Thu May 01, 2014 8:01 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Molay »

Thanks for the tips! As to what Ssilk posted, I'm not sure how to use a "diff", so I'll be probably using the regular version for now. If it really doesn't work out at all, I suppose I'll need to do some research on what a diff might be^^ Or just go back to manual rail laying, which I guess is a possibility.
Thanks for the heads up on a possible problem + solution :)

edit: I figure that the diff alters the config.lua from the mod, I'm just not sure how to... apply it? Is it like a patch?
If anyone just has a reworked control.lua, would it be possible to post it in full to allow copy+paste of the whole thing? Would be very helpful :)

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Boogieman14 »

Here's mine: https://www.dropbox.com/s/snbuu6tt2kipl ... l.lua?dl=0

Note that apart from the directionality fixes, I made one other change: I increased the range in which trees get removed slightly. And this still has the problems with breaking existing diagonal tracks, I haven't been able to figure out how to fix that yet.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by ssilk »

Molay wrote:Just concerning this one point Ssilk:
"- a better motor should be nice. I had trains with 6 wagons and it begins to get very slow, and not so fun."
Can you not add one or more normal locomotives behind the setup, to help with speed?
It seems to me, that this will not longer add to the speed. I can use two diesel-locos, they will be much, much faster than the combi out of diesel-loco and rail-layer. I've not tested this a lot, but it might be a bug, that two different locos cannot combine their speed, or so.

Perhaps I should use it with two rail layers?... and btw: the second loco to be diesel has the advantage, that if you don't want to lay tracks, you just jump into the second, drive a bit and when you want to lay tracks jump back to the front rail-layer.
And more generally, how much could you suggest this mod in it's current state? Sounds like it's useable but can crash the game? That's not so good :( I'm in a game with the mod resource spawner overhaul and this mod looks perfect for this (with resources so far away) but after reading the comments I'm not sure.
Well, I recommend to save before you use it for strange situations, but I brought it always to run by avoiding things. Sometimes I needed to think a bit about how I could "repair" the missplaced stuff, but well, still fun.

You need to be careful and look quite closely, for example if you see for example the rail layer laying a second rail over an existing (that will block). All in all, after some usage you find some tweaks, how it could be used.

In other words: Only for hardcore players, which like to make really big rails or for players, which want to have phun. :)

EDIT:
Molay wrote:Thanks for the tips! As to what Ssilk posted, I'm not sure how to use a "diff", so I'll be probably using the regular version for now. If it really doesn't work out at all, I suppose I'll need to do some research on what a diff might be^^ Or just go back to manual rail laying, which I guess is a possibility.
Thanks for the heads up on a possible problem + solution :)

edit: I figure that the diff alters the config.lua from the mod, I'm just not sure how to... apply it? Is it like a patch?
If anyone just has a reworked control.lua, would it be possible to post it in full to allow copy+paste of the whole thing? Would be very helpful :)
Explanation: I made a diff in that mentioned post.
http://en.wikipedia.org/wiki/Diff_utility
To use that, you need to patch the sourcecode (yes you guessed right :) ):
http://en.wikipedia.org/wiki/Patch_%28Unix%29
That are unix tools, which are standard installation in nearly every unix, for windows you need for example the unix-tools.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
Adil
Filter Inserter
Filter Inserter
Posts: 945
Joined: Fri Aug 15, 2014 8:36 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Adil »

Boogieman14 wrote:Here's mine: https://www.dropbox.com/s/snbuu6tt2kipl ... l.lua?dl=0

Note that apart from the directionality fixes, I made one other change: I increased the range in which trees get removed slightly. And this still has the problems with breaking existing diagonal tracks, I haven't been able to figure out how to fix that yet.
I was trying to do something with this one too, but any factorio modding by me is currently on halt.
I believe the problem is that it checks the centre of the 2x2 block for presence of a rail, but only one of two possible diagonal rail positions covers that point. Maybe someone who incorporates rail check in two shifted points will claim the victory over this bug.
I do mods. Modding wiki is friend, it teaches how to mod. Api docs is friend too...
I also update mods, some of them even work.
Recently I did a mod tutorial.

User avatar
cpy
Filter Inserter
Filter Inserter
Posts: 839
Joined: Thu Jul 31, 2014 5:34 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by cpy »

Is anyone still working on this mod?

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Boogieman14 »

Kolli hasn't been around for a few weeks and hasn't posted here for three months, so I"m going to guess he isn't. I've taken a bit of a look, but not enough to get to the bottom of the diagonal tracks problem, let alone any improvements that have been suggested (and I've been too busy actually playing Factorio that I couldn't find time dig in :oops: )
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

Molay
Fast Inserter
Fast Inserter
Posts: 177
Joined: Thu May 01, 2014 8:01 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Molay »

Thanks everyone for your help and tips and tricks, and explaining what a diff is^^ I'm not very literate when it comes to unix systems.

I've been using the rail layer a good amount of time now, placing some 3000 or so rails total. With your tips of not starting diagonal and such I seem to have avoided all possible issues. It just all worked fine first try, always, although I'm always carefully setting it up on a straight, horizontal line or vertical rail before I start off - which really isn't much of a price to pay for such an extremely powerful tool.

I wonder if there are chances that something similar will ever be implemented officially. I mean, it was featured in an update on their website afterall, so they must sure think it's awesome :)

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by ssilk »

I'm sure they think about that. But when they do that, they will make it in a way, which enables even more modding and that needs time.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

_Nevar_
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Oct 13, 2014 10:52 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by _Nevar_ »

HI all.
I made some fix and now Rail Laying Machine can placed rail diagonally. https://www.dropbox.com/s/2v8p3jm3rqfpn ... r.zip?dl=0

Some limitation exists:
Can't start laying rail track from curved rail.

Also I plan to add:
- button for turn on/off rail laying
- place big pole near the rail track

Some thoughts:
Maybe it is cool to draw ghost rail by mouse and Rail Laying Machine will be place rail when you drive near or on this ghost track?

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by ssilk »

:) will test...
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

_Nevar_
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Oct 13, 2014 10:52 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by _Nevar_ »

Found and fix bug in my modification.
Also add placing big electric pole (if it in cargo wagon). Not very well tested, but it some time working :D

bump version to 0.1.0.

https://www.dropbox.com/s/2v8p3jm3rqfpn ... r.zip?dl=0

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by ssilk »

What about using github?
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by ssilk »

Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Boogieman14 »

Rail laying with the new version seems to work well, thanks :)
However I'm noticing a very 'choppy' gameplay on my big map. No idea what causes it, I don't notice it on a newly created map with the same mods but in my ongoing game it seems like the game just freezes briefly for each rail segment that needs to be placed (that save is now 170MB though :shock: ). It's not gamebreaking, but it is very noticable and somewhat annoying.

And as an enhancement request, I would love for the rail layer to be able to not only place the track it's driving on right now, but also a parallel track at a configurable distance (I like my track to be placed with 3 2x2 blocks inbetween).
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

_Nevar_
Burner Inserter
Burner Inserter
Posts: 11
Joined: Mon Oct 13, 2014 10:52 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by _Nevar_ »

Thanks for test.

I also notice freezing even in fresh game. Place rail by diagonal in max speed and freezing come.
I don't really know what make freezing (game because track build to fast or mod script do some crazy stuff).
But if you placing semaphore on track, or make turn, freezing happening less often. I need more testing.
Don't remember freezing when drive diesel locomotive and place rail before it.
It makes me think that the problem is in mod script. I will try optimize this situation.

It will be wonderful if you can give me save your current game near rail laying machine.
So I load save, jump in and drive to see freezing.

I will do version with addition track on left/right + offset (configured via config.lua in mod folder)
and make post about that.

Boogieman14
Filter Inserter
Filter Inserter
Posts: 770
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Boogieman14 »

Here's a save where you're stood next to the raillayer with a plentiful supply of rail in the cargo wagons and a relatively clear path heading west and southwest.
I've included the mods in a separate zip, although apart from raillayer you probably won't need any of them for this test.

Save: https://www.dropbox.com/s/0thcunie792sp ... o.zip?dl=0 (155mb)
Mods: https://www.dropbox.com/s/k7gxwmiouikvu ... s.zip?dl=0 (20mb)

The choppiness is mostly noticable on diagonal track, less so on horizontal or vertical. I also did quite a bit of rail laying with the original mod (the one that messed up when driving over existing diagonal track) and I don't think I've noticed that choppiness there.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

puddlejumper
Burner Inserter
Burner Inserter
Posts: 5
Joined: Tue Oct 21, 2014 7:21 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by puddlejumper »

The "choppiness" is probably due to the game recalculating the signal blocks and track paths every time a rail is placed. It would affect diagonal more because 2 tracks need to be placed at once instead of 1 for horizontal and vertical.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by ssilk »

Hm. Perhaps they should be placed not at the same time, to let the game time to do the recalculation.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Mods”