Project Zomboid

Project Zomboid

Tk's Multiplayer mileage fix and more
34 Comments
BloodhoundMk2 11 Dec, 2024 @ 9:15am 
I honestly think thats exactly where the issue is, i remember having to deal with this same problem i was just hoping the mileage fix would fix it. I also think it might a conflict with some of the mods that im using, i have things like repair overhaul, AVCS, no truck reduction, and a few other repair mods, so it could be anything really
tkonrye  [author] 11 Dec, 2024 @ 9:13am 
@BloodhoundMk2 No worries, I will look into the problem with the counter, could be something in the original mods code as well.
BloodhoundMk2 11 Dec, 2024 @ 9:12am 
Yeah i mean in the mod menu under SP. But unless i enable a mod under SP in the mod menus and then under MP, i cannot change any settings for the said mod under server settings cause its not showing up.
Sounds good, i hope later on, maybe in the later build of the game that would be possible cause its a bit difficult for ppl who are joining the server since it requires manual installation. Great mods otherwise. As for miles expansion fix, it seems if i exit and enter a vehicle and sometimes just click on the mileage and switch it to imperial and back it makes it count miles again, still not sure if thats a solution or just a random thing really. Thanks for the support with this
tkonrye  [author] 11 Dec, 2024 @ 5:53am 
@BloohoundMk2, I dont think enabling a mod in SP (unless you mean in the mod menu) matters at all for MP. It is quite impossible for RVA3 to work without manual installation under the current build, or at least with my current knowledge of lua. As for TksTuners, At the moment I also believe it is not possible. In both cases there are variables that cannot be manipulated with vanilla code using lua: (such as "horsepower", or offroad etc..), and the java edits were necessary to create editable variables that could be manipulated using lua.
BloodhoundMk2 9 Dec, 2024 @ 9:27am 
Also on the previous topic, is there any reason id want a mod to be enabled in SP when i have it already enabled in MP on my server? only thing ive noticed so far if i dont have it enabled in SP as well as MP, i cannot tweak the settings for the mod under server settings.

Also is there any chance that the TKs Tuners and RVA3 not gonna need manual installation on the future or that not even possible with the current game build?
BloodhoundMk2 9 Dec, 2024 @ 9:24am 
ok then i guess its not standardized upgrades or the tsar, however do u you have a modlet called standardized armor something for Motorized zone? i actually suspect that the issues start popping up after i enabled that, but im not sure. AVCS is Another vehicle claim system, its a mod that lets u claim vehicles and set permissions on who can access what in the vehicle, very useful for MP. Id love to get to the bottom of this issue but at this point im not sure where to begin. Anyway any help would be appreciated but i dont wanna take take waste your time on this if its not even related to ur mods.
tkonrye  [author] 8 Dec, 2024 @ 9:18am 
I have used standardized upgrades, I am not familiar with AVCS? I use Tsar myself. I can try and do some more testing, it will take a bit though.
BloodhoundMk2 7 Dec, 2024 @ 5:25pm 
Im not using the RVA3, just the TK Tuners. Yeah i believe i have everything enabled. This issue was there before i tried using the TKMileageFix, it seemed to be better but it still persists. Idk if standardized upgrades or the AVCS or the Tsar library could be causing the issues. Does any of that ring a bell? just trying to narrow down what could be causing this issue
tkonrye  [author] 7 Dec, 2024 @ 2:28pm 
@BloodhoundMk2, it should be.... mostly consistent lol. There is a bit of wiggle, but during testing, I ran it up a "1/3" mile stretch, and changed the parameters a little and found I was ticking up a mile every time. Are you using TksRVA3? I assume you are using the Expanded mileage mod. Is everything enabled under the mods section, and or for your multiplayer game? Thats the best I can suggest as a preliminary check.
BloodhoundMk2 7 Dec, 2024 @ 12:20pm 
Im trying to use the Mileage extension fix but im getting inconsistent results. Ive put it to the very bottom of my modlist but it still "sometimes works" meaning sometimes the mileage actually goes up as i drive but not other times. And sometimes mileage on some cars gets reset/put back to previous values after a reload. Is there something that im missing or is this how its supposed to work?
Matchutchuc 15 Oct, 2024 @ 10:33pm 
Alright, thanks for the continued support!
tkonrye  [author] 14 Oct, 2024 @ 4:06pm 
@Matchutchuc I believe (hope) that I have added something to the mod that will fix the item duplication issue. Thanks for bringing it to my attention
tkonrye  [author] 11 Oct, 2024 @ 1:07pm 
@Double-O, if you take a look at my previous posts, you will notice that the chance of losing air in a tire is completely random. As a result if you noticed more loss in a solo game than a multiplayer, or even from one vehicle to another, or even the same vehicle on the same trip, at the same speed, moving in the same direction, and the loss of air was different. RNJesus.
Double-O Deal With It 11 Oct, 2024 @ 9:54am 
I think you lose tire pressure faster in solo play. I did a small amount of testing in solo and in a hosted server with the mod. I set the tire condition low (which I have read increases the rate of tire pressure loss) and drove around for a bit. Unfortunately I can't say for certain unless I do more testing and actually time how long it takes on average to lose tire pressure. also since I don't know how the code really works I can't say for certain if it's possible that what I observed is correct.
Double-O Deal With It 11 Oct, 2024 @ 9:44am 
After more playing I can see that the mod is working.
tkonrye  [author] 3 Oct, 2024 @ 12:33pm 
@Double-O, yeah the tire pressure should still work, however the fuel mileage might be a bit wonky if that was the case ha ha.
Double-O Deal With It 3 Oct, 2024 @ 12:19pm 
I did a search in my workshop folder and the only Vehicle.lua is from your mod. we only had the mod active for one night so I'll just have to keep an eye on it to see if it's working. The only other thing I could think of is if the server admin enabled the submod for TksRealVehicleAcceleration3 even though we're not using that mod, but I'm not sure if that would cause it to not work.
tkonrye  [author] 3 Oct, 2024 @ 11:43am 
I dont use standardized vehicle upgrades 2.. perhaps that might be the one, if you check this path in the mod: media/lua/server/Vehicles\Vehicles.lua IF that file is also present in upgrades 2, that could be the issue. IF it is present there let me know and I think I can create a sub mod that will add compatibility for the upgrades 2 mod and this one.
tkonrye  [author] 3 Oct, 2024 @ 11:40am 
@Double-O The mileage mod "shouldn't" impact anything, unless on of those mods uses the same script. I can say there is an update delay on the vehicle, seems like I had to get in and out of the car for the mechanics overlay to update, and in one instance I had to leave the game and come back in again for the UI to show the correct tire pressure. Honestly no idea why those occurances happened, but it could be related to the weirdness I have with TKsrealvehicleaccelearation where the Horsepower value is wrong until you get in a vehicle, then it corrects.
Double-O Deal With It 3 Oct, 2024 @ 11:26am 
I'll keep an eye on it. we are using it with filibuster rhymes used cars, better car physics, and standardized vehicle upgrades 2, among other non-car related mods. One of the people on my server drove a vehicle with 30% tires for a decent amount of time and didn't lose any pressure. The other mods probably shouldn't affect tire pressure but there could be an incompatibility. Do you think putting the the mileage fix mod before or after the other mods in the load order would help? In the mean time I'll try testing it out myself on the server to make sure it's working or not.
tkonrye  [author] 3 Oct, 2024 @ 10:43am 
just wanted to add another quick update to the tire pressure. With further testing, and boy it took a while I managed to get this result:

Base.SmallCarSwiffer chance of damage: 0.4486035633802414% (tire pressure)
Base.SmallCarSwiffer randomNumber: 0.41221466064453 number
Base.SmallCarSwifferpressure: 34 PSI

after that result I checked the tire, and sure enough it had lost one PSI. I did shut the vehicle off for this result, not sure if that matters. Could be there is a small delay on the UI update... maybe?
tkonrye  [author] 3 Oct, 2024 @ 10:38am 
Edit for below, I meant to say honestly NOT sure.
tkonrye  [author] 3 Oct, 2024 @ 10:16am 
@Double-o Deal With It
I can tell you the mod is working, the chance to lose tire pressure is pretty small, and its based on a random chance. I am going to delve into it a bit further. Generally though what I say was something like this:

vehicleSpeed: Base.SmallCarSwiffer is moving at: 127.33773441314698 MPH (for tire pressure)
vehicle: Base.SmallCarSwiffer chance of damage: 0.7166886702775955 ?? (tire pressure)

this is a representation of the log file.
Then the game checks with a random number between 0-100? at least that is what I believe it is doing. IF the random number is less than the chance of tire pressure loss, you lose 1psi in the tire, otherwise no go.

so perhaps you were lucky, perhaps there is an install issue with the mod, honestly now sure, however, at least as far as the checks are concerned, it does appear to be working as intended.
Double-O Deal With It 2 Oct, 2024 @ 9:05pm 
For some reason, even with this mod, the tires don't lose any pressure in our MP server.
tkonrye  [author] 29 Sep, 2024 @ 12:24am 
No worries, I will have a look around again, but its an odd error, specifically with a generator. I wonder if a corpse would do the same thing. Perhaps because they are not "items"...?
Matchutchuc 29 Sep, 2024 @ 12:15am 
It was worth a shot! Didn't mean to imply it was something wrong with the mod. Thanks for you hard work
tkonrye  [author] 28 Sep, 2024 @ 11:38pm 
oh, well if its not part of the mod... I havent found a solution for the issue sorry
Matchutchuc 28 Sep, 2024 @ 11:31pm 
Negative on the fuel mileage mods, this bug happened long ago, before these were released. The duplication used to happen in the following circumstance:

1. Player A and B are in the car, trunk is badly damaged
2. While driving around, Generator falls from car
3. Original generator is still in the trunk! Thus the item has been duplicated
tkonrye  [author] 28 Sep, 2024 @ 11:20pm 
Do you by chance have both of the fuel mileage mods active? Not that, that should matter... but just in case. If not sadly there is nothing in the code that will cause that and I am unable to replicate the results in testing.
Matchutchuc 28 Sep, 2024 @ 9:32pm 
And yes, it happened in multiplayer
Matchutchuc 28 Sep, 2024 @ 9:31pm 
Its been a while since I've seen it before, and I remember it happening mostly with generators (so, tile items instead of 3d ones)
tkonrye  [author] 28 Sep, 2024 @ 6:13pm 
@matchuthuc, I will however see if I can find the code that "removes" the item from the trunk and perhaps it also needs a change...
tkonrye  [author] 28 Sep, 2024 @ 6:12pm 
@Matchutchuc, I havent encountered that before, lol, sadly nothing in this mod changes anything other than a single variable, so that is either another mod or a strange vanilla behaviour (multiplayer I am assuming)
Matchutchuc 28 Sep, 2024 @ 5:35pm 
Is there anything that can be done about item duplication happening when items drop from the trunk?