Project Zomboid

Project Zomboid

[B42] Week One NPC
Mod Compatibility Issue with Way More Cars
In testing compatibility with my mod (Way More Cars) against other mods, I noticed that this mod, Week One, kinda just... deletes cars at random? It deletes about half, maybe less, idk, of all the vehicles that are spawned in on the map AFTER loading in that chunk, they literally just vanish. You can see them for a few seconds before a random check from this mod comes through and then very suddenly they just get cleared out as if they never existed. It's most likely related to the NPC driving feature because when the NPC driven cars drive off screen and despawn, so do mine.

I know you're most definitely busy with all these bugs given the unstable is updating and breaking a lot of random things, and you're still investing the freezes, but eventually I would like this to be sorted out, thanks.
Last edited by GamestaMechanic; 9 Jul @ 5:51pm
< >
Showing 1-6 of 6 comments
Slayer  [developer] 10 Jul @ 1:05am 
Hey. Yes. Cars are despawned in the early days. It necessary because it looks unnatural for cars that spawn in the middle of roads.

You could hack it by adding a moddata parameter.

Vehicle:getModData().BWO.repaired = true
I understand that cars in the middle of the road would be deleted, burnts and wrecks, but it also affects entire parking lots of perfectly normal cars and I'm not sure how it chooses which vehicles to delete.

Is it possible for you to only delete trafficjam(s)?
Last edited by GamestaMechanic; 10 Jul @ 10:26am
Slayer  [developer] 10 Jul @ 10:49am 
When a square is loaded that has a car on it, I check if that car ovverall condition is below certain threshold. If yes then it removes it. If not, it even raises it condition and marks are repaired so that it is not subject to recurring checks.
Last edited by Slayer; 10 Jul @ 10:49am
Well the problem with that is, as you actually have noted in your files, KI5's cars (and anyone else's vehicle mod) with armor and other extra mechanics count towards that repair AND condition number. And for the same reason, this line of code won't work.

So I ask again, is it possible for you to only delete trafficjam(s) instead of just any car under a certain quality? Because this also affects even vanilla cars if you're someone who likes playing with vehicles set to very very low condition or with more burnt vehicles. And this is exactly what my mod aims to do, so it is a huge conflict and just repairing the vehicles defeats the purpose of it.

Or, if possible, allow me to DISGUISE the cars as repaired so it gets skipped over?
Last edited by GamestaMechanic; 10 Jul @ 1:59pm
Slayer  [developer] 10 Jul @ 10:39pm 
Armor is skipped in repair

Cars with very low quality on the streets is odd before the event.

I dontthink i can recognize kze traffic jams by any other means.

I gave you the recipe how to solve the problem in my first post.
The modded attachments to modded cars are still considered as 0% when added in the overall condition percentage, that lowers the overall % and the cars get despawned. I've seen very high conditioned vehicles get despawned just because of how many empty modded spots there were. So not only does this not work sometimes, I would also just like to have the freedom to choose low quality cars.

Your mod already attempts to repair all the vehicles it can, so I don't need to do it, but again, the overall percent is not accurate for modded vehicles and it will still despawn a good chunk of them. It's just an inconvenience for anyone who wants to play with a different setting for car condition.

By forcing the vanilla sandbox settings to have no car wrecks on the roads and no road stories at all (never), nothing would spawn in to begin with. Then, these things can easily be re-enabled after one week passes so they can spawn again in newly loaded areas (re-enabling these sandbox settings mid-game works).

Also, specific vehicle definitions for zones and cars themself can be changed in the VehiclesZoneDefinition.lua file. I still recommend the first choice more because it's easier and more compatible. My mod does not interact with those 2 sandbox settings and they work with it, even with spawnRate set to 100 the game still obeys correctly, so this is really just the best option.
Last edited by GamestaMechanic; 10 Jul @ 11:34pm
< >
Showing 1-6 of 6 comments
Per page: 1530 50