Project Zomboid

Project Zomboid

708 ratings
Mileage Expansion
3
3
3
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
667.718 KB
24 May, 2023 @ 7:29pm
26 May, 2023 @ 7:21pm
4 Change Notes ( view )

Subscribe to download
Mileage Expansion

In 2 collections by KONIJIMA
Konijima Mods
13 items
Project Real Life
63 items
Description
Mileage Expansion

Introducing the "Mileage Expansion" mod, a game-changer for all vehicle enthusiasts! Get ready to embark on a journey of realism and immersion as this mod brings a whole new level of authenticity to your favorite game.

With the "Mileage Expansion" mod, every vehicle in the game now has its own unique mileage system.
As you hit the road, every mile you traverse will be recorded and accounted for.

The mod introduces a comprehensive mileage tracking system that keeps tabs on the distance you've traveled in each vehicle.
Whether you're cruising down the highways, off-roading through rugged terrains, or soaring through the skies, every adventure will leave its mark on your vehicle's odometer.

Features:
Random Starting Mileage
Every existing and new car will have a unique starting mileage based on its initial engine condition.

Mileage Counter Options
Clicking the mileage counter opens a menu with options to switch between metric and imperial units and access the trip odometer.

Resettable Trip Odometer
The trip odometer can be reset to zero, allowing you to track distances for specific trips or periods.

Admin Mileage Cheat
The admin has the ability to modify the vehicle's mileage using the mechanic overlay for testing or administrative purposes.

Engine-Based Mileage
Mileage data is stored on the vehicle's engine rather than on the vehicle itself.

One Meter Equals One Tile Square
The in-game measurement system equates one meter to one tile square.

Kilometer to Mile Conversion
Mileage is saved in kilometers but displayed in miles on the counter when the imperial unit is enabled.

Persistent Metric/Imperial Setting
The chosen metric/imperial unit setting is saved on the vehicle, ensuring that other players see the mileage in the last set unit.

Action-Based Operations
Switching between metric/imperial units, showing/hiding the trip odometer, and resetting the trip odometer are actual actions that require time to complete.

Sandbox Options:

Default Unit
Default Unit newly created vehicle starts with. (Miles | Kilometers)

Meter per Kilometer
Set the amount of meter is in a kilometer.
Lower value mean 1 kilometer take less time to travel.
Higher value means 1 kilometer takes more time to travel.

Kilometer Short Name
Set a custom short name for Kilometers. Default: km

Miles Short Name
Set a custom short name for Miles. Default: mi

Minimum Starting Odometer
This is the minimum amount of kilometers used to randomize a vehicle starting odometer value.
The engine condition will affect the final value only.

Maximum Starting Odometer
This is the maximum amount of kilometers used to randomize a vehicle starting odometer value.
The engine condition will affect the final value only.

Modding the mod:

Creating a translation mod:
When you create a translation mod, make sure to only include the .txt for the language you are translating to.
Never distribute any of lua files from this mod into your own translation mod.

Modify this mod:
About everything is global, designed similarly to the base game.
You can create a mod that requires, extend or patch this mod.
There is an API in shared/ and a global client object to set the odometer.
--- Settings for the odometer OdometerSettings = { backgroundImage = "media/ui/vehicles/vehicle_odometer.png", odometerY = 93, odometerTextY = 98.5, colors = { odometer = { green = 1, red = 1, blue = 1, alpha = 0.8, }, tripOdometer = { green = 0.8, red = 0.8, blue = 1, alpha = 0.8, } }, font = UIFont.Small, }

Mod created by Konijima
Commissioned by Blubbazz

Hire Team Orbit for Custom Mod Commission
[discord.gg]


Workshop ID: 2980294462
Mod ID: mileage-expansion
Popular Discussions View All (1)
0
14 Jul, 2023 @ 8:41am
Polish Translation
Kahned
59 Comments
CryneX 6 Oct, 2024 @ 2:13pm 
The kilometer text in the speedometer is not in the box, the text goes beyond the box : (
Purple Nebula 1 Oct, 2024 @ 12:08pm 
@Rukio is that a one time thing or every single time someone enters a car? Because I don't use this mod (yet) in my current playthrough and MP, both heavily modded, and that also happens first time I or someone in the server enters a vehicle for the first time since the session's launch.
tkonrye 23 Sep, 2024 @ 11:05am 
@konijima I have found a problem in multiplayer where vehicle:getCurrentSpeedKmHour() (seems to be in vanilla and with mods). If you change line 30 in the lua file from:

if vehicle:isEngineRunning() and vehicle:getCurrentSpeedKmHour() ~= 0 then

to: (adds a line, so the first is now 30 and the second is now 31, place under comment

local vehicleSpeed = (vehicle:getSpeed2D())*3.81
if vehicle:isEngineRunning() and vehicleSpeed ~= 0 then

the mod will work correctly in both single and multiplayer games (with mods 100% sure, vanilla pretty sure) Either way it wont effect the function negatively at all.
Rukio 14 Apr, 2024 @ 7:14pm 
The mod unfortunately causes a pretty bad hitch. Especially in MP, when 1 person jumps in the car. It lags for everyone nearby.

Would advise against it.
Tnaz.v 30 Mar, 2024 @ 10:13pm 
How long do I have to walk for one km to count with the standard configuration? I walked for 30m and did not increase
Tnaz.v 28 Mar, 2024 @ 3:01am 
I move with the car and the number doesn't increase, I hit reset and it doesn't stay fixed at the same value either.
Tnaz.v 26 Mar, 2024 @ 3:07am 
Why does it say miles on the car?
Tnaz.v 26 Mar, 2024 @ 3:06am 
トミー (Tommy) 24 Jan, 2024 @ 8:15pm 
Just wondering, but can you maybe consider adding your onTick function to an onEnterVehicle event so it only runs when a player is actually in a vehicle? Such as registering the function on enter event, then remove the function on leaving the vehicle.
OoNSHPAMoO 5 Dec, 2023 @ 3:15am 
Hi, I improved the Thai Translation and PR to your repository on Github. It's would be great if you merge it to the mod!