[1.1.80] Trains with short joint distance and long connection distance won't connect

Post your bugs and problems so we can fix them.
Post Reply
Cyberpro_
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Aug 14, 2022 1:25 pm
Contact:

[1.1.80] Trains with short joint distance and long connection distance won't connect

Post by Cyberpro_ »

So I'm developing a mod (https://mods.factorio.com/mod/Space_trains is the latest public version, https://drive.google.com/drive/folders/ ... share_link has both a zipped and unzipped version of the mod (the in-development version, with the train that is causing the problems)) and one of the trains I'm trying to add has a relatively short joint distance compared to its length. As such, the connection distance has to be longer, in this case, the joint distance is 4 and the connection distance is 5. When placing the units (where the game snaps them to automatical), they will not automatically connect, even though when I manually reverse them into each other, they can connect if close enough.
The bottom train was connected by manually reversing, the top one was paced at the snapping points of the game
The bottom train was connected by manually reversing, the top one was paced at the snapping points of the game
Bild_2023-05-01_114715968.png (861.66 KiB) Viewed 587 times
The problem only occurs between the two locomotives (from the left, the first two pieces of rolling stock), not between locomotives and wagons. (wagons have a joint distance of 5.4 and a connection distance of 3.6).

The bug can be reproduced by simply placing a locomotive, and then a second locomotive behind it where the game will snap it to. they will not automatically connect, and pressing g will give the "cannot connect rollingstock" message

(For more clarity, the only difference between types A and B are the graphics and the problem only occurs for the "Darkliner" locomotives)

After reaching out in the #mod-making channel on the official serve (https://discord.com/channels/1396775903 ... 2265732098), it seems like it is a hardcoded engine limit, but I'm not sure about that (Relevant message https://discord.com/channels/1396775903 ... 7370059808). If this is an engine limit, it is not documented anywhere, or at least I couldn't find any mention of it on the wiki or luaAPI. If it is hardcoded, but not an engine limitation, it would be nice to have a way to give trains a property (maybe "long_connections = true") that increases this value to 10 or something. If it is, in fact, an engine limitation, mentioning it in the documentation would be useful.
Attachments
factorio-current.log
Log from when i took the screenshot
(44.86 KiB) Downloaded 30 times

Cyberpro_
Burner Inserter
Burner Inserter
Posts: 7
Joined: Sun Aug 14, 2022 1:25 pm
Contact:

Re: [1.1.80] Trains with short joint distance and long connection distance won't connect

Post by Cyberpro_ »

Also, in case that matters:
System:
-CPU: AMD Ryzen 5 3600
-GPU: NVIDIA GeForce RTX 3060
-RAM: 16GB DDR4
-Windows 10
-The game is installed on an SSD

Post Reply

Return to “Bug Reports”