[MOD 0.10.2] Automatic Rail Laying Machine

Topics and discussion about specific mods
User_Name
Fast Inserter
Fast Inserter
Posts: 142
Joined: Sun May 18, 2014 2:07 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by User_Name »

Someone with modding knowledge should fix this mod properly.

I ended up with a similar solution as the poster above, but decided not to post it here, because I don't understand what that code did, and what implications could arise from commenting it out.
Attach your blueprints to forum posts with Foreman or Blueprint string.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Choumiko »

User_Name wrote:Someone with modding knowledge should fix this mod properly.

I ended up with a similar solution as the poster above, but decided not to post it here, because I don't understand what that code did, and what implications could arise from commenting it out.
I completely agree with that.
Anyways, i think i fixed it, my new check_tech:

Code: Select all

local function check_tech()
	if game.players[1] ~= nil then
    if (game.players[1].force.technologies["automated-rail-transportation"].researched) then
        game.players[1].force.technologies["automated-rail-transportation"].researched = false
        game.players[1].force.technologies["automated-rail-transportation"].researched = true
        game.player.force.recipes["rail-layer"].enabled = true
    end
	end
end
No errors when creating a new map, the Rail-Layer shows in the techtree in the new game and also in an old save which started without the mod and has the tech researched. That's good enough for me. Saving while in the rail-layer still creates an error, but that's beyond my current abilities.
_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_ »

Choumiko wrote:
User_Name wrote:Someone with modding knowledge should fix this mod properly.

I ended up with a similar solution as the poster above, but decided not to post it here, because I don't understand what that code did, and what implications could arise from commenting it out.
I completely agree with that.
Anyways, i think i fixed it, my new check_tech:

Code: Select all

local function check_tech()
	if game.players[1] ~= nil then
    if (game.players[1].force.technologies["automated-rail-transportation"].researched) then
        game.players[1].force.technologies["automated-rail-transportation"].researched = false
        game.players[1].force.technologies["automated-rail-transportation"].researched = true
        game.player.force.recipes["rail-layer"].enabled = true
    end
	end
end
No errors when creating a new map, the Rail-Layer shows in the techtree in the new game and also in an old save which started without the mod and has the tech researched. That's good enough for me. Saving while in the rail-layer still creates an error, but that's beyond my current abilities.
Finally found some time to do that ... but I made loop for all players.
Download zip

If some one play in MP not only 1 player please write is it work.
User avatar
YSX
Burner Inserter
Burner Inserter
Posts: 14
Joined: Fri Nov 28, 2014 5:21 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by YSX »

_Nevar_ wrote: If some one play in MP not only 1 player please write is it work.
Nope, doesn't work. Trying to host saved game, error pops up, here it is:

Code: Select all

Error while running the event handler: __rail-layer__\control.lua:170: Map doesn't contain 1 player, this function can't be used
Poor english speaking russian translator =D
_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_ »

YSX wrote:
_Nevar_ wrote: If some one play in MP not only 1 player please write is it work.
Nope, doesn't work. Trying to host saved game, error pops up, here it is:

Code: Select all

Error while running the event handler: __rail-layer__\control.lua:170: Map doesn't contain 1 player, this function can't be used
Thanks YSX.
Look like need complete remove game.player stuff ...

next try ...
Download zip
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Choumiko »

i found this thread: https://forums.factorio.com/forum/vie ... =28&t=5911
Might be a show stopper for the mod in multiplayer.
The event game.onputitem looks like a promising candidate to circumvent the problems, would require a special item to be held and clicked while driving the rail layer. I made a few basic tests but got annoyed by the placement sound constantly being played
Rseding91
Factorio Staff
Factorio Staff
Posts: 14345
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Rseding91 »

I just finished up my finals and I've got a lot of open time for the next few weeks.

Would anyone mind telling me what's broken (if anything) about this mod in 0.11 and MP? If there's anything broken I want to fix it so I can use it in my game :)
If you want to get ahold of me I'm almost always on Discord.
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Choumiko »

Rseding91 wrote:Would anyone mind telling me what's broken (if anything) about this mod in 0.11 and MP? If there's anything broken I want to fix it so I can use it in my game :)
I don't know about MP. I've been messing around with the mod in SP today, adding automated placing of signals and some other stuff. I started with Nevars latest version and all errors i got where made by me.
But apparently 0.11.6 introduced a bug that breaks the mod, see: https://forums.factorio.com/forum/vie ... f=7&t=7261
katyal
Fast Inserter
Fast Inserter
Posts: 208
Joined: Wed Nov 12, 2014 8:42 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by katyal »

Is anyone trying to get this working again in 11.6?
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Choumiko »

I have a somewhat hackish version going: https://github.com/Choumiko/rail-layer/ ... /0.1.1.zip
It does not check if rails can be placed, will build over water and other entities, use at own risk!
Works in singleplayer, haven't tried in multiplayer
Changes:
  • Loading bug fixed
    adjustable positioning of big electric poles
    optional removal of stone rocks
    placing of signals with adjustable distance (not finished)
    when using FatController on the rail-layer it doesn't place rails
    some bug-fixes
Take a look at settings.lua Should be self-explanatory.
You'll have to replace the - before the version with _ in the zip file and the directory inside to get it to load
katyal
Fast Inserter
Fast Inserter
Posts: 208
Joined: Wed Nov 12, 2014 8:42 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by katyal »

Thanx
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 tried it with 0.11.6 It loads properly, I could produce the special engine, attached a wagon to it, put some straight and curved tracks in the wagon, then tried driving it, but it did not lay down any track. Am I supposed to do something else? You mentioned the automatic signal placement, is that something which should be configured somewhere?
Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Choumiko »

imajor wrote:I tried it with 0.11.6 It loads properly, I could produce the special engine, attached a wagon to it, put some straight and curved tracks in the wagon, then tried driving it, but it did not lay down any track. Am I supposed to do something else? You mentioned the automatic signal placement, is that something which should be configured somewhere?
Make sure you don't enter the engine when it's on a curved track. Try leaving and entering again. Signals or poles don't hinder rail-placing, if there are some in the wagon they get placed, if not then they don't.
I just tried it with a fresh game, cheated in the items, it lays rails just fine.

In case you never used it: Where the rails get placed depends on the position of your cursor relative to the engine, make sure it's ahead of it. Takes some getting used to but is fun
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 »

Thanks a lot. Leaving the engine and entering again helps. I didn't know I need to enter the vehicle when it is not on a curved track. I hope the vanilla version will get some similar help with laying down the tracks.
Urbs
Inserter
Inserter
Posts: 34
Joined: Sat Nov 01, 2014 1:10 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Urbs »

Does anyone know if this mod works with 11.8?

About to start major train operations on my current game and would love to use this.
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 »

More or less it does.
Telarin
Long Handed Inserter
Long Handed Inserter
Posts: 62
Joined: Tue Mar 05, 2013 2:17 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Telarin »

I cannot get this mod to work with 0.11.8.
Launching Factorio gives the error:

Filename of mod
C:/users\username\AppData\Roaming\Factorio\mods\rail-layer.zip doesn't match the expected rail-layer_0.0.6.zip (case sensitive!)

If I rename the zip file to what appears to be expected, then I get the following error on launch:

Error while loading entity prototype "rail-layer" (locomotive): No such node (width)
Modifications: rail-layer
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 also got the filename error, but I think somewhere it was told that we have to rename the file, however I cannot find where. After renaming the file it worked for me with 0.11.8.
Boogieman14
Filter Inserter
Filter Inserter
Posts: 778
Joined: Sun Sep 07, 2014 12:59 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Boogieman14 »

Telarin wrote:Error while loading entity prototype "rail-layer" (locomotive): No such node (width)
Modifications: rail-layer
Looks like you're trying to use the version in the starting post, but that hasn't been updated for 0.11. Try the version in this post: https://forums.factorio.com/forum/vie ... 100#p57937
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.
filippe999
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sat May 03, 2014 12:45 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by filippe999 »

dead download links, anyone have a mirror?
Post Reply

Return to “Mods”