Is your vehicle always where you are not, especially when you need it? Do you regularly waste time running to your vehicle because you need something from its trunk? Then let it come to you instead!
This mod is based on Gizmos Car Keys by aodgizmo. It should work with most modded vehicles (except trains and trains in disguise) -- not just cars.
Usage
After you've researched automobilism (or ships, if Cargo Ships is active), the keys are available. Use them on a vehicle to make it yours. Using them again on the same vehicle will lock/unlock the vehicle. By using them on another vehicle, you give up your previous vehicle and claim the new one. (Hint: If you want to exchange vehicles but are afraid that other players might take something from your vehicle, or the vehicle itself, lock it before you give it up! Only you will be able to claim it in this state.)
If you use the keys on the ground (or on water, if you have a boat) the vehicle will be summoned there -- if it can be placed there, and if that position is within your character's reach. Usually, your reach will be limited during this action to the vanilla game settings (10 tiles) even if you have mods installed that extend your reach. I consider using long reach as extremely cheaty because you can also summon a car if you are in it -- with long reach enabled, your vehicle keys would become your personal mobile teleporter! Nevertheless, if you insist on using the keys with long reach, there should be a startup option hidden somewhere …
In contrast to the original mod, this one also supports vehicle grids and everything else a vehicle might contain. It also is possible to summon vehicles to another surface; driver and player will be teleported along with the vehicle unless they have chosen to be left on the original surface via a per-player runtime setting.
Other than the original mod, this one should be safe to use in multiplayer games.
Does it work with other mods?
Incompatible mods
GCKI should be safe to use with other mods. If you do find an incompatibility, please don't hesitate to report it, so I can try to make it compatible!
Incompatible prototypes
Some mods utilize vehicles for special purposes. Such vehicles aren't meant to be used directly by players. GCKI will ignore (some) prototypes created by these mods: Avatars, Companion Drones, HelicopterRevival, Industrial Revolution 2, King Jo's Warhammer 40K Bunker, Logistic Carts, Renai Transportation, Satisfactorio, Shield Projector, Space Exploration. GCKI also allows other mods to black- or whitelist their vehicles with GCKI.
Supported mods
Autodrive
- If a vehicle controlled by Autodrive is locked, the dummy passenger will be removed (if present).
- Autodrive now recognizes whether a vehicle has been locked by this mod and will disable its GUI controls in this case.
- Custom names will be synced between Autodrive and GCKI. Even if a given prototype has been blacklisted in one of the mods, that name will be reserved.
AAI Programmable Vehicles
- AAI Programmable Vehicles will continually destroy and replace any vehicle controlled by it. GCKI will keep track of these changes, so the two mods will work together.
Cargo Ships
- If this mod is installed, the keys will also be unlocked by researching "Ships".
DMV - Directional Movement Vehicles
- DMV will change some car prototypes to spider-vehicles. If DMV is added to an existing game, GCKI will make sure that you can continue to use the cars that you've built already.
Nullius
- GCKI is officially compatible with Nullius and has been added to the Nullius Momenti modpack.
Uncle Shred's unminable vehicles/Unminable Vehicles
- If one of these mods makes vehicles unminable, GCKI will respect this and keep vehicles unminable even if they are unlocked.
Vehicle Wagon 2
- This mod is fully compatible with GCKI. If a player owned the vehicle before it was loaded, he will get it back when it is unloaded -- unless the player has claimed another vehicle in the meantime. Only the player who owns or who has locked a vehicle may load it onto a wagon and unload it again. Thanks to robot256 for cooperating on getting this done!
Remote interface for use by other mods
As of version 0.17.14, other mods can check who has locked a vehicle or who is the owner of a vehicle.
Usage:
remote.call("GCKI", "vehicle_locked_by", vehicle)
remote.call("GCKI", "vehicle_owned_by", vehicle)
In both cases, the argument 'vehicle' must be an entity of type "car". Both remote calls will return either a player entity or nil.
As of version 0.17.15/0.18.2, other mods can check whether a dummy character has been inserted into a vehicle.
Usage:
remote.call("GCKI", "dummies_in_vehicle", vehicle)
The argument 'vehicle' must be an entity of type "car". This remote call will return either nil or a table of character entities with the fields "driver" and "passenger".
Supported languages
- English
- German
- Russian (Dragonling fetches and translates new/changed strings from other mods and includes them in his. I'll eventually integrate his changes, but you'll get new translations faster if you also have his translations-pack mod installed!)
If you can provide a localization for another language, I'd be happy to include it! :-)
Uninstalling GCKI
If you want to remove GCKI from a game, you should make sure that there are no locked vehicles left behind! Otherwise, you won't be able to drive them, mine them, or open their inventory. In single-player mode, or as admin, you can use the commands "/GCKI-unlock" and "/GCKI-reset" to unlock or reset all vehicles that have been touched by GCKI.
Help needed
I've spent quite some time on testing this mod to make sure it's safe to use in multiplayer mode. However, doing these tests locally may not be reliable. So I'm interested in any feedback on issues while playing multiplayer games!
Credits
Credits go to
- aodgizmo: for the original mod -- I used the code (and changed, added to, or removed parts of it) and the car-key graphics (which I also used for the mod thumbnail) in my mod.
- Zahnfeechen: for Gizmos Car Keys - Zahnfeechen Patch (which updated aodgizmo's mod for Factorio 0.17) -- I happily played with this mod myself until I decided to make my own version.
- Dragonling: for the Russian localization -- thanks a lot!