Coder Social home page Coder Social logo

nosoop / sm-tfcustomweaponsx Goto Github PK

View Code? Open in Web Editor NEW
22.0 7.0 12.0 151 KB

SourceMod plugin that allows players to use custom TF2 items.

License: GNU General Public License v3.0

Python 18.52% SourcePawn 81.48%
team-fortress-2 sourcemod-plugin user-generated-content tf2 tf2-plugins

sm-tfcustomweaponsx's Introduction

Custom Weapons X

☕ fund my caffeine addiction ☕

A new iteration of Custom Weapons.

This was not a sponsored project.

Discuss this plugin on AlliedModders.

Features

Same as previous iterations of Custom Weapons:

  • A text-based configuration format for server operators to create new items with.
    • However, the format is different and not completely compatible.
  • A (newly localized) menu system for players to build their loadouts.
    • Know any languages? Please help localize by sending a pull request! Many of the localizations are copied straight from the game files, but there are custom messages that are not.
  • Support for equipping wearable weapons such as shields and boots.

New to CWX:

  • Dropped custom items can be picked up like any other item, and will retain their attributes (assuming the implementing plugins are written to spec).
  • Item exporting. You can dynamically add / update attributes, then run sm_cwx_export to export your item to a file once it's configured to your liking.
  • Weapon persistence. Custom items will not be dropped or reequipped on resupply, eliminating a whole class of related bugs and crummy workarounds.

More information is provided in the project wiki.

Installation

Dependencies

The SourceMod plugins / extensions listed below are required for Custom Weapons X to run:

  • Econ Data
    • Requires minimum version 0.18.0.
  • TF2Attributes
    • You must specifically use @nosoop's fork of TF2Attributes — it has additional features that are not available in the original upstream.
    • Requires minimum version 1.7.0 or newer.
  • TF2 Custom Attributes
  • TF2Utils
    • Requires minimum version 0.11.0.
  • DHooks2
    • The current stable version of SourceMod (1.11 or newer) now comes with this preinstalled. You only need to download this separately if you are using 1.10.

Additional software recommendations that aren't completely necessary:

  • The Attribute Support Fixes project, which is a no-configuration project that fixes certain attribute interactions.
  • CW3toX, which may allow attributes written for Custom Weapons 3 to run under this project.

Prebuilt Package

This repository is configured to have Github automatically compile the plugin and create a release whenever commits are pushed.

Download the package.zip from the releases section and unpack into your SourceMod directory.

This plugin can run alongside CW2/3, other than conflicting when weapons are applied. (As CW2/3 handles their logic later during spawn / resupply, their weapons will be the ones active.)

Upgrading

If you're upgrading an existing installation, please make sure to make a note of your currently installed version, then read over the Upgrade Notes section of the wiki to upgrade any changed dependencies between your current version and the latest.

Building

This project can be built in a consistent manner with Ninja, git, and Python 3.

  1. Clone the repository and its submodules: git clone --recurse-submodules ...
  2. Execute python3 configure.py --spcomp-dir ${PATH} within the repo, where ${PATH} is the path to the directory containing spcomp. This repository targets 1.10.
  3. Run ninja. Output will be available under build/.

(If you'd like to use a similar build system for your project, the template project is available here.)

Differences

Core design changes in TF2 necessitated a clean break from previous iterations of Custom Weapons. This means that attributes originally written for CW2 or CW3 are not compatible with CWX; they will need to be rewritten.

CWX is also not backwards-compatible with configuration files written for CW2 or CW3.

To keep the responsibilities of the core plugin to a minimum, a number of properties that were previously integral to CW2 / CW3 are delegated to attribute-implementing plugins in CWX.

This includes:

  • killfeed / log name
  • weapon model (view / world)
  • clip / ammo settings

For implementations of those, see the Core Attribute Implementations page on the project wiki.

For attribute developers

CWX has no unique format for attributes. Instead, it has first-class support for the following systems:

  • Native game attributes through TF2Attributes.
    • It'd be pretty dumb if you couldn't use built-in attributes.
    • New attribute classes can be injected using a plugin like Hidden Dev Attributes, and developers can then use TF2Attrib_HookValue* to calculate values like any other in-game attribute.
  • The Custom Attributes Framework.
    • These are basically KeyValues handles stored as an attribute value under a common interface. "Attributes" can be declared freely without an injection process, speeding up development iteration.
    • I'll be referring to these as CAF-based attributes.
    • Full disclosure: I made this.

By implementing your attribute in one of those two formats, they will interoperate with plugins that support those systems; they are not bound to specifically to CWX.

If you're coming from CW2 or CW3, native / CAF-based attributes are very different (though native / CAF-based attributes share similarities among themselves).

The main difference is the storage mechanism. Whereas CW2 / CW3 receive attribute information through forward functions and store them globally in-plugin, native / CAF-based ones retrieve the value from entities at runtime and are tied to the game's attribute system.

sm-tfcustomweaponsx's People

Contributors

blueberryy avatar blunderstab avatar jack5github avatar nosoop avatar shadowmario avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

sm-tfcustomweaponsx's Issues

Invalid Handle 0 (error 4)

Pre-flight checklist

  • I am only describing a single issue.
  • I have upgraded to the latest version of CWX and its dependencies; the issue still persists.
  • I have verified that the issue is specific to CWX, and have ruled out other plugins that work indirectly with CWX (e.g. attributes).

Environment

  • Operating system: Windows 10
  • SourceMod version: 1.12.0.git1192-windows
  • CWX version: X.0.10-2c22df4

Description

CWX attempts to load with a call to TF2Econ, resulting in the following error:

Exception reported: Invalid Handle 0 (error 4)
L 04/19/2024 - 03:56:19: [SM] Blaming: tf_econ_data.smx
L 04/19/2024 - 03:56:19: [SM] Call stack trace:
L 04/19/2024 - 03:56:19: [SM]   [0] SDKCall
L 04/19/2024 - 03:56:19: [SM]   [1] Line 495, scripting/tf_econ_data.sp::GetEconAttributeDefinitionByName
L 04/19/2024 - 03:56:19: [SM]   [2] Line 484, scripting/tf_econ_data.sp::Native_TranslateAttributeNameToDefinitionIndex
L 04/19/2024 - 03:56:19: [SM]   [4] TF2Econ_TranslateAttributeNameToDefinitionIndex
L 04/19/2024 - 03:56:19: [SM]   [5] Line 164, scripting/cwx.sp::OnAllPluginsLoaded

Steps to replicate

Install CWX and launch the server.

Other information

N/A

Feature request: add an option to "remove other weapons"

One interesting thing that could be added to the plugin is an option called "remove other weapons" (with the default value of zero) when using a custom weapon.

It works exactly the way you think: when such a custom weapon is used, all other weapons will be removed from the player's loadout.

One exception could be made to the Engineer's melee weapons to not make them delete his PDAs, and another could be made for the Spy's disguise kit (these two exceptions would also be options, with both having the default value of zero).

Crash on Equip

Pre-flight checklist

  • I am only describing a single issue.
  • I have upgraded to the latest version of CWX and its dependencies; the issue still persists.
  • I have verified that the issue is specific to CWX, and have ruled out other plugins that work indirectly with CWX (e.g. attributes).

Environment

  • Operating system: Windows 10
  • SourceMod version: 1.12.0.git1192-windows
  • CWX version: X.0.10-2c22df4

Description
Unfortunately no logs are printed as a result of this crash, however if necessary I can edit this post with a crash dump, let me know.

Steps to replicate

  1. Install CWX (with pre-requisites)
  2. Load into a map as pyro or demoman
  3. Run sm_cwx command
  4. Select a custom primary from the default example items
  5. Expect immediate server crash

Other information

N/A

Add 'access' override entry for items

An access key on the item would introduce more flexibility for item testing / restrictions.
Probably going to implement this once the KeyValues entries are ported to enum structs internally.

Weapon equip error spam + crash

Windows 10 64 Bit
Sourcemod version : 1.11.0.6922
CWX version : X.0.10-cbf76ba

After the recent Vscript update, equipped custom weapons are permanently stuck to a player's right hand after switching weapons. This happens to all custom weapons regardless of stats used or attribute plugins accessed. Class and slot also don't seem to matter. Custom weapons still function as intended otherwise.

L 12/02/2022 - 18:07:34: [SM] Exception reported: Entity -1 (-1118764352) is not a valid entity
L 12/02/2022 - 18:07:34: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:34: [SM] Call stack trace:
L 12/02/2022 - 18:07:34: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:34: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:34: [SM] Exception reported: Entity -1 (-1383529666) is not a valid entity
L 12/02/2022 - 18:07:34: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:34: [SM] Call stack trace:
L 12/02/2022 - 18:07:35: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:35: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:35: [SM] Exception reported: Entity -1 (-1312357564) is not a valid entity
L 12/02/2022 - 18:07:35: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:35: [SM] Call stack trace:
L 12/02/2022 - 18:07:35: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:35: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:35: [SM] Exception reported: Entity -1 (-637861048) is not a valid entity
L 12/02/2022 - 18:07:35: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:35: [SM] Call stack trace:
L 12/02/2022 - 18:07:35: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:35: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:35: [SM] Exception reported: Entity -1 (-1707932854) is not a valid entity
L 12/02/2022 - 18:07:35: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:35: [SM] Call stack trace:
L 12/02/2022 - 18:07:35: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:35: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:35: [SM] Exception reported: Entity -1 (-1313537204) is not a valid entity
L 12/02/2022 - 18:07:35: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:35: [SM] Call stack trace:
L 12/02/2022 - 18:07:35: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:35: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:35: [SM] Exception reported: Entity -1 (-956890260) is not a valid entity
L 12/02/2022 - 18:07:35: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:35: [SM] Call stack trace:
L 12/02/2022 - 18:07:35: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:35: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:35: [SM] [3] TF2_RegeneratePlayer
L 12/02/2022 - 18:07:35: [SM] [4] Line 39, /home/forums/content/files/2/5/5/3/4/1/163360.attach::BackWeapons
L 12/02/2022 - 18:07:35: [SM] Exception reported: Entity -1 (-1503001744) is not a valid entity
L 12/02/2022 - 18:07:35: [SM] Blaming: cwx.smx
L 12/02/2022 - 18:07:35: [SM] Call stack trace:
L 12/02/2022 - 18:07:35: [SM] [0] RemoveEntity
L 12/02/2022 - 18:07:35: [SM] [1] Line 456, scripting/cwx.sp::OnGetLoadoutItemPost
L 12/02/2022 - 18:07:35: [SM] [3] TF2_RegeneratePlayer
L 12/02/2022 - 18:07:35: [SM] [4] Line 39, /home/forums/content/files/2/5/5/3/4/1/163360.attach::BackWeapons

This appears whenever someone touches a resupply while custom weapons are equipped, or when equipping a custom weapon.

Crashes do occasionally happen but are inconsistent, and I could not pinpoint exactly what causes them, only that they happen with custom weapons in use when and seemingly after a player dies. No errors are thrown before or upon server crash

Replicating should be as simple as equipping a weapon, unless there are variables I haven't considered

[SM] Displaying 23 extensions:
[01] Automatic Updater (1.11.0.6922): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6922): Extension for interacting with URLs
[03] TF2Items (1.6.4): TF2 Item Modifier
[04] TF2 CalculateMaxSpeed Detour (1.0.4): Allows overriding max speed results
[05] TF2 Tools (1.11.0.6922): TF2 extended functionality
[06] BinTools (1.11.0.6922): Low-level C/C++ Calling API
[07] SDK Hooks (1.11.0.6922): Source SDK Hooks
[08] SDK Tools (1.11.0.6922): Source SDK Tools
[09] Top Menus (1.11.0.6922): Creates sorted nested menus
[10] DHooks (1.11.0.6922): Dynamic Hooks
[11] Client Preferences (1.11.0.6922): Saves client preference settings
[12] SQLite (1.11.0.6922): SQLite Driver
[13] GeoIP (1.11.0.6922): Geographical IP information
[14] file "geoipcity.ext.dll": The specified module could not be found.

[15] Regex (1.11.0.6922): Provides regex natives for plugins
[16] SteamWorks Extension (1.2.3): Exposes SteamWorks functions to Developers
[17] file "store_sm.ext.dll": The specified module could not be found.

[18] SteamTools (0.10.0+54fdc51): SteamWorks for SourceMod
[19] Source Scramble (0.7.0): Tools for working with memory.
[20] file "PathFollower.ext.2.tf2.dll": Unknown error
[21] file "curl.ext.dll": The specified module could not be found.

[22] Socket (3.0.1): Socket extension for SourceMod
[23] LoadSoundscript (1.1.0): More soundscript functionality for SourceMod plugins
[SM] Listing 145 plugins:
001 "TF2 Add Condition" (1.0.0) by Tylerst
002 "Admin File Reader" (1.11.0.6922) by AlliedModders LLC
003 "Admin Smite" (2.1) by Hipster
004 "Admin Help" (1.11.0.6922) by AlliedModders LLC
005 "Admin Menu" (1.11.0.6922) by AlliedModders LLC
006 "Admin Sounds" (1.0.1) by dalto
007 "Admin Troll" (1.1.4a) by BB
008 "Advertisements" (2.1.1) by Tsunami
009 "airblast_projectiles_adds_self_condition.smx"
010 "Anti-Flood" (1.11.0.6922) by AlliedModders LLC
011 "[TF2CA] Medigun Uber: Group Overheal" (0.0.0) by Author!
012 "attr_medic_disable_active_regen.smx"
013 "[TF2CA] TF2 Classic Nailgun Slow" (1.0.0) by nosoop
014 "Auto File Loader" (1.0.3) by Keith Warren (Shaders Allen)
015 "Basic Ban Commands" (1.11.0.6922) by AlliedModders LLC
016 "Basic Chat" (1.11.0.6922) by AlliedModders LLC
017 "Basic Comm Control" (1.11.0.6922) by AlliedModders LLC
018 "Basic Commands" (1.11.0.6922) by AlliedModders LLC
019 "Basic Info Triggers" (1.11.0.6922) by AlliedModders LLC
020 "Basic Votes" (1.11.0.6922) by AlliedModders LLC
021 "Automatic Bot Names" (1.3.2) by Rakeri, luki1412
022 "TFBot Rocket Jump" (1.0) by EfeDursun125
023 "Bot Teamplay" (1.2.1) by Showin (Originally by Dr. McKay but I kinda completely changed it at this point.), Goerge
024 "Class Restrictions for Bots" (3.01) by luki1412
025 "TF2 Bot Combat Improvements" (1.6.5) by EfeDursun125, Marqueritte, Showin', and Crasher_3637
026 "TF2 Improved Bots" (3.7) by EfeDursun125 / Tweaks And Comments By Showin
027 "TF2 Bot Medic Fix" (1.0) by EfeDursun125
028 "Bot Setup Time Fun" (1.0) by tRololo312312 / luki1412 / Showin
029 "[TF2] Bot Voice Commands" (1.7.5) by EfeDursun125, enderandrew, Marqueritte, Showin', and Crasher_3637
030 "[TF2] Building Hats" (2.0) by Pelipoika
031 "Caberdemo Scream" (0.2) by hotgrits
032 "CallAdmin" (0.1.8) by Impact, dordnung
033 "Connect Announce" (1.8) by Arg!
034 "[TF2] Custom Attribute : Replace Sound" (1.0) by Mir
035 "[TF2] Chat Bubbles" (22w04a) by code: reBane, idea: fuffeh
036 "[ANY] Chat Trigger to Lower Case" (1.0.0) by Mart
037 "Civilian Pose Plugin" (1.0) by dada513
038 "Client Preferences" (1.11.0.6922) by AlliedModders LLC
039 "[TF2] Crit Hallelujah!" (1.0.1) by DarthNinja
040 "Sounds Editor" (1.0) by Arkarr
041 "[TF2] Serverside Player Attachment Fixer" (1.1) by 404UNF
042 "Custom Votes" (1.9) by ReFlexPoison
043 "Custom Weapons 2" (beta 2) by MasterOfTheXP
044 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop

045 "[TF2] Custom Weapons X - Custom Weapons 3 Attribute Adapter" (0.0.0) by nosoop
046 "[TF2] Custom Weapons X" (X.0.10-cbf76ba) by nosoop
047 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
048 "Class is dead voice systeam" (1.2) by Classic
049 "Default Map Changer" (2.5) by TigerOx
050 "Discord API" (1.0) by .#Zipcore, Credits: Shavit, bara, ImACow and Phire
051 "Discord: CallAdmin" (1.1) by .#Zipcore
052 "Discord: SourceBans" (1.0) by .#Zipcore
053 "Discord: SourceComms" (1.1) by .#Zipcore
054 "disorient_on_hit.smx"
055 "Custom Weapons: Dota 2 Attributes" (1.04) by Orion
056 "[TF2] DSP Effects" (1.1) by A.I, Hurp Durp
057 "Empty Server Map Restarter" (1.2) by Daniel Hambraeus
058 "Frog Chance" (1.0) by MasterOfTheXP
059 "Cheats" (1.1) by FaTony
060 "Fun Commands" (1.11.0.6922) by AlliedModders LLC
061 "Fun Votes" (1.11.0.6922) by AlliedModders LLC
062 "[ANY] Gifts" (2.3) by Zephyrus
063 "Give Bots More Weapons" (1.10) by PC Gamer, with code by luki1412 and manicogaming, edited by That Annoying Guide
064 "Give Bots More Cosmetics" (1.13) by PC Gamer, with code by luki1412 and manicogaming
065 "Goomba Stomp Core" (2.0.2) by Flyflo
066 "Goomba Stomp TF2" (1.1.0) by Flyflo
067 "invisfix.smx" (1.0) by kgbproject(Tetragromaton)
068 "invisiwepfix" (1.0) by Frenzoid
069 "joke_medigun_mod_drain_health.smx"
070 "List SourceMod Commands" (1.1) by denormal, shanapu
071 "MapChooser" (1.10.0.6543) by AlliedModders LLC
072 "Map configs" (1.3) by Berni
073 "minigun_radial_buff.smx"
074 "mod_crit_type_on_hitgroup.smx"
075 "mod_crit_type_vs_condition.smx"
076 "Custom Weapons: More Advanced Weaponiser 2 Attributes" (1.04) by Orion && the AW2 dev team
077 "MORE BOOM" (1.0) by psychonic
078 "mult_basegrenade_explode_radius.smx"
079 "[TF2] Necromasher" (1.1) by Pelipoika
080 "Resize Players" (1.6.0) by 11530
081 "Nextmap" (1.11.0.6922) by AlliedModders LLC
082 "Noise Maker Player" (2.3.1) by Jouva Moufette [email protected], DarthNinja, Velture
083 "Map Nominations" (1.10.0.6543) by AlliedModders LLC
084 "TF2 Utils" (1.2.1) by nosoop
085 "Custom Weapons: Orion's Attributes" (1.04) by Orion
086 "Panzer Tank Rockets" (0.2.1) by AI
087 "Player Commands" (1.11.0.6922) by AlliedModders LLC
088 "Player Pitch" (1.1.1) by mrphil2105
089 "Player Ranks" (3.4.2) by Aderic, Gladoncio
090 "pluginreloader.smx"
091 "Profile Data Viewer" (0x01) by Chdata
092 "Quake Sounds v3" (3.5.0) by Spartan_C001
093 "It's Raining Men" (0.1) by Jindo
094 "RandomCycle" (1.10.0.6543) by AlliedModders LLC
095 "Reserved Slots" (1.11.0.6922) by AlliedModders LLC
096 "[TF2] Respawn Effects" (3.2) by Lucas 'aIM' Maza
097 "rocketdrop69.smx"
098 "Rock The Vote" (1.10.0.6543) by AlliedModders LLC
099 "Roll The Dice (Revamped)" (2.3.3) by Phil25
100 "Round Triggers" (1.10) by MikeJS
101 "Simple Chat Processor (Redux)" (2.3.0) by Simple Plugins, Mini
102 "Simple Welcome Message" (1.2) by Zuko
103 "SM File/Folder Downloader and Precacher" (1.5) by SWAT_88
104 "sm_rsptc" (0.3) by gameguysz
105 "Sound Commands" (1.11.0.6922) by AlliedModders LLC
106 "[TF2] Special Ragdolls" (1.0) by Nanochip
107 "stack_grenade_damage_custom.smx"
108 "Steam Profile" (1.0.1) by Facksy
109 "Store - The Resurrection" (1.0) by Zephyrus
110 "[Any] SteamTools Game Description Override" (1.1.3) by Dr. McKay
111 "[TF2] Stuck in spectate fix" (1.0) by Fraeven and Rowedahelicon
112 "[TF2] TF2Attributes" ([email protected]) by FlaminSarge
113 "[TF2] TF2 Attribute Extended Support" (1.11.0) by nosoop
114 "TF2 Hidden Attribuites" (1.2) by rafradek
115 "[TF2] Hud Msg" (21w35a) by reBane
116 "TF2IDB" (0.93) by Bottiger
117 "[TF2Items] Give Weapon" (3.14159) by FlaminSarge (orig by asherkin)
118 "[TF2Items] Manager" (1.4.3) by Damizean & Asherkin
119 "Rebalanced Fortress 2" (v1.9.0) by JugadorXEI
120 "[TF2] Wearable Item Tools" (1.1.1) by Powerlord
121 "[TF2] Flags" (1.1) by Damizean

122 "TF2 Fast Respawns" (1.0.8) by WoZeR, MonkeyBiz, gH0sTy, Downtown1, Kevin_b_er, SaberUK, octo-dhd
123 "[TF2] Customizable Team Names" (1.0.3) by Oshizu�
124 "TF Force Holidays" (1.10.2) by Powerlord
125 "Engineer Bot Fix" (1.2) by EfeDursun125
126 "[TF2] TFBot engineer support for all maps" (1.3) by EfeDursun125
127 "[TF2] Custom Attributes" (0.4.1) by nosoop
128 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
129 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
130 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
131 "[TF2] DamageInfo Tools" (0.1.0) by nosoop
132 "[TF2] Econ Data" (0.18.2) by nosoop
133 "[TF2] OnTakeDamage Hooks" (1.2.0) by nosoop
134 "[TF2] Spin the Wheel" (1.1) by FlaminSarge
135 "[TF2] Taunt Menu" (1.08) by FlaminSarge, Nighty, xCoderx, Crow, PC Gamer
136 "Tidy Chat" (0.5) by linux_lover
137 "[Tf2] Third Person Cookies!" (1.3.5) by Friagram
138 "[TF2] Unused Voicelines" (1.0) by Nanochip
139 "Updater" (1.2.2) by GoD-Tony
140 "Driveable Vehicles" (2.4.0) by Mikusch
141 "viewmodel_override.smx"
142 "VoiceCommand spam" (27.2.2021) by Bacardi
143 "[TF2] Voice Commands Pitch" (1.1.1) by SirDigby
144 "Web Shortcuts" (1.0.1) by James "sslice" Gray
145 "[TF2]Wheel of Doom spawner" (1.3) by kgbproject(Tetragromaton)

Stickies disappear when respawning caused by changed weapons

Separated out individual issue from #28, CC @SnowySnowtime

It looks like TF2_RespawnPlayer() is the culprit here. Should be able to replace with a call to either CTFPlayer::CheckInstantLoadoutRespawn(), CTFPlayer::ForceRegenerateAndRespawn(), or CTFPlayer::ForceRespawn(), which would exactly match the behavior the game uses when it receives a loadout change notification from the game coordinator.

Attributes on non-native wearables stack

Separated out individual issue from #28, CC @SnowySnowtime

I'm almost certain this stems from wearables still being on the player. cwx/item_entity.sp::TF2_RemoveItemByLoadoutSlot() only checks against the loadout entity, which means off-class loadouts aren't recognized or unequiped.

I thought I had an issue tracking this quirk somewhere in tf2utils. There's a change there I've been meaning to push, so I'll test / deploy it if it works out.

Sound replacements not work

The SM TF2 ReplaceSound registered on the wiki is dependent on other plugins, so it does unnecessary behavior.
and above all, it does not work properly. So I made another one.
I want you register it on the wiki if there is no problem.

Ability to pick up non-native weapons

Wonder if there's a way to do this. In most cases server operators are expected to inherit from an item that is valid for a given class, but being able to pick up an item that it normally can't (with proper-ish pickup dialog and all) would be very nice to have.

Support item name localizations

With the enum struct refactor out of the way, it should be easier to organize this.

The plan is to implement a top-level section to provide localized item names. Something like:

// ... previous item sections
"localized_name"
{
    "es"    "[spanish name for item]"
    "de"    "[german name]"
    // so on
}

"Projectile speed increased" attribute causes extreme projectile deviation on The Scorch Shot.

Environment

  • Operating system: Windows 11 64bit
  • SourceMod version: 1.11.0.6906
  • CWX version: X.0.10-006b99b

Description

The attribute makes the projectile go flying in a direction not even remotely close to the crosshair.

Steps to replicate

Install this weapon config.

Experience shooting your secondary as pyro when you select "The Everburn" secondary weapon.

Other information

[SM] Displaying 10 extensions:
[01] Automatic Updater (1.11.0.6906): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6906): Extension for interacting with URLs
[03] TF2 Tools (1.11.0.6906): TF2 extended functionality
[04] BinTools (1.11.0.6906): Low-level C/C++ Calling API
[05] SDK Hooks (1.11.0.6906): Source SDK Hooks
[06] SDK Tools (1.11.0.6906): Source SDK Tools
[07] Top Menus (1.11.0.6906): Creates sorted nested menus
[08] Client Preferences (1.11.0.6906): Saves client preference settings
[09] SQLite (1.11.0.6906): SQLite Driver
[10] DHooks (1.11.0.6906): Dynamic Hooks
[SM] Listing 27 plugins:
  01 "Admin File Reader" (1.11.0.6906) by AlliedModders LLC
  02 "Admin Help" (1.11.0.6906) by AlliedModders LLC
  03 "Admin Menu" (1.11.0.6906) by AlliedModders LLC
  04 "Anti-Flood" (1.11.0.6906) by AlliedModders LLC
  05 "Basic Ban Commands" (1.11.0.6906) by AlliedModders LLC
  06 "Basic Chat" (1.11.0.6906) by AlliedModders LLC
  07 "Basic Comm Control" (1.11.0.6906) by AlliedModders LLC
  08 "Basic Commands" (1.11.0.6906) by AlliedModders LLC
  09 "Basic Info Triggers" (1.11.0.6906) by AlliedModders LLC
  10 "Basic Votes" (1.11.0.6906) by AlliedModders LLC
  11 "Client Preferences" (1.11.0.6906) by AlliedModders LLC
  12 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
  13 "[TF2] Custom Weapons X" (X.0.10-006b99b) by nosoop
  14 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
  15 "Fun Commands" (1.11.0.6906) by AlliedModders LLC
  16 "Fun Votes" (1.11.0.6906) by AlliedModders LLC
  17 "Nextmap" (1.11.0.6906) by AlliedModders LLC
  18 "Player Commands" (1.11.0.6906) by AlliedModders LLC
  19 "Reserved Slots" (1.11.0.6906) by AlliedModders LLC
  20 "Sound Commands" (1.11.0.6906) by AlliedModders LLC
  21 "[TF2] TF2Attributes" ([email protected]) by FlaminSarge
  22 "TF2 Utils" (0.19.1) by nosoop
  23 "[TF2] Custom Attributes" (0.4.1) by nosoop
  24 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
  25 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
  26 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
  27 "[TF2] Econ Data" (0.18.2) by nosoop

Prevent sentries from being destroyed on custom item switch with Gunslinger in real inventory

Have yet to look into the actual cause, but I think the weapon persist code still allows the player's Gunslinger to spawn if the custom weapon we're supposed to have isn't spawned in yet.

It's since been fixed but I think this is reproducible by doing the following:

  • Start with the Gunslinger equipped in "true" loadout
  • Equip custom wrench A
  • Build a sentry
  • Select custom wrench B
  • Sentry destroyed when loadout updated to equip wrench B

"weapon burn time increased" attribute does not work on secondary weapons

Environment

  • Operating system: Windows 11 64bit
  • SourceMod version: 1.11.0.6906
  • CWX version: X.0.10-006b99b

Description

The attribute "weapon burn time increased" does not work on secondary weapons such as the scorch shot.

Steps to replicate

Install this weapon config.

Experience shooting your secondary as pyro when you select "The Everburn" secondary weapon at an enemy and observe as they don't burn longer.

Other information

[SM] Displaying 10 extensions:
[01] Automatic Updater (1.11.0.6906): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6906): Extension for interacting with URLs
[03] TF2 Tools (1.11.0.6906): TF2 extended functionality
[04] BinTools (1.11.0.6906): Low-level C/C++ Calling API
[05] SDK Hooks (1.11.0.6906): Source SDK Hooks
[06] SDK Tools (1.11.0.6906): Source SDK Tools
[07] Top Menus (1.11.0.6906): Creates sorted nested menus
[08] Client Preferences (1.11.0.6906): Saves client preference settings
[09] SQLite (1.11.0.6906): SQLite Driver
[10] DHooks (1.11.0.6906): Dynamic Hooks
[SM] Listing 27 plugins:
  01 "Admin File Reader" (1.11.0.6906) by AlliedModders LLC
  02 "Admin Help" (1.11.0.6906) by AlliedModders LLC
  03 "Admin Menu" (1.11.0.6906) by AlliedModders LLC
  04 "Anti-Flood" (1.11.0.6906) by AlliedModders LLC
  05 "Basic Ban Commands" (1.11.0.6906) by AlliedModders LLC
  06 "Basic Chat" (1.11.0.6906) by AlliedModders LLC
  07 "Basic Comm Control" (1.11.0.6906) by AlliedModders LLC
  08 "Basic Commands" (1.11.0.6906) by AlliedModders LLC
  09 "Basic Info Triggers" (1.11.0.6906) by AlliedModders LLC
  10 "Basic Votes" (1.11.0.6906) by AlliedModders LLC
  11 "Client Preferences" (1.11.0.6906) by AlliedModders LLC
  12 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
  13 "[TF2] Custom Weapons X" (X.0.10-006b99b) by nosoop
  14 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
  15 "Fun Commands" (1.11.0.6906) by AlliedModders LLC
  16 "Fun Votes" (1.11.0.6906) by AlliedModders LLC
  17 "Nextmap" (1.11.0.6906) by AlliedModders LLC
  18 "Player Commands" (1.11.0.6906) by AlliedModders LLC
  19 "Reserved Slots" (1.11.0.6906) by AlliedModders LLC
  20 "Sound Commands" (1.11.0.6906) by AlliedModders LLC
  21 "[TF2] TF2Attributes" ([email protected]) by FlaminSarge
  22 "TF2 Utils" (0.19.1) by nosoop
  23 "[TF2] Custom Attributes" (0.4.1) by nosoop
  24 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
  25 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
  26 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
  27 "[TF2] Econ Data" (0.18.2) by nosoop

Add "Replace" functionality from CW2

Custom Weapons 2 has a feature that allows existing weapons to be replaced by custom weapons with custom stats. This would be incredibly useful for this plugin as developers could use custom attributes in their rebalance mods.

Use in CW2 looked like this: "replace" "425" where 425 is a weapon id.

For example: I could implement a custom attribute on the Family Business, and anyone who connects to the server and equips the Family Business normally would receive the modified version. A popup would appear with an item description so the user knows what the changes are (although I intend on documenting my balance changes elsewhere so I would greatly appreciate this popup being toggleable).

"ED_Alloc no free edicts" crash when refunding credits in MvM.

Environment

  • Operating system: Windows 10 64bit
  • SourceMod version: 1.11.0.6906
  • CWX version: X.0.10-006b99b

Description

When clicking the "refund" button in mvm, the server crashes and reports "ED_Alloc no free edicts". This does not happen if this plugin is not installed.
Screenshot 2022-07-12 233955

Steps to replicate

  1. Place this file in the configs/cwx folder. (generated using this)
  2. Load up a game of mvm_ghost_town.
  3. Click the refund credits button.

Other information

sm exts list; sm plugins list;
[SM] Displaying 10 extensions:
[01] Automatic Updater (1.11.0.6906): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6906): Extension for interacting with URLs
[03] TF2 Tools (1.11.0.6906): TF2 extended functionality
[04] BinTools (1.11.0.6906): Low-level C/C++ Calling API
[05] SDK Hooks (1.11.0.6906): Source SDK Hooks
[06] SDK Tools (1.11.0.6906): Source SDK Tools
[07] Top Menus (1.11.0.6906): Creates sorted nested menus
[08] Client Preferences (1.11.0.6906): Saves client preference settings
[09] SQLite (1.11.0.6906): SQLite Driver
[10] DHooks (1.11.0.6906): Dynamic Hooks
[SM] Listing 27 plugins:
  01 "Admin File Reader" (1.11.0.6906) by AlliedModders LLC
  02 "Admin Help" (1.11.0.6906) by AlliedModders LLC
  03 "Admin Menu" (1.11.0.6906) by AlliedModders LLC
  04 "Anti-Flood" (1.11.0.6906) by AlliedModders LLC
  05 "Basic Ban Commands" (1.11.0.6906) by AlliedModders LLC
  06 "Basic Chat" (1.11.0.6906) by AlliedModders LLC
  07 "Basic Comm Control" (1.11.0.6906) by AlliedModders LLC
  08 "Basic Commands" (1.11.0.6906) by AlliedModders LLC
  09 "Basic Info Triggers" (1.11.0.6906) by AlliedModders LLC
  10 "Basic Votes" (1.11.0.6906) by AlliedModders LLC
  11 "Client Preferences" (1.11.0.6906) by AlliedModders LLC
  12 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
  13 "[TF2] Custom Weapons X" (X.0.10-006b99b) by nosoop
  14 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
  15 "Fun Commands" (1.11.0.6906) by AlliedModders LLC
  16 "Fun Votes" (1.11.0.6906) by AlliedModders LLC
  17 "Nextmap" (1.11.0.6906) by AlliedModders LLC
  18 "Player Commands" (1.11.0.6906) by AlliedModders LLC
  19 "Reserved Slots" (1.11.0.6906) by AlliedModders LLC
  20 "Sound Commands" (1.11.0.6906) by AlliedModders LLC
  21 "[TF2] TF2Attributes" ([email protected]) by FlaminSarge
  22 "TF2 Utils" (0.19.1) by nosoop
  23 "[TF2] Custom Attributes" (0.4.1) by nosoop
  24 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
  25 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
  26 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
  27 "[TF2] Econ Data" (0.18.2) by nosoop

Inheriting Engineer PDA causes error

CWX states that the PDA shows a "non-existent" slot if it is set in the "inherits" field. In order for it to work, it must be overwritten with "used_by_classes" and set onto "Utility".

Possible missing dependency in install instructions.

I've installed all dependencies listed in the README. When I attempt to load the plugin with sm plugins load cwx, SM returns the error:

[SM] Plugin cwx.smx failed to load: Native "TF2Attrib_SetFromStringValue" was not found.

Either I've screwed something up while installing (quite possible), or there's a dependency which isn't listed in the docs.

CWX alters clip on forced respawns

Environment

Linux; Debian
SourceMod 1.12.0.6985,
cwx_version" = "X.0.10-4396d59"

Description

I have a simple BFB reskin that I'm running through CWX- However, on forced respawns, the weapon ends with 6 maximum rounds in its clip, instead of the usual 4. Reloading rounds 5 & 6 have stuttered animations. This gives an unfair and unintended advantage over traditional variants.

The following respawn events trigger the issue if the item is equipped prior:

  • End of waiting for player respawn
  • Beginning of new round respawn

The following do not influence the weapon's max clip size:

  • Death
  • Touching a Resupply Cabinet
  • Emptying the clip (Still reloads to 6.)

The only found fixes: - All fixes are temporary, triggers still cause the bug to reapply

  • Swapping classes, then swapping back
  • Swapping to a different CWX item, then back to the problem item.
  • reloading cwx itself

Steps to replicate

Create a cwx BFB- No custom attributes needed.

		"{40e7b3a1-30d6-43b5-8f94-2e0e5a14366d}"
		{
			"name"			"custom BFB skin test"
			"inherits"		"Baby Face's Blaster"
	        	"keep_static_attrs"		"1"
		  	
	        	"attributes_game"
			{
	   		}
	        	
			"attributes_custom"
			{
	   		}

	 	}

Load a map, join a team, and equip the custom BFB through CWX.
Once Waiting for players ends- your BFB will have 6 rounds in it.

  • This will also happen again after the round ends

Other information

] sm exts list; sm plugins list;
 "Automatic Updater" (1.12.0.6985) by AlliedModders LLC: Updates SourceMod gamedata files
 "Webternet" (1.12.0.6985) by AlliedModders LLC: Extension for interacting with URLs
 "TF2Items" (1.6.3) by Asherkin & AzuiSleet & Damizean: TF2 Item Modifier
 "TF2 CalculateMaxSpeed Detour" (1.0.4) by nosoop: Allows overriding max speed results
 "Accelerator" (2.5.0) by Asher "asherkin" Baker: SRCDS Crash Handler
 "TF2 Tools" (1.12.0.6985) by AlliedModders LLC: TF2 extended functionality
 "BinTools" (1.12.0.6985) by AlliedModders LLC: Low-level C/C++ Calling API
 "SDK Hooks" (1.12.0.6985) by AlliedModders LLC: Source SDK Hooks
 "SDK Tools" (1.12.0.6985) by AlliedModders LLC: Source SDK Tools
 "DHooks" (1.12.0.6910) by AlliedModders LLC: Dynamic Hooks
 "Source Scramble" (0.7.0) by nosoop: Tools for working with memory.
 "Regex" (1.12.0.6985) by AlliedModders LLC: Provides regex natives for plugins
 "Top Menus" (1.12.0.6985) by AlliedModders: Creates sorted nested menus
 "TF2 Econ Dynamic" (0.1.0) by nosoop: Injects user-defined content into the game schema
 "Client Preferences" (1.12.0.6985) by AlliedModders: Saves client preference settings
 "SQLite" (1.12.0.6985) by AlliedModders LLC: SQLite Driver
 "REST in Pawn" (1.3.1) by Tsunami: Provides HTTP and JSON natives for plugins
 "proxysend" (0.1.0.7) by Arthurdead: proxysend
 "SteamWorks Extension" (1.2.3) by Kyle Sanderson: Exposes SteamWorks functions to Developers
 "SMJansson" (2.3.1/3) by Thrawn2: JSON parser/writer
 "Project: Overtime - Sniper Rifle Attributes On Full Charge" (8b75090) by nosoop
 "Project: Overtime - Build Speed Modifiers" (8b75090) by nosoop
 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
 "[TF2] OnTakeDamage Hooks" (1.3.1) by nosoop
 "Project: Overtime - Mad Milk Heal Scaling" (8b75090) by nosoop
 "Project: Overtime - Explode on Ignite Mod" (8b75090) by nosoop
 "Project: Overtime - Healing Debuff Removal" (6d30c16) by NotnHeavy
 "Project: Overtime - Mult Repressurization Rate" (8b75090) by nosoop
 "Project: Overtime - Dynamic Quick Fix Healing" (8b75090) by nosoop
 "Admin File Reader" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Item Server Down" (919b979) by NotnHeavy
 "Project: Overtime - Cannot Oneshot" (8b75090) by nosoop
 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
 "Project: Overtime - Grenade Detonate on Impact" (8b75090) by Bakugo
 "Project: Overtime - Mod Engineer Build Setup Time" (8b75090) by nosoop
 "Project: Overtime - Mult DmgTaken Cloaked" (8b75090) by nosoop
 "Project: Overtime - Damage Tweak" (6d30c16) by NotnHeavy
 "Nextmap" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Radial Heal On Banner Deploy" (8b75090) by nosoop
 "Project: Overtime - Add Building Unsap Disable Time" (8b75090) by nosoop
 "Project: Overtime - Healing Source Modifiers" (8b75090) by nosoop
 "Custom Weapons 3: YoNer's Attributes" (2.1) by YoNer, code repurposed from basic-attributes plugin by MasterOfTheXP and TriggerCommands plugin by Chase
 "Project: Overtime - Jar Mod Duration" (8b75090) by nosoop
 "Project: Overtime - Sapper Replace Cooldown" (8b75090) by nosoop
 "[TF2] TF2 Attribute Extended Support" (1.14.1) by nosoop
 "Basic Chat" (1.12.0.6985) by AlliedModders LLC
 "Improved Pause Command" (1.5.0) by Aad
 "Fulcrum" (1.4.1) by nosoop
 "Admin Menu" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Arrows Heal Buildings Mod" (8b75090) by nosoop
 "Reserved Slots" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Add Attribute On Reload" (8b75090) by nosoop
 "Project: Overtime - Scattergun Uses Cray Knockback" (8b75090) by nosoop
 "Project: Overtime - Lerp Active Move Speed" (8b75090) by nosoop
 "Project: Overtime - Apply Wet Effect" (8b75090) by nosoop
 "Project: Overtime - Attribute Effect Scaled on Health" (8b75090) by nosoop
 "Project: Overtime - Sapper Armor" (6d30c16) by NotnHeavy
 "Project: Overtime - Crit Behind Player" (8b75090) by NotnHeavy
 "TF2 Utils" (1.3.2) by nosoop
 "Project: Overtime - Stickybomb Radius Reduced Arm Time" (8b75090) by nosoop
 "Client Preferences" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Melts in Fire Modifier" (8b75090) by nosoop
 "Project: Overtime - Fire Rate Tick Fix" by nosoop
 "Basic Commands" (1.12.0.6985) by AlliedModders LLC
 "Basic Ban Commands" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Repair Mult From Others" (8b75090) by nosoop
 "HUD Overlay Material Generator Attribute" (0.1.0) by nosoop
 "Project: Overtime - aiming_no_flinch_at_threshold" (8b75090) by nosoop
 "Project: Overtime - mult_ammo_from_sources" (8b75090) by nosoop
 "Project: Overtime - cannot_backstab" (8b75090) by nosoop
 "Project: Overtime - add_health_regen_const" (8b75090) by nosoop
 "Project: Overtime - Attribute" (8b75090) by nosoop
 "Project: Overtime - Mult Sentry Turn Speed" (8b75090) by nosoop
 "Project: Overtime - Flying Guillotine Mod" (8b75090) by nosoop
 "Project: Overtime - Electrical Airblast" (8b75090) by nosoop
 "[TF2] Custom Attribute : Replace Sound" (1.0) by Mir
 "Project: Overtime - Charge Launch Windows" (6d30c16) by nosoop
 "Chat Forwarder" (0.0.1) by nosoop
 "Project: Overtime - Mult Sentry Rocket Post Fire Delay" (8b75090) by nosoop
 "Project: Overtime - Dynamic Repair Rates" (8b75090) by nosoop
 "Auto File Loader" (1.0.3) by Keith Warren (Shaders Allen)
 "Project: Overtime - Spy Backstab Instakill Cooldown" (8b75090) by nosoop
 "Project: Overtime - Wrangler Mod" (8b75090) by nosoop
 "Project: Overtime - Falling Stomp While Active" (8b75090) by nosoop
 "Player Commands" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Sapper Highlights Buildings" (8b75090) by Bakugo
 "tf2rue" (0.0.5) by https://sappho.io
 "Project: Overtime - Classic Charge Display" (8b75090) by nosoop
 "Project: Overtime - Mult Boots Falling Stomp" (8b75090) by nosoop
 "Custom Weapons: More Advanced Weaponiser 2 Attributes" (1.04) by Orion && the AW2 dev team
 "Project: Overtime - Attribute" (8b75090) by nosoop
 "Project: Overtime - Scope Crit Arm Time" (8b75090) by nosoop
 "Project: Overtime - Mult Dmgtaken From Fall" (8b75090) by nosoop
 "Custom Status HUD" (1.1.1) by nosoop
 "Project: Overtime - Reload While Holstered" (8b75090) by nosoop
 "Project: Overtime - Player Detections Shared" (8b75090) by nosoop
 "Project: Overtime - Heal on Backstab" (8b75090) by nosoop
 "Project: Overtime - Reload While Cloaked" (8b75090) by nosoop
 "Anti-Flood" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Energy Weapon Charged Shot Mod" (8b75090) by nosoop
 "Project: Overtime - Buffalo Steak Mod" (8b75090) by nosoop
 "Project: Overtime - Mult Lunchbox Consume Speed" (8b75090) by nosoop
 "Project: Overtime - Flare Fires Knockback Pellets Mod" (8b75090) by nosoop
 "[TF2] Econ Dynamic Compatibility Shim" (1.0.0) by nosoop
 "Project: Overtime - No Extinguish" (8b75090) by nosoop
 "viewmodel_override.smx" viewmodel_override.smx
 "[TF2CA] Building Health Override" (1.0.0) by nosoop
 "[TF2CA] Weapon Always Gibs On Kill" (0.0.0) by Author!
 "custom-attr-starter-pack/pull_target_on_hit.smx" custom-attr-starter-pack/pull_target_on_hit.smx
 "custom-attr-starter-pack/jar_is_poison.smx" custom-attr-starter-pack/jar_is_poison.smx
 "custom-attr-starter-pack/minigun_rage_projectile_shield.smx" custom-attr-starter-pack/minigun_rage_projectile_shield.smx
 "custom-attr-starter-pack/joke_medigun_mod_drain_health.smx" custom-attr-starter-pack/joke_medigun_mod_drain_health.smx
 "custom-attr-starter-pack/attr_medic_disable_active_regen.smx" custom-attr-starter-pack/attr_medic_disable_active_regen.smx
 "custom-attr-starter-pack/uber_drain_rate_per_extra_player.smx" custom-attr-starter-pack/uber_drain_rate_per_extra_player.smx
 "[TF2CA] TF2 Classic Nailgun Slow" (1.0.0) by nosoop
 "custom-attr-starter-pack/sniper_weapon_rate_aim_target.smx" custom-attr-starter-pack/sniper_weapon_rate_aim_target.smx
 "custom-attr-starter-pack/cloak_debuff_time_scale.smx" custom-attr-starter-pack/cloak_debuff_time_scale.smx
 "custom-attr-starter-pack/preserve_rage.smx" custom-attr-starter-pack/preserve_rage.smx
 "custom-attr-starter-pack/mult_basegrenade_explode_radius.smx" custom-attr-starter-pack/mult_basegrenade_explode_radius.smx
 "custom-attr-starter-pack/lunchbox_effects/temp_mod_crit_chance.smx" custom-attr-starter-pack/lunchbox_effects/temp_mod_crit_chance.smx
 "custom-attr-starter-pack/lunchbox_effects/sugar_frenzy.smx" custom-attr-starter-pack/lunchbox_effects/sugar_frenzy.smx
 "custom-attr-starter-pack/syringegun_poison_on_hit.smx" custom-attr-starter-pack/syringegun_poison_on_hit.smx
 "custom-attr-starter-pack/minigun_radial_buff.smx" custom-attr-starter-pack/minigun_radial_buff.smx
 "custom-attr-starter-pack/minigun_burst_shot_rage.smx" custom-attr-starter-pack/minigun_burst_shot_rage.smx
 "custom-attr-starter-pack/owned_building_phasing.smx" custom-attr-starter-pack/owned_building_phasing.smx
 "custom-attr-starter-pack/minigun_vacuum.smx" custom-attr-starter-pack/minigun_vacuum.smx
 "custom-attr-starter-pack/energy_ring_instakill_radius.smx" custom-attr-starter-pack/energy_ring_instakill_radius.smx
 "custom-attr-starter-pack/airblast_projectiles_restores_health.smx" custom-attr-starter-pack/airblast_projectiles_restores_health.smx
 "[TF2CA] Rage Meter Nultiplier" (1.0.0) by nosoop
 "custom-attr-starter-pack/mod_crit_type_on_hitgroup.smx" custom-attr-starter-pack/mod_crit_type_on_hitgroup.smx
 "[TF2CA] Rage on Headshot" (0.0.0) by nosoop
 "custom-attr-starter-pack/reload_full_clip_at_once.smx" custom-attr-starter-pack/reload_full_clip_at_once.smx
 "custom-attr-starter-pack/weapon_overheat.smx" custom-attr-starter-pack/weapon_overheat.smx
 "[TF2] Custom Attribute: addcond while active" (1.0.1) by nosoop
 "custom-attr-starter-pack/low_gravity_charge.smx" custom-attr-starter-pack/low_gravity_charge.smx
 "custom-attr-starter-pack/mod_crit_type_vs_sentry_targets.smx" custom-attr-starter-pack/mod_crit_type_vs_sentry_targets.smx
 "custom-attr-starter-pack/lunchbox_override_pickup_type.smx" custom-attr-starter-pack/lunchbox_override_pickup_type.smx
 "custom-attr-starter-pack/flare_mods.smx" custom-attr-starter-pack/flare_mods.smx
 "custom-attr-starter-pack/generate_rage_on_dmg_patch.smx" custom-attr-starter-pack/generate_rage_on_dmg_patch.smx
 "custom-attr-starter-pack/mult_damage_vs_sappers.smx" custom-attr-starter-pack/mult_damage_vs_sappers.smx
 "custom-attr-starter-pack/full_clip_refill_after_time.smx" custom-attr-starter-pack/full_clip_refill_after_time.smx
 "[TF2] Custom Attribute: Custom Ball Impact Effect" (1.0.0) by nosoop
 "custom-attr-starter-pack/buff_overrides/buff_control_rockets.smx" custom-attr-starter-pack/buff_overrides/buff_control_rockets.smx
 "custom-attr-starter-pack/buff_overrides/buff_enable_tag_players.smx" custom-attr-starter-pack/buff_overrides/buff_enable_tag_players.smx
 "custom-attr-starter-pack/buff_overrides/buff_crit_and_mark_for_death.smx" custom-attr-starter-pack/buff_overrides/buff_crit_and_mark_for_death.smx
 "[TF2CA] Sniper Rage: Smoke Out Spies" (1.0.0) by nosoop
 "custom-attr-starter-pack/buff_overrides/sniper_rage_buff_reload.smx" custom-attr-starter-pack/buff_overrides/sniper_rage_buff_reload.smx
 "custom-attr-starter-pack/crossbow_addcond_on_teammate_hit.smx" custom-attr-starter-pack/crossbow_addcond_on_teammate_hit.smx
 "custom-attr-starter-pack/mod_crit_type_vs_condition.smx" custom-attr-starter-pack/mod_crit_type_vs_condition.smx
 "custom-attr-starter-pack/alt_fire_throws_cleaver.smx" custom-attr-starter-pack/alt_fire_throws_cleaver.smx
 "custom-attr-starter-pack/tag_last_enemy_hit.smx" custom-attr-starter-pack/tag_last_enemy_hit.smx
 "custom-attr-starter-pack/energy_ring_impact_effect.smx" custom-attr-starter-pack/energy_ring_impact_effect.smx
 "[TF2CA] Medigun Uber: Group Overheal" (0.0.0) by Author!
 "custom-attr-starter-pack/airblast_projectiles_adds_self_condition.smx" custom-attr-starter-pack/airblast_projectiles_adds_self_condition.smx
 "[TF2] Custom Attribute: MvM Attributes" (1.0.0) by nosoop
 "custom-attr-starter-pack/jar_is_bleed_on_hit.smx" custom-attr-starter-pack/jar_is_bleed_on_hit.smx
 "custom-attr-starter-pack/shake_on_step.smx" custom-attr-starter-pack/shake_on_step.smx
 "custom-attr-starter-pack/unsap_metal_cost.smx" custom-attr-starter-pack/unsap_metal_cost.smx
 "custom-attr-starter-pack/condition_stack_on_hit.smx" custom-attr-starter-pack/condition_stack_on_hit.smx
 "custom-attr-starter-pack/custom_lunchbox_effect.smx" custom-attr-starter-pack/custom_lunchbox_effect.smx
 "custom-attr-starter-pack/explosive_shield_bash.smx" custom-attr-starter-pack/explosive_shield_bash.smx
 "custom-attr-starter-pack/projectile_override_energy_ball.smx" custom-attr-starter-pack/projectile_override_energy_ball.smx
 "custom-attr-starter-pack/spontaneous_explode.smx" custom-attr-starter-pack/spontaneous_explode.smx
 "[TF2CA] Sapper Recharge Time" (1.0.0) by nosoop
 "custom-attr-starter-pack/damage_increase_on_hit.smx" custom-attr-starter-pack/damage_increase_on_hit.smx
 "custom-attr-starter-pack/stack_grenade_damage_custom.smx" custom-attr-starter-pack/stack_grenade_damage_custom.smx
 "[TF2CA] Sapper Building Reprogrammer" (1.0.0) by nosoop
 "custom-attr-starter-pack/shake_on_hit.smx" custom-attr-starter-pack/shake_on_hit.smx
 "custom-attr-starter-pack/disable_sniper_unzoom.smx" custom-attr-starter-pack/disable_sniper_unzoom.smx
 "custom-attr-starter-pack/generate_rage_over_time.smx" custom-attr-starter-pack/generate_rage_over_time.smx
 "custom-attr-starter-pack/disorient_on_hit.smx" custom-attr-starter-pack/disorient_on_hit.smx
 "[TF2CA] Banner Buff Override" (1.1.1) by nosoop
 "custom-attr-starter-pack/weapon_rate_buff_ally.smx" custom-attr-starter-pack/weapon_rate_buff_ally.smx
 "custom-attr-starter-pack/projectile_heal_on_teammate_contact.smx" custom-attr-starter-pack/projectile_heal_on_teammate_contact.smx
 "custom-attr-starter-pack/projectile_upgrades_buildings.smx" custom-attr-starter-pack/projectile_upgrades_buildings.smx
 "custom-attr-starter-pack/flamethrower_alt_fire_oil.smx" custom-attr-starter-pack/flamethrower_alt_fire_oil.smx
 "custom-attr-starter-pack/mult_damage_vs_targetcond.smx" custom-attr-starter-pack/mult_damage_vs_targetcond.smx
 "Project: Overtime - Weapon Overheat Mod" (8b75090) by nosoop
 "Project: Overtime - Flare Inverted Falloff" (8b75090) by nosoop
 "Project: Overtime - Stickybomb Primer" (8b75090) by nosoop
 "Project: Overtime - Mult Damage Sapper Target" (8b75090) by nosoop
 "Project: Overtime - Buff Override - Buff Banner++" (8b75090) by nosoop
 "Spew Kit" (1.0.1) by nosoop
 "Project: Overtime - Knife is Throwable" (8b75090) by Bakugo
 "[Any] Plugin Enable/Disable" (1.0.1) by DarthNinja
 "AddTime" (1.0.4) by bl4nk
 "Project: Overtime - Bounce On Player Stomp" (8b75090) by nosoop
 "[TF2] Custom Weapons X" (X.0.10-4396d59) by nosoop
 "Project: Overtime - Spunup Damage Resistance Mod" (8b75090) by nosoop
 "Sound Commands" (1.12.0.6985) by AlliedModders LLC
 "Basic Info Triggers" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Mult Dmg vs Health Low" (8b75090) by nosoop
 "Project: Overtime - Spy Nearby Reveal" (8b75090) by nosoop
 "Fun Commands" (1.12.0.6985) by AlliedModders LLC
 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
 "[TF2] Serverside Player Attachment Fixer" (1.1) by 404UNF
 "Basic Comm Control" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Bonk! Atomic Punch Modifier" (8b75090) by nosoop
 "Project: Overtime - Thermal Thruster Air Control" (6d30c16) by NotnHeavy
 "[TF2] Econ Data" (0.18.1) by nosoop
 "Project: Overtime - Mmmph Overhaul" (8b75090) by nosoop
 "Project: Overtime - Sniper Rifle Mod Crit Type On Hitgroup" (8b75090) by nosoop
 "[TF2] TF2Attributes" (1.7.3) by FlaminSarge
 "[TF2] Wearable Item Tools" (1.1.1) by Powerlord
 "Project: Overtime - Flamethrower Revamp" (6d30c16) by NotnHeavy
 "Project: Overtime - Dispenser Output Modifiers" (8b75090) by nosoop
 "[CA] Weapon Model Override" (1.1.1) by Zabaniya001
 "Project: Overtime - Sniper Rifle Damage Remap" (8b75090) by nosoop
 "HUD Overlay Material Generator" (1.0.0) by nosoop
 "[CA] Fire Magic Spells Rage" (1.0.0) by Zabaniya001
 "[CA] Fire Ring Attribute" (1.0.0) by Zabaniya001
 "Project: Overtime - Custom Projectile Offset" (8b75090) by nosoop
 "Custom Weapons: Orion's Attributes" (1.04) by Orion
 "Project: Overtime - Damage as Health Percentage" (8b75090) by nosoop
 "Project: Overtime - Add Attribute On Condition" (8b75090) by nosoop
 "[TF2] Halloween Tiny Unstuck" (1.2.1) by nosoop
 "[TF2] Custom Weapons X - Custom Weapons 3 Attribute Adapter" (0.0.0) by nosoop
 "Project: Overtime - Build Time Consistency" by nosoop
 "[TF2] Smooth Sentry Construct & Upgrade Animations" (1.0) by Pelipoika
 "[TF2] Custom Attributes" (0.5.0) by nosoop
 "Fun Votes" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - Custom Stunball Modifiers" (8b75090) by nosoop
 "Project: Overtime - Speed Boost On Hit Mod" (8b75090) by nosoop
 "Admin Help" (1.12.0.6985) by AlliedModders LLC
 "Project: Overtime - No Gas Ignition on Self Damage" (6d30c16) by nosoop
 "Source Scramble Manager" (1.2.0) by nosoop
 "Project: Overtime - Teleporter Recharge Rate" (8b75090) by nosoop
 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
 "Custom Weapons 3: Ray's Attributes" (2.0.0) by Theray070696
 "Custom Weapons 3: Basic Attributes" (Beta 2) by MasterOfTheXP (original author), Theray070696 (porting to CW3)
 "Custom Weapons: More Advanced Weaponiser 2 Attributes" (1.04) by Orion && the AW2 dev team
 "Custom Weapons 3: AW2 Attributes" (2.0.1) by MechaTheSlag (Attributes & AW2), Theray070696 (Porting to CW2 and CW3)
 "Custom Weapons: Dota 2 Attributes" (1.04) by Orion
 "Custom Weapons: Orion's Attributes" (1.04) by Orion
 "SM File/Folder Downloader and Precacher" (1.5) by SWAT_88
 "Project: Overtime - Meter Persists on Death" (8b75090) by nosoop
 "Project: Overtime - Back Attack Options" (8b75090) by nosoop
 "Basic Votes" (1.12.0.6985) by AlliedModders LLC
 "[TF2] DamageInfo Tools" (0.1.0) by nosoop

Segfault on weapon grant

Pre-flight checklist

  • [Y] I am only describing a single issue. (If you want to report multiple, please file them individually so they can be referenced and closed separately.)
  • [Y] I have upgraded to the latest version of CWX and its dependencies; the issue still persists.
  • [Yes and no respectively] I have verified that the issue is specific to CWX, and have ruled out other plugins that work indirectly with CWX (e.g. attributes).

Environment

Ubuntu 20.04 LTS

Description

When sm_cwx is run and a weapon (in this case, The Grenade Launcher Launcher) is selected from the menu, the server experiences a segmentation fault.

Steps to replicate

Start a server. Wait for round to start, then type sm_cwx into the console and select The Grenade Launcher Launcher.
Expected Behavior: Weapon is granted upon touching a resupply locker.
Actual Behavior: Server crashes immediately upon touching a resupply locker.

Other information

Multiple errors are shown when the /cwx command is run, primarily in the realm of things like L 04/10/2022 - 05:45:46: [SM] Exception reported: Language phrase "LoadoutSlot_Melee" not found (arg 5)

sm exts list output:

 "Automatic Updater" (1.10.0.6536) by AlliedModders LLC: Updates SourceMod gamedata files
 "Webternet" (1.10.0.6536) by AlliedModders LLC: Extension for interacting with URLs
 "TF2Items" (1.6.4) by Asherkin & AzuiSleet & Damizean: TF2 Item Modifier
 "TF2 Tools" (1.10.0.6536) by AlliedModders LLC: TF2 extended functionality
 "BinTools" (1.10.0.6536) by AlliedModders LLC: Low-level C/C++ Calling API
 "SDK Hooks" (1.10.0.6536) by AlliedModders LLC: Source SDK Hooks
 "SDK Tools" (1.10.0.6536) by AlliedModders LLC: Source SDK Tools
 "Top Menus" (1.10.0.6536) by AlliedModders: Creates sorted nested menus
 "Client Preferences" (1.10.0.6536) by AlliedModders: Saves client preference settings
 "SQLite" (1.10.0.6536) by AlliedModders LLC: SQLite Driver

sm plugins list output

 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
 "Basic Ban Commands" (1.10.0.6536) by AlliedModders LLC
 "Admin Help" (1.10.0.6536) by AlliedModders LLC
 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
 "Simple Chat Processor (Redux)" (2.3.0) by Simple Plugins, Mini
 "[TF2] Custom Weapons X" (X.0.9-5d020e6) by nosoop
 "Client Preferences" (1.10.0.6536) by AlliedModders LLC
 "[TF2] Custom Attributes" (0.4.1) by nosoop
 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
 "Basic Commands" (1.10.0.6536) by AlliedModders LLC
 "Anti-Flood" (1.10.0.6536) by AlliedModders LLC
 "Instant Respawn" (1.4) by ChauffeR
 "Basic Chat" (1.10.0.6536) by AlliedModders LLC
 "[TF2] TF2Attributes" ([email protected]) by FlaminSarge
 "[TF2] Econ Data" (0.18.2) by nosoop
 "TF2 Utils" (0.17.0) by nosoop
 "Basic Comm Control" (1.10.0.6536) by AlliedModders LLC
 "Player Commands" (1.10.0.6536) by AlliedModders LLC
 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
 "Basic Votes" (1.10.0.6536) by AlliedModders LLC
 "Fun Commands" (1.10.0.6536) by AlliedModders LLC
 "[TF2] Be the Horsemann" (1.4) by FlaminSarge
 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
 "[TF2] Gimme" (1.13) by PC Gamer
 "Reserved Slots" (1.10.0.6536) by AlliedModders LLC
 "Admin Menu" (1.10.0.6536) by AlliedModders LLC
 "Sound Commands" (1.10.0.6536) by AlliedModders LLC
 "Admin File Reader" (1.10.0.6536) by AlliedModders LLC
 "Bonus Round Immunity" (1.1.0) by Antithasys
 "Civilian Pose Plugin" (1.0) by dada513
 "Fun Votes" (1.10.0.6536) by AlliedModders LLC
 "Basic Info Triggers" (1.10.0.6536) by AlliedModders LLC
 "Nextmap" (1.10.0.6536) by AlliedModders LLC
"[Source 2013] Custom Chat Colors" (3.1.0) by Dr. McKay

Implement API for reading extended data by plugins

In the future I'd like to implement the following native functionality:

/**
 * Returns a subsection within an items "extended data" section.  This handle should be freed by the calling plugin.
 * If the section doesn't exist, this returns `null`.
 */
native KeyValues CWX_GetItemExtData(const char[] uid, const char[] name);

// TODO some item UID iterator (??)

One of the intended functions of this setup is to allow custom-defined sections, such as for precaching resources on map startup, and just things that other plugins can hook on:

"my item"
{
	"name"		"My custom bat that I didn't steal from Smash or anything"
	"inherits"	"TF_WEAPON_BAT"
	"extdata"
	{
		"resources"
		{
			"model"		"models/path/to/a/custom_bat.mdl"
			"texture"	"materials/stuff.vmt"
			"texture"	"materials/more_stuff.vmt"
			"sound"		"sound/satisfying_bat_impact_sound.wav"
		}
	}
}

I believe this is something that would be relevant for #7.

(The reason we do it this way is to isolate plugin-specific data and provide a convenient interface without having to traverse deep into the entire item KeyValues struct. Also, we may not necessarily require items to be defined in their entirety using KeyValues.)

Secondary weapons keep getting swapped to when touching a resupply locker.

Environment

  • Operating system: Windows 11 64bit
  • SourceMod version: 1.11.0.6906
  • CWX version: X.0.10-006b99b

Description

If a custom secondary weapon is selected, touching a resupply locker will always switch to it. This makes maps that have constant resupply like tr_walkway impossible to play on.

Steps to replicate

Install this weapon config.

Play on the famous tr_walkway_fix.

Experience as you keep getting swapped to your secondary as pyro when you select "The Everburn" secondary weapon.

Other information

[SM] Displaying 10 extensions:
[01] Automatic Updater (1.11.0.6906): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6906): Extension for interacting with URLs
[03] TF2 Tools (1.11.0.6906): TF2 extended functionality
[04] BinTools (1.11.0.6906): Low-level C/C++ Calling API
[05] SDK Hooks (1.11.0.6906): Source SDK Hooks
[06] SDK Tools (1.11.0.6906): Source SDK Tools
[07] Top Menus (1.11.0.6906): Creates sorted nested menus
[08] Client Preferences (1.11.0.6906): Saves client preference settings
[09] SQLite (1.11.0.6906): SQLite Driver
[10] DHooks (1.11.0.6906): Dynamic Hooks
[SM] Listing 27 plugins:
  01 "Admin File Reader" (1.11.0.6906) by AlliedModders LLC
  02 "Admin Help" (1.11.0.6906) by AlliedModders LLC
  03 "Admin Menu" (1.11.0.6906) by AlliedModders LLC
  04 "Anti-Flood" (1.11.0.6906) by AlliedModders LLC
  05 "Basic Ban Commands" (1.11.0.6906) by AlliedModders LLC
  06 "Basic Chat" (1.11.0.6906) by AlliedModders LLC
  07 "Basic Comm Control" (1.11.0.6906) by AlliedModders LLC
  08 "Basic Commands" (1.11.0.6906) by AlliedModders LLC
  09 "Basic Info Triggers" (1.11.0.6906) by AlliedModders LLC
  10 "Basic Votes" (1.11.0.6906) by AlliedModders LLC
  11 "Client Preferences" (1.11.0.6906) by AlliedModders LLC
  12 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
  13 "[TF2] Custom Weapons X" (X.0.10-006b99b) by nosoop
  14 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
  15 "Fun Commands" (1.11.0.6906) by AlliedModders LLC
  16 "Fun Votes" (1.11.0.6906) by AlliedModders LLC
  17 "Nextmap" (1.11.0.6906) by AlliedModders LLC
  18 "Player Commands" (1.11.0.6906) by AlliedModders LLC
  19 "Reserved Slots" (1.11.0.6906) by AlliedModders LLC
  20 "Sound Commands" (1.11.0.6906) by AlliedModders LLC
  21 "[TF2] TF2Attributes" ([email protected]) by FlaminSarge
  22 "TF2 Utils" (0.19.1) by nosoop
  23 "[TF2] Custom Attributes" (0.4.1) by nosoop
  24 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
  25 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
  26 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
  27 "[TF2] Econ Data" (0.18.2) by nosoop

allow equipping of regular items?

since a lot of the functions are already written here, could you allow the commands to also equip regular items so a separate plugin isnt needed? however i understand if you only want this plugin for custom items. thanks.

Add client-facing CW3 commands

To make the transition from CW3 to CWX happen seamlessly for end-users, we need to support /c, /cus, and /custom.
Have to support both plugins running side-by-side though, so AddCommandListener seems like the best approach here.

Migrate tf2wearables natives to tf2utils

The utils library now supports the wearables-related functionality from tf2wearables, so the plan is to migrate to the other one and reduce the number of dependencies an end-user has to download.

This is already in the works; just throwing up the issue so it can be referenced in the future.

Fix non-medieval weapons being useable in medieval mode

It appears that every single weapon a server operator creates, regardless of its attributes, is always equippable when medieval mode is active. This makes it impossible to play regular medieval mode, for there will be players that equip these custom weapons during such maps or when the medieval ConVar is turned on.

[SUGGESTION] Add alternative variant of menu for choosing weapons (MOTD-based)

I don't know if you have looked into this, but I have a suggestion to add the option to equip weapons through MOTD-based menus, written by reBane.

This suggestion is geared more towards player's comfort when choosing weapons, since apparently choosing weapons by typing a command and selecting stuff from menu is not very intuitive for players, so at least it would eliminate the second part of the issue, making it look more like an in-game inventory theoretically.

If it would be added, I would suggest to also add an additional setting in the weapon files to set an icon for a specified weapon.

Crash on starting new usermessage during PlayerLoadoutUpdated

Forgot usermessage hooks meant not being able to start new messages, so it looks like other plugins may be creating new ones in that time (like PrintToChat diagnostics).

Really should be up to StartMessage to deal with this, but alas.

Should be a matter of moving the loadout application the post-usermessage callback. Will test shortly.

A bunch of gamebreaking issues found. (Engineer Buildings Disappearing, Stickies Disappearing, etc.)

Currently, I'm compiling a list of issues I had found whilst using this plugin on my server. There's a few small ones, but on the other hand, a decent chunk that is game-breaking that is REALLY annoying the players. Here's a list of the few I found, along with replication:
These all occur at random.

Engineer Buildings Disappearing, and Stickies Disappearing.
Replication: Build or deploy a sticky, and switch to a CWX weapon from stock. May even occur if you just switch weapons outright. This is a major annoyance to Engineer and Demo's, for obvious reasons.

Players may lose one, multiple; or all weaponry, upon spawning.
Replication: Spawn. I'm not sure why this one happens. This seems to be an odd case where some people will experience this, and be incapable of playing outright, while others will be able to play without issues whatsoever. This one occurs even if the player doesn't use CWX weapons whatsoever. I've had cases where players would lose their primary weapon only, but never lose their other weapons. but then some who'd always lose their weapons, and even some who would lose just their melee. It's weird and inconsistent. Since this issue never occurs to me, it may be related to when a player joins.

Wearables double their attributes on touching a resupply locker on classes that do not originally have them
Replication: Self Explanatory. Touch resupply with a wearable on a class that doesn't usually have it, and it'll double it's attributes. Best seen with health increases and health regen.
I'm certain there's more, but I'll need to record these issues occurring. Due to the fact that only the first and third one affects me, I'm going to have to wait for players to join to record the weapon misplacement issue.

I've been watching the console but I don't see anything that could correlate to the weapons disappearing. It just happens. I tried it with no other plugins enabled besides the CWX framework, base Sourcemod, and its Attribute framework and it still occurs for players. Further investigation required.

Add stricter class-visible loadout slot checks

bitsSlotVisibility controls which items are valid for slots, but we only check this at item parse time.

Item assignments from before this change will persist (and at the moment, will be applied), but there is no way to access them. We should simply ignore those slots; maybe log a warning or provide an SQL script to clean up unused items.

We should also validate the inventory slot against the item data.

Fix being able to change weapon during arena rounds

It is currently possible for a player to change their weapon in an Arena spawn room, and thus completely replenish their health, ammo and clip immediately. This is OK during the short setup time but becomes unfair as the round progresses.

Validate loadout slot for inherited items

Split off from #30. Pure wearables cannot be placed in wearable weapon slots. I vaguely remember it being related to how CWX intercepts the game's request for equipment, but I'm not 100% certain on that.

Most items should match their true loadout slot; have to think about which ones that don't (Revolver, ???).

Request: Smoother way to refresh custom weapons.

Right now it is sort of clunky to make custom weapons.

You edit the file and then go to console to write "sm plugins reload cwx" which isn't a hard task by any means, but compared to just typing "/c reload" ingame for CW3 it is... very clunky. It would be nice to have a shorter command to refresh cwx if possible.

Support item stats / descriptions

CW3 displays a description / stats panel for a weapon before equipping it.
Not sure what route I want to take here. Confirming an item selection with that panel seems clunky, personally; would prefer a different approach.

Improve loadout handling on schema changes

CanPlayerEquipItem(), the function that is handled for item access, is only checked when the player selects the item.

If the player already has an item selected for their loadout, they are still allowed to equip it even if the access changes on either the item or the player (or if the item isn't valid for that class anymore, but #19 covers that case).

We should also gracefully handle removals of items from the schema.

I think most of this could be resolved by simply resetting loadout entries that the player is incapable of using back to default (and submitting those changes to the backend). Might be good to log those events as well.

Weapon models do not appear on other players

Environment

  • Operating system: Windows 11 64bit
  • SourceMod version: 1.11.0.6906
  • CWX version: X.0.10-006b99b

Description
20220717185138_1

Non custom weapon models do not appear on other players from your perspective when using a custom weapon. This occurs 100% of the time for me when looking at weapons with custom stats. It's not just a rare missing model glitch that is normal to TF2.

Steps to replicate

  1. Install this weapon config.

  2. Observe another player holding said weapon.

  3. Profit?

Other information

[SM] Displaying 10 extensions:
[01] Automatic Updater (1.11.0.6906): Updates SourceMod gamedata files
[02] Webternet (1.11.0.6906): Extension for interacting with URLs
[03] TF2 Tools (1.11.0.6906): TF2 extended functionality
[04] BinTools (1.11.0.6906): Low-level C/C++ Calling API
[05] SDK Hooks (1.11.0.6906): Source SDK Hooks
[06] SDK Tools (1.11.0.6906): Source SDK Tools
[07] Top Menus (1.11.0.6906): Creates sorted nested menus
[08] Client Preferences (1.11.0.6906): Saves client preference settings
[09] SQLite (1.11.0.6906): SQLite Driver
[10] DHooks (1.11.0.6906): Dynamic Hooks
[SM] Listing 27 plugins:
  01 "Admin File Reader" (1.11.0.6906) by AlliedModders LLC
  02 "Admin Help" (1.11.0.6906) by AlliedModders LLC
  03 "Admin Menu" (1.11.0.6906) by AlliedModders LLC
  04 "Anti-Flood" (1.11.0.6906) by AlliedModders LLC
  05 "Basic Ban Commands" (1.11.0.6906) by AlliedModders LLC
  06 "Basic Chat" (1.11.0.6906) by AlliedModders LLC
  07 "Basic Comm Control" (1.11.0.6906) by AlliedModders LLC
  08 "Basic Commands" (1.11.0.6906) by AlliedModders LLC
  09 "Basic Info Triggers" (1.11.0.6906) by AlliedModders LLC
  10 "Basic Votes" (1.11.0.6906) by AlliedModders LLC
  11 "Client Preferences" (1.11.0.6906) by AlliedModders LLC
  12 "[TF2CA] Custom Weapons Config Adapter for Custom Attributes" (1.2.2) by nosoop
  13 "[TF2] Custom Weapons X" (X.0.10-006b99b) by nosoop
  14 "[TF2] Custom Weapons X - Equip Commands" (1.1.0) by nosoop
  15 "Fun Commands" (1.11.0.6906) by AlliedModders LLC
  16 "Fun Votes" (1.11.0.6906) by AlliedModders LLC
  17 "Nextmap" (1.11.0.6906) by AlliedModders LLC
  18 "Player Commands" (1.11.0.6906) by AlliedModders LLC
  19 "Reserved Slots" (1.11.0.6906) by AlliedModders LLC
  20 "Sound Commands" (1.11.0.6906) by AlliedModders LLC
  21 "[TF2] TF2Attributes" ([email protected]) by FlaminSarge
  22 "TF2 Utils" (0.19.1) by nosoop
  23 "[TF2] Custom Attributes" (0.4.1) by nosoop
  24 "[TF2] Custom Attribute Debugger" (1.0.0) by nosoop
  25 "[TF2] Custom Attribute Manager" (1.0.0) by nosoop
  26 "[TF2] Custom Attribute Team Subsection Handler" (1.1.0) by nosoop
  27 "[TF2] Econ Data" (0.18.2) by nosoop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.