Project Zomboid

Project Zomboid

A hotwire nerf mod
ArsonBoy5996 30 Oct, 2023 @ 8:22am
Hotwire Nerf Mod + Bicycles workaround
For anyone like me using both this mod +
Braven's Bicycles , I think I've managed to get a temporary workaround that lets the two mods play somewhat nicer together.

The following involves you making a small change to your 'Server_AHotWireNerfMod.lua' found under "steamapps\workshop\content\108600\2738969410\mods\ahotwirenerfmod\media\lua\server". Once you find this file, open it up with Notepad or any text editor of your choosing, and add the following to Line 33 of the file:

-- check if car has only 1 seat, (bikes/ motorbikes/ certain vehicles)
if t_SeatCount == 1 then
return;
end;

All this is doing is telling the Hotwire Nerf mod to stop doing checks on any vehicles that have only 1 seat. This means that now bicycles won't short out and spark wires after you hop onto them, ALTHOUGH this does mean that motorbikes/ certain specialty vehicles with only 1 seat also won't short out.

I think this is fair trade since they usually offer zero protection against zombies, though letting you know now in case you wonder why hotwired motorbikes are suddenly more reliable than your hotwired car or tank.

==========================

If Braven can tell me about a better way to specifically target just bicycles I'll update this discussion with a comment below, though for now this is the best way I've found.

Let me know what ya'll think!
< >
Showing 1-3 of 3 comments
Mikołaj 5 Apr, 2024 @ 11:15am 
Link to the thread you made on the matter on Braven's Bicycles mod page for context: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/2988491347/3883851663705226096/


I managed to get it working without making it ignore all single seat vehicles. You had the right idea with using Braven's isBike() function for this, so I wager a guess that you forgot to add require statements in hotwire nerf's .lua.

To patch the mod, add these lines at the start of "Server_AHotWireNerfMod.lua"
require "BravensUtilities" require "/Bicycles/BravensBikeUtilities"

then, copy-paste this code I lifted from Braven's mod into each CheckCar function.
(I also put it at the beginning of the ApplyNerf function to be safe. Could be unnecessary but, no offence to nigel, I can't read his code so I just err on the side of caution)

local playerObj = getPlayer(); if not playerObj then return end local vehicle = playerObj:getVehicle(); if not vehicle then return end if BravensBikeUtils.isBike(vehicle) then return end

Should look something like this https://i.imgur.com/K8ClVgg.png
Doesn't matter where you paste the stolen borrowed code inside CheckCar functions, so long as it's not inside the existing if statements. Needless to say, I didn't include every line of code I changed in the screenshot, but it should give you the idea of how to do the rest.
Last edited by Mikołaj; 5 Apr, 2024 @ 11:23am
ArsonBoy5996 19 Apr, 2024 @ 11:05pm 
Originally posted by Mikołaj:
Link to the thread you made on the matter on Braven's Bicycles mod page for context: https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/2988491347/3883851663705226096/

*solution that's infinitely better than mine*

You're definitely right that I didn't include the require statements near the (mainly since I'm terrible at scripting), but I figured if that hurdle could be crossed it would be as easy as patching that file with Braven's functions.

I'll definitely try this out when I'm next playing, appreciate that I'm not the only who was masochistic enough to run both of these mods at the same time!
Monk Enthusiast 17 May, 2024 @ 1:55am 
GOAT
< >
Showing 1-3 of 3 comments
Per page: 1530 50