Project Zomboid

Project Zomboid

TwoSix M41A Pulse Rifle (With Sound!)
49 Comments
Nico 8 Feb @ 10:42am 
we love this weapon, pls pls pls, update it for B42 plssss
Nico 25 Dec, 2024 @ 8:49am 
update to b42 pls !!! :P
Nico 23 Dec, 2024 @ 5:49pm 
update pls !!!
NicyRaider 21 Dec, 2024 @ 7:32am 
please update this gem of a mod for build42! its my fav. weapon and would love to play on with my best gun ever. :steamhappy:
nomadthefox12 7 Sep, 2024 @ 1:26pm 
can you add this to it's own Start With menu? would appreciate it
Yes1555 1 Aug, 2024 @ 3:33am 
Where the fuck can I find Xenomorphs in Knox country!?!??!?!?!?!?!
Kaldari 18 Feb, 2024 @ 10:36am 
Very nice weapon, but a melee hit with the rifle plays the gunfire sound.
Would it be possible to reduce the sound so that a single shot sounds more like a single shot, rather than a short burst?
On a side note, Cheat Menu Rebirth breaks gun sounds when ghost mode is enabled, as the guns are still silent when ghost mode is disabled
Two-Six  [author] 9 Oct, 2023 @ 11:50pm 
it has sound...
ANIMUS 9 Oct, 2023 @ 8:49pm 
this is a great mod, id recommend a minor but critical tweak which is the sound! search online for a sound of pulse rifle,
GrimReaper85 30 Jun, 2023 @ 3:36am 
my brother thinks its just a god weapon. id expect nothing less ha.
GrimReaper85 30 Jun, 2023 @ 3:34am 
First MOD i put on zomboid. Love the pulse rifle. never had any issues while using gunfighter or britta. this mod always gets priority ;)
Doc Morbid 6 Mar, 2023 @ 5:53am 
I would really like to see this weapon in play myself, and compatible with other mods, but there's too much in the other mods and I'm in the middle of a big building play through, so I can't just start taking mods out entirely, especially large ones.
Doc Morbid 6 Mar, 2023 @ 5:50am 
I think what Gunfighter itself or maybe the Brita Weapon Pack does to add new ammunition types, as an example, is to create an entirely new file for ammo types and then direct the vanilla code to look at both rather than adding to the original. Perhaps it would be possible to have a separate rate of fire code or file for the pulse rifle and tell the vanilla coding that it has to look at both, and the one weapon uses the new code? I think that's what Gunfighter actually does to modify the rate of fire for the weapons that use modified rates, and leaves the original code in place so that it can be used for standard weapons, which still exist.
Two-Six  [author] 5 Mar, 2023 @ 3:27pm 
Using Gunfighter messes up the way the M41A fires. To get it to burst fire and sync the sounds correctly, I had to change how the rate of fire is calculated. IIRC Gunfighter changes this for its own uses, so they conflict. I'm sure that I could work around it, but that would involve reverse engineering GFs code so I can implement my own within it's confines. As it stands right now, I'm not really up for doing that. Maybe, MAYBE, I will have a stab at it in the future, but who knows? As a supporter of open source and Creative Commons, I'm more than willing to let someone use my code, models, sounds etc, so they can create a separate mod that works with GF as long as they attribute my original work. Just gimme a heads up, lol
Doc Morbid 5 Mar, 2023 @ 3:16pm 
I would speculate that if you have Brita/Gunfighter, you just can't throw a bunch of weapon mods on this (lacks non-vanilla rails and stuff from that). The way to test would be to start a new save, have both this and Gunfighter, if the game crashes or something really unusable happens, pick your favorite, dump the other one. If you load it up and a lot of stuff doesn't work, same thing. If it's JUST that you can't put mods from Gunfighter, or something minor like that, maybe using both isn't a problem, you just don't get to throw some kind of 2015 rifle scope on it and dump ammo into stuff half a map away... not the worst thing that can happen to you.

TL;DR, if you test on a new save, you can find out what the issues are with Gunfighter yourself without messing up something you're already doing. It won't destroy the whole game, I promise. Unsubscribe to whatever you don't like or doesn't work together.
R.4.V.3.N 5 Mar, 2023 @ 5:44am 
Ooohhoho~. M41A Baby~.

Now all we need is a full on UACM/USCM Mode and a Xenomorphs Overhaul to replace all the zombies with buggers. Al La Aliens: Earth War
Archadies Leafwalker 4 Mar, 2023 @ 8:49am 
@Two-Six What kind of problems come up when you run this mod with Gunfighter? I would love to use this weapon, but I use Gunfighter so I don't want my game to crash. lol.
Phistandantilus 20 Jan, 2023 @ 10:10pm 
bro, I didn't even realize you did all this just a few days after I commented on your other Pulse Rifle mod saying "man it'd be cool if you did [exactly this]", and I'm and freakin' thrilled to see this as I've gotten back into zomboid again this month. can't wait to go blasting zombies with this iconic sci-fi gun! huge thanks and great respect to you, Two-Six!

hey, as a total side note, you think anybody is gonna do an Aliens mod and make the zombies into xenomorphs? I mean, might as well complete the ensemble, right? lol. though I guess some space marine cosplay armor would probably be in order first, huh?
Byro 9 Dec, 2022 @ 7:16pm 
awesome mod love the iconic sound 95 rnd mag , but i would really like to put attatchments on it from Arsenal 26 & Britta Weapons that would make this mod even more awesome
Sasquatch 26 Oct, 2022 @ 12:21am 
@Cerberus it uses .45 ACP
Cerberus 12 Oct, 2022 @ 5:29am 
whats the ammo it uses? 5.56?
Sasquatch 10 Oct, 2022 @ 3:16pm 
I deleted my last comment, I got it to work, It does not work on current worlds, you need to make a new one for it to spawn and for those with sounds issues. I did that and everything is working as it should now.
amargen 3 Oct, 2022 @ 8:23pm 
does this work at all? I can't find this weapon anywhere.
seanpook 25 Aug, 2022 @ 7:33pm 
I can't get any sounds, is it because I have Vanilla Firearms Expansion?
Node 712 25 Aug, 2022 @ 6:11pm 
UPDATE IT PLEASE
solarchos 25 Aug, 2022 @ 8:26am 
Game over, man! This is game over!!!!
Giant.Scheming.Iron.HOMIE 19 Aug, 2022 @ 4:57pm 
thx for the mod! I'd like to ask if this is repairable?
CrocBoy172 7 Aug, 2022 @ 4:16am 
oh my fucking god thank you XD
Blitz 3 Aug, 2022 @ 4:06pm 
for some reason my weapon is stuck to singlefire. is there a way to fix this?
NicyRaider 25 Jul, 2022 @ 11:46am 
such a F***** good mod! i love it! its my fav. gun and i need nothing more..never ever!:cubewink:
DevilKat 24 Jul, 2022 @ 10:10pm 
@Rose We were just saying this as well after seeing the pulse rifle mod!
(Just saw the Barotrauma xenomorph mod - gonna have to give that one a try)
Two-Six  [author] 24 Jul, 2022 @ 1:31am 
@CarltonBob Thanks for your opinion bro
CarltonBob 23 Jul, 2022 @ 12:55pm 
awful gun sound, so abrupt with the cutting in and out when burst firing
TtequillaaBr 20 Jul, 2022 @ 6:34pm 
omg omg nice nice nice
R.4.V.3.N 20 Jul, 2022 @ 12:55pm 
Curious, is there a mod that turns the zombies into Xenomorphs and the "Infection spreads via facehuggers" being worked on by anyone? That'd be amazing to have an "Aliens: Earth War" server set up. (Great comic btw)
Two-Six  [author] 18 Jul, 2022 @ 5:33am 
@StoneCold well yea, but you really want a whole extra set of ammunition for just one gun? Makes no sense particularly. And considering how long it took to get the sound right, I honestly could not be fucked
Scarnie ? 18 Jul, 2022 @ 5:26am 
Pretty cool! Only one issue - the M41A uses caseless ammunition but there is the sound of brass hitting the floor.
𝖘𝖍𝖊𝖞 18 Jul, 2022 @ 12:05am 
▬▬▬▬▬▬▬▬▬ஜ۩☆۩ஜ▬▬▬▬▬▬▬▬▬▬
☆★☆ 𝐌𝐂𝐀𝐅𝐅𝐄𝐄 𝐃𝐈𝐃𝐍'𝐓 𝐊𝐈𝐋𝐋 𝐇𝐈𝐌𝐒𝐄𝐋𝐅 ☆★☆
▬▬▬▬▬▬▬▬▬ஜ۩☆۩ஜ▬▬▬▬▬▬▬▬▬▬
give me -rep because im toxic af :3333333
Two-Six  [author] 17 Jul, 2022 @ 12:23am 
@Switchblade Perfect man, glad it's ok. Will probably end up using it in my main game too, lol
西崎 16 Jul, 2022 @ 9:41pm 
They're coming outta the goddamn walls!
[U.N.] Switchblade 16 Jul, 2022 @ 4:44pm 
Worked like a charm. Sound works as intended.

Formatted the function like this (went for my gut):
https://i.imgur.com/HAtjMou.png
Two-Six  [author] 16 Jul, 2022 @ 2:52pm 
Looks like you will have to format it as steam has stripped the tabs, Just indent If statement contents etc, hopefully you know what you're doing :)
Two-Six  [author] 16 Jul, 2022 @ 2:51pm 
[code]

function bypassM41()
local player = getSpecificPlayer(0)
local weapon = nil
if player ~= nil then
weapon = player:getPrimaryHandItem()
if weapon == nil then return end
end
if player:getModData().hasM41 == nil then
player:getModData().hasM41 = false
end
if weapon:getScriptItem():getName() == "TS_M41ARR" then
Events.OnPlayerUpdate.Remove(ApplyRecoil)
Events.OnWeaponSwing.Remove(SendHit)
Events.OnPlayerUpdate.Remove(WeaponStatus)
Events.OnPlayerUpdate.Remove(AutoTransform)
weapon:setSwingSound("")
player:getModData().hasM41 = true

elseif player:getModData().hasM41 and weapon:getScriptItem():getName() ~= "TS_M41ARR" then
Events.OnPlayerUpdate.Add(ApplyRecoil)
Events.OnWeaponSwing.Add(SendHit)
Events.OnPlayerUpdate.Add(WeaponStatus)
Events.OnPlayerUpdate.Add(AutoTransform)
player:getModData().hasM41 = false
end
end

Events.OnPlayerUpdate.Add(bypassM41)

[/code]
Two-Six  [author] 16 Jul, 2022 @ 2:50pm 
Ok, I have written up a function you can chuck in a local copy. it seems to work fine, although I only tested it for a few mins, so you'll have to just give it a try. Bassically when you have the M41 in your hand, it disables a lot of the Gunfighter mod.

Go into the file ARSENAL-26-GunFighter\media\lua\client\GunFighter_02Function.lua. Go to line number 3298 (Just above the Events lines) and add the following code (DISCLAIMER This is my code, none of it is from the Gunfighter mod, only the function names requiring bypassing.)
[U.N.] Switchblade 16 Jul, 2022 @ 1:24pm 
Sounds good to me. The M41A uses caseless 10x24mm ammunition.

I'm already happy if sound gets fixed. If you have any hint on how to fix it in Brita's mod, I'd appreciate it and would integrate it into my local copy.

Thanks in advance for looking at this. =)
Two-Six  [author] 16 Jul, 2022 @ 9:27am 
Alright, so had a poke, and I don't know what the Brita mod code is doing, but it seems to be overiding most of the games original gun, and also any other added gun. It's not only playing 45 shot sounds with the pulse rifles, it's also limiting the bursts from 5 to 3 and cutting the sound short. I created some custom ammo for it to test, and while that sorts the sound, it doesn't fix the bursts, and makes Britas mod go a bit weird as it can't identify the ammo. I will continue to see if I can find a way around it, but tbh, if Britas mod had an exception for other guns than it's own, it would be fine, and I can't go changing their code unfortunately
Two-Six  [author] 16 Jul, 2022 @ 8:00am 
@Switchblade, thats an interesting one. I use britas pack too, so will look into it man. It's interesting as I have completely bypassed theguns sound system for thew rifle, however I think britas does too and uses the ammo to trigger sound rather than the gun, so that would probably be the issue. I thought about making custom ammo for it, but that would make it more of a pain to use. I will see what I can do though bud
[U.N.] Switchblade 16 Jul, 2022 @ 7:51am 
Badass! Great mod!

I'm having one issue though and I'm pretty sure it's not this mods fault. When I shoot, I can hear two gun sounds. One of this mod and the other is some kind of normal pistol shot.

The mods I use are Brita's Weapon Pack and the Arsenal Mod. Seems there is something colliding. If anybody has an idea, I'm grateful. Otherwise I'm going to try figure it out.
Jman 15 Jul, 2022 @ 11:44am 
AWESOME !!!!!!!!! thank you!