Project Zomboid

Project Zomboid

Hide in Car
dragonregure 18 Dec, 2024 @ 12:08am
Modded Car Quickfix
For those who using modded car and can't make this mod work. You can try this:

  1. Go to "C:\Program Files (x86)\Steam\steamapps\workshop\content\108600\3328140230\mods\HideInCar\media\lua\client"
  2. Open HIC_VehicleUtils.lua using notepad or notepad++
  3. Replace the entire IsPartListValid() method with the one I provided below

Replace this:
function IsPartListValid(vehicle, vehiclePartsData) for _, partData in ipairs(vehiclePartsData) do local part = vehicle:getPartById(partData:getId()) if part == nil then print("Part " .. partData:getId() .. " not found."); end if part ~= nil then if not IsPartValid(part) then return false; end elseif part == nil and partData:isRequired() then return false; end end return true; end

With this:
function IsPartListValid(vehicle, vehiclePartsData) return true; end

WARNING: This will affect all cars. As a result, the second check, "Doors and windows are closed and undamaged," will not function at all. This means that even if your car doesn't have any doors, your character will remain hidden.

Explanation:
Cars from other mods sometimes have custom parts or are missing original parts. The function above ensures that the car has basic parts so the player can hide. The quick fix forces the return method to always be true, meaning that even if your car is heavily damaged, the check will still return as valid. In my case, the car I want to use doesn’t have a front right door, only a rear right door.