[Mod 0.13.0+] Compound Splitters 0.2.1

Topics and discussion about specific mods
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

[Mod 0.13.0+] Compound Splitters 0.2.1

Post by CmdrKeen »

*Note: New versions are being posted through the mod portal here: Link Current Version as of this notice is 2.9 (for 14)

Type: Mod
Name: Compound Splitters
Description: n-width splitters for larger bases. output and inputs configurable to 'round-robin' and 'priority' mode. Priority mode is intended to saturate an output belt before starting to fill the next one.
License: The MIT License
Version: 0.1.4
Release: 2016-05-15
Tested-With-Factorio-Version: 0.12.30
Category: Convenience
Tags: New Items
Download-Url for V13:
compoundsplitters_0.2.1.zip
Factorio Version 0.13+
(67.3 KiB) Downloaded 355 times
Download-Url:
compoundsplitters_0.1.4.zip
Factorio Version 0.12.30+
(59.37 KiB) Downloaded 280 times
Website: viewtopic.php?f=97&t=20443

About the mod:
Please read the change log for known issues.
This is a small mod that adds a multi-tile structure that replicates the behavior of n-belt splitters. The mod adds a new method of item distribution from a splitter- called 'priority'- that favors maximizing output on one belt, before trying to output to the next belt in line. This splitter expects only one type of item on the belt and ignores belt side when picking up and placing items on a belt.

I made this mod to help me increase UPS on my larger bases and to hopefully take advantage of the power switch that will be added in version 0.13. Mod's with a power switch exist that *might* help with UPS but I'm waiting for the in-game implementation. This mod does not perform better versus splitters with a width smaller than 8 belts.



Gfycat of two of these splitters in action
creating a splitter with V0.1.4
change log
License
Old Versions
Last edited by CmdrKeen on Wed Feb 08, 2017 9:10 pm, edited 13 times in total.
User avatar
StoneLegion
Filter Inserter
Filter Inserter
Posts: 687
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

Re: [Mod 0.12.24] Compound Splitters

Post by StoneLegion »

First since it's your first mod I had to jack the first reply ;) Grats on the release.
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.12.24] Compound Splitters

Post by CmdrKeen »

Thanks :mrgreen:
Alexs
Fast Inserter
Fast Inserter
Posts: 102
Joined: Sun Sep 07, 2014 9:46 am

Re: [Mod 0.12.24] Compound Splitters

Post by Alexs »

THX
aklesey1
Smart Inserter
Smart Inserter
Posts: 1862
Joined: Sun May 18, 2014 3:45 pm
Contact:

Re: [Mod 0.12.24] Compound Splitters

Post by aklesey1 »

May be its very smart and useful mod but i currently cannot understad how to use it?
CmdrKeen can u create tutuorial video to your mod please?
Nickname on ModPortal - Naron79
User avatar
bigyihsuan
Filter Inserter
Filter Inserter
Posts: 299
Joined: Thu Jan 01, 2015 12:57 pm
Contact:

Re: [Mod 0.12.24] Compound Splitters

Post by bigyihsuan »

I'm using this mod, and it works great! some suggestions:
  • Recipes. Maybe use a splitter in each compound splitter piece recipe.
  • In/out belt speeds. Can you make three speeds to the input/output belts? It's really annoying to see express belt speeds with yellow belts, leading to not entirely expected compression coming out. Also, when you eventually add actual recipes, I'm hoping the three tiers are made out of the yellow, red, and blue belts.
  • Make the Lane pieces parts of a splitter with animations and connect properly to belts. Minor, but could be nice.
  • EDIT: Also make the compound splitters walk-though-able. Super annoying to walk on my main bus just to be stopped by a compound splitter.
aklesey1 wrote:May be its very smart and useful mod but i currently cannot understad how to use it?
CmdrKeen can u create tutuorial video to your mod please?
Here's a simple guide to make a splitter:

1. Place enough Lane pieces to equal the input or output (whichever is larger). Place Splitter belts to match your inputs/outputs.
2. On one end, place a Buffer. On the other end, place a Round-Robin (blue)/Priority (green) piece. Place these two pieces on the input and output sides. If you want the belts to tend towards one side, use Priority on the side you want to prioritized.
3. When you have all of the pieces placed, put the Endcap (red) in between the Priority/Round-Robin pieces and next to the Lane pieces. This needs to be on the opposite end of the Buffer piece.
4. You should get a chat message saying "Compound Splitters: [in]-[out] compound splitter detected." You are now done.
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.12.24] Compound Splitters

Post by CmdrKeen »

bigyihsuan wrote:I'm using this mod, and it works great! some suggestions:
  • Recipes. Maybe use a splitter in each compound splitter piece recipe.
  • In/out belt speeds. Can you make three speeds to the input/output belts? It's really annoying to see express belt speeds with yellow belts, leading to not entirely expected compression coming out. Also, when you eventually add actual recipes, I'm hoping the three tiers are made out of the yellow, red, and blue belts.
  • Make the Lane pieces parts of a splitter with animations and connect properly to belts. Minor, but could be nice.
  • EDIT: Also make the compound splitters walk-though-able. Super annoying to walk on my main bus just to be stopped by a compound splitter.
good to hear that it's mostly working for you.

On recipes: I do plan to make an actual recipe instead of the current fairly cheap setup. with the n^2 style balancers, the size grows exponentially while with this mod the size grows linearly with additional lanes. this will make it hard to decide on the actual part cost. I think i'll balance it so that a 16 lane compound splitter is the same cost as the average 16 lane n^2 style splitter.

On in out belt speeds: I didn't expect anything but blue belts to be used with these splitters, i'll do some testing with the lower tier splitters and see if I can tweak the code to reduce the gaps. The problem is that in order to get the lua code fast enough to compare with regular belts, I had to add some code to allow the splitter to 'sleep' for a certain number of ticks if the belts are idle. The optimal solution would be an on inventory content's changed event (which doens't . We'll see.

On making the splitters animated: I looked into this and decided on a basic entity that can't accept an animated sprite for better performance. to animate it- It'd have to be an inserter/assembler/vehicle entity which would be more complex to work with.

On walking on belts: i'll change that for the next version.
Peppe
Fast Inserter
Fast Inserter
Posts: 223
Joined: Fri Nov 28, 2014 6:48 pm
Contact:

Re: [Mod 0.12.24] Compound Splitters

Post by Peppe »

CmdrKeen wrote:
bigyihsuan wrote:I'm using this mod, and it works great! some suggestions:
  • Recipes. Maybe use a splitter in each compound splitter piece recipe.
  • In/out belt speeds. Can you make three speeds to the input/output belts? It's really annoying to see express belt speeds with yellow belts, leading to not entirely expected compression coming out. Also, when you eventually add actual recipes, I'm hoping the three tiers are made out of the yellow, red, and blue belts.
  • Make the Lane pieces parts of a splitter with animations and connect properly to belts. Minor, but could be nice.
  • EDIT: Also make the compound splitters walk-though-able. Super annoying to walk on my main bus just to be stopped by a compound splitter.
good to hear that it's mostly working for you.

On recipes: I do plan to make an actual recipe instead of the current fairly cheap setup. with the n^2 style balancers, the size grows exponentially while with this mod the size grows linearly with additional lanes. this will make it hard to decide on the actual part cost. I think i'll balance it so that a 16 lane compound splitter is the same cost as the average 16 lane n^2 style splitter.

On in out belt speeds: I didn't expect anything but blue belts to be used with these splitters, i'll do some testing with the lower tier splitters and see if I can tweak the code to reduce the gaps. The problem is that in order to get the lua code fast enough to compare with regular belts, I had to add some code to allow the splitter to 'sleep' for a certain number of ticks if the belts are idle. The optimal solution would be an on inventory content's changed event (which doens't . We'll see.

On making the splitters animated: I looked into this and decided on a basic entity that can't accept an animated sprite for better performance. to animate it- It'd have to be an inserter/assembler/vehicle entity which would be more complex to work with.

On walking on belts: i'll change that for the next version.
I have not looked at your code to see tickrate you are using. If it doesn't align with the belts you can see some weirdness on usually red belts.

Some timings I found for my mod, which inputs/outputs with belts like this but in batches of 4 and my entity is a chest.

First if you want blue belt gapless you need to update every 12 ticks for belts, or every 6 ticks for underground belts/splitters (if you support them as input/output options -- if you don't I would not start they are a pain). Belts have 4 item slots per lane, while splitters/underground belts only have 2 slots.

Red belt is 18 ticks, or again half that to support splitter/underground belts.
Yellow belt is 36/18.

You can get gaps on the belt if how you place items and your tick rate don't line up, so say placing one item in a lane per cycle. You would need to update every 3 ticks for blue, every 4.5 for red, and every 9 ticks for yellow.

If you want to pull in items when they touch your entity check for an item in position 0 on the belt, zero is the end of the belt and 1 is the start of the belt.
belt.get_transport_line(laneNumber).can_insert_at(0), if that is false then something is about to touch your splitter entity.
How i use it: https://github.com/Peppe-KSP/InterfaceC ... l.lua#L462
So if something is at 0, then I take everything in the lane.

If you want to place items 4 at a time instead of one at a time you can place 4 perfectly compressed items onto an adjacent lane by placing at these positions:
{.159, .44, .72, 1}

For my mod I wait until position 1 in the list is clear (.159 - basically the edge of a belt facing away), and then I place 4 items. So my output from chest to belt is idle unless it can place all 4 items. And if I check 12 ticks later that is exactly when position 1 has opened up again on blue belt. I check on 6 ticks to support underground belts and splitters, so I do nothing to belts one cycle, and should always do something on underground/splitters.
https://github.com/Peppe-KSP/InterfaceC ... l.lua#L493

Splitters and underground belt I only found these spots work to insert (insert_at):
local splitterPositions = {0, .28}
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.12.30] Compound Splitters

Post by CmdrKeen »

Updated the Mod to 0.1.4:

-0.1.4
- FIX: fixed unhandled exception when endcap was placed on splitter with no totems. splitters with 0 totems behave like a count-perfect balancer
- Official recipes made. a 16 lane CS should be about as expensive as a 16-lane belt-based splitter
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.13.0+] Compound Splitters 0.2.1

Post by CmdrKeen »

Version 0.2.2 is now availiable on the mod portal (under an older username I've had)
Aes Sedai
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Jan 08, 2016 12:37 am
Contact:

Re: [Mod 0.13.0+] Compound Splitters 0.2.1

Post by Aes Sedai »

Ran into an error with Compound Splitters 0.2.5. Error while running the event handler: __compoundsplitters__/control.lua:245: attempt to index local 'buffer' (a nil value). I had the lane pieces, belt pieces, and round-robin totems in place, then placed a buffer then endcap and then the error occured.
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.13.0+] Compound Splitters 0.2.1

Post by CmdrKeen »

looks like I broke the detection for when the endcap is placed before the buffer...
aklesey1
Smart Inserter
Smart Inserter
Posts: 1862
Joined: Sun May 18, 2014 3:45 pm
Contact:

Re: [Mod 0.12.24] Compound Splitters

Post by aklesey1 »

Hi CndrKeen
I finally was able to understand the structure of the еруыу splitters, so i can understand splitters able to work in 2 modes
1) Uniform distribution for all lines
2) Distribution to 1 line which has priority if its not full
May be it can be able to do something more useful but now i donno, please don't offend on me ;)

Question - is it possible to create spliter which can be able to split by proportions - each section has priority to another section, has multiplier of item count, the multiplier must be an integer, it cannot accept decimal values to not to complicate our task
Vanilla splitter is terribly simple - it have 2 sections with 1.0 multiplier

I want to create adjuctble splitters with sections, i like idea with splitters block like in your mod

Very simple case - for example i need splitter 1-3
For setting multiplier we can use UI like in bob adjustble inserters or like K&L inseters mod
More hard case is splitter which will split in proportion - 1-3-7-4 or harder

Is modding instruments allow to change values of proportions of splitters? I'm very like mods for inserters? so now its time to improve our splitters, are you agree? :?:
Nickname on ModPortal - Naron79
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.13.0+] Compound Splitters 0.2.1

Post by CmdrKeen »

aklesey1 wrote:Hi CndrKeen

Very simple case - for example i need splitter 1-3
For setting multiplier we can use UI like in bob adjustble inserters or like K&L inseters mod
More hard case is splitter which will split in proportion - 1-3-7-4 or harder

Is modding instruments allow to change values of proportions of splitters? I'm very like mods for inserters? so now its time to improve our splitters, are you agree? :?:
I'm not understanding the 1-3-7-4 part. usually i-o means input-output belts

Unfortunately, This mod is currently on bug fixes only (I'm working on a new mod), and I don't see the need for proportional splitting at the moment.
Resom
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Jun 07, 2016 1:53 pm
Contact:

Re: [Mod 0.13.0+] Compound Splitters 0.2.1

Post by Resom »

Hello,
First I would like to thank you for making this mod. Even though you say it is not better then regular splitters until greater than 8 lanes, I believe it is better 3 lanes and above (the buffers help a great deal). I did have a request though, is there anyway that you could increase the stack size on the lane pieces? 10 seems a bit low for what I end up needing to walk around with. the only other odd thing is that the lane pieces and the totems do not show up in blue prints, and therefore do not get placed.
Again thank you for making this mod, I use it the most.
best regards,
Resom
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.13.0+] Compound Splitters 0.2.1

Post by CmdrKeen »

Mod is updated to 0.4.0
CmdrKeen
Long Handed Inserter
Long Handed Inserter
Posts: 98
Joined: Tue Sep 29, 2015 9:03 pm
Contact:

Re: [Mod 0.13.0+] Compound Splitters 0.2.1

Post by CmdrKeen »

This mod is hereby abandoned by the author. The most recent version is attached.
Attachments
compoundsplitters_0.4.1.zip
(65.76 KiB) Downloaded 111 times
Post Reply

Return to “Mods”