Page 1 of 2

[MOD 0.15.X] Belt Overflow

Posted: Thu Jun 02, 2016 1:14 am
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

Re: [MOD 0.12.34] Belt Overflow

Posted: Thu Jun 02, 2016 4:24 am
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".

Re: [MOD 0.12.34] Belt Overflow

Posted: Thu Jun 02, 2016 4:45 am
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.

Re: [MOD 0.12.34] Belt Overflow

Posted: Thu Jun 02, 2016 4:18 pm
by Nick-Nack
Wow, I'm really impressed! Definitely will try this out this weekend! :)

Re: [MOD 0.12.34] Belt Overflow

Posted: Fri Jun 03, 2016 9:35 am
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?

Re: [MOD 0.12.34] Belt Overflow

Posted: Fri Jun 03, 2016 9:49 am
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.

Re: [MOD 0.12.34] Belt Overflow

Posted: Thu Jun 09, 2016 9:19 pm
by sparr
New release. Major bug fixing, an optional indicator for where belts can overflow, and a huge code refactor.

Re: [MOD 0.12.34] Belt Overflow

Posted: Fri Jun 10, 2016 2:13 am
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.

Re: [MOD 0.12.34] Belt Overflow

Posted: Fri Jun 10, 2016 2:50 am
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.

Re: [MOD 0.12.34] Belt Overflow

Posted: Fri Jun 10, 2016 11:37 pm
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

Re: [MOD 0.12.34] Belt Overflow

Posted: Fri Jun 10, 2016 11:51 pm
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.

Re: [MOD 0.12.X] Belt Overflow

Posted: Thu Jun 16, 2016 1:33 am
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!

Re: [MOD 0.12.X] Belt Overflow

Posted: Thu Jun 16, 2016 4:05 am
by British_Petroleum
wow this will really change factory designs. I think if i played this I would only use circular belts :P

Re: [MOD 0.12.X] Belt Overflow

Posted: Sat Jun 25, 2016 3:31 pm
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.

Re: [MOD 0.12.X] Belt Overflow

Posted: Sat Jun 25, 2016 5:48 pm
by sparr
Thanks, I'll look into this.

Are you using any belt-laying mods, like Easy Belt or Belt Planner?

Re: [MOD 0.12.X] Belt Overflow

Posted: Sat Jun 25, 2016 11:27 pm
by sparr
It is likely I'll fix this at the same time as updating for 0.13

Re: [MOD 0.12.X] Belt Overflow

Posted: Sun Jun 26, 2016 7:24 pm
by swni
I disabled all other mods while reproducing the bug.

Sounds like you figured it out already though?

Re: [MOD 0.13.X] Belt Overflow

Posted: Wed Jun 29, 2016 1:12 am
by sparr
Fixed that bug, updated for 0.13, and uploaded to the mod portal.

Re: [MOD 0.13.X] Belt Overflow

Posted: Sun Jul 17, 2016 2:37 pm
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?

Re: [MOD 0.13.X] Belt Overflow

Posted: Mon Jul 18, 2016 4:52 pm
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.