Creating a different kind of belt splitter

Place to get help with not working mods / modding interface.
Post Reply
GotLag
Filter Inserter
Filter Inserter
Posts: 510
Joined: Sat May 03, 2014 3:32 pm
Contact:

Creating a different kind of belt splitter

Post by GotLag » Wed May 07, 2014 1:44 pm

I've spent a couple of hours messing around with belts and splitters, trying to make something that acts like this (Photoshop):
Image
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?

Roest
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Apr 30, 2014 7:09 pm
Contact:

Re: Creating a different kind of belt splitter

Post by Roest » Wed May 07, 2014 1:49 pm

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.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10470
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Creating a different kind of belt splitter

Post by ssilk » Wed May 07, 2014 1:52 pm

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. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

GotLag
Filter Inserter
Filter Inserter
Posts: 510
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: Creating a different kind of belt splitter

Post by GotLag » Wed May 07, 2014 2:13 pm

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:
Image

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 10470
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Creating a different kind of belt splitter

Post by ssilk » Wed May 07, 2014 9:49 pm

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! :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

ghoti
Burner Inserter
Burner Inserter
Posts: 15
Joined: Thu Apr 24, 2014 5:40 pm
Contact:

Re: Creating a different kind of belt splitter

Post by ghoti » Wed May 07, 2014 9:57 pm

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:
Image

that said. I like yours more :)

GotLag
Filter Inserter
Filter Inserter
Posts: 510
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: Creating a different kind of belt splitter

Post by GotLag » Thu May 08, 2014 6:43 am

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.
ssilk wrote: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! :)
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.

Post Reply

Return to “Modding help”

Who is online

Users browsing this forum: No registered users