Black Mesa

Black Mesa

91 ratings
[SOURCEMOD] Weapon Inspection Plugin
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
7.436 KB
9 Feb, 2022 @ 5:14pm
1 Change Note ( view )

Subscribe to download
[SOURCEMOD] Weapon Inspection Plugin

Description
NOTE: THIS ADDON REQUIRES SOURCEMOD AND MANUAL INSTALLATION TO RUN. READ THIS DESCRIPTION IN FULL FOR INSTRUCTIONS.

Something that I've seen people ask about before is whether it's possible to do a CS:GO/TF2-style "weapon inspect" on command in Black Mesa - binding a key to playing the initial weapon pickup animation, basically. This isn't strictly possible in vanilla BM, though the player does have an input that forces them to play the weapon deploy animation, which is used in Interloper.

This plugin adds a command that will usually play the weapon deploy animation whenever the player wants. Simple as that.

Note that this plugin is ONLY DESIGNED FOR USE IN SINGLE-PLAYER MODE. If you can get it to load on a multiplayer server, there is no guarantee it'll work properly. I do not recommend attempting this.

This plugin adds one command and one console variable:

sm_inspect_weapon - Command. This is SUPPOSED to make the player's weapon play its deploy animation, but it's not perfect. See below. bm_weapon_inspect_enableprint 0/1 - Defaults to 0. This enables printing more detailed information to the console, reporting on what the plugin is doing.

ISSUES

There are two issues with this plugin that need to be taken into account. The first is that the inspect command itself may not work when run through the console. Try either of the following bindings to set it to a key:

bind g sm_inspect_weapon bind g "say /inspect_weapon"

The other is that the weapon deploy animation will not play on your most recently acquired weapon. As best I can tell, this is an issue in Black Mesa itself, so there's not much I can really do about it.

As an example: If you pick up a crowbar, then a Glock, then try inspecting the crowbar, the animation will play properly. However, if you try inspecting the Glock, the animation does not play. From what I can tell, this is not a plugin-specific issue - the same behaviour happens when using the command normally.

SOURCEMOD INSTALLATION

  1. Download the latest developer branch builds of SourceMod[www.sourcemod.net] and MetaMod:Source[www.sourcemm.net]. If you're not sure where exactly to find them, you can find a pre-packaged download of working builds HERE.[drive.google.com]
  2. Install both of them to your Black Mesa installation - this should be somewhere like Program Files (x86)/Steam/steamapps/common/Black Mesa/bms, though its exact location may differ based on your setup. If you downloaded them separately, drop the addons folder from MM:Source in the bms directory, followed by the addons and cfg folders from SourceMod - if you downloaded the package, extract the bms folder from it and merge it with the directory in the Black Mesa folder.
  3. In your Steam library, find Black Mesa, right-click it, and select Properties. At the bottom of the window is an option labelled Launch options. Add this to it:
    -insecure
    Do note that starting Black Mesa with this launch option enabled WILL PREVENT YOU FROM CONNECTING TO VAC-SECURED MULTIPLAYER SERVERS.
    If you should want to play multiplayer, remove the -insecure entry from the launch options.
  4. Launch the game and bring up the developer console. In it, type the following commands and press enter.
    meta sm
    If MetaMod:Source and SourceMod are installed correctly, you'll get output something like this in response:
    ] meta Metamod:Source Menu usage: meta <command> [arguments] alias - List or set an alias clear - Unload all plugins forcefully cmds - Show plugin commands cvars - Show plugin cvars credits - About Metamod:Source force_unload - Forcefully unload a plugin game - Information about GameDLL info - Information about a plugin list - List plugins load - Load a plugin pause - Pause a running plugin refresh - Reparse plugin files retry - Attempt to reload a plugin unload - Unload a loaded plugin unpause - Unpause a paused plugin version - Version information ] sm SourceMod Menu: Usage: sm <command> [arguments] cmds - List console commands config - Set core configuration options credits - Display credits listing cvars - View convars created by a plugin exts - Manage extensions plugins - Manage Plugins prof - Profiling version - Display version information
    If you get a message stating Unknown command, then something isn't installed properly. Double-check and make sure you've got both a metamod and sourcemod directory in your /bms/addons folder, as well as a pair of files called metamod.vdf and metamod_x64.vdf. If all four of those are present, check and make sure that you added -insecure to the launch parameters via Steam before starting the game.
  5. Subscribe to this addon and let it download (this shouldn't take very long, since it's a relatively small file). When it's done, you can find it in your workshop downloads folder for Black Mesa - this'll be somewhere like Program Files (x86)/Steam/steamapps/workshop/content/362890/2748611446. Inside, you should find a folder named Weapon Inspection Plugin.
  6. Copy the contents of this folder into your Black Mesa directory, merging the bms folders. This will install the compiled plugin, as well as place a copy of its source code in addons/sourcemod/scripting.
  7. Either restart Black Mesa, or run this command in the console:
    sm plugins refresh
    Once that's done, run this command as well:
    sm plugins list
    If installed correctly, you should see a line like this somewhere in the output:
    14 "[Black Mesa] Weapon Inspection" (1.0) by KyuuGryphon

If you've followed these instructions correctly, the plugin should be working as intended! Enjoy being able to admire your weapons (almost) whenever you please.

If you encounter any bugs, please feel free to let me know, and I'll do what I can to fix them - though make sure you've followed these instructions correctly before reporting bugs about the plugin or SourceMod just "not working". Reading comprehension is on you, not me.
Popular Discussions View All (1)
0
15 Sep, 2022 @ 1:21am
implemented here!
SHOUBI
22 Comments
Sg 29 Jul @ 6:28am 
Installing with was a bit odd, but overall a cool mod! One problem ive run into is that whenever you get a new weapon, at that moment, its inspect animation breaks and trying to inspect will just play the "grabbing the weapon" animation that plays whenever you equip a gun, for ex:

When i startedd up lambda core trough the new game section, all the gun inspect animations woked perfectly, except the Tau cannon, as the tau cannon was the gun i started off when the chapter loaded, so using the inspect keybind just played the equip animation.

There doesnt seem to be any efficient way to fix this, sometimes it does fix itself, but i dunno. Maybe saving and reloading the save could work?
White and Birdy™  [author] 9 Jul @ 11:00am 
@Vhs tape and CZB_XB; Go into your /bms/addons/sourcemod/plugins folder and remove any .smx files that you haven't installed yourself. Basically anything that doesn't start with the "bm_" prefix - admin-flatfile, basebans, clientprefs, nextmap, etc. That should do the trick.
Division 7 Jul @ 4:20pm 
When I try to go through a loading zone is puts me back on the main menu
OneGamerCat 23 May @ 4:54pm 
for some reason wont work with the shotgun
CZB_XB 20 Nov, 2023 @ 5:34am 
i can't changing maps between two maps when i'm playing. it says that can't find connection to bm_c1a2b from background04 in the console variable.then it come back to the main menu.i deleted the mod and then it worked.i think there's some problems in meta mod or sourse mod
Kalasnikov 8 Jan, 2023 @ 12:29pm 
Is there any chance to bind idle inspect, too?
minidrwho 🌈 6 Nov, 2022 @ 2:47am 
it sadly doesn't work with the assassin glock but works with all the default weapons as far as I can tell
C1TY 13 Sep, 2022 @ 6:10am 
this mod crashed my game
chompa 23 Jul, 2022 @ 6:10am 
lol as much as i'd like to use this mod, the installation is just a little too nuts. i really hope crowbar collective works to further streamline this workshop business because black mesa is one of those rare but perfect games for modding
PRC-MXYLR 30 May, 2022 @ 3:15am 
I found another fun thing : you can use this plugin to disable some weapon's speed cap such as glock, .357 and crossbow, if you dont understand what i mean, just press the `sm_inspect_weapon` key and hold right mouse when you are using glock