[0.9.x] Belt Lane Splitters (1.2)

Topics and discussion about specific mods
GotLag
Filter Inserter
Filter Inserter
Posts: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

[0.9.x] Belt Lane Splitters (1.2)

Post by GotLag »

It's taken a while but I've made it work:
Image
Image

Features
  • Belt dividers - simple, cheap, only allows the two outermost lanes of the two inputs to pass
  • Belt separators - sends the left lane of both input belts to the left outside output, and the right lanes to the right
  • Dividers and separators for all 3 belt types (basic, fast, express), unlocked alongside existing splitters with Logistics research
Known Issues
  • Dividers and splitters both share the same teleporting behaviour as regular splitters, if you chain them items will come out the far end almost instantly
  • Terrible art
  • Separators too visually similar to existing splitters
Update 1.1
  • Added initilisation handler to ensure recipes show up
Update 1.2
  • Changed divider graphics to make direction more obvious during placement
Download
Last edited by GotLag on Thu May 22, 2014 8:42 am, edited 3 times in total.

BurnHard
Filter Inserter
Filter Inserter
Posts: 519
Joined: Mon Oct 21, 2013 5:08 pm
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by BurnHard »

Seems to be very helpful, thank you.

robhol
Long Handed Inserter
Long Handed Inserter
Posts: 72
Joined: Sun May 11, 2014 9:57 pm
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by robhol »

This is awesome. I didn't think this was even possible with modding.

Edit: how *does* it work? I can't find any "logic"-related code in the mod.
窮屈そうに身を屈めても今じゃ誰もがそうしてる 天井の無いECHO ROOMに誰かが僕を放り込む
君のSPEEDでもって 同じPHRASEを弾いて 冷たい時に寄り添って

User avatar
Sedado77
Fast Inserter
Fast Inserter
Posts: 132
Joined: Sun Feb 09, 2014 11:32 am
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by Sedado77 »

Great! you'll get someone to do the artwork soon enough, as this is VERY usefull for lots of pple.

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

Re: [0.9.x] Belt Lane Splitters

Post by GotLag »

It's all in the collision boxes. Press F4-F7 in-game and compare these to regular splitters.
The deeper collision boxes block the central output zones, and on the divider it stops them from reaching the central inputs too.

Image Image
(spots added to show where items are input/output)

Note that on the original splitter the normal item flow is completely blocked, and items only pass through by being teleporting through by the splitter logic. On my modified versions, the outside lanes flow as normal belts as well. In practice, this means that if the lane is full, the first item will teleport straight through, but the next one won't be able to because the path is blocked by the items pushed along by the belt. So if the belt is only sparsely filled each item will instantly jump across, but there's nothing I can do about that.
Also note the width of the collision box is 1.02 units. It took me a while to work out that entity tile size is determined by collision box size rounded up to the nearest whole number.

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

Re: [0.9.x] Belt Lane Splitters

Post by ssilk »

This makes my day. Now I can say: Splitter? This way! Everyone only one splitter, please. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

BurnHard
Filter Inserter
Filter Inserter
Posts: 519
Joined: Mon Oct 21, 2013 5:08 pm
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by BurnHard »

GotLag wrote:So if the belt is only sparsely filled each item will instantly jump across, but there's nothing I can do about that.
Don't know if I understood you right, but can't you use two collision boxes to make it work "the original" way? a+b combined
Attachments
VNqyG4m.jpg
VNqyG4m.jpg (55.9 KiB) Viewed 26938 times

BurnHard
Filter Inserter
Filter Inserter
Posts: 519
Joined: Mon Oct 21, 2013 5:08 pm
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by BurnHard »

By the way, can you make (is it possible) a one-tile-wide lane-switcher (items on left belt side port to right side)? same graphics, but 1x1 tile and green dot connects to turquoise and vice versa. :)

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

Re: [0.9.x] Belt Lane Splitters

Post by GotLag »

Entities can only have one collision box. If you try to set a second it simply replaces the first.
Splitters are hard-coded to render two belts side-by-side, underground belts are hard-coded to render the belt on only half the tile (and have other fruity issues with regard to entrance and exit textures, take a close look at one in-game and have a look at the entity definition and sprite sheet, something isn't right), and transport belt collision boxes don't affect items.

So unfortunately, no, I can't see a way to make a 1x1 version. God knows I spent enough time trying. Splitter input/output zones are also hard-coded.

Edit: actually, in the original splitter every item teleports across the collision box, which I guess is why there's that machinery over the top, to hide it.

BurnHard
Filter Inserter
Filter Inserter
Posts: 519
Joined: Mon Oct 21, 2013 5:08 pm
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by BurnHard »

Thanks for the explanations...

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

Re: [0.9.x] Belt Lane Splitters

Post by ssilk »

GotLag wrote:Edit: actually, in the original splitter every item teleports across the collision box, which I guess is why there's that machinery over the top, to hide it.
You can see it clearly, if you slow down the game (console) and eventually press F5 for debug. There you are seeing the little items just jumping, like in a quantum tunnel.

And it can be measured: If you place several splitters in a row, the first item is much faster, and the rest will follow. It works then as a fast buffer, because the amounts of items in the splitters are high.
It's explained about here: https://forums.factorio.com/wiki/inde ... her_Usages

The "splitter wormhole". :)

Oh, and I found an old thread: https://forums.factorio.com/forum/vie ... =18&t=1808
Quite interesting. I didn't remember that I've been doing such stuff... :)
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: 532
Joined: Sat May 03, 2014 3:32 pm
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by GotLag »

I've read that thread :)

I was trying to explain why even if I could, adding that collision box wouldn't remove the quantum tunnelling.

Slye_Fox
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon May 19, 2014 3:46 am
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by Slye_Fox »

I'm having a bit of a problem with this mod.
The items aren't in my crafting menu menu.
The mod is active, I have the needed research & the items do show up in the smart filters.

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

Re: [0.9.x] Belt Lane Splitters

Post by GotLag »

I've updated the mod to add initialisation code to make sure the research and recipes are registered. Re-download the mod and try it again.

Slye_Fox
Manual Inserter
Manual Inserter
Posts: 3
Joined: Mon May 19, 2014 3:46 am
Contact:

Re: [0.9.x] Belt Lane Splitters

Post by Slye_Fox »

GotLag wrote:I've updated the mod to add initialisation code to make sure the research and recipes are registered. Re-download the mod and try it again.
That fixed it, thanks for the quick-fix.

<edit>
I do have a suggestion for a new item;
Is it possible to make a 1x1(or 2x1 lenghways along the belt) belt swapper?
By this I mean an block that moves item from one side of the belt to the other & vice-versa

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

Re: [0.9.x] Belt Lane Splitters (1.1)

Post by GotLag »

Unfortunately I don't believe those are possible at the moment, see the previous page for explanations.

Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.9.x] Belt Lane Splitters (1.2)

Post by Neotix »

Could you add something like Belt divider but for single belt? Device do block left or right side of the belt, and pass throe another.

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

Re: [0.9.x] Belt Lane Splitters (1.2)

Post by GotLag »

Neotix wrote:Could you add something like Belt divider but for single belt? Device do block left or right side of the belt, and pass throe another.
Got most of it working:
Image

Now to make it behave well on corners and make some pretty sprites instead of placeholders.

BurnHard
Filter Inserter
Filter Inserter
Posts: 519
Joined: Mon Oct 21, 2013 5:08 pm
Contact:

Re: [0.9.x] Belt Lane Splitters (1.2)

Post by BurnHard »

Thanks for your efforts :) Always surprised what is possible with modding and good ideas how to make it happen :)

scrangos
Burner Inserter
Burner Inserter
Posts: 10
Joined: Mon Apr 21, 2014 6:27 pm
Contact:

Re: [0.9.x] Belt Lane Splitters (1.2)

Post by scrangos »

Would it be possible to add new versions of your splitters for the new DyTech belt speeds? They have two higher ones than the base game ones.

Post Reply

Return to “Mods”