I've been toying with the idea of a diagonal inserter challenge mod, and for a while I would get a crash seemingly at random when the game would save, both during a manual save or an autosave.
I've finally figured out a way to reproduce it, considering the mod I made was very simple.
I've set the inserter pickup and insert positions to have the same x offset as their y offset, so they become 45 degree inserters instead of straight on.
You can rotate them fine, and do everything you can with a normal inserter, but if you decide to flip inserters horizontally (relative to the inserter) then it flips the positions of insert and pickup, while keeping the same orientation of the entity. Since I did not set the allow_custom_vectors property to true, when you go to save the game the positions are invalid.
I believe the most sensible solution (from the player's perspective) to this problem is to make it so you cannot flip blueprints that contain inserters without an x offset of 0 in either of the pickup or insert positions, instead of just allowing the flip to happen. For example, if someone made a mod to make all inserters right 90 degree inserters, you could easily bypass that restriction with a simple flip and make a left 90 degree inserter, thus removing the hypothetical challenge completely. If someone wanted to allow the right to left flip, then they would be able to enable the custom vector property and the flip restriction would no longer apply.
I've attached the mod I made, as well as a video demonstrating the crash.
[1.1.57] Crash flipping modded inserter "Saving in this state will result in a desync when loaded."
- _CodeGreen
- Long Handed Inserter
- Posts: 72
- Joined: Sat Mar 05, 2022 11:30 am
- Contact:
[1.1.57] Crash flipping modded inserter "Saving in this state will result in a desync when loaded."
- Attachments
-
- diagonal-inserters_0.0.1.zip
- (578 Bytes) Downloaded 109 times
-
- OBS-2022-04-29 20-00-25.mp4
- (2.86 MiB) Downloaded 155 times
-
- factorio-current.log
- (18.36 KiB) Downloaded 116 times
My Mods | If you can't make it perfect, make it adjustable
Re: [1.1.57] Crash flipping modded inserter "Saving in this state will result in a desync when loaded."
Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.