[MOD 0.15.X] Belt Overflow

Topics and discussion about specific mods
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

[MOD 0.15.X] Belt Overflow

Post by sparr »

Belt Overflow

https://mods.factorio.com/mods/sparr/belt-overflow

Description:
  • This mod causes full belts to overflow at the end.
LONG DESCRIPTION
Details: Pictures
Overflow demonstration
Factory ruination
Video https://youtu.be/ZlqmGD9MZSA
Comments and suggestions
This thread!

Change Log
Version-0.15.0
Version-0.13.0
Version-0.12.1
Version-0.12.0
Version-0.0.2
Version-0.0.1
Last edited by sparr on Sun Sep 17, 2017 6:18 am, edited 7 times in total.
Sean Mirrsen
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Apr 27, 2016 6:30 pm
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by Sean Mirrsen »

*checks code*

Yep, that's about as complex as I was thinking. The idea itself is great, I'm just not sure Lua alone can handle this kind of thing well enough. It would likely need a hard-code implementation to really work, something like a flag in belt definition, "spill-item-if-cant-move".
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by sparr »

Fortunately I had already written most of the code for my Belt Combinator mod, just yesterday.

Of course, after I wrote it, one of the devs on IRC said they might add API calls to follow belt chains. That would make this a lot easier to do with a mod; 90% of the code here is for figuring out which belts to check.
Nick-Nack
Inserter
Inserter
Posts: 36
Joined: Tue May 31, 2016 11:03 am
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by Nick-Nack »

Wow, I'm really impressed! Definitely will try this out this weekend! :)
Squiss
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Oct 22, 2015 8:43 am
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by Squiss »

How does it work if you wanna merge two lines into one with a spliter?
Does the the 2nd (unsued) exit of the splitter overflow on the ground as well?
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by sparr »

Squiss wrote:How does it work if you wanna merge two lines into one with a spliter?
Does the the 2nd (unsued) exit of the splitter overflow on the ground as well?
The second outlet of the splitter should only overflow if you try to put more items into the splitter than it can output into the single continuing output lane.
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by sparr »

New release. Major bug fixing, an optional indicator for where belts can overflow, and a huge code refactor.
bug sniper
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri Jun 10, 2016 2:11 am
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by bug sniper »

This looks very good, almost exactly what I was hoping to see. Now, we just need a material that becomes a biter when it falls off the conveyor belt.
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by sparr »

sparr wrote:
Squiss wrote:How does it work if you wanna merge two lines into one with a spliter?
Does the the 2nd (unsued) exit of the splitter overflow on the ground as well?
The second outlet of the splitter should only overflow if you try to put more items into the splitter than it can output into the single continuing output lane.
For code simplicity I ended up making the overflow happen at the entry to the splitter, not the second exit. I'll work on fixing that when I can.
Qon
Smart Inserter
Smart Inserter
Posts: 2164
Joined: Thu Mar 17, 2016 6:27 am
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by Qon »

bug sniper wrote:This looks very good, almost exactly what I was hoping to see. Now, we just need a material that becomes a biter when it falls off the conveyor belt.
viewtopic.php?f=93&t=26524

Lol @sparr, you are pretty quick. Though the mod description says it only makse small artifacts into eggs and not the normal ones. Is this a description error or is this intended behaviour?

I would love to watch a lets play with these 2 mods :D
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.12.34] Belt Overflow

Post by sparr »

Amended the description. Thanks. Hope someone has fun with one or both mods. I do look forward to seeing a stream or video series using belt-overflow.
User avatar
stellatedHex
Inserter
Inserter
Posts: 27
Joined: Wed Jun 15, 2016 1:39 am
Contact:

Re: [MOD 0.12.X] Belt Overflow

Post by stellatedHex »

I spotted this mod and wondered how it one handled stuff being in the way. Long story short, found a cool exploit that is completely impractical on multiple levels:
  • Have a a stupid amount of stone
  • Build a stupid amount of walls
  • Chart out a couple-meter-wide path from your mining outpost to your base. Build an X m-wide ULTRAWALL on either side of it, where X is at least, say, 5.
  • Every X m on the path, place belts across the path so that they are parallel to each other and facing toward your base
  • Fill in the rest of the path with walls
  • Enjoy your new unreliable, slow, monoresource, and probably laggy teleporter bus! Trains? Who needs trains?

PS: Heya Sparr, long time no see!
stellatedHexahedron wrote:I'm the kind of person who makes Conway's Game of Life in Factorio, but forgets what they are doing halfway through typing their username.
British_Petroleum
Filter Inserter
Filter Inserter
Posts: 321
Joined: Tue Dec 23, 2014 7:21 am
Contact:

Re: [MOD 0.12.X] Belt Overflow

Post by British_Petroleum »

wow this will really change factory designs. I think if i played this I would only use circular belts :P
swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.X] Belt Overflow

Post by swni »

Hi- I was very excited by this mod and want to surprise a few friends by including it in our 0.13 multiplayer party next week, but unfortunately when I tried it for myself I found it to be unstable. Specifically, when placing a transport belt I very frequently get the following error, which crashes the game:

Error while running the event handler: __belt-overflow__/control.lua:357: LuaEntity API call when LuaEntity was invalid.

The bug can be reliably reproduced from a new game by the following (first use 3 of your starting iron to make two transport belts):

(1) place a belt
(2) place a belt in the same location as (1) but facing another direction
(3) place a belt directly in front of the existing belt's new direction

or

(1) place a belt
(2) place a belt next to (1) but not in front of it
(3) place a belt in the same location as (1) but pointing towards belt (2)

Also some of the red terminal highlights seem to be stuck permanently, perhaps when the game is saved/reloaded. (Also "mod_version" at the top of control.lua is out of date.)

Tried in Factorio 0.12.35.

If you fix the crashes I would be stoked! Great mod idea.
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.12.X] Belt Overflow

Post by sparr »

Thanks, I'll look into this.

Are you using any belt-laying mods, like Easy Belt or Belt Planner?
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.12.X] Belt Overflow

Post by sparr »

It is likely I'll fix this at the same time as updating for 0.13
swni
Long Handed Inserter
Long Handed Inserter
Posts: 91
Joined: Sat Mar 05, 2016 1:54 am
Contact:

Re: [MOD 0.12.X] Belt Overflow

Post by swni »

I disabled all other mods while reproducing the bug.

Sounds like you figured it out already though?
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.13.X] Belt Overflow

Post by sparr »

Fixed that bug, updated for 0.13, and uploaded to the mod portal.
EnderTheXenocide
Burner Inserter
Burner Inserter
Posts: 17
Joined: Sat Apr 02, 2016 6:23 pm
Contact:

Re: [MOD 0.13.X] Belt Overflow

Post by EnderTheXenocide »

I was very interested in this mod, unfortunately it doesn't do quite what I imagined, however this is a really cool idea.

What I'm wondering is, would it be possible to have a mod where items go off the end of a belt and just vanish?
What I'm thinking is that it'd make the circuit network critically important, and I want to do a build like that. Possible?
sparr
Smart Inserter
Smart Inserter
Posts: 1446
Joined: Fri Feb 14, 2014 5:52 pm
Contact:

Re: [MOD 0.13.X] Belt Overflow

Post by sparr »

EnderTheXenocide wrote:What I'm wondering is, would it be possible to have a mod where items go off the end of a belt and just vanish?
Sure. Items already disappear off the end of the belt here, they just also get spawned on the ground. If you comment out the item spilling line in this mod then it should do what you want.
Post Reply

Return to “Mods”