Garry's Mod

Garry's Mod

753 个评价
NPC Weapon Switching
4
   
奖励
收藏
已收藏
取消收藏
素材类型: 插件
插件类型: NPC
插件标签: 快乐, 写实
文件大小
发表于
更新日期
29.194 KB
9 月 1 日 上午 5:02
9 月 4 日 上午 1:33
5 项改动说明 ( 查看 )

订阅以下载
NPC Weapon Switching

在 Lynch 的 3 个合集中
Lynch Addons [GMOD]
10 件物品
Map Sweepers - Lynch's collection
108 件物品
Half-Life² Realism - Lynch's Collection
167 件物品
描述
[ko-fi.com]

Please take a moment to read the full description before subscribing. Thank you for your understanding.

THIS ADDON DOES NOT ADD ANIMATIONS TO NPCS, YOU REQUIRE OTHER ADDONS FOR THAT

WORKS AND IS RECOMMENDED WITH: MAP SWEEPERS

BEST PAIRED WITH: Lynch’s NPCs Item Drops, Lynch’s NPCs Essentials

ABOUT:
One of the standout features from Lynch's NPCs Essentials was so unique that I couldn’t just leave it as “one more feature” in a larger addon. Instead, I decided to split it into its own dedicated addon, while also improving the codebase and adding new customization options.

This addon gives NPCs (currently npc_combine_s and npc_citizen) the ability to seamlessly switch between their primary and secondary weapons, just like in COD or Trepang2.

KEY FEATURES:
  • Optimized codebase for performance and stability.
  • Unique decision-making logic that allows NPCs to choose when to switch weapons.
    • NPCs can decide whether to swap weapons when they’re out of ammo or about to run out.
  • Configurable options:
    • Set a global secondary weapon for all supported NPCs.
    • Or enable a ConVar that lets NPCs spawn with a random secondary weapon chosen from a hardcoded pool.
  • Misc ConVars:
    • Adjust the reload animation speed when NPCs switch weapons.
    • Force NPCs to reload upon first spawn during their setup phase.
  • Visual holsters (configurable):
    • Support for sidearm holsters (handgun-type weapons).
    • Holsters for whichever weapon (primary or secondary) is not currently in use.
  • When an NPC using this system dies, it will drop both its primary and secondary weapons.
  • Should be fully compatible with most addons that alter NPC AI or behavior.

KNOW ISSUES:
  • When using HL2 weapon replacements or completely new NPC weapons, holstered angles may look odd. Sadly, the only solution would be writing per-weapon angle fixes, which I will only do if there are enough requests for the same broken weapon model.
  • On the x64 branch of Garry’s Mod, this addon works correctly. However, animation addons for Combine Soldiers (to allow them to use handguns) are broken on that branch. The most noticeable issue is that when standing still and firing a handgun, the Combine Soldier may adopt the SMG1 holding animation after every shot. This is not caused by my addon nor the animation authors, it’s simply an incompatibility with the x64 branch. I recommend using this addon on the default branch of Garry’s Mod. - Added a convar to fix that - Now has been fixed by the developers of gmod
  • Incompatible with "Automatic Culling - Dynamic auto-cull" by Vuthakral, and potentially with other addons that behave similarly. The issue is strange but reproducible: the NPC’s secondary weapon gets duplicated in-hand, creating a hybrid between the primary and secondary weapon models.

SPECIAL COMPATIBILITY WITH:
NPC Flashlights System - Compatibility would not have been possible without the help of the original creator, this addon works fine with his!

RECOMMENDED ADDONS
For the best experience, I highly recommend using these alongside this addon:
These addons fix or improve the animations for Citizens and Combine Soldiers, and also give Combine Soldiers the ability to properly use sidearms and melee weapons.

Enjoy.

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀    Did you like the add-on? Show support by giving it a thumbs up!


TAGS Realism, NPC, Weapon, Entity, Effect, Call Of Duty, Modern Warfare, Realistic, QoL, Quality of Life, Trepang2, TP2, COD, Weapon Change

Contact information: Discord – lynch18

Copyright © 2025-20XX by Lynch, All rights reserved.
No part of this content, including files or code, may be reproduced, copied, adapted, merged, or modified without prior written consent from the original author, Lynch.
Unauthorized use or reproduction of this content may violate Valve's Terms and Conditions and Steam Workshop Rules Official Garry's Mod Wiki[wiki.garrysmod.com].

Any violation of this copyright notice will result in a formal DMCA complaint and report to Steam Support. That said, if you’d like to use any of my code legitimately, feel free to contact me and we can discuss it.