AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO/L4D1/L4D2] Weapon Charms (1.19) [24-Nov-2023] (https://forums.alliedmods.net/showthread.php?t=325652)

Silvers 07-01-2020 01:06

[CS:GO/L4D1/L4D2] Weapon Charms (1.19) [24-Nov-2023]
 
24 Attachment(s)

https://i.imgur.com/tv0N9NC.jpg
(L4D2: all charms on the Pistol)

https://i.imgur.com/jdi7aaf.jpg
(CS:GO: various charm examples. Models created by Silvers.)




Thanks:
  • "Phoenix" and "Napas" for the original plugin idea, pin attachment and wiggle bone.
  • "ESKO" for inspiring me to start the project.
  • "CZE|EMINEM" for showing me how to model custom Charms.
  • "Lux" for testing and various help as always.
  • "xZk" for testing in L4D2.



Features:

All Games:
  • Translations support.
  • Database support saving players selected charm for all weapons.
  • Menu to select charm for current weapon and all other weapons.
  • Menus for admins to position and change angles of charms.
  • Menus only show available charms for the weapon.
  • Supports unloading and late loading the plugin.
  • Bots can use randomly selected charms.

CS:GO:
  • Custom charm models positioned for all Weapons, Molotov, C4 and Tablet.
  • Third person charm attachment view. (But no support for users changing to 3rd person).

L4D1 & L4D2:
  • All charms positioned for the Pistol.
  • 6 charms positioned to all weapons. Some have more.
  • Third person charm attachment view.
  • Automatically shows/hides the 1st and 3rd person charm when changing view.



Known Issues:

All Games:
  • Uses fake viewmodels because I cannot figure how to attach/bonemerge that follows the viewmodel_fov cvar to sit in the correct position.
  • If any charm models are missing this might cause an indexing error, so if you change the pos/ang/size and save it might affect the wrong one. Haven't fully tested. Please report if you tested.
  • Sometimes (rarely) the wrong weapon is shown when equipping a new weapon, cannot figure out how to fix.
  • Edit menus XYZ text not accurate for every model/view.

CS:GO:
  • Plugin copies and renames viewmodels, sending ~33 models (1 MB) to clients.
  • Uses fake arms/weapon. When a Charm is active the following issues occur:
  • Arms maybe incorrect for the players model (work in progress). All 3rd party maps seem to be affected.
  • Gloves are stock (not sure how to fix).
  • Weapon missing StatTrack and Stickers.
  • Weapon FOV changes to 90 and does not follow the viewmodel_fov cvar.
  • Left handed weapons are not compatible using the cl_righthand 1 cvar.
  • Weapon Viewmodel may show invisible section due to FOV.
  • Most stock game models cannot be resized, third party models would have to add support if required.

L4D1 & L4D2:
  • Uses fake arms/weapon. When a Charm is active the following issues occur:
  • Weapon FOV changes to 90 and does not follow the cl_viewmodelfovsurvivor cvar.
  • Weapon Viewmodel may show invisible section due to FOV.
  • Laser sight beam is not visible in first person view.
  • Blood splatter screen effect is not visible with an active charm.
  • Clashes with plugins that hide the viewmodel (maybe can support, report here about affected plugins).
  • L4D1 cannot resize models and only 1 charm model example is provided, add more yourself and please share.
  • Charms are removed while incapped to save excess code in fixing bugs.



Adding charms to weapons and custom charm models:

CS:GO:
  • Create a unique index in data/charms.data.csgo.cfg with the charm name and model path.
  • Copy the weapon classnames and their data from the Mustachio example provided. This already has a charm position setup for all weapons.
  • Adding support for more weapon classnames can be done via data/charms.weapons.csgo.cfg. This file has some more details.
  • Weapons missing attachment points cannot work. Download CS:GO - SDK (premium users only I think) from steam and use Model Viewer to open models and view their attachment point names.
  • Add your new weapon classname entry in data/charms.data.csgo.cfg for the new charm you're supporting, follow the details above about copying the positions.
  • Info about the keys:
- "attach_1": First person attachment point (usually name "1" or "2" for most models). When shooting sometimes the charm freezes, use "2" or other attachment point.
- "attach_2": Third person view attachment point. Since detecting current view in CS:GO doesn't work, you might want to comment out the "Hook_SetTransmitWorld" section and recompile the plugin to test positions.
- "default": Signals this charm will be default for the weapon classname when clients have no saved preferences.
- "vpos_1" and "vang_1" etc: Use sm_charm_edit [1 or 2] command to modify charm position and angles for 1st or 3rd person view.
- "bonemerge": Specifying a bone name which exists on both the weapon viewmodel and charm will use bonemerge attachment without having to manually position and use attachment points.

L4D1 & L4D2:
  • The above information is relevant for these games, except instead of custom charm models we use stock game models.
  • This is because L4D1 and L4D2 has issues with the downloads table sending files to clients and something I do not support.




Natives: (for developers)
Spoiler





Public Commands:
PHP Code:

sm_charm    // Shows the Charms menu. Alternative usage: sm_charm [charm index] or 0 to remove.
sm_charms   // Shows the Charms weapon menu. 




Admin Commands:
  • Requires "z" - ADMFLAG_ROOT flag
PHP Code:

sm_charm_reload   // Reload the Charms config.
sm_charm_edit     // Usage: sm_charm_edit <type>. 1=First person. 2=Third person. Enables editing pos/ang/size.
sm_charm_ang      // Shows a menu allowing you to adjust the charm angles.
sm_charm_pos      // Shows a menu allowing you to adjust the charm position.
sm_charm_size     // Shows a menu allowing you to adjust the charm size.
sm_charm_save     // Saves the data config. Suggest saving after editing each charm, either via menu or command. 




ConVars:
  • Saved to charms.cfg in your servers \cfg\sourcemod\ folder.
PHP Code:

// 0=Plugin off. 1=Plugin on.
charms_allow "1"

// 0=Plugin off, 1=Plugin on.
charms_bots "1"

// 0=None. 1=Give default charms to new players (search for default in the charms.data config).
charms_default "1"

// L4D/2 only: 0.0=Off. How often to check if a players in first or third person view to show/hide the correct Charm.
charms_check "0.2"

// Weapon Charms plugin version.
charms_version 




Changes:
Code:

1.19 (24-Nov-2023)
    - L4D2: Fixed the weapon being hidden after staggering when the stagger timer didn't reset (due to some plugins such as "Stagger Gravity").

1.18 (05-Sep-2023)
    - No longer shows the charm of the player you're spectating.

1.17 (16-Jul-2022)
    - L4D1 & L4D2: Fixed charms appearing after using a minigun when the plugin has been turned off.

1.16 (04-Dec-2021)
    - Changes to fix warnings when compiling on SourceMod 1.11.

1.15 (01-Jul-2021)
    - L4D2: Added a warning message to suggest installing the "Use Priority Patch" plugin if missing.

1.14b (15-May-2021)
    - L4D2: Fixed the Rifle weapon positions in 3rd person view.
    - Config file "charms.data.l4d2.cfg" has been updated.

    - Fixed bad translations data. Thanks to "weffer" for reporting.
    - Translation file "translations/es/charms.phrases.txt" has been updated.

1.14a (20-Apr-2021)
    - Added Spanish translations. Thanks to "AlexAlcala" for providing.

1.14 (12-Apr-2021)
    - L4D/L4D2: Fixed not restoring the charm after being revived.

1.13 (04-Mar-2021)
    - Added an extra check in case the database had not connected. Thanks to "Marttt" for reporting.
    - Added Portuguese translations. Thanks to "hoyxen" for providing.

1.12 (15-Feb-2021)
    - Fixed "Array index out-of-bounds" error. Thanks to "Alex101192" for reporting and "Marttt" for fixing.
    - Added Russian translations. Thanks to "Kleiner" for providing.

1.11 (05-Oct-2020)
    - Added cvar "charms_default" to give default charms to new players or none at all.

1.10 (01-Oct-2020)
    - Added support for following weapons "m_nSkin" value. Fixes L4D2 new weapon skins.
    - Added an "IsClientInGame" check to "TimerSpawn" due to rare case of logging an error.
    - L4D2: Added charms to CSS weapons since their viewmodel is now better from The Last Stand update.
    - L4D2: Changed "charms_precache" cvar default value to blank.
    - L4D2: Fixed various weapon positions supporting The Last Stand update changes.
    - L4D2: Fixed displaying the wrong arms model for L4D2 characters on L4D1 maps.
    - L4D/2: Fixed reloading or turning plugin off/on from making the weapon and arms invisible.
    - L4D/2: Fixed not hiding the charm when reviving someone.

1.9 (25-Jul-2020)
    - Any: "Attachments_API" version 1.5 fixes wrong or broken weapon models being shown.
    - Added some code to attempt fixing charms blocking +USE action. Thanks to Lux for providing.
    - Fixed not saving clients selected charms when "charms_bots" cvar was disabled.
    - L4D2: Fixed the "F-18" and "Missile" charms causing lag stutter on first usage.
    - L4D2: Fixed the "prop_minigun_l4d1" minigun from not removing charms when used.
    - L4D2: Fixed thirdperson weapon showing when using a minigun. Thanks to "Alex101192" for reporting.

1.8 (20-Jul-2020)
    - Added cvar "charms_timeout" to prevent equipping a new charm for X seconds.
    - L4D2: Jockey riding someone now deletes the charm and restores on ride end.
    - L4D2: Ladder fix from "Attachments_API" version 1.4 update.

1.7 (15-Jul-2020)
    - Added 4 natives for other plugins (support for L4D/2 "Extinguisher" plugin to create/remove charms).
    - Optimized bots using charms, no longer creating viewmodels or fake arms.
    - CSGO: Removed the charm when aiming down iron sights (Aug).
    - CSGO: Better replicating the players arms based on their current model.
    - CSGO: Blocked some silenced/modified weapons from using charms.

1.6 (11-Jul-2020)
    - Changed command "sm_charm" to allow using an optional arg to select the charm index.
    - Fixed L4D1 crash due to using the wrong dual pistol model.
    - Fixed L4D1 errors about event missing. Now hooks OnUse to hide charms when mounting a minigun.
    - Removes the charm when zooming down a scope. Thanks to "Alex101192" for reporting.
    - CSGO: The charm won't re-attach when shooting during scoped view, only when manually unscoping.
    - CSGO: Updated the C4 charm position in the "charms.data.csgo.cfg" config.
    - CSGO: Blocked plugin from running when "Sm_Skinchooser" plugin is detected.

1.5 (09-Jul-2020)
    - L4D2: Fixed showing a duplicate weapon when using "thirdpersonshoulder". Thanks to "Alex101192" for reporting.

1.4 (06-Jul-2020)
    - Added cvar "charms_precache" to prevent the plugin working and PreCaching models on certain maps.
    - Added a 1 frame delay in creating a charm to hopefully fix weapons or charms getting stuck or invisible.

1.3 (05-Jul-2020)
    - Fixed minor memory leak from bots, forgot to delete a handle I tried to remember.

1.2 (04-Jul-2020)
    - Added support for bots using random charms.
    - Added cvar "charms_bots" to control if bots can use charms.
    - Fixed L4D1 and L4D2 not removing charms when pinned.
    - Plugin "Attachments_API" updated and required.

1.1 (02-Jul-2020)
    - Fixed database creation error. Thanks to "NanoC" for reporting.
    - Fixed default charm settings in "charms.data.csgo.cfg" config.
    - Fixed batch exporting the project to .zip archive duplicating the .sp source code.

1.0 (01-Jul-2020)
    - Initial release.




Incompatible:
  1. L4D1 game bug: this plugin is incompatible with the Glare plugin, beam_spotlight turning on/off breaks the position. Tried to fix, not wasting more hours.
  2. CSGO various bugs: this plugin is incompatible with the Sm_Skinchooser plugin, too many different issues to fix, only fix would be real charms attachment.



Updating from 1.10 or older:
  • New cvars have been added: use the Cvar Configs Updater, or delete the old cvars config or manually add them.



Requirements:
  1. All games: Attachment_API plugin.
  2. L4D/2 only: ThirdPersonShoulder_Detect plugin.
  3. L4D/2 only: Use Priority Patch plugin.



Installation:

All games:
  1. Download the charms.zip and extract the files to their respective folders in your servers \addons\sourcemod\ folder.
  2. Setup a "charms" database entry in your servers \addons\sourcemod\configs\databases.cfg file.
    (you can duplicate "clientprefs" section changing the name to "charms" since SQLite is supported, or duplicate and rename an existing external database entry since MySQL is supported too).
  3. For those using MySQL and not clientprefs you have to login to phpMyAdmin or whatever you use to maintain your database and create a new database entry named "charms".

CS:GO:
  • For custom Charm models download the charms_models.zip and extract the \materials\ and \models\ folders to your servers main game folder.
  • You can find more custom Charm models for CS:GO on GameBanana thanks to "CZE|EMINEM" and "CrazySkull2k" for creating.
  • Use SM File/Folder Downloader and Precacher to serve custom charm models to clients (file paths can be found in the .txt file in the archives).

FastDL:
  • If using FastDL copy the \csgo\models\weapons\silvershot\ folder to your FTP. The folder and files in \viewmodels\ are generated on map start, the \charms\ are those you install. All must be copied to your FastDL server to prevent error boxes.
Current Translations: English (en), Portuguese (pt), Russian (ru).

Silvers 07-01-2020 01:23

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Reserved.

I will be updating the models at some point polishing the Shades for example which appears too small. - (Valve time, some year when I'm able to).

There are probably other issues unknown to me at this time. Please report any problems and I'll see what I can do.

Alex101192 07-01-2020 04:57

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Wow nice plugin silver. I will test it soon.

CrazySkull2k 07-01-2020 09:18

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Awsome release! I've been working with Eminem for the past days, and we are currently working on Apex Legends, Rainbow Six & Half Life Alyx Charms :D

Steve Merson 07-01-2020 15:39

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Very awesome! I have waited for this Plugin very long time.

Thanks for sharing this with the Community. <3

The Killer NL 07-01-2020 15:41

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Would be lovely if it had store support tho :P

But great plugin bro!

Marttt 07-01-2020 16:22

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Hi, sorry for asking but does it also have support for L4D2 melee weapons? I haven't found any info about it the main thread. I'm asking that because melee behavior is very specific in most cases.

Silvers 07-01-2020 16:42

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by CrazySkull2k (Post 2708125)
Awsome release! I've been working with Eminem for the past days, and we are currently working on Apex Legends, Rainbow Six & Half Life Alyx Charms :D

:up:


Quote:

Originally Posted by The Killer NL (Post 2708177)
Would be lovely if it had store support tho :P

But great plugin bro!

I haven't used any store plugins and don't know what's needed. Not really something I want to do.


Quote:

Originally Posted by Marttt (Post 2708184)
Hi, sorry for asking but does it also have support for L4D2 melee weapons? I haven't found any info about it the main thread. I'm asking that because melee behavior is very specific in most cases.

With some modification it might work, but some melee weapons are missing attachments and not something I'll support. Same issue with CS:GO knives they're all missing attachment points so cannot work.

NanoC 07-01-2020 17:25

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Amazing! :bacon!: :bacon!: :bacon!: for you!
I'll test it and come back later to give you more feedback

Zeddy_god 07-02-2020 01:28

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
I've installed it correctly, once the cham is applied you see the charm in your screen, but the weapon disappears and is replaced by error boxes.

Another friend of mine tried to install and the same happened with him. I believe some models might be missing as well


Error downloading models/weapons/silvershot/viewmodels/v_shot_mag7.mdl.bz2
and other such gun models.

NanoC 07-02-2020 01:44

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by Zeddy_god (Post 2708212)
I've installed it correctly, once the cham is applied you see the charm in your screen, but the weapon disappears and is replaced by error boxes.

Another friend of mine tried to install and the same happened with him. I believe some models might be missing as well


Error downloading models/weapons/silvershot/viewmodels/v_shot_mag7.mdl.bz2
and other such gun models.

All weapon models are created automatically into the game server. Navigate to models/weapons/silvershot and you'll see a folder called viewmodels, extract it and upload it to the fastdl.
I have tested the plugin today but it has little weird details like Silver said in the first post, eg model fov and agent's arms, something like this:


https://i.imgur.com/BFOAtZ8.png

September 07-02-2020 05:17

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by Zeddy_god (Post 2708212)
I've installed it correctly, once the cham is applied you see the charm in your screen, but the weapon disappears and is replaced by error boxes.

Another friend of mine tried to install and the same happened with him. I believe some models might be missing as well


Error downloading models/weapons/silvershot/viewmodels/v_shot_mag7.mdl.bz2
and other such gun models.

I confirm a similar problem.

September 07-02-2020 05:28

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by NanoC (Post 2708213)
All weapon models are created automatically into the game server. Navigate to models/weapons/silvershot and you'll see a folder called viewmodels, extract it and upload it to the fastdl.
I have tested the plugin today but it has little weird details like Silver said in the first post, eg model fov and agent's arms, something like this:


https://i.imgur.com/BFOAtZ8.png

Yes, they downloaded. But the server still has an error.

L1MPEEP 07-02-2020 08:15

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Why don’t you use another method that has fewer flaws, for example, creating a new weapon model with a new bone for the keychain, this method has fewer bugs

Silvers 07-02-2020 09:16

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by September (Post 2708228)
Yes, they downloaded. But the server still has an error.

What other error are you getting? Only .bz2 missing errors? As NanoC said you have to copy and upload the /csgo/models/weapons/silvershot/viewmodels/ folder to your fastDL (this folder and files are only generated OnMapStart when the plugin first loads. Will clarify the install instructions.


Quote:

Originally Posted by L1MPEEP (Post 2708250)
Why don’t you use another method that has fewer flaws, for example, creating a new weapon model with a new bone for the keychain, this method has fewer bugs

If you know how please share. All this has been attempted already, the bonemerged charm sits at the 90 FOV position. Also would require editing every weapon to add the new bone. This is the only way I got charms attaching either with bonemerge or SetParent attachment where they sit in the correct position, because they're stuck at the viewmodels 90 FOV position and don't respect the clients viewmodel_fov cvar. If a proper method is found I can get rid of all the clone/dupe/replica stuff. At least with SetParent attachment you can change the position for each charm and not be stuck with the bonemerged position or editing every weapon. Once a proper solution for attaching is discovered that doesn't make the objects sit at the 90 FOV position then sending renamed viewmodels won't be required either.

https://i.imgur.com/E8Ssusf.png

L1MPEEP 07-02-2020 11:12

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by Silvers (Post 2708254)
What other error are you getting? Only .bz2 missing errors? As NanoC said you have to copy and upload the /csgo/models/weapons/silvershot/viewmodels/ folder to your fastDL (this folder and files are only generated OnMapStart when the plugin first loads. Will clarify the install instructions.



If you know how please share. All this has been attempted already, the bonemerged charm sits at the 90 FOV position. Also would require editing every weapon to add the new bone. This is the only way I got charms attaching either with bonemerge or SetParent attachment where they sit in the correct position, because they're stuck at the viewmodels 90 FOV position and don't respect the clients viewmodel_fov cvar. If a proper method is found I can get rid of all the clone/dupe/replica stuff. At least with SetParent attachment you can change the position for each charm and not be stuck with the bonemerged position or editing every weapon. Once a proper solution for attaching is discovered that doesn't make the objects sit at the 90 FOV position then sending renamed viewmodels won't be required either.

https://i.imgur.com/E8Ssusf.png


Well, the phoenix somehow did it this way, though yes, you need to add a bone to each weapon, otherwise it can’t be done normally.

Silvers 07-02-2020 13:05

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by L1MPEEP (Post 2708265)
Well, the phoenix somehow did it this way, though yes, you need to add a bone to each weapon, otherwise it can’t be done normally.

Bone or attachment method I've tried and they do the same things, attaching at 90 FOV position. I don't know how Phoenix got it working, I've spent hours trying different methods and nothing worked. So this is the best it can be for now unless someone can figure out how to fix. Use the plugin or don't use the plugin that's your choice.

asherkin 07-02-2020 13:25

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.0) [01-Jul-2020]
 
Quote:

Originally Posted by L1MPEEP (Post 2708265)
Well, the phoenix somehow did it this way, though yes, you need to add a bone to each weapon, otherwise it can’t be done normally.

Well Silvers is sharing his method with the community (even packaged in a ready to use plugin!) while other people are keeping theirs quiet to make a quick buck.

Rather than complaining, collaborate! That's the reason AM started as an open community - sadly its become heavily fragmented as people have become less generous with donations of time and money to content creators, driving them to privatise (and yes, greed too, on both sides in the wake of monetisation becoming a primary driver for running game servers rather than fun).

L1MPEEP 07-02-2020 13:50

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [01-Jul-2020]
 
Quote:

Originally Posted by Silvers (Post 2708274)
Bone or attachment method I've tried and they do the same things, attaching at 90 FOV position. I don't know how Phoenix got it working, I've spent hours trying different methods and nothing worked. So this is the best it can be for now unless someone can figure out how to fix. Use the plugin or don't use the plugin that's your choice.


So no one seems to complain about the plugin, just a question arose, why not

Daniel Alexandru 07-02-2020 18:27

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
Having the same problem with the error boxes,don't know what to do. Instead of the Charms are some big red error boxes,also the hands are white and having a weird fov.

Zeddy_god 07-03-2020 00:23

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
Also, when you set charms on one weapon [example dual elites], all other weapons like knife / bizon etc turn into dual elites as well, with different holding animations.
https://prnt.sc/tavluv
https://prnt.sc/tavm00

Silvers 07-03-2020 13:57

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
Quote:

Originally Posted by Zeddy_god (Post 2708334)
Also, when you set charms on one weapon [example dual elites], all other weapons like knife / bizon etc turn into dual elites as well, with different holding animations.
https://prnt.sc/tavluv
https://prnt.sc/tavm00

Will look into this, the charms and fake weapon should be removed when changing to weapons without charms.


Quote:

Originally Posted by Daniel Alexandru (Post 2708302)
Having the same problem with the error boxes,don't know what to do. Instead of the Charms are some big red error boxes

FastDL:
  • If using FastDL copy the \csgo\models\weapons\silvershot\ folder to your FTP. The folder and files in \viewmodels\ are generated on map start, the \charms\ are those you install. All must be copied to your FastDL server to prevent error boxes.

Quote:

Originally Posted by Daniel Alexandru (Post 2708302)
also the hands are white and having a weird fov.

Read the Known Issues section on the first post.

manicogaming 07-03-2020 14:41

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
When should we expect bot support for CS:GO be expected, or is it not planned?

Silvers 07-03-2020 20:06

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
Quote:

Originally Posted by Zeddy_god (Post 2708334)
Also, when you set charms on one weapon [example dual elites], all other weapons like knife / bizon etc turn into dual elites as well, with different holding animations.
https://prnt.sc/tavluv
https://prnt.sc/tavm00

I can't duplicate this issue.

Quote:

Originally Posted by manicogaming (Post 2708445)
When should we expect bot support for CS:GO be expected, or is it not planned?

Done.

Code:

1.2 (04-Jul-2020)
    - Added support for bots using random charms.
    - Added cvar "charms_bots" to control if bots can use charms.
    - Fixed L4D1 and L4D2 not removing charms when pinned.
    - Plugin "Attachments_API" updated and required.


Should also downloaded the updated "Attachments_API" plugin.

manicogaming 07-03-2020 21:04

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
Quote:

Originally Posted by Silvers (Post 2708498)
I can't duplicate this issue.


Done.

Code:

1.2 (04-Jul-2020)
    - Added support for bots using random charms.
    - Added cvar "charms_bots" to control if bots can use charms.
    - Fixed L4D1 and L4D2 not removing charms when pinned.
    - Plugin "Attachments_API" updated and required.


Should also downloaded the updated "Attachments_API" plugin.

But because of charms bots stickers will not render if a bot has a weapon with stickers right?

Silvers 07-03-2020 21:07

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.2) [04-Jul-2020]
 
Stickers will not render on the viewmodel, in first person. For 3rd person views the replica weapon is invisible and should not affect the weapons skin, stickers etc. Actually the bots weapons won't render when spectating them in 1st person view. Not sure if I'll change this since that's more logic being added to the SetTransmit hook.

Some 3rd person views of the charms I've noticed are in bad positions. That's because they use one of the sticker attachement slots. This can be configured and changed but I have no interest in spending more time positioning everything. If someone else wants to do that and provide a config that would be greatly appreciated. I've done the bulk work, now it's time for others to help the community with some of the finer details.

Again, if the correct method for attaching charms to viewmodels in 1st person is actually revealed then the whole duplicate weapon and arms can be gotten rid of enabling stickers, stat track and less bugs with viewing in 1st person.

Of course now I recall the handle I tried to remember to delete, so now small memory leak added. Will update soon, shouldn't actually overflow unless you don't restart your server for long periods.

Alex101192 07-04-2020 07:56

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.2) [04-Jul-2020]
 
The plugin is working fine on l4d2. Sometimes however when changing the attachment, the attachment does not show up, or the arms become invisible. Scrolling to another weapon slot and then equip that weapon again fixes it.

Another thing is, because the weapon basically becomes third person view instead of the default first person, the vanilla motion blur of the game is basically seen everytime you move visual. This can be a bit annoying.

Yes I know I can disable the blur in my settings, but if there was a way to work around this it would be better.
__________________

L4D2 Enhanced Vanilla Official Steam Group:

https://steamcommunity.com/groups/l4d2enhancedvanilla

Daniel Alexandru 07-04-2020 17:39

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
Quote:

Originally Posted by Silvers (Post 2708436)



FastDL:
  • If using FastDL copy the \csgo\models\weapons\silvershot\ folder to your FTP. The folder and files in \viewmodels\ are generated on map start, the \charms\ are those you install. All must be copied to your FastDL server to prevent error boxes.


Read the Known Issues section on the first post.

I'm not using FastDL at the moment,is there any other way to solve this?

Silvers 07-04-2020 21:37

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.2) [04-Jul-2020]
 
Quote:

Originally Posted by Alex101192 (Post 2708569)
The plugin is working fine on l4d2. Sometimes however when changing the attachment, the attachment does not show up, or the arms become invisible. Scrolling to another weapon slot and then equip that weapon again fixes it.

Another thing is, because the weapon basically becomes third person view instead of the default first person, the vanilla motion blur of the game is basically seen everytime you move visual. This can be a bit annoying.

Yes I know I can disable the blur in my settings, but if there was a way to work around this it would be better.

I might have to add a delay between deleting and equipping a charm, hopefully that will resolve the random missing attachment or invisible arms. Blur I forgot how to enable or disable so cannot test, but don't think it's going to be possible to fix. Just another one of the many issues with this method of using a fake viewmodel.


Quote:

Originally Posted by Daniel Alexandru (Post 2708663)
I'm not using FastDL at the moment,is there any other way to solve this?

Did you install the custom charm models? The plugin should fail to load if all charm models are missing. The generated viewmodels should be automatically transferred to clients. The only thing I can think is your client or server is not allowing the files to be sent. Did you read the install instructions? Maybe you're not sending the custom charms to clients:

Quote:

Use SM File/Folder Downloader and Precacher to serve custom charm models to clients (file paths can be found in the .txt file in the archives).



Edit: updated Charms and Attachment API plugins.

Alex101192 07-05-2020 05:07

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.3) [05-Jul-2020]
 
Silver, the charms plugin suffers of the same problem that hats has. Some maps don't like the models. On c1m3_mall (one of the maps disabled on hats by default), choosing some charms causes weird effects like a black giant thing that don't allow you to see anything and other weird stuff. Resulting later in a crash. Needs a cvar to filter buggy maps like hats does.

Here's an updated list of buggy maps, that I filter on my servers, that will crash the game if either hats or charms are being used on them.

Code:

c1m3_mall,l4d_zero01_south,l4d_zero02_complex,l4d_zero03_chasm,l4d_zero04_steppes,l4d_zero05_aerith,crashbandicootmap2,crashbandicootmap4,l4d2_stadium3_city1,l4d2_stadium4_city2,l4d2_stadium5_stadium,l4d2_bts03_town,l4d2_bts04_cinema,l4d2_bts05_church,l4d2_bts06_school,re3m3

Daniel Alexandru 07-05-2020 16:50

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.2) [04-Jul-2020]
 
Quote:

Originally Posted by Silvers (Post 2708686)
I might have to add a delay between deleting and equipping a charm, hopefully that will resolve the random missing attachment or invisible arms. Blur I forgot how to enable or disable so cannot test, but don't think it's going to be possible to fix. Just another one of the many issues with this method of using a fake viewmodel.



Did you install the custom charm models? The plugin should fail to load if all charm models are missing. The generated viewmodels should be automatically transferred to clients. The only thing I can think is your client or server is not allowing the files to be sent. Did you read the install instructions? Maybe you're not sending the custom charms to clients:






Edit: updated Charms and Attachment API plugins.


Thank you,it worked.
But other problems came up.
Such as: If put a charm to any gun I will still have that gun in my hand if I change it to the knife/pistol/utilities. For example,If I put a charm to the AK-47 and then try to put the knife/pistol in my hand it will still show the AK-47.
And sometimes the guns just disappear from my hand.
I hope I was understandable,I don't know if the problem was because of me or not.

Silvers 07-05-2020 17:22

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.3) [05-Jul-2020]
 
1 Attachment(s)
@Daniel Alexandru nice, thanks! Added test version that adds a 1 frame delay between deleting and attaching a new charm, hopefully this fixes weapons getting stuck in hand or going invisible.

@Alex101192 I added the precache cvar to this version also, thanks.

Edit: Test version pushed to main post.

Alex101192 07-06-2020 07:37

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.3) [05-Jul-2020]
 
Silver, there is something I am not sure about !charms command. When I set an attachment to a weapon using it, will everyone on the server have the same attachment on the weapon I chose? I ask because I set these commands to be flag A only so I was the only one in the server to be able to use it.

But I saw players that had the same exact attachments that I chose before on the shotgun.

Do admins get to choose everyone's attachments if they use the command?

Silvers 07-06-2020 12:37

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.3) [05-Jul-2020]
 
The command allows each person to choose their own charm. You can set the "default" charm for each weapon in the /data/charms.data.game.cfg config (search for "default" to see how/where it's used), but that won't change the players default charm if they have already joined the server, you would have to wipe the database and let it generate again for each player that connects. Version 1.0 had "default" incorrectly set for all charms and weapons in the CSGO config but that's been fixed, so if you're using 1.0 config replace it with the newer one.

OcC 07-08-2020 21:09

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.1) [02-Jul-2020]
 
Quote:

Originally Posted by Zeddy_god (Post 2708334)
Also, when you set charms on one weapon [example dual elites], all other weapons like knife / bizon etc turn into dual elites as well, with different holding animations.
https://prnt.sc/tavluv
https://prnt.sc/tavm00

There are two of us :shock:
with SM SKINCHOOSER (4.9) by Andi67 https://prnt.sc/tefb8p

Alex101192 07-09-2020 10:01

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.3) [05-Jul-2020]
 
1 Attachment(s)
Something weird happened while I was playing. The crowbar duplicated itself after changing from thirdperson to first person using a custom bind. I have never seen this happen before.

The reason why I think this could be a problem with charms, is because changing weapons fixes it, just like it happened for previous charms' issues.

Silvers 07-09-2020 14:13

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.5) [09-Jul-2020]
 
Quote:

Originally Posted by OcC (Post 2709335)
There are two of us :shock:
with SM SKINCHOOSER (4.9) by Andi67 https://prnt.sc/tefb8p

Does this still happen without SM Skinchooser? I'll install sometime and test. Maybe is some plugin conflict. I can't duplicate the problem as is so can't fix without being able to see the problem. Maybe you can explain some steps on how this happens?

Quote:

Originally Posted by Alex101192 (Post 2709411)
Something weird happened while I was playing. The crowbar duplicated itself after changing from thirdperson to first person using a custom bind. I have never seen this happen before.

Thanks, fixed in latest update.

Alex101192 07-11-2020 08:52

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.5) [09-Jul-2020]
 
3 Attachment(s)
The thirdperson view appears while aiming with scope with snipers. It should be disabled while scoping if possible. The hunting rifle also becomes invisible on one side when looking down.

Now I don't know if this is intentional, but I can only see the charms I set myself. It doesn't work like hats where I can see everybody's different hats. I set charms for weapons and that's all I see. If there is a shotgun I will see my personal attachment on it, even if it's being used by another player.

Would be cooler if the charm I choose for my gun is only there when I am using the gun and when another player uses a gun with a charm he put, I see his charm instead of mine.

Silvers 07-11-2020 11:40

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.5) [09-Jul-2020]
 
Quote:

Originally Posted by OcC (Post 2709335)
There are two of us :shock:
with SM SKINCHOOSER (4.9) by Andi67

Just tried with " Sm_Skinchooser" plugin.. Theres too much going on with this plugin that will cause conflicts, also for some reason it's blocking the WeaponSwitch detection so I'm not even going to bother trying to support this plugin, way too much work. Charms and SM Skinchooser will have to remain incompatible. If/when the real method for attaching charms is found then I can get rid of all the fake weapon/arms stuff and it will probably work with this plugin.



Quote:

Originally Posted by Alex101192 (Post 2709659)
The thirdperson view appears while aiming with scope with snipers. It should be disabled while scoping if possible. The hunting rifle also becomes invisible on one side when looking down.

Now I don't know if this is intentional, but I can only see the charms I set myself. It doesn't work like hats where I can see everybody's different hats. I set charms for weapons and that's all I see. If there is a shotgun I will see my personal attachment on it, even if it's being used by another player.

Would be cooler if the charm I choose for my gun is only there when I am using the gun and when another player uses a gun with a charm he put, I see his charm instead of mine.

Thanks, fixed.

I've tested with other players and can see them selecting different charms.


Code:

1.6 (11-Jul-2020)
    - Changed command "sm_charm" to allow using an optional arg to select the charm index.
    - Fixed L4D1 crash due to using the wrong dual pistol model.
    - Fixed L4D1 errors about event missing. Now hooks OnUse to hide charms when mounting a minigun.
    - Removes the charm when zooming down a scope. Thanks to "Alex101192" for reporting.
    - CSGO: The charm won't re-attach when shooting during scoped view, only when manually unscoping.
    - CSGO: Updated the C4 charm position in the "charms.data.csgo.cfg" config.
    - CSGO: Blocked plugin from running when "Sm_Skinchooser" plugin is detected.


Code:

1.7 (15-Jul-2020)
    - Added 4 natives for other plugins (support for L4D/2 "Extinguisher" plugin to create/remove charms).
    - Optimized bots using charms, no longer creating viewmodels or fake arms.
    - CSGO: Removed the charm when aiming down iron sights (Aug).
    - CSGO: Better replicating the players arms based on their current model.
    - CSGO: Blocked some silenced/modified weapons from using charms.

Been working on fixing CSGO arms, if anyone has any advice on how to better change them, or how to match the arms with current player model please let me know. Right now hard coding the player models to various arms. Some might be wrong, may eventually switch to a config so 3rd party player models could be added.

Not currently precaching the CSGO arm models, the game will stutter once on first spawn of new models as the client/server caches. Will eventually cache, hopefully doesn't cause any crash.

Alex101192 07-15-2020 16:58

Re: [CS:GO/L4D1/L4D2] Weapon Charms (1.7) [15-Jul-2020]
 
1 Attachment(s)
When climbing a ladder, the therdperson view remains. Shooting while on ladder plays the animation but no bullet is actually fired, and shooting makes you fall the ladder.

Possible conflicts with https://forums.alliedmods.net/showthread.php?t=305796.


All times are GMT -4. The time now is 20:00.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.