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

b game crash

2 years ago

looks like a problem with putting my characters color on a vehicle, specifically a gunship from Aircrafts, heres the log

27348.372 Script @minime/common.lua:291: End of common.lua!
27348.379 Script @minime/scripts/remote_interface.lua:390: Adding remote interface "minime".
27348.379 Script @minime/scripts/remote_interface.lua:393: Interface has these functions: {backup_player = true, bob_class_pick_character = true, bob_classes_update = true, dump = true, get_character_list = true, get_minime_event_id = true, get_minime_event_ids = true, main_inventory_resized = true, on_character_swapped = true, on_entity_died = true, player_changed_character = true, pre_player_changed_character = true, register_characters = true, unregister_characters = true}
27348.379 Checksum for script minime/control.lua: 2618671979
27348.380 Checksum for script reskins-bobs/control.lua: 133972344
27348.381 Checksum for script SchallArtillery/control.lua: 2598963277
27348.382 Checksum for script MushroomCloud-patched/control.lua: 3921571979
27348.577 Script @minime/scripts/remote_interface.lua:388: Remote interface already exists!
27348.577 Script @minime/scripts/remote_interface.lua:393: Interface has these functions: {backup_player = true, bob_class_pick_character = true, bob_classes_update = true, dump = true, get_character_list = true, get_minime_event_id = true, get_minime_event_ids = true, main_inventory_resized = true, on_character_swapped = true, on_entity_died = true, player_changed_character = true, pre_player_changed_character = true, register_characters = true, unregister_characters = true}
27392.496 Error MainLoop.cpp:1284: Exception at tick 5060617: The mod Gizmos Car Keys (improved) (1.1.1) caused a non-recoverable error.
Please report this error to the mod author.

Error while running event GCKI::on_built_entity (ID 6)
GCKI error! color_vehicle: {self = "userdata"} is not a valid entity!
stack traceback:
[C]: in function 'error'
__GCKI
/common.lua:232: in function 'error'
GCKI/control.lua:560: in function 'color_vehicle'
GCKI/control.lua:1441: in function <GCKI/control.lua:1395>

2 years ago

Thanks for the report. I won't upload a fix for this because I've already a completely reworked version ready -- which I didn't upload yet because I'm still waiting for a small patch getting added to Vehicle Wagons. (Perhaps I should upload in spite of that, but I guess I'll still wait some more days …)

However, you can fix that yourself by editing control.lua. At line 1437, you'll find

  -- In singleplayer games, we can just loop over all registered vehicles!
  else
GCKI.dprint("Singleplayer game -- recoloring all vehicles in GCKI_vehicles!")
for v, vehicle in pairs(global.GCKI_vehicles) do
  color_vehicle(vehicle.entity)
end
  end

Change that to

  -- In singleplayer games, we can just loop over all registered vehicles!
  else
GCKI.dprint("Singleplayer game -- recoloring all vehicles in GCKI_vehicles!")
for v, vehicle in pairs(global.GCKI_vehicles) do
  if vehicle.entity and vehicle.entity.valid then
    color_vehicle(vehicle.entity)
  end
end
  end
2 years ago

after looking into it some more i think its cause of AAI, someone else in a different discussion( https://mods.factorio.com/mod/GCKI/discussion/6031e4bf2d9174df44d51779 ) had the same issue as me, i put down some ai miners then tried to call my plane and it crashed with the same error he reported, and with the same process of disabling and re enabling i managed to get it to work again, until i put down another ai. i ain't exactly neo so i think ill just use trains instead of ai lol. i look forward to the rework, and thanks for responding so fast to my issue :)

New response