[MOD 0.10.2] Automatic Rail Laying Machine

Topics and discussion about specific mods
_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.

Just made that diagonal track placed not in same tick. Look like it help with "choppiness" but the slowdown exists.
Hope this smoth rail laying. So will wait some feedback.

Boogieman14, thanks for the save. Try use it by my laptop not so cool for run fast enough with your base :cry:
Also have to say that item collector from DyTech can also create "choppiness" if a few of them placed near belt.

Modified version is here zip.
As it download from github it need exctract and copy "rail-layer" folder to mods folder.

ssilk, as soon someone confirmed that this helps I made pull request to github repository.
I already have change in my fork in this commit.

P.S.: finally figure out how hide url in link =)
Last edited by _Nevar_ on Thu Oct 23, 2014 3:08 am, edited 1 time in total.

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 »

_Nevar_ wrote:Boogieman14, thanks for the save. Try use it by my laptop not so cool for run fast enough with your base :cry:
Yeah, even on my (fairly beefy) PC it only runs at 30fps now. It's still playable thought.
Also have to say that item collector from DyTech can also create "choppiness" if a few of them placed near belt.
I'm not using the DyTech one though, I'm using RSeding's (https://forums.factorio.com/forum/vie ... =14&t=5410). I understand there were some issues with the dytech ones that don't exist in this one. Besides, the choppiness only happens (noticably) while laying diagonal track, otherwise the game is pretty smooth still.

I'll give this new version a try tonight, thanks :)


*edit* looks like you missed some edits...
Image
(and looking at the code around that line, it's a bit more complicated than simply tossing an ) in there :) )
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_ »

Sorry for this. Look like edit and not save file before commit to github.

Fixed version: zip

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 »

Cool, that fixed version works. The choppiness does appear slightly less, but it's still there. I also tested puddle's theory (the game needing to recalculate stuff) by disconnecting the segment the rail layer is on from the rest of the network. This does seem to make some difference, but it's still noticable.

Anyway, overall this is a fairly minor issue, so if I were you I wouldn't spend too much more time on it anymore, I bet there's a lot more fun stuff to do than optimise for some fringe case :)
I don't have OCD, I have CDO. It's the same, but with the letters in the correct order.

dyf123
Inserter
Inserter
Posts: 37
Joined: Wed Sep 10, 2014 9:28 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by dyf123 »

Maybe you're this mod builder ,I suggest some idea I hope want to:
1.Add a switch to stop laying the rail ,because I put it on ahead of the train and it wouldn't lay rails when the train is on the way to working place.
2.Make a pointer to show the line of rail where will be laied down easily.
This train is very useful to laying rail by train,Thank for your idea.
And I hope you will agree my suggestion.
And My version is v0.10.12,So I Hope the mod fits it.

dragzonox
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Oct 28, 2014 4:44 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by dragzonox »

how about a inserter/ crane
Attachments
pHUkuao.jpg
pHUkuao.jpg (82.77 KiB) Viewed 7061 times

_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_ »

dyf123 wrote:Maybe you're this mod builder ,I suggest some idea I hope want to:
1.Add a switch to stop laying the rail ,because I put it on ahead of the train and it wouldn't lay rails when the train is on the way to working place.
2.Make a pointer to show the line of rail where will be laied down easily.
This train is very useful to laying rail by train,Thank for your idea.
And I hope you will agree my suggestion.
And My version is v0.10.12,So I Hope the mod fits it.
I only try support and develop mod =)

What about button. I made button for switch rail laying off/on, but not sure everyone will happy with it. Can share version with button.
For now you can add more locomotive and jump into it for drive to working place. Or better jump in wagon and drive to working place.

I agree that now it is hard to see how rail will be laied. But don't have any good idea how to show how and where the rail will laid.
Maybe make possible mouse pointer place rail track for some distance from train. Need try and see ...
dragzonox wrote:how about a inserter/ crane
I'm not very good at create sprites.
What about add "crane", then it need animation (without animation it not bring big benefit).
For me it is too hard :( (as I know train has only static sprite for each direction).

dyf123
Inserter
Inserter
Posts: 37
Joined: Wed Sep 10, 2014 9:28 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by dyf123 »

_Nevar_ wrote:
dyf123 wrote:Maybe you're this mod builder ,I suggest some idea I hope want to:
1.Add a switch to stop laying the rail ,because I put it on ahead of the train and it wouldn't lay rails when the train is on the way to working place.
2.Make a pointer to show the line of rail where will be laied down easily.
This train is very useful to laying rail by train,Thank for your idea.
And I hope you will agree my suggestion.
And My version is v0.10.12,So I Hope the mod fits it.
I only try support and develop mod =)

What about button. I made button for switch rail laying off/on, but not sure everyone will happy with it. Can share version with button.
For now you can add more locomotive and jump into it for drive to working place. Or better jump in wagon and drive to working place.

I agree that now it is hard to see how rail will be laied. But don't have any good idea how to show how and where the rail will laid.
Maybe make possible mouse pointer place rail track for some distance from train. Need try and see ...
dragzonox wrote:how about a inserter/ crane
I'm not very good at create sprites.
What about add "crane", then it need animation (without animation it not bring big benefit).
For me it is too hard :( (as I know train has only static sprite for each direction).
Thanks for help from the version with switch,but Can it make a more function that the train return the normal speed(1.2) if the switch turn on to stop laying.If it can't or others don't agree,just with the switch.

And I have a idea for make a pointer to show laying line but I can't sure the game will be able to do that.The idea is that the line which will be layed as ghost buildings with the blueprint,and show the ghost buildings about six tiles away but plane it about three tiles away.Can you think that it's feasibility?

That's all.

dyf123
Inserter
Inserter
Posts: 37
Joined: Wed Sep 10, 2014 9:28 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by dyf123 »

And I report a bug or just a illogical mistake.
The train can lay the rail across the water area which maybe it doesn't check the terrain of map.Maybe it need to check the terrain where need to be placed.
Just a useful but illogical mistake.

Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Airat9000 »

0.11.0 ?
when will it be updated?

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 741
Joined: Sun Jan 12, 2014 3:54 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by SuperSandro2000 »

laiter

_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_ »

Airat9000 wrote:0.11.0 ?
when will it be updated?
Make run and little test for Factorio v0.11.1
Single player should work.
Download zip

_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_ »

dyf123 wrote: Thanks for help from the version with switch,but Can it make a more function that the train return the normal speed(1.2) if the switch turn on to stop laying.If it can't or others don't agree,just with the switch.

And I have a idea for make a pointer to show laying line but I can't sure the game will be able to do that.The idea is that the line which will be layed as ghost buildings with the blueprint,and show the ghost buildings about six tiles away but plane it about three tiles away.Can you think that it's feasibility?

That's all.
I don't think I can change max speed of train in game.

Ghost build for rail have some bug behavior. Don't fill up bug report and maybe this changed for v0.11.1.
dyf123 wrote:And I report a bug or just a illogical mistake.
The train can lay the rail across the water area which maybe it doesn't check the terrain of map.Maybe it need to check the terrain where need to be placed.
Just a useful but illogical mistake.
This is expected. It check if it can place rail and if not than skip that rail and proceeds to the next rail.
So you see that it skip rail on water and continue rail laying on another side of water pool.
This can happen with all entity (factory, big electric pole, stone rock and etc.) on rail path except tree.

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 »

No multiplayer? :(

Airat9000
Smart Inserter
Smart Inserter
Posts: 1418
Joined: Fri Mar 28, 2014 12:32 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Airat9000 »

bug ((

Image

_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_ »

Airat9000 wrote:bug ((

Image
Hi, Airat9000.

What version Factorio you use?
When error happen? Can you give more detail. (I try create multiplayer game and don't get error).

katalex
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Mon Nov 10, 2014 7:44 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by katalex »

I have similar bug too.
0.11.3.
If I create new game, I see notice too (control.lua 45). But If I add mode and load game - ok. :?

Damrus
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Sat Aug 23, 2014 12:41 pm
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by Damrus »

_Nevar_ wrote:
Airat9000 wrote:0.11.0 ?
when will it be updated?
Make run and little test for Factorio v0.11.1
Single player should work.
Download zip

sadly this doesn't seem to work in 11.3 either : l

This is the Error,

Unknown key:"Error while running the oninit: ...rus\AppData\Roaming\Factorio\mods\rail-layer|control.lua:45: Map doesn't contain 1 player, this function can't be used"

Ps: this is in single player btw.

WoodyDaOcas
Long Handed Inserter
Long Handed Inserter
Posts: 67
Joined: Wed Apr 02, 2014 9:06 am
Contact:

Re: [MOD 0.10.2] Automatic Rail Laying Machine

Post by WoodyDaOcas »

update please :( MP compatible ?

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 managed to get rid of the errors. Just replace lines 44 to 50 with this:

Code: Select all

local function check_tech()
    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
I don't know if this will work in MP, but in SP i managed to lay down a couple of stacks of straight rails, some curves and big poles. (using 0.11.5)
Edit: Don't save while in the Rail-Layer, get's me an error on loading which i can't solve with my limited (=0) knowledge of modding.
Also remove/comment check_tech() in game.oninit, didn't let me create a new map

Post Reply

Return to “Mods”