Project Zomboid

Project Zomboid

[41/42] Rob's 10 Years Vehicles
Possible approaches to cleaning cars.
Hi there.
SVU3 and STFR dev here.
I'd like to start off by saying this is an AMAZING concept you got here. You've done great work already.
Now, regarding the ability to clean off cars...

You could theoretically replace the rust texture, which, if done right, would make supporting modded cars far easier.
If you do go down this path, you could make a timed action or some other form of interacting with the vehicle, that upon completion, removes all rust. You'd also have to make code to make the cars spawn with rust.

Another theoretical method would involve the "SkinIndex", where you'd use lua to add the worn skins to the vehicles without overriding the scripts, and then force the worn down skins when the vehicle spawns. Changing the skinIndex to the non-worn down skins when the cleaning action completes.

Do note the above 2 wouldn't exactly play nicely with wheels without a bit of lua finaggling.

The below does work out of the box with new wheels, as long as you define the new wheel textures as new wheel types, and make the new vehicleIDs use them.

An excessively complicated method of cleaning cars could involve making entirely new vehicle IDs that are copies of the originals, but just covered in moss and rust. You'd then use the new B42 only feature found in "ProfessionVehicles.lua" to automatically replace all supported cars when they spawn. Then make an interaction to remove the rust, and have the code replace the worn down vehicle with the new one on completion.

I've never personally dealt with making timed actions, nor new vehicle interactions.
BUT I would gladly help as best as I can with the SkinIndex/RustTexture/NewScript stuff?
< >
Showing 1-5 of 5 comments
Anyhoo, KEEP UP THE GREAT WORK!!!
RobTheContractor  [developer] 16 Apr @ 12:07pm 
Hey Jack, thanks for reaching out.

While I greatly appreciate you trying to help here, this is one of those situations where I genuinely do not have the essential know-how of lua to ensure a fully stable (or functional) cleaning system, especially with the wheels having to be involved in the process, after previously trying to mess around with those for a separate mod idea. (It was a disaster.)

I'm working on something else currently, but I do hope to eventually be able to implement something this intricate in the future because I do know how much a lot of people would like to have the ability to clean their car completely for that one extra goal to achieve. It's just not currently in the cards for my skill level and will have to wait until I learn more about lua.

When I figure my crap out and (potentially) decide to tackle vehicle cleaning functionality in the future I'll be sure to reach out to you. In the meantime, take care of yourself and thank you for all you do for the zomboid community. I look forward to seeing your next must-have mod!
Ah, fair nuff.
I MIGHT dabble with an implementation on my end eventually.
But yeah, keep up the great work, ok?
RobTheContractor  [developer] 16 Apr @ 12:31pm 
Likewise!

If you do decide to do that I'd be more than happy to link it in the description or even make it a requirement, we can discuss those details later on when/if you decide to do it. :steamhappy:
sounds like a plan.
< >
Showing 1-5 of 5 comments
Per page: 1530 50