Page 1 of 1
Creating a different kind of belt splitter
Posted: Wed May 07, 2014 1:44 pm
by GotLag
I've spent a couple of hours messing around with belts and splitters, trying to make something that acts like this (Photoshop):
I don't know if it's clear from that picture, but I want to make a 1x1 square entity that splits an incoming belt, with the left side being ejected to the left, and the right to the right. A single-tile machine to do what currently takes a splitter and two underground belts to achieve.
Unfortunately I'm not getting anywhere. I can't see any way of making a belt-type entity push in multiple directions, and splitters seem hard-coded to be 2x1 squares and I can't see how to alter the output position, anyway. I haven't tried with underground belts yet but I don't expect that to work either.
So, is there any way I can achieve this by modding using Lua, or am I out of luck?
Re: Creating a different kind of belt splitter
Posted: Wed May 07, 2014 1:49 pm
by Roest
I spent quite some time yesterday looking for things in the lua to achieve something like that. I'm either too blind to see or most belt stuff is done in the C++ and we can't mod it.
Re: Creating a different kind of belt splitter
Posted: Wed May 07, 2014 1:52 pm
by ssilk
I think out of luck. The problem is, that this needs to be hardcoded because of speed reasons. More than 100,000 items on the belts needs to be moved every 1/60 second. Every item on a belt needs to be moved. No time for lua. I think this is one of the reasons, why the devs won't make new belt types, because this is really extremely optimized code.
Re: Creating a different kind of belt splitter
Posted: Wed May 07, 2014 2:13 pm
by GotLag
How do corner belts work? This is two inside corners, but facing outwards. If the current engine can handle splitters and corners already I see no reason why it couldn't handle this (of course there may be reasons I can't see).
Edit:
The blue box is the outline of the unzipper. The yellow machinery part is just decorative and would be static. It's really just the two small belt corners that do the work:
Re: Creating a different kind of belt splitter
Posted: Wed May 07, 2014 9:49 pm
by ssilk
Corner belts:
https://forums.factorio.com/wiki/inde ... ort_system
Tip: slow down the speed and zoom very high in, turn debug mode on (F5). (See
https://forums.factorio.com/wiki/inde ... f_the_game)
You see then step by step the movement of the items. And now again, think a bit: this movement has to be calculated for thousands of items in extreme.
Lua is by factor 10-1000 too slow for that!
Re: Creating a different kind of belt splitter
Posted: Wed May 07, 2014 9:57 pm
by ghoti
I was thinking of this splitter type as well. While I'm sorry to say that I don't think you can mod it in, you can definately do this in vanilla in a pretty tight form factor, check it out:
that said. I like yours more
Re: Creating a different kind of belt splitter
Posted: Thu May 08, 2014 6:43 am
by GotLag
I even have a few underground belt designs of my own, I just dislike relying on something that feels like a bug (even if it isn't) to split belts. Plus it's clumsy.
Oh I understand that it's too much for Lua. I'm saying there seems to be nothing stopping the devs from putting a splitter in if they want to.