Project Zomboid

Project Zomboid

Braven's Bicycles Redux
ArsonBoy5996 30 Oct, 2023 @ 8:18am
Hotwire Nerf Mod + Bicycles workaround
For anyone like me using both this Bicycle mod +
A Hotwire Nerf mod, 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.

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

I did have a question for Braven though. Is there any way to get your mod's functions to be called in another mod's .lua files? I ask because I tried your BravensBikeUtils.isBike(vehicle) function, though it threw a few errors whenever I entered a vehicle and appeared to let all hotwired vehicles ignore the sparks from the Hotwire nerf mod.

If that function returns a boolean that would make sense, though I'm also not sure how well it would interact with the other mod's function calls so I stuck with t_SeatCount == 1.

Any thoughts as to how I could get it to play better with your Bicycles mod using that function or a similar one?
< >
Showing 1-3 of 3 comments
Hey Arson, just got a lil question regarding this fix.
Is this supposed to go before or after what currently exists on line 33?
"for i=0, t_SeatCount do"
ArsonBoy5996 31 Dec, 2023 @ 4:35am 
Originally posted by Scroobles McDoodle:
Hey Arson, just got a lil question regarding this fix.
Is this supposed to go before or after what currently exists on line 33?
"for i=0, t_SeatCount do"

I placed it before that specific line in my 'Server_AHotWireNerfMod.lua', so that codeblock should occupy lines 33-35 and not much else. It shouldn't matter too much since anything after it just does similar checks and also ends the function if they match the conditions.

I will say I'm still testing whether or not to look for a t_SeatCount value of 1 or 0. I think 1 should be fine but I worry the "local t_SeatCount = f_Vehicle:getMaxPassengers() -1" might be throwing it off potentially, hard to say. Maybe a correction to the function could be to check if it's less than or equal to 1, though I worry it might cover too many vehicles. Been a while since I played so I'll need to check when I'm next in and I'll update the post if there's any findings.
ArsonBoy5996 19 Apr, 2024 @ 11:06pm 
Originally posted by Scroobles McDoodle:
Hey Arson, just got a lil question regarding this fix.
Is this supposed to go before or after what currently exists on line 33?
"for i=0, t_SeatCount do"

Update: I think a better solution can be found here in this thread:
https://steamhost.cn/steamcommunity_com/workshop/filedetails/discussion/2738969410/3883851663705236598/?tscn=1712340937
< >
Showing 1-3 of 3 comments
Per page: 1530 50