[MOD 0.10.2] Automatic Rail Laying Machine

Topics and discussion about specific mods
Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Dark »

Doskan wrote:Is there a way to solve this? i cant load my game, tried removing the mod but isnt working either
It's related to https://forums.factorio.com/forum/vie ... f=7&t=4875

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've been playing around with this mod now for hundrets of thousands of rails. This mod is complete fun and should be added to the vanilla game. :)

Some suggestions:
- Slows down for me for diagonal rails. A bit tweaking needed here.
- it is complicated to make exact curves. For example I drive through swamp-land, sometimes only one rail-wide. Then I need to be quite exact. Or laying out a circle is a mess with it. :) There are some ways thinkable, perhaps we should be able to set "marks", which the rail layer automatically tries to hit?
Another would be to see more exact, when the rail would be bowed. Some kind of "mark", which shows the player: I would place it straight and then a curve. Or there is a mode, where I can steer it with the wasd-keys. Again: Some more are thinkable. The point is just to be able to control the rail layout.
- It should be able to be switched of, cause it is complicated to drive home with this after you made your job or want to refill, when it always wants to place tracks. :)
- If I placed a wrong track I would like to delete it, as long as I'm in the train, cause getting out, running to the wrong track, mining it and return is too slow.

More features could be added, for example some kind of portable roboport to place blueprints to create railway station... like https://forums.factorio.com/forum/vie ... =32&t=4232
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

safan
Fast Inserter
Fast Inserter
Posts: 126
Joined: Mon Dec 23, 2013 7:26 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by safan »

i haven't bothered with automatic curves anymore after the few first times:
I just fill it with straight rails and do the curves manually

i wish it would do curves only after an explicit command, and that you could say "45 90 or 180 degrees"

imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: [MOD 0.10.x] Automatic Rail Laying Machine

Post by imajor »

LinkinParkx3 wrote:I still get an error :/
Same here:

---------------------------
Error
---------------------------
...majori\AppData\Roaming\Factorio\mods\rail-layer|data.lua:88: attempt to call global 'rolling_stock_back_light' (a nil value)
---------------------------
OK
---------------------------

I was using version 0.9.8, then I downloaded and installed the latest experimental (0.10.6) it started and worked properly.

BTW this is an extremely good mod. When I started playing factorio about a while ago, I thought that the biggest problem is that it is hard to lay down the tracks. So I started looking around for the possibility to make a script or mod which would help with that, and then I found your mod. Thanks a lot!

imajor
Fast Inserter
Fast Inserter
Posts: 164
Joined: Thu Aug 14, 2014 11:02 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by imajor »

I have a question: wouls it be possible to control the direction of the track the same way as you control the direction the train goes when you drive it? Instead of the mouse cursor? So with the 'A' and 'D' keys? That way it would be easier to create loops.

User avatar
sbroadbent
Long Handed Inserter
Long Handed Inserter
Posts: 74
Joined: Thu May 08, 2014 11:58 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by sbroadbent »

What I like about this mod is that it automatically clears trees in it's path, while laying down rail. Makes laying rail down much easier than having to get out of the normal locomotive to clear the trees. What I don't so much like so much is controlling how or when it makes curves. My best advice is to go slow and manually place corners by hand.

A few questions:

For Rail Laying trains that have more than one cargo wagon, if it runs out of rails in the first cargo wagon, will it grab them from other cargo wagons? Also, in the event that someone is using the Cargo Wagon Inventory Upgrade mod do you have to use the original cargo wagon, or can the Rail Layer use rails from any wagon it's hauling?

Also, is it a game limitation that you can't 'mine' anything such as removing track, buildings or other things while inside a car or other vehicle? Would be nice to be able to remove sections of track while still being inside the machine, so if there was a misplaced piece of track, you could remove it without having to jump out.
SB Gaming Youtube Channel:
ImageImage
Also includes series for Cities Skylines, Prison Architect, Euro Truck Simulator 2, Far Cry 2, and Test Drive Unlimited 2.

keyboardhack
Filter Inserter
Filter Inserter
Posts: 478
Joined: Sat Aug 23, 2014 11:43 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by keyboardhack »

sbroadbent wrote:What I like about this mod is that it automatically clears trees in it's path, while laying down rail. Makes laying rail down much easier than having to get out of the normal locomotive to clear the trees. What I don't so much like so much is controlling how or when it makes curves. My best advice is to go slow and manually place corners by hand.
You don't have to go out of the train. you can use your shotgun to remove the trees while you place down tracks in the train.

Haven't tried this mod yet, but if it's as good as it looks like it's, then it's gonna save me a lot of trouble :D
Waste of bytes : P

zyrus
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Aug 16, 2014 11:24 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by zyrus »

Hi,

your machine sees to be a bit broken in 0.10.9.

Driving NE deploys NW-SE rails.
Driving NW deploys NE-SW rails.

/Z

User avatar
Brathahn
Fast Inserter
Fast Inserter
Posts: 121
Joined: Sat Aug 02, 2014 1:50 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Brathahn »

i can confirm this.
it worked fine until the 0.10.9 update.
Image

thegreyman
Inserter
Inserter
Posts: 23
Joined: Tue Jul 15, 2014 1:08 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by thegreyman »

From what I can see, the direction of the rotation changed behind the scenes, and then later the positioning needed to get the tracks laid in the correct spot changed as well. Replace the control.lua file in the rail-layer folder to fix this issue.

Happy Rail-laying!

https://www.dropbox.com/s/mvut75es0vbp2 ... l.lua?dl=0

OBAMA MCLAMA
Filter Inserter
Filter Inserter
Posts: 337
Joined: Fri May 30, 2014 4:23 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by OBAMA MCLAMA »

thegreyman wrote:From what I can see, the direction of the rotation changed behind the scenes, and then later the positioning needed to get the tracks laid in the correct spot changed as well. Replace the control.lua file in the rail-layer folder to fix this issue.

Happy Rail-laying!

https://www.dropbox.com/s/mvut75es0vbp2 ... l.lua?dl=0
I've updated the McLauncher rail-layer download with this fix. (just re-download and it should work)

I don't think kolli is maintaining this mod any more, Its such a great mod. Going to have to rely on the community to update it, it seems.
When i stream twitch i always answer questions and try to help, come visit me.

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 made a diff - for those who can use patch:

Code: Select all

> diff -u Downloads/rail-layer/control.lua Downloads/control.lua
--- Downloads/rail-layer/control.lua	2014-06-25 16:19:58.000000000 +0200
+++ Downloads/control.lua	2014-09-10 14:35:37.000000000 +0200
@@ -241,8 +241,8 @@
 	    end
 	    --diagonal \
 	    if ((raildirection%4==1) and (cargo_straight>1)) then
-		  placetrack(edge.x+2,edge.y,5,"straight-rail")
-		  placetrack(edge.x,edge.y,1,"straight-rail")
+		  placetrack(edge.x+2,edge.y,7,"straight-rail")
+		  placetrack(edge.x,edge.y-.5,3,"straight-rail")
 	      if (raildirection==1) then
 	   	    edge.x=edge.x-2
 		    edge.y=edge.y-2
@@ -254,8 +254,8 @@
   	    end
 	  --diagonal /
 	    if ((raildirection%4==3) and (cargo_straight>1)) then
-		  placetrack(edge.x+2,edge.y,7,"straight-rail")
-		  placetrack(edge.x,edge.y,3,"straight-rail")
+		  placetrack(edge.x+2,edge.y,1,"straight-rail")
+		  placetrack(edge.x+.5,edge.y,5,"straight-rail")
 	      if (raildirection==3) then
 	   	    edge.x=edge.x-2
 		    edge.y=edge.y+2
@@ -281,7 +281,21 @@
 		    local success=false
 		    success=placetrack(edge.x+curves[i].xoffset,edge.y+curves[i].yoffset,curves[i].curvedir,"curved-rail")
 	        if ((curves[i].corner==1) and (success)) then
-  			  placetrack(edge.x+curves[i].cornerx, edge.y+curves[i].cornery, curves[i].cornerr, "straight-rail")
+          			if (curves[i].cornerr%2 == 0) then
+            			    placetrack(edge.x+curves[i].cornerx, edge.y+curves[i].cornery, curves[i].cornerr, "straight-rail")
+          			end
+          			if (curves[i].cornerr%8 == 1) then
+          			    placetrack(edge.x+curves[i].cornerx, edge.y+curves[i].cornery-1, 3, "straight-rail")
+          			end
+          			if (curves[i].cornerr%8 == 3) then
+          			    placetrack(edge.x+curves[i].cornerx+.5, edge.y+curves[i].cornery+.5, 1, "straight-rail")
+          			end
+          			if (curves[i].cornerr%8 == 5) then
+          			    placetrack(edge.x+curves[i].cornerx-1, edge.y+curves[i].cornery, 3, "straight-rail")
+          			end
+          			if (curves[i].cornerr%8 == 7) then
+          			    placetrack(edge.x+curves[i].cornerx, edge.y+curves[i].cornery-1, 1, "straight-rail")
+          			end
 	        end
             raildirection=wanteddirection
             edge.x=edge.x+curves[i].xmove
I think also the idea to use the A/D-key to give the directions would be really useful (instead of mouse, which is needed in reality for other stuff).
And something to switch it completely off.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

billw
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Tue May 27, 2014 10:27 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by billw »

Yeah it took me ages to figure out that I was meant to use the mouse to set direction, I just assumed it would be directional keys! Only problem with that is the directional keys are also used for specifying what branch to take while moving along existing line.

What would be nice is if the rail laying was toggleable because I am constantly accidentally laying rails on the way to where I actually want to branch my line.
If this mod is no longer being supported by author then I might add this feature myself as it should be pretty trivial.

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 »

https://forums.factorio.com/forum/mem ... ile&u=2522
Not here since 22th Aug....

I mean there could be nothing against discussing this mod and making patches for fixing bugs or new features (don't see the big difference). It would be a little bit different, if you use the mod and make an own clone from it, then you need to ask the author. So I think it would be ok to add new features into mods.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

OBAMA MCLAMA
Filter Inserter
Filter Inserter
Posts: 337
Joined: Fri May 30, 2014 4:23 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by OBAMA MCLAMA »

When I asked for permission to use his mod on McLauncher, he said it was fine but be warned he is not updating the mod anymore.

This mod really needs to continue, if you guys pm him I think he will read it because it emails the person.
When i stream twitch i always answer questions and try to help, come visit me.

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 »

Does anyone else have this problem of machine lying 2x as many diagonal straight rails as it is supposed to and bugging out getting stuck?

Ok sometimes it lay 4-5 rails at the same spot. WTF?

Version 0.10.9 with that fix.

Game crashed when i tried to pick up one wagon. I can't remove that wagon. Can't pick it up, can't shoot it. It just crash game.

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 »

cpy wrote:Does anyone else have this problem of machine lying 2x as many diagonal straight rails as it is supposed to and bugging out getting stuck?
Yeah, I'm running into the same issue. I suspect something's going wrong with the detection of track being present. I've been staring at the lua for half an hour now, but I can't make heads or tails of the code.

And in fact, because of these stacked rails, Factorio refuses to load the game any longer :( Returns an error saying that a segment is already connected to another segment.
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

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 »

It appears to go wrong as soon as you manually place some diagonal track. In a quick testrun, I was able to build a decent length piece of track (and destroy a few biter spawners in the process), but things would go bad as soon as I tried to build a branch line (changing direction because I ran into water, for instance). Workaround for now is to manually remove a few pieces of track, so you're starting from orthogonal track, and have the ARLM pick it up in the desired direction.
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 »

I also made some tests. Yes, there a some bugs, which are a bit annoying, but it is still possible to use it.

It currently can't be used, if you try to begin with diagonal belts: Then it places tracks over existing tracks, which leads to blocking for the following wagons, instead of continue with the track, where the train is standing on. You can go around this bug, when you place the builder on vertical/horizontal tracks and then make a turn to diagonal.

Also there is some bug in factorio, I had some situations, where I placed the builder near switches (not clear if that was the reason) and the game dies.


Suggestions cause I layouted now many, about >100.000 of tracks:

- the "drive by keys" from above is really needed. It makes no sense to drive it by mouse, even if it looks nice in the demo.
- switch on/off is also really needed, also something which tells me, if there are some rails, on which rail the next rail would be placed.
- a better motor should be nice. I had trains with 6 wagons and it begins to get very slow, and not so fun.
- an included roboport is needed, when the tracks begin to get complex (stop the train, lay out tracks, while sitting in the train, wait until built)
- an included basic power supply is needed (build a roboport to build some solar grid to power the roboport, but then it is suddenly night and the roboport has not enough power left and all your robots "flee" to the next roboport, which is about 500 tiles away and leads through biter controlled area, nice).
- automatic placing of signals and power lines besides the track (configurable, place a one way signal (two way doesn't make sense!) every X tiles, place big poles right/left in distance of X tiles and destroy trees and other things before placing).

Nice to have:
- A really cool feature would be for complex situations to ghost-build some tracks and the path finder creates the best route through that ghosted tracks and creates some kind of "provisoric blueprint", which then can be placed, if you like it; you need only to wait for the robots to built that.
- A set of finished blueprints in the inventory of the builder: train stations for loading/unloading by belts or robots, solar power grids and such stuff.
-
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
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 »

This with electric rails and we're golden! Mouse control is unpredictable sometimes. If electric rails looked like real electric rails with overhead cables, you could use electric engines and not bother loading coal into it :D

Post Reply

Return to “Mods”