Gizmos Car Keys (improved)

by Pi-C

Tired of running to your vehicle? Then let it come to you! This mod is based on "Gizmos Car Keys" by aodgizmo. It works with most modded car and spider-vehicle prototypes -- not just vanilla cars.

Content
3 months ago
0.17 - 1.1
14.8K
Transportation

a [0.18.3] Risky changes ahead!

4 years ago
(updated 4 years ago)

I've noticed that the current way of storing vehicle data isn't optimal and will lead to problems with other mods that replace vehicles (e.g. AAI or Vehicle Wagon). So, for the next release, I plan to reorganize the data structure a bit.

I know that migrations can be dangerous (I already happened to delete complete tables in another mod accidentally). Of course I'll try my best to avoid such mistakes, but they still may happen. If you're afraid that anything may break, just skip the next version!

Of course, it's necessary that the changes get tested by some real players -- otherwise, it's hard to find those nasty bugs. So I'd appreciate if you would try out the next version. Just be careful and make sure you have a backup of your saved game! I really don't want you to lose hours of progress. :-)

4 years ago

I've decided to make these changes only for Factorio 0.18. If everything is working there, I'll backport these changes to Factorio 0.17 for the next double release.

4 years ago

Yep, it crashed on migration:
342.369 Applying migration: Gizmos Car Keys (improved): 00-17-04_check_tech.lua
342.370 Applying migration: Gizmos Car Keys (improved): 00-17-09_cars_to_vehicles.lua
342.371 Applying migration: Gizmos Car Keys (improved): 00-17-10_remove_autodrive-passenger.lua
342.384 Applying migration: Gizmos Car Keys (improved): 00-18-03_combine_locked_+claimed_vehicle_lists.lua
342.531 Error ServerMultiplayerManager.cpp:90: MultiplayerManager failed: "Error while applying migration: Gizmos Car Keys (improved): 00-18-03_combine_locked
+_claimed_vehicle_lists.lua

...ions/00-18-03_combine_locked_+claimed_vehicle_lists.lua:43: attempt to index local 'locker' (a nil value)
stack traceback:
...ions/00-18-03_combine_locked
+claimed_vehicle_lists.lua:43: in function 'is_locked_vehicle'
...ions/00-18-03_combine_locked
+_claimed_vehicle_lists.lua:57: in main chunk

The save for debug and mod set (230MB) is at https://mega.nz/file/GxEQjSLQ#mBfJkZfXgvsp3IoK0SYXcCg2B5_oOZvfgSUE9n4hIa8

4 years ago
(updated 4 years ago)

Thanks for finding this! Replacing line 43 of migrations/00-18-03_combine_locked+_claimed_vehicle_lists.lua with

        return locker and locker.index

should fix that. :-)

4 years ago

Just wanted to thank you again for this great bug report!

The save for debug and mod set (230MB) is at https://mega.nz/file/GxEQjSLQ#mBfJkZfXgvsp3IoK0SYXcCg2B5_oOZvfgSUE9n4hIa8

I didn't really need this to fix the crash (the error message was sufficient for such a stupid mistake). But because I could try out things in a game with quite a number of mods I don't use myself, I also could identify a problem with "Autodrive" that I hadn't known about. So I can fix that for the next version as well now. :-)

4 years ago

I can confirm that I am experiencing the same issue that Dragonling reported across several maps.

I can also confirm that your recommendation regarding a manual fix to line 43 of the migration file work.

Thanks in advance

Hiladdar

4 years ago

19.874 Applying migration: Gizmos Car Keys (improved): 00-17-04_check_tech.lua
19.875 Applying migration: Gizmos Car Keys (improved): 00-17-09_cars_to_vehicles.lua
19.875 Applying migration: Gizmos Car Keys (improved): 00-17-10_remove_autodrive-passenger.lua
19.886 Applying migration: Gizmos Car Keys (improved): 00-18-03_combine_locked_+claimed_vehicle_lists.lua
20.179 Error ServerMultiplayerManager.cpp:90: MultiplayerManager failed: "Error while applying migration: Gizmos Car Keys (improved): 00-18-03_combine_locked
+_claimed_vehicle_lists.lua

...ions/00-18-03_combine_locked_+claimed_vehicle_lists.lua:43: attempt to index local 'locker' (a nil value)
stack traceback:
...ions/00-18-03_combine_locked
+claimed_vehicle_lists.lua:43: in function 'is_locked_vehicle'
...ions/00-18-03_combine_locked
+_claimed_vehicle_lists.lua:57: in main chunk"
20.179 Info ServerMultiplayerManager.cpp:771: updateTick(4294967295) changing state from(CreatingGame) to(InitializationFailed)
20.179 Info CommandLineMultiplayer.cpp:234: Exit point.
20.190 Info ServerMultiplayerManager.cpp:136: Quitting multiplayer connection.
20.190 Info ServerMultiplayerManager.cpp:771: updateTick(4294967295) changing state from(InitializationFailed) to(Closed)
20.293 Info UDPSocket.cpp:218: Closing socket
20.295 Goodbye
[ OK ] Debug fctrserver: Stopping debug

This is a error running with headless 0.18.24

4 years ago

@yofreak: Known issue, known solution (see posts above yours). I thought I'd get away with not releasing a fix where just one line needs to be changed. But as the next update (compatibility with Vehicle Wagons) will take some more time, I'll do it soonish. :-)

4 years ago

OK, uploaded the fix!

4 years ago

I can confirm the everything works as expected, and zipped mod loads. Thanks.

Hiladdar

4 years ago

Thanks! Hopefully that was the last crash before the next update. :-)

4 years ago

@yofreak: Known issue, known solution (see posts above yours). I thought I'd get away with not releasing a fix where just one line needs to be changed. But as the next update (compatibility with Vehicle Wagons) will take some more time, I'll do it soonish. :-)

Sorry didnt read all enough ;) Now it works fine!

4 years ago

Consider the transition done! The changes from 0.18.3 - 0.18.5 have been integrated into 0.17.16 (unless they only apply to Factorio 0.18). GCKI 0.17.16 is now back in sync with 0.18.6. Please try the latest versions! :-)

New response