Troubleshooting - nosoop/SM-TFCustomAttributeStarterPack GitHub Wiki

I frequently get support questions on trying to run attributes in this starter pack. It doesn't help that most users are accustomed to Custom Weapons and that this set requires a new separate subsystem and a large number of dependencies.

Here's a list of questions I've received, to hopefully ensure that I don't have to answer them again.

You may also want to refer to the following other resources:

General

I can't find the compiled .smx files, only .sp.

Precompiled plugins for the Starter Pack are available in the releases section, and they are automatically kept up-to-date. For other repositories, there is a releases section on the main repository view; Github likes changing where it is every now and then so I can't be bothered to point to the exact location.

It isn't working :(

You'll need more information than that:

  • Verify that you've installed the dependencies. This includes Team Fortress 2, MetaMod:Source, and SourceMod.
  • Check the SourceMod error logs for load errors. You can also type sm plugins list in the server console to see if the attribute plugin you're trying to use failed to load.
  • If the plugin is indeed loaded, read up on Applying Custom Attributes.

An error "Exception reported: Invalid Handle 0" is reported when trying to load a plugin on Windows. Topmost entry in the stack trace is DHookEnableDetour.

That generally indicates a failure to retrieve a signature. The tl;dr of it is that supporting Windows is a hassle.

One of the causes is that due to the byte-based signature lookup on Windows, multiple plugins cannot detour the same function (update: this should be resolved in SourceMod 1.11). Remove other plugins that hook the same function for now. This shouldn't be happening any more within the starter pack itself, but it may happen again as new plugins are written and detouring functions that are already being detoured. You may also run into this issue running plugins from other sources that also hook into those functions, or if you've ended up installing multiple instances of the same plugin.

Another cause is that no signature is provided at all.

I try to provide Windows signatures when I can, but some plugins are designed for Linux first, depending on the end-user that paid me to develop it, and porting over to Windows isn't always successful without completely redesigning the plugin. This is primarily due to Windows builds not having named symbols for signatures (using byte pattern matching instead, a.k.a. "bytesigs"). The inverse is usually much easier. Windows builds also occasionally inline functions, meaning that a function call is replaced with the contents of a function; this means that hooking each instance becomes much more complicated.

The third cause is that a game update broke bytesigs. In that case, do file an issue if one isn't already open.

Starter Pack

An error "Buff type '...' is not associated with a plugin" or "Custom lunchbox effect '...' is not associated with a plugin" shows up in console.

You may be attempting to apply an attribute that calls into a separate registered plugin to apply some effects (dubbed a "microframework" in this project). Refer to the custom buffs / lunchbox effects to identify the required providing plugin.

Other developers may have implemented their own providers. If none of the listed custom buffs / lunchbox effects match, you may need to refer to other projects.

It's also possible that the attribute value is a typo.

Custom Weapons 3

An error "[CW3 Attributes] WARNING! Attribute "..." (value "..." plugin "custom-attribute-adapter/some_plugin_name") seems to have been ignored by all attribute plugins. It's either an invalid attribute, incorrect plugin, an error occured in the att. plugin, or the att. plugin forgot to return Plugin_Handled." shows up in console.

There's a number of reasons why you'd get that error:

An error "Could not find required attribute plugin ${filename}" shows up in console when I try to equip a weapon with one of these attributes.

The weapon config requests a plugin ${filename} that isn't loaded in. Assuming you definitely have that plugin installed, check sm plugins list and unload / load the plugin to see what error is causing it to not load.

An error "Could not find a weapon in slot ... to apply '...'."

Continue reading the error message. This happens because CW3 opted to pass in item slots instead of entities. Custom Attributes works with entities, so converting item slots back to entities is a "best guess" situation.

I'm not seeing any of those errors, but the attributes aren't getting applied either.

Make sure that both the CW2 and CW3 attribute modules are installed to ensure Custom Weapons is reading from both subsections.

An error "Failed to create native "CusWepsTF_GetClientWeapon", name is probably already in use" shows up in console.

You've installed both Custom Weapons 2 and Custom Weapons 3. Only one of them should be installed.

Dependency-related

A message "[tf2attributes.smx] Could not initialize call to CEconItem::SetCustomName" shows up in console.

You've installed an old build of FlaminSarge's TF2Attributes. As the upstream plugin is a bit behind on prebuilt releases, please download the most recent stable release of my personal build.

A message "[SM] Exception reported: Could not initialize call to CTFPlayer::AddCustomAttribute" shows up in console.

You've installed my build of TF2Attributes, but you neglected to update the gamedata.

None of the plugins are loading because the required extension(s) isn't/aren't running.

Make sure you've download the releases, not the sources. Also make sure that you are downloading the extension packages specific to your server platform. I usually package Windows releases in .zip archives, whereas Linux are packaged in .tar.gz or a similar tarballed archive.

Plugin releases are generally only .zip, since it's supported well-enough on both platforms. Don't @me to ask why I don't package everything in .zip.