[kovarex] [0.17.75] Crash placing modified rail wagons

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Post Reply
User avatar
Muppet9010
Fast Inserter
Fast Inserter
Posts: 195
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

[kovarex] [0.17.75] Crash placing modified rail wagons

Post by Muppet9010 »

I was placing some modified locamotives and cargo wagons in editor mode and the game crashed. They were being placed in a line using the auto connect placement feature. I placed into a train from front heading backwards a loco, wagon and clicked to place a second loco when it happened. I saw the 2nd loco appear in the game and the ghost marker then appeared between the 2nd (back) loco and the cargo wagon when the error occured.
Capture.PNG
Capture.PNG (199.12 KiB) Viewed 434 times
The modified wagon entity prototype values were:

Code: Select all

local smallLoco = factorioUtil.table.deepcopy(data.raw.locomotive.locomotive)
smallLoco.name = "small_locomotive"
smallLoco.minable.result = "small_locomotive"
smallLoco.collision_box = {{-0.6, -0.7}, {0.6, 0.7}}
smallLoco.selection_box = {{-1, -0.9}, {1, 0.9}}
smallLoco.vertical_selection_shift = -0.5
smallLoco.connection_distance = 2
smallLoco.joint_distance = 1

local smallCargoWagon = factorioUtil.table.deepcopy(data.raw["cargo-wagon"]["cargo-wagon"])
smallCargoWagon.name = "small_cargo_wagon"
smallCargoWagon.minable.result = "small_cargo_wagon"
smallCargoWagon.collision_box = {{-0.6, -1.25}, {0.6, 1.25}}
smallCargoWagon.selection_box = {{-1, -1.4}, {1, 1.4}}
smallCargoWagon.vertical_selection_shift = -0.5
smallCargoWagon.connection_distance = 2
smallCargoWagon.joint_distance = 2


To reproduce
In 0.17.75
Load the mod zip attached: small_trains_17.0.0.zip
Load the save attached: _small loco test a.zip
In editor place a small_locomotive on the horizontal track with it snapping to the station.
Place a small_cargo_wagon behind it, snapping in place.
Place another small_locomotive behind the cargo wagon, snapping to it.
Game errors.
Attachments
small_trains_17.0.0.zip
(1.25 KiB) Downloaded 15 times
_small loco test a.zip
(1.17 MiB) Downloaded 15 times
factorio-dump-current.dmp
(547.5 KiB) Downloaded 11 times
factorio-current.log
(8.08 KiB) Downloaded 9 times

User avatar
Muppet9010
Fast Inserter
Fast Inserter
Posts: 195
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Re: [0.17.75] Game Crash from placing modified rail wagons

Post by Muppet9010 »

from antidotal experience this seems to be related to the selection boxes, as if I make them smaller the crash doesn't occur.

kovarex
Factorio Staff
Factorio Staff
Posts: 7448
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [kovarex] [0.17.75] Crash placing modified rail wagons

Post by kovarex »

I can't load the mod.

It is generally not a good idea to try to change the size of the rolling stocks too much.

User avatar
Muppet9010
Fast Inserter
Fast Inserter
Posts: 195
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Re: [kovarex] [0.17.75] Crash placing modified rail wagons

Post by Muppet9010 »

I had forgotten this was logged tbh. I gave up on this mod idea shortly after posting this bug due to other game engine limitations relating to non default sized wagons. I never ported the POC mod code in to .18 so no idea if the bug still occurs, but seems pretty pointless now given the wider context.

User avatar
Muppet9010
Fast Inserter
Fast Inserter
Posts: 195
Joined: Sat Dec 09, 2017 6:01 pm
Contact:

Re: [kovarex] [0.17.75] Crash placing modified rail wagons

Post by Muppet9010 »

Ended up trying this mod concept again and I no longer see an issue with selection boxes that touch/overlap when on corners.
So guess the core issue was fixed in the past 7 months :)

Post Reply

Return to “Pending”

Who is online

Users browsing this forum: No registered users