Linked-belt

Post Reply
User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 407
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Linked-belt

Post by y.petremann »

TL;DR
Linked-belt would link two belt-lines wherever there are (could be on two different surfaces).
linked-belt-concept.png
linked-belt-concept.png (198.61 KiB) Viewed 5275 times
What ?
Linked-belt would link two belt-lines and merge them into one belt-line wherever the links are, they can be really far appart or on two different surfaces.

Linked-belt would be displayed like special underground belts.

Linked-belt would be configured like linked-container.

Linked-belt would already be protected against reconfiguration with the entity.operable=false

If speed is not defined in linked-belt prototype,
Linked-belt output would set his speed depending of belt_neighbors,
Linked-belt input would set his speed depending of sibling linked-belt,
Because mods like Factorissimo shouldn't search for existing linked-belt or declare new linked-belt depending of existing belts to match speed of existing belts,
but mods like Beltlayer could directly use the linked-belt as placeable by the player to replace the underground belts

Linked-belt would stop working if linked to no sibling.
Linked-belt would stop working if linked to more than one sibling.
Linked-belt would stop working if no belt is connected on the linked-belt sibling.
Linked-belt would display a "closed door" if it's not working

Linked-belt would not allow sideloading input in the same way input dloader-1x1 works.

Lua-Api should permit to probe :
- with LuaEntity.link_id to read and write link id
- with LuaEntity.neighbours to get an array of all siblings connected on it, working or not
- have the list of entities, associated with a link_id
Some more ?
Optionally, a feature could be added to have a sideload parameter in the linked-belt prototype:
- sideload=0 : no sideload (by default)
- sideload=1 : sideload like underground belts on one line only
- sideload=2 : sideload like straight belt on two lines
- sideload=3 : sideload like a belt (can be curved exactly like a belt)
linked-belt-sideloading.png
linked-belt-sideloading.png (207.76 KiB) Viewed 5275 times
Why ?
Beltlayer and Factorissimo are two mods that heavily use a script to teleport items on a belt from a surface to another, while those scripts are quite good at doing their jobs, they have a limit in performance, with linked-belt, mods like these could be a lot more UPS-friendly

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

Re: Linked-belt

Post by ssilk »

Since 1.1 there are linked chests (or so), and I think this mod use them:

https://mods.factorio.com/mod/SIEXHyperspaceStorage

And more generally seen, this is a modding-request.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
y.petremann
Filter Inserter
Filter Inserter
Posts: 407
Joined: Mon Mar 17, 2014 4:24 pm
Contact:

Re: Linked-belt

Post by y.petremann »

Sorry for posting in the wrong section, in fact if you can, can you move this in the Modding Interface Request since it is where it belong.
I'm not asking about another mod doing things, I'm asking about a feature fors mods to use.
Linked-chest are cool and there is a lot of cool things we can do with them, but they have some limitation, for example even with loaders, they are not aware of belt lines, just to recreate the feature I asked, I needed to do this contraption.
I can't imagine factorisimo doing this multiplied by 32 inside a 8x8 square or even beltlayer hiding 16 entities just to send entities to another surface with the risk of accidental connection.
linked-belt-workaround.png
linked-belt-workaround.png (245.9 KiB) Viewed 5191 times

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

Re: Linked-belt

Post by ssilk »

moved from suggestions to modding interface requests — ssilk
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2244
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: Linked-belt

Post by boskid »

Moving this to implemented. In 1.1.6 there was entity type "linked-belt" added. It was implemented a little differently than suggested but it should still be usable by mods.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: Linked-belt

Post by orzelek »

boskid wrote:
Mon Dec 14, 2020 7:48 pm
Moving this to implemented. In 1.1.6 there was entity type "linked-belt" added. It was implemented a little differently than suggested but it should still be usable by mods.
Just out of curiosity:
Will we also get a linked pipe?

That would make it possible to use entities to move stuff between surfaces without scripting.

(*dreams about linked rails*)

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Linked-belt

Post by DaveMcW »

<boskid> NOOO
<boskid> linked pipes are more likely than linked rails
<boskid> with linked rails there is so many obstacles, with most basic one being trains pathfinder heuristic, that i would have to disable it completly if there would be any linked rail in use
<boskid> and rolling stocks having 2 joints so it would be hard to decide on which surface it should be and what orientation it should report while being in half on one surface and half on another
<boskid> basically it would be immediately forcing linked rails to be on different surface, have exactly the same position, the same orientation and the same bending type
<boskid> and still rolling stocks when traveling across linked rail would be effectively teleported to different surface
<boskid> so if you would have rolling stock with grid and roboport in that grid, and construction robots flying to a rolling stock, when that rolling stock would switch to different surface all the robots would have to be immediately teleported to that other surface
<boskid> i think electricity can be connected between surfaces (there are some distance checks bypassed if both ends are on different surfaces, not sure if it was for all wires or only for PowerSwitch), now belts, there are chests
<boskid> pipes are strong next candidate, but please do not mention rails, i have nightmares because of that idea

User avatar
darkfrei
Smart Inserter
Smart Inserter
Posts: 2903
Joined: Thu Nov 20, 2014 11:11 pm
Contact:

Re: Linked-belt

Post by darkfrei »

y.petremann wrote:
Sun Dec 13, 2020 9:09 am
Linked-belt would link two belt-lines wherever there are (could be on two different surfaces).
See my implementation: Linked Belts
Attachments
2020-12-19T14_58_23-Factorio 1.1.6.png
2020-12-19T14_58_23-Factorio 1.1.6.png (206.8 KiB) Viewed 4842 times

chugin_iv
Burner Inserter
Burner Inserter
Posts: 9
Joined: Tue Feb 23, 2021 2:22 pm
Contact:

Re: Linked-belt

Post by chugin_iv »

DaveMcW wrote:
Mon Dec 14, 2020 9:11 pm
<boskid> NOOO
<boskid> linked pipes are more likely than linked rails
<boskid> with linked rails there is so many obstacles, with most basic one being trains pathfinder heuristic, that i would have to disable it completly if there would be any linked rail in use
<boskid> and rolling stocks having 2 joints so it would be hard to decide on which surface it should be and what orientation it should report while being in half on one surface and half on another
<boskid> basically it would be immediately forcing linked rails to be on different surface, have exactly the same position, the same orientation and the same bending type
<boskid> and still rolling stocks when traveling across linked rail would be effectively teleported to different surface
<boskid> so if you would have rolling stock with grid and roboport in that grid, and construction robots flying to a rolling stock, when that rolling stock would switch to different surface all the robots would have to be immediately teleported to that other surface
<boskid> i think electricity can be connected between surfaces (there are some distance checks bypassed if both ends are on different surfaces, not sure if it was for all wires or only for PowerSwitch), now belts, there are chests
<boskid> pipes are strong next candidate, but please do not mention rails, i have nightmares because of that idea
Um... Might not be a good idea, but how about "underground tunnel" view on this? As in, not linked rails per se, but specific structure built at the end of a rail line, into which train enters entirely, and only then begins to reappear out the other (connected) one? That way, there's no parts of the train that have to simultaneously exist on different surfaces, have different orientations or any other duality stuff.

Might look a bit strange for long trains if they're placed really close together, though.

mrvn
Smart Inserter
Smart Inserter
Posts: 5704
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Linked-belt

Post by mrvn »

chugin_iv wrote:
Tue Feb 23, 2021 2:39 pm
DaveMcW wrote:
Mon Dec 14, 2020 9:11 pm
<boskid> NOOO
<boskid> linked pipes are more likely than linked rails
<boskid> with linked rails there is so many obstacles, with most basic one being trains pathfinder heuristic, that i would have to disable it completly if there would be any linked rail in use
<boskid> and rolling stocks having 2 joints so it would be hard to decide on which surface it should be and what orientation it should report while being in half on one surface and half on another
<boskid> basically it would be immediately forcing linked rails to be on different surface, have exactly the same position, the same orientation and the same bending type
<boskid> and still rolling stocks when traveling across linked rail would be effectively teleported to different surface
<boskid> so if you would have rolling stock with grid and roboport in that grid, and construction robots flying to a rolling stock, when that rolling stock would switch to different surface all the robots would have to be immediately teleported to that other surface
<boskid> i think electricity can be connected between surfaces (there are some distance checks bypassed if both ends are on different surfaces, not sure if it was for all wires or only for PowerSwitch), now belts, there are chests
<boskid> pipes are strong next candidate, but please do not mention rails, i have nightmares because of that idea
Um... Might not be a good idea, but how about "underground tunnel" view on this? As in, not linked rails per se, but specific structure built at the end of a rail line, into which train enters entirely, and only then begins to reappear out the other (connected) one? That way, there's no parts of the train that have to simultaneously exist on different surfaces, have different orientations or any other duality stuff.

Might look a bit strange for long trains if they're placed really close together, though.
Sorry for hijacking this thread but I couldn't find where the original was quoted from.

Actually why is teleporting trains over to the other surface a problem. How is that even something new? Why would it matter to robots? (code wise)

Lets ignore the visual effect of the train hanging over the end of rail till it reaches the midpoint and then disappearing. Obviously any use of a linked rail could construct some kind of portal or tunnel graphic around the linked tile that hides the train car before it teleports. So the train would drive into the tunnel, become invisible beneath the graphics of the tunnel entrance, teleport, and reappear out the other tunnel entrance. The tunnel entrance just has to cover at least the size of a cargo wagon on each surface.

Roboports in a grid and construction bots flying around? What happens now if I teleport a player, car, tank, spidertron with those to another surface? Programmatically how is that different from what a linked rail would do?

Do you think it's different because the user would expect the bots to somehow magically follow the train through the portal or tunnel? I would say tough luck. Don't drive your train through linked rails with bots in the air. If the train comes back to the original surface the bots can aim for it again. Even the RFC 1149 on "IP over avian carriers" says that pigeons ignore bridges and tunnels. Same for bots.


Aside from that: Any update on linked pipes? Or linked tanks? Anything with a fluid box on separate surfaces?

Post Reply

Return to “Implemented mod requests”