Project Zomboid

Project Zomboid

评价数不足
No Car Wear
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
1.783 MB
2024 年 3 月 14 日 上午 12:30
2024 年 3 月 14 日 上午 10:50
3 项改动说明 ( 查看 )

订阅以下载
No Car Wear

描述
Hate Degradation?

ᵒʳ ʲᵘˢᵗ ᵗʰᵉ ᵗʸᵖᵉ ᵒᶠ ᵖᵉʳˢᵒⁿ ʷʰᵒ ᶠᵉᵉˡˢ ᵗʰᵉ ⁿᵉᵉᵈ ᵗᵒ ʳᵉᵖᵃᶦʳ ʸᵒᵘʳ ᵗᶦʳᵉˢ ᵗʰᵉ ˢᵉᶜᵒⁿᵈ ʸᵒᵘ ˢᵉᵉ ᵗʰᵉᵐ ᵈʳᵒᵖ ᵗᵒ ⁹⁹ ᵖᵉʳᶜᵉⁿᵗˀ

Well, have I got the mod for you!

By deleting blocks of code skillfully modifying and overwriting functions in the vanilla* Vehicles.lua file, it is possible to remove durability (a.k.a. condition) loss from wear and tear; (i.e., driving).

What about crashing into zombies and buildings?

While it is (probably, I didn't check) possible to negate damage from collisions, this mod is only designed to override durability losses from simply driving around town. Drive carefully, and your car shouldn't take a lick of damage!

Which parts/interactions are affected?

Normally, while driving, (based on factors such as speed, time spent driving, etc,) tires, mufflers, and your suspension have a chance to lose condition.

When braking, your brakes have a chance to lose condition based on the speed you were going before starting to brake.

While turned on, the condition of your headlights will slowly degrade over time. This is to simulate the bulb(s) burning out.

With this mod enabled, your vehicle will not lose condition from any of the above events.

    As a sidenote, the game applies a multiplier to condition loss while driving offroad. However, since the degradation is set to 0, the degradation loss multiplier ends up doing nothing.

    Additionally, there is a function to check engine temperature that I did not touch. Unless Google and the PZ Wiki have failed me, I'm pretty sure engines lose condition and/or make more noise if their current temperature is too high. As you drive, your engine's temperature rises, though high engine quality should limit the maximum temperatures your engine can reach. Knowing the kind of people who would install this mod, your engine probably is already set to max quality, so it is unlikely that your engine condition should deteriorate anyway ʸᵒᵘ ᵈᶦʳᵗʸ ᶜʰᵉᵃᵗᵉʳ

What isn't changed?

Aside from collisions, this mod does not affect loss of battery charge nor does it affect fuel loss. Leaving your car and/or headlights on will still drain your gasoline and/or car battery. Driving will also consume gasoline as normal.

But I just want cars to degrade slower!

This mod was inspired by Slower Car Tear and Wear by Kagari, please use their mod if you just want cars to degrade slower! Specifically, as of March 14, 2024, Kagari's mod makes your tires, suspension, and muffler last three times as long compared to vanilla. It does not affect headlight condition loss or losses from braking.

Slower Car Tear and Wear

Compatibility

Obviously, this will not work with Kagari's mod. Any other mod that edits the Vehicles.lua file will probably not be compatible either. Otherwise, this mod is a very simple lua edit, so compatibility should be high. For context, aside from file structure, the mod is 2KB in size.

For modders:
The functions in the Vehicles.lua file that this mod edits are:
function Vehicles.Update.Headlight(vehicle, part, elapsedMinutes) function Vehicles.Update.Brakes(vehicle, part, elapsedMinutes) function Vehicles.LowerCondition(vehicle, part, elapsedMinutes)
I have also added comments in the file explaining what certain things do and where I removed code.

*Limitation note:

Just like in Kagari's mod, any modded vehicles whose parts do not depend on the base degradation files and create their own custom degradation lua files will not be affected. Nothing I can do about that, unfortunately. On the bright side, modded vehicles that are not affected by this mod are simply ignored and will not throw any errors.


Also
ᴀʟsᴏ
ᵃˡˢᵒ

This my first workshop mod, so please let me know if somehow I completely borked your game, my mod does not work as intended, or if there is an additional part that no longer loses durability due to my edits. Based on my testing, my mod works as described, but I'm only an amateur.


Workshop ID: 3182873840
Mod ID: microbotsNoCarWear
4 条留言
PVVforlive 8 月 14 日 下午 1:16 
Do you have any plans to update this for build 42? <3
Thatch 2024 年 6 月 9 日 上午 3:40 
good mod
acariaubeko  [作者] 2024 年 3 月 20 日 上午 8:41 
Thanks for trying it! I hope you enjoy the mod.
Chop Chop 2024 年 3 月 19 日 下午 10:29 
I like my cars in PZ so I will try this.