Garry's Mod

Garry's Mod

Zombie Survival Weapons & Melee for Sandbox! (W.I.P)
71 Comments
BluDogMac2 29 minutes ago 
thanks. Also recently decided to play ZS because of this addon and i'm glad I did. btw your addons are really good! keep up the good work.
Shadow  [author] 14 Oct @ 12:02pm 
The Nanite Heal on the Electrohammer repairs nailed props in an area of effect, so nearby nailed props are repaired together. It requires pulse ammo to work.

As for the Medical Rifle, it has two modes: buff and debuff.
• If you hold the attack button, it switches between the two modes.
• If you just tap it once, the projectile locks onto a target.

And yeah, the item descriptions could definitely be improved. I tried to avoid filling the screen with too much text explaining every mechanic.

In Zombie Survival, there are clearly defined teams: humans (good guys) and zombies (bad guys), so the game can automatically know who to heal or damage.
But in Sandbox, there are no teams, just players, NPCs, and other entities. Because of that, there’s no reliable way to tell whether someone should be buffed or debuffed automatically.

That’s why the Medical Rifle in Sandbox now lets you manually set the mode (buff/debuff), so you can decide how it behaves in different situations.
BluDogMac2 14 Oct @ 10:33am 
I have never played ZS before. But I must ask, how do you change the mode on the medical rifle? I don't wanna just always debuff my comrades when I try to heal them. Also, I am pretty sure the Nanite Heal for the Electrohammer is broken, as all the tests I have tried with it does nothing. Not sure if both of those are from this addon not being finished or if its a bug.
Shadow  [author] 9 Oct @ 5:38am 
Yeah, it makes sense that it conflicts with JMod, good suggestion! When I have some time I’ll add that, maybe make it toggleable with a key, like E by default.
Comrade Blue 6 Oct @ 6:41pm 
I had a suggestion I was wondering about, do you plan to add a toggle for the pickup system? I have a small server where I tend to play with friends on and I added your addon to it recently and noticed that mods like JMod and others that add their own pickup systems tend to conflict with the ZS one, so I had to disable the prop pickup system server-wide. I was thinking maybe a client-side toggle command in the console that could enable the ZS pickup system for yourself would be neat, and so someone could bind it to a key and toggle it whenever they'd like
Shadow  [author] 4 Oct @ 5:52am 
Oh actually, not really haha, I just moved the model a few units up to kind of simulate the old hammer, I think it looks better that way, at least better than before, I also added the ElectroHammer, and yeah, I’ve already finished the thirdperson blocking animations, they look decently good now, kind of a mix of Darkest Days and some I made myself, I also made a model of the blaster shotgun that uses c-arms and lua animations, I’m planning to add the remantler, but I’m not sure if I’ll actually be able to do it, the resupplybox is already done, and later I’d also like to bring in some of the missing deployables like the gun turret and the repair field, on top of that I think I managed to fix the issue with player statuses (I think), anyway, I’ll release the update once I finish checking why the top and center notify messages aren’t showing up… :winter2019angryyul:
Comrade Blue 3 Oct @ 10:30pm 
Oh I see you found the c_hands version of the hammer! Nice lol
Comrade Blue 30 Sep @ 12:27pm 
Oh alrighty! Yeah I understand the CHands issue, although I remember seeing the models with CHands in one ZS server I played but I have no idea where they got that from. I assume it's something their own devs did so it's probably private lol

Also thirdperson blocking animations would be great! Kinda reminds me of Melee Arts 2 (great addon btw)
Shadow  [author] 30 Sep @ 10:35am 
Probably not, I’d love to leave the original models if they only had CHands, but the ZPS models don’t support them, and having two types of hands looks bad. I’d rather give everything a bit of a remastered touch, because, for example, the CSS weapons ported to GMod look awful. Also, thanks for pointing out the console errors, I fixed some weapons holdtypes when using ironsights, fixed some melees like the Butcher Knife, and left the rest because later I’ll try to port the Darkest Days blocking animations so they work in thirdperson and don’t just show the holdtype of the SLAM/Physgun.
Comrade Blue 29 Sep @ 4:41pm 
Hm just a question, do you plan to add back the original carpenter's hammer model? Also some melee weapons have incorrect holdtypes when seen from thirdperson, and certain guns spam errors in the console when used in thirdperson. I was using the Customizable Thirdperson addon when all of this happened by the way
Savee14702 29 Sep @ 8:01am 
Finally a ZS weapon pack!
Thank you so much!!!!!
Shadow  [author] 28 Sep @ 3:51pm 
No problem! :winter2019happyyul: If you want, you can check out W.Black57 "NPC Prop Attacking & Breaching", it has support for the barricade system.

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3449464807
danko_5keleton 28 Sep @ 3:38pm 
That actually makes a lot of sense. What a shame, tho that's a VJ base thing, this works really well with other zombie mods like Nextbot Zambies. Either way thank you!
Shadow  [author] 28 Sep @ 3:26pm 
Thanks a lot for the comments! About the barricade issue: yeah, it looks like VJ Base zombies instantly removes all constraints from a prop (for example welds), so unfortunately that also breaks the nails. Since it removes every constraint, I’m not sure if there’s even a way to prevent that from happening, if it were just damage it would be easier to handle, but in this case I really have no idea how to solve it without editing the zombies base code.

As for the suggestion about a damage multiplier setting, that’s a good idea, I’ll definitely keep it in mind for the future, I should probably add one for the headshot multiplier too.
Comrade Blue 28 Sep @ 2:57pm 
Also I wonder, do you ever plan to add a damage multiplier setting for these weapons?
Comrade Blue 28 Sep @ 2:54pm 
Yeah unfortunately VJ Base melee-based NPCs don't really work well with this. There's an option that technically should allow you to disable them instantly unwelding/breaking barricades but that doesn't seem to do anything sadly. Such a shame because I use Lethal Necrotics: Reanimated alot and those zombies won't really work well with this RIP
danko_5keleton 28 Sep @ 2:24pm 
One thing I noticed is that VJ Base npcs instantly destroy barricades. Someone might have pointed this out already but I thought I'd say somethin'. I could also have some sort of setting turn on but I've done a lot of tweaking so I don't think it's me. Really cool addon tho, I think a lot of people wanted this for a while so you're based af for this.
Comrade Blue 27 Sep @ 6:46pm 
This is such an amazing addon so far! While there are some bugs, it has huge potential :)
Shadow  [author] 20 Sep @ 9:23am 
@Link Thanks for reporting, fixed! :winter2019happyyul:
Link 18 Sep @ 4:05pm 
doesnt work with tfa base HD left for dead 2 guns


[ZS Essentials] lua/zsbox/obj_entity_extend.lua:346: attempt to concatenate local 'sType' (a nil value)
1. GetStatus - lua/zsbox/obj_entity_extend.lua:346
2. Think2 - lua/weapons/tfa_bash_base.lua:199
3. PlayerThink - lua/weapons/tfa_gun_base/shared.lua:1028
4. func - lua/tfa/modules/tfa_hooks.lua:52
5. unknown - lua/includes/modules/hook.lua:267

[ZS Essentials] lua/zsbox/obj_entity_extend.lua:346: attempt to concatenate local 'sType' (a nil value)
1. GetStatus - lua/zsbox/obj_entity_extend.lua:346
2. ProcessLoopFire - lua/weapons/tfa_gun_base/shared.lua:2455
3. unknown - lua/weapons/tfa_gun_base/shared.lua:1022

[ZS Essentials] lua/zsbox/obj_entity_extend.lua:346: attempt to concatenate local 'sType' (a nil value)
1. GetStatus - lua/zsbox/obj_entity_extend.lua:346
2. func - lua/weapons/tfa_gun_base/client/viewbob.lua:89
3. unknown - gamemodes/base/gamemode/cl_init.lua:391
Shadow  [author] 17 Sep @ 12:53pm 
Hey, thanks! I actually got it working in the end. It took me a while, but PlayerButtonDown does work if you hold the key, that was my mistake.

I haven’t had anyone to test it with yet, only on a local server in multiplayer mode, but it should work fine.

Once I have some time, I’ll post the update. :MrFoster::ebonyivory:
CommonSay 17 Sep @ 6:11am 
I could find a GM:PlayerButtonDown [wiki.facepunch.com] and a GM:PlayerButtonUp [wiki.facepunch.com], but I'm not experienced enough with GMod development to actually know how to associate these with binds yet.

input.LookupBinding [wiki.facepunch.com] looks like a good start though. My naive approach would be to try something like `GM:PlayerButtonDown(player_from_hook,input.GetKeyCode(input.LookupBinding('block_bind')))`, and then detecting the release of the key with `GM:PlayerButtonUp` in place of `GM:PlayerButtonDown`.
Shadow  [author] 16 Sep @ 3:41pm 
Hey! I tried several approaches to make the block key customizable. I experimented with a ConVar to switch between RELOAD (R) and ZOOM, even letting the client choose, but ran into issues. Blocking often didn’t trigger or behaved inconsistently.

For now, it only works with RELOAD (R). The closest I found was Underhell SWEPs, which let you bind keys for actions like kick or silencer, but the keys were press-only, not holdable. 😭

If you know an addon that lets you customize and hold a key, please share it. I searched many addons but couldn’t find anything reliable. :winter2019happyyul:
CommonSay 15 Sep @ 6:28pm 
Can there be an option to change the block key? I'd prefer to associate blocking with something more comfortable than reload (R), like the zoom bind (Middle-mouse).
w.black57 11 Sep @ 8:44am 
Seems to spam 'Too close to another nail' when I hold right click nail near other nails. not that its a critical bug or anything XD
Shadow  [author] 10 Sep @ 7:28am 
Yes! There actually is, but right now the toggle CVAR only works for melees. I forgot to add it for weapons because it was originally for melees. I’ll update it soon, Thanks for pointing it out!

CVAR: zsw_enable_cooldown → set it to 0 to disable crosshair cooldowns.
Neeko 10 Sep @ 12:09am 
Is there a way to disable the reloading status circle? It's really big and distracting to me and I can't seem to find the option for it
MrSlenderTOP 7 Sep @ 9:01am 
creador de contenido en decadencia
rtkz_wasa19741 5 Sep @ 2:26am 
I see thanks for replying
Shadow  [author] 4 Sep @ 5:16pm 
Well, no, it’s not the same, I said similar, not identical. I made the functions code with ChatGPT (not the one I sent you from the URL). I’m still not a coder and still struggle with things, so ChatGPT helps me a lot. It took me a while because it didn’t work perfectly at first. Back in the day, creating structures to make something work would take me like two days, and polishing them? Forget it haha. I’m not sure what you’re trying to do, but CQB also has a kind of hollow circle when you pick up a medkit or ammo, and it’s better, it even has a material in the middle showing the cooldown, which I don’t have.

https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3560733120

Sorry if my English is bad, I’m also using a translator.
rtkz_wasa19741 4 Sep @ 2:58pm 
Thats not chatgpt and not same code of gmod-draw-functions?
Shadow  [author] 4 Sep @ 1:36pm 
@rtkz_wasa19741 ChatGPT :winter2019happyyul:

Heres something similar if you need
https://github.com/BullyHunter32/gmod-draw-functions
rtkz_wasa19741 4 Sep @ 4:06am 
Where did you get draw.HollowCircle, surface.DrawArc and surface.DrawQuad code from?
Shadow  [author] 29 Aug @ 7:34am 
Yeah, my bad! I left those includes in there, but they’re actually empty. They’re meant for a ZS hitsounds & hitnumbers extension I plan to release later. They don’t affect the essential or the weapons at all. I normally don’t pay much attention to Lua errors on the loading screen because it happens all the time, and if the weapon pack and essential work fine, I usually just ignore them, also because my GMod is so messy.
w.black57 29 Aug @ 6:32am 
Oh i meant, lua errors, like there were missing lua files on your end, but then realized its still WIP. The hook works completely fine!
Shadow  [author] 29 Aug @ 5:56am 
Lua errors? That’s strange, I tried the hook and it worked fine on my side…

Input:
hook.Add("OnRepairedObject", "AddonGivePoints", function(ply, ent, health)
print(ply, ent, health)
end)


Output:
Player [1][Shadow] Entity [178][prop_physics] 10


But yeah, I wouldn’t be surprised if some script errors appear. It was a real struggle to get it working, sometimes even changing the order of a single file would break the whole base. :rgirl_Spittingblood:
w.black57 29 Aug @ 5:25am 
@Shadow

btw the hook worked, thanks so much! currently seeing lua errors though, but like the title says its WIP. Take your time :HappyElle:
Shadow  [author] 29 Aug @ 5:21am 
@w.black57 I’m really glad to see you so excited about it! I totally get it, because for a long time I also wanted to have the ZS stuff in sandbox, but all I could ever find were poorly ported things, stuff that wasn’t really from ZS, or very simple versions that didn’t feel true to ZS. I also completely forgot that in ZS the props turn red and break when you hit them, but I see you’ve already taken the initiative on that, so go ahead! :demoticon:

@TotallyARussian, I honestly never noticed that since I don’t really use melees in multiplayer. It’s been a while since I last played with friends, and even if I did, I wouldn’t make them install the ZS sweps since we don’t play sandbox. Thanks for pointing it out though!
w.black57 29 Aug @ 12:41am 
Im just excited to make my npc prop breaching mod ( https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3449464807 ) actually work with this barricade system, for a PvE ZS style gameplay :stella_happy:
TotallyARussian 29 Aug @ 12:30am 
one thing i should also mention is that a lot of melee weapons can't seem to actually hit other players, only melee weapons you can actually hit players with are: all fist weapons, grave digger's shovel, xiiia type longsword and great scythe.
w.black57 28 Aug @ 2:22pm 
@Shadow

Thanks for the reply! Im just so glad im not the only one who had plans of importing stuff from ZS to sandbox. :SaffronHappy:
Shadow  [author] 28 Aug @ 1:08pm 
Yeah, after testing some weapons on a custom map with props I noticed that map-spawned objects start with way too much health. That part of the code was something I adapted for sandbox, and I didn’t really think about how it would behave outside of ZS. I’ll see if I can either remove it or make it only apply when a prop gets nailed down with the hammer.
TotallyARussian 28 Aug @ 9:21am 
good to hear that it's getting seperated, cause i did stumble into a problem where the zs prop mechanics would cause vents on certain maps to have a ton of health, requiring me to turn off the addon and lose the melees. and it's a good idea over all
Shadow  [author] 28 Aug @ 8:54am 
Hi! I’m currently trying to move all the ZS-like functions into a separate addon so you can use them without installing the full SWEP pack. That way, if you want, you could simply make your own mod depend on the “Base” addon and access the ZS functions from there.

The repair function can’t be hooked directly, so I plan to make (RepairedObject) call a hook:
hook.Run("OnRepairedObject", ply, ent, health)

Example:
hook.Add("OnRepairedObject", "AddonGivePoints", function(ply, ent, health)
ply:AddPoints(3)
end)

You can also copy the barricade code if you want, but it’s tricky. I’ll release the Base functions as soon as I can and update them over time. :demoticon:
w.black57 28 Aug @ 1:39am 
Hi Shadow, I was currently trying to replicate the barricade system similar to the ZS. To my surprise, this mod updated with that mechanic and it is magnificent! Is there a way for me to hook my own functions on the repairing of barricade? I have a mod Loadout Progression System and it involves gaining points (https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=3553728948) . I'd like to save my time from actually remaking the barricade system and ask if its possible to execute my functions to "add points" when repairing the barricade. Or if it's possible to burrow some codes on your end to have your mechanic and make my own version, id be glad to credit you for it !:stella_happy:
TotallyARussian 19 Aug @ 9:26pm 
true, i guess as an alternative you could probably implement an optional passive health leech instead, it'll have it's own icon next to the LMB, block, passive, hud elements that will only appear if you turn that option on, and it would show the percentage of leeching that could be configured via a console command, although i think a default leech of 15% is pretty reasonable, but obviously feel free to think up your own idea of implementing a healing system
Shadow  [author] 19 Aug @ 12:18pm 
Yeah, it could definitely be done to add a phantom health system like that. The main issue is that players would need a way to actually see how much phantom health they have. Otherwise it’d be pretty confusing, like suddenly hitting something with a melee and just getting health back out of nowhere.

And forcing players to use a custom HUD just to see their phantom health would be a bad idea, since it would override whatever HUD they already prefer using.
TotallyARussian 19 Aug @ 7:58am 
well a lot of zs servers i've played on had a perk called "bloodlust" where essentially you'd get 10 phantom health per kill, up to like 20 max which would convert into proper health after like 5 seconds, you could only get that phantom health if you were missing health in the first place
Shadow  [author] 19 Aug @ 6:43am 
Yeah, you’re right, the Rebar Mace is broken at the moment, I’m already fixing it.
As for the “optional healing” idea: I didn’t really want to stray too far from the original ZS design, but it’s definitely not a bad suggestion. I’m just not sure how I’d implement it yet, maybe something like the Hemoclobber from Killing Floor 2?

I’ve also been considering adding an “Unofficial Melees” tab for experimental ideas like this. Rather than making a separate addon, I’d probably merge everything into a single mod, since I already have another unreleased ZS weapons mod.
TotallyARussian 19 Aug @ 12:35am 
i think the rebar mace is broken, doesn't seem to do damage, i also think it'd also be cool if there was like an optional healing or something from melee kills or melee damage