Garry's Mod

Garry's Mod

540 ratings
NPC Weapons - Base
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Tags: Fun, Realism
File Size
Posted
Updated
118.187 KB
Aug 25, 2020 @ 10:05pm
Aug 29, 2020 @ 12:50am
25 Change Notes ( view )

Subscribe to download
NPC Weapons - Base

Description
My NPC Weapon base from NPC Weapons, uploaded in separate form for use such as expansion packs, one-off weapons, or addons made by other people which require my weapon base.

This addon doesn't do anything by itself! Download one of the below addons to get actual NPC weapons to use.

ADDONS USING THIS BASE:

NPC Weapons - Adds 49 new weapons that NPCs can use.
Halo NPC Weapons - Adds 13 new weapons from Halo 3 and Halo Reach that NPCs can use.
Left For Dead 2 NPC Weapons - Adds 15 new weapons from Left For Dead 2 that NPCs can use.
Huge Deagle - A joke weapon, it's literally a huge Deagle that can probably kill anything that gets hit by it in 1 or 2 shots.
CloneWars NPC Weapons Reworked Pack - Star Wars Clone Wars weapons with fancy effects.

Want your addon added to this list? Message me on Steam: xyzzy

You are allowed to make NPC Weapons which use this base, but you are not allowed to re-upload, reproduce, copy, modify, alter, or adapt any part of this addon. If your addon needs this base to work, do not include it as part of your addon! Instead set this addon as a "required item" using the Steam Workshop options on your addon page. Not doing so would be violating Valve's Terms and Conditions. If you make an addon using this base, credit me (xyzzy) in the addon's description.

If you want to make weapons using this base, I suggest you look at Huge Deagle for how to create an addon requiring this base, and NPC Weapons for lots of examples. For more exotic weapon examples, try looking at Halo NPC Weapons.

FEATURES:
  • Easy to use weapon base, allowing quick creation of NPC weapons and easy tweaking. Most weapons won't require any coding, only changing values around.
  • Easily make weapons that fire bullets, explosive projectiles (rockets), or non-explosive projectiles.
  • Customizable muzzle effects, shell effects, tracer effects, impact decals, reload sounds, shoot sounds, and more.
  • Support for delayed shell ejection and sounds after firing, such as AWP and Scout bolt sounds, delaying ejecting shotgun shells until after racking shotgun slide, etc.
  • Custom logic for targeting and shooting, meaning that NPCs can fire as quickly and as accurately as you would like them to. Additionally, the custom logic lets NPCs shoot at unlimited range!
  • Aiming time - NPCs take time to aim at enemies before shooting. This can be as high or as low as you want, even 0 (which makes NPCs shoot you immediately on sight, extremely overpowered).
  • Customizable firerate, damage, bursts, bullets per shot, magazine size, holdtypes, and more.
  • Customizable damage drop off over distance, letting you do things like make shotguns weak at long range and sniper rifles strong at distance.
  • Control whether to aim for the head vs aim for the body, for balancing reasons.
  • Positionable clientside models in case you want to use a model that doesn't have attachments, or if you want to position/rotate/scale it (useful if the model isn't rigged and spawns as a "crotchgun"). See Halo NPC Weapons for examples of clientside models.
  • A base class for random weapons, extremely easy to use - 2 lines of code and a table of weapons to randomly select from, and you have a random weapon selector.
  • Easily add additional effects such as custom tracers or effects where bullets hit. See Huge Deagle for an example of additional effects, or Halo NPC Weapons.
  • Support for addons that replace NPC animations with the ConVar "npc_weapons_force_animations" - forces NPCs to hold weapons the correct way (eg. force Combine to hold pistols like pistols). This requires an animation replacement addon to work correctly.
  • Admins can easily scale the damage of all weapons using this base using the Options menu or a ConVar "npc_weapons_damage_mult".
  • Developer mode - enable with the ConVar "developer 1". Displays useful information such as muzzle position, damage + distance + dropoff multiplier, targeted position, etc.


Have any suggestions, changes, or additions you need in order to get your weapons to work with this base? Post it here.

Copyright © 2016 by xyzzy, All rights reserved.
No parts of this addon, code, or any of its contents may be reproduced, copied, modified, altered, or adapted, without the prior written consent of the author, unless otherwise indicated for stand-alone materials. Doing so would be violating Valve's Terms and Conditions.
Popular Discussions View All (2)
24
Apr 12 @ 1:14am
PINNED: Suggestions, Questions, Bugs? Post it here!
xyzzy
1
Jun 10, 2022 @ 8:09am
Addon
qpaulgenial123
28 Comments
ProGaming122 May 13 @ 10:52am 
WARNING! Carry on reading! Or you will die, even if you only looked at the word warning! Once there was a little girl called Clarissa, she was ten-years-old and she lived in a mental hospital, because she killed her mom and her dad. She got so bad she went to kill all the staff in the hospital so the More- government decided that best idea was to get rid of her so they set up a special room to kill her, as humane as possible but it went wrong the machine they were using went wrong. And she sat there in agony for hours until she died. Now every week on the day of her death she returns to the person that reads this letter, on a monday night at 12:00a.m. She creeps into your room and kills you slowly, by cutting you and watching you bleed to death. Now send this to ten other profiles on this one site, and she will haunt someone else who doesn't. This isn't fake. apparently, if u copy and paste this to ten comments in the next ten minutes u will have the best of your life.
Deniz Apr 30 @ 7:19am 
Not dealing damage to players
Nut Master Feb 8 @ 9:24am 
NPC's infinitely reload shotguns.
The omega crazytails Jan 7 @ 9:55pm 
I want npcs to use slightly stronger than fist boxing gloves no one has done this yet
Logan Jul 9, 2023 @ 4:16pm 
does it work with mwb base weapons?:slendy:
Abusive Father Mar 26, 2023 @ 4:16pm 
npcs won't shoot their guns
basic human rights Feb 24, 2023 @ 11:27pm 
does it work with vj npcs
aniquaaniss Feb 12, 2023 @ 8:03am 
He ain't lying, i tried it and it worked, just either delete the w_ files or move it to another folder.
󠀡󠀡⁧⁧_Re4PeR Nov 24, 2022 @ 10:50am 
Here's the fix for the weapons not being held properly:
Go to your Gmod folder and in addons go to your CSS content folder and in weapons delete all files that start with "w_". Done.
slingshot Aug 31, 2022 @ 6:40pm 
some reason the guns dont work for the npcs for me they dont hold the gun correctley or it wont show up can you fix it.