Page 6 of 8

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Sat Dec 06, 2014 11:27 am
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.

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Sat Dec 06, 2014 2:08 pm
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.

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Sun Dec 07, 2014 9:18 am
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.

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Mon Dec 08, 2014 2:44 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Wed Dec 10, 2014 1:27 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Thu Dec 11, 2014 4:46 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Thu Dec 11, 2014 8:49 pm
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 :)

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Thu Dec 11, 2014 9:42 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Mon Dec 15, 2014 4:03 pm
by katyal
Is anyone trying to get this working again in 11.6?

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Mon Dec 15, 2014 8:01 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Mon Dec 15, 2014 8:24 pm
by katyal
Thanx

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Fri Dec 19, 2014 1:35 pm
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?

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Fri Dec 19, 2014 4:36 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Fri Dec 19, 2014 4:43 pm
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.

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Mon Dec 29, 2014 3:50 pm
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.

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Mon Dec 29, 2014 3:55 pm
by imajor
More or less it does.

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Tue Dec 30, 2014 2:27 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Tue Dec 30, 2014 3:25 pm
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.

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Tue Dec 30, 2014 6:56 pm
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

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Posted: Tue Dec 30, 2014 10:18 pm
by filippe999
dead download links, anyone have a mirror?