Garry's Mod

Garry's Mod

Not enough ratings
[TTT] Weapon Stats Changer
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Weapon
Addon Tags: Fun
File Size
Posted
Updated
4.221 KB
20 Jul, 2023 @ 7:24am
9 Jan, 2024 @ 8:38am
21 Change Notes ( view )

Subscribe to download
[TTT] Weapon Stats Changer

In 1 collection by The Stig
The Stig's TTT Mod List
305 items
Description
This mod adds options in the form of convars for you to enable/disable or change the stats of any TTT weapon!

Not every stat change is supported by every gun, e.g. the DNA Scanner doesn't have ammo.

Tested Weapons
Default TTT weapons

Lykrast's Weapon Collection
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=337994500

TTT Weapon Collection
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=194965598

World War II Guns for TTT
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=496383004

+ Any weapon that uses the SWEP.Primary table to store the stats of the gun will work, which is the vast majority of weapons on the workshop.

Convars/Options
The list of convars is too big to put in the mod description here, see this instead for the full list of convars:
https://github.com/TheStig294/weapon-fixes-and-rebalances/tree/main#manipulating-weapon-stats

As an example, here is just the list of convars you can configure for the default TTT weapons (Use above link for the full list):

weapon_ttt_cse_enabled 1
weapon_ttt_cse_ammosize -1
weapon_ttt_cse_firedelay 1
weapon_ttt_cse_startingammo -1

weapon_ttt_flaregun_enabled 1
weapon_ttt_flaregun_ammosize 4
weapon_ttt_flaregun_recoil 4
weapon_ttt_flaregun_spread 0.01
weapon_ttt_flaregun_firedelay 1
weapon_ttt_flaregun_damage 7
weapon_ttt_flaregun_startingammo 4

weapon_ttt_defuser_enabled 1
weapon_ttt_defuser_ammosize -1
weapon_ttt_defuser_firedelay 1
weapon_ttt_defuser_startingammo -1

weapon_ttt_m16_enabled 1
weapon_ttt_m16_ammosize 20
weapon_ttt_m16_recoil 1.6
weapon_ttt_m16_spread 0.018
weapon_ttt_m16_firedelay 0.19
weapon_ttt_m16_damage 23
weapon_ttt_m16_startingammo 20

weapon_medkit_enabled 1
weapon_medkit_ammosize 100
weapon_medkit_startingammo 100

weapon_ttt_knife_enabled 1
weapon_ttt_knife_ammosize -1
weapon_ttt_knife_firedelay 1.1
weapon_ttt_knife_damage 50
weapon_ttt_knife_startingammo -1

weapon_ttt_teleport_enabled 1
weapon_ttt_teleport_ammosize 16
weapon_ttt_teleport_firedelay 0.5
weapon_ttt_teleport_startingammo 16

weapon_ttt_binoculars_enabled 1
weapon_ttt_binoculars_ammosize -1
weapon_ttt_binoculars_firedelay 1
weapon_ttt_binoculars_startingammo -1

weapon_ttt_unarmed_enabled 1
weapon_ttt_unarmed_ammosize -1
weapon_ttt_unarmed_startingammo -1

weapon_zm_shotgun_enabled 1
weapon_zm_shotgun_ammosize 8
weapon_zm_shotgun_recoil 7
weapon_zm_shotgun_spread 0.082
weapon_zm_shotgun_firedelay 0.8
weapon_zm_shotgun_damage 11
weapon_zm_shotgun_startingammo 8

weapon_ttt_radio_enabled 1
weapon_ttt_radio_ammosize -1
weapon_ttt_radio_firedelay 1
weapon_ttt_radio_startingammo -1

weapon_ttt_push_enabled 1
weapon_ttt_push_ammosize -1
weapon_ttt_push_spread 0.005
weapon_ttt_push_firedelay 3
weapon_ttt_push_startingammo -1

weapon_ttt_stungun_enabled 1
weapon_ttt_stungun_ammosize 30
weapon_ttt_stungun_recoil 1.2
weapon_ttt_stungun_spread 0.02
weapon_ttt_stungun_firedelay 0.1
weapon_ttt_stungun_damage 9
weapon_ttt_stungun_startingammo 30

weapon_ttt_smokegrenade_enabled 1

weapon_ttt_health_station_enabled 1
weapon_ttt_health_station_ammosize -1
weapon_ttt_health_station_firedelay 1
weapon_ttt_health_station_startingammo -1

weapon_ttt_beacon_enabled 1
weapon_ttt_beacon_ammosize 3
weapon_ttt_beacon_firedelay 1
weapon_ttt_beacon_startingammo 1

weapon_zm_molotov_enabled 1

weapon_ttt_sipistol_enabled 1
weapon_ttt_sipistol_ammosize 20
weapon_ttt_sipistol_recoil 1.35
weapon_ttt_sipistol_spread 0.02
weapon_ttt_sipistol_firedelay 0.38
weapon_ttt_sipistol_damage 28
weapon_ttt_sipistol_startingammo 20

weapon_ttt_glock_enabled 1
weapon_ttt_glock_ammosize 20
weapon_ttt_glock_recoil 0.9
weapon_ttt_glock_spread 0.028
weapon_ttt_glock_firedelay 0.1
weapon_ttt_glock_damage 12
weapon_ttt_glock_startingammo 20

weapon_ttt_wtester_enabled 1
weapon_ttt_wtester_ammosize -1
weapon_ttt_wtester_firedelay 1
weapon_ttt_wtester_startingammo -1

weapon_zm_rifle_enabled 1
weapon_zm_rifle_ammosize 10
weapon_zm_rifle_recoil 7
weapon_zm_rifle_spread 0.005
weapon_zm_rifle_firedelay 1.5
weapon_zm_rifle_damage 50
weapon_zm_rifle_startingammo 10

weapon_zm_mac10_enabled 1
weapon_zm_mac10_ammosize 30
weapon_zm_mac10_recoil 1.15
weapon_zm_mac10_spread 0.03
weapon_zm_mac10_firedelay 0.065
weapon_zm_mac10_damage 12
weapon_zm_mac10_startingammo 30

weapon_ttt_decoy_enabled 1
weapon_ttt_decoy_ammosize -1
weapon_ttt_decoy_firedelay 1
weapon_ttt_decoy_startingammo -1

weapon_zm_pistol_enabled 1
weapon_zm_pistol_ammosize 20
weapon_zm_pistol_recoil 1.5
weapon_zm_pistol_spread 0.02
weapon_zm_pistol_firedelay 0.38
weapon_zm_pistol_damage 25
weapon_zm_pistol_startingammo 20

weapon_ttt_phammer_enabled 1
weapon_ttt_phammer_ammosize 6
weapon_ttt_phammer_recoil 0.1
weapon_ttt_phammer_spread 0.02
weapon_ttt_phammer_firedelay 12
weapon_ttt_phammer_startingammo 6

weapon_ttt_confgrenade_enabled 1

weapon_ttt_c4_enabled 1
weapon_ttt_c4_ammosize -1
weapon_ttt_c4_firedelay 5
weapon_ttt_c4_startingammo -1

weapon_zm_sledge_enabled 1
weapon_zm_sledge_ammosize 150
weapon_zm_sledge_recoil 1.9
weapon_zm_sledge_spread 0.09
weapon_zm_sledge_firedelay 0.06
weapon_zm_sledge_damage 7
weapon_zm_sledge_startingammo 150

weapon_zm_revolver_enabled 1
weapon_zm_revolver_ammosize 8
weapon_zm_revolver_recoil 6
weapon_zm_revolver_spread 0.02
weapon_zm_revolver_firedelay 0.6
weapon_zm_revolver_damage 37
weapon_zm_revolver_startingammo 8

weapon_zm_improvised_enabled 1
weapon_zm_improvised_ammosize -1
weapon_zm_improvised_firedelay 0.5
weapon_zm_improvised_damage 20
weapon_zm_improvised_startingammo -1

weapon_zm_carry_enabled 1
weapon_zm_carry_ammosize -1
weapon_zm_carry_firedelay 0.1
weapon_zm_carry_startingammo -1
8 Comments
Gonzo 007 19 Apr @ 8:06am 
so how do i change it
Poxy_Clone 21 May, 2024 @ 11:20pm 
Thanks that helped better clarify what I needed to do. I was thinking I ran the convar as like some command to change a config file, but no I'm inserting the convar in the config to set it. That makes sense, and now I'm no longer having an issue. So TTT2 is cleared of any issues I claimed.
The Stig  [author] 21 May, 2024 @ 6:41pm 
Don’t have time to look into this atm, but yes, TTT2 is the bane of my existence, try removing it as see if that works, then I have a mod conflict to look into in the future.

The convars reset after manually changing them and switching maps because this mod in theory could create a ton of convars and blow up your server.vdf way too much.

What you have to do is first find the classname of the weapon you want to change (with the command in the guide I put on GitHub),
Then change the stat you want like _damage, or disable the weapon with _enabled 0,
Then put that line into your server’s server.cfg, or if you’re not using a dedicated server and just are hosting from the main menu of Gmod then put it into your Gmod install’s listenserver.cfg

Then on changing maps the stats and disabled guns will change, you don’t need to restart the server, but you do need to at least change to a different map for changes to take effect.
Poxy_Clone 20 May, 2024 @ 10:10pm 
I can't seem to get this work. I'm unfamiliar, and just trying figure out this stuff. When I use rcon with a convar to change the stats I then can see in the cvarlist that it has changed. Though the weapon stats do not apply. I figured maybe to restart the server, but no stat changes, and the cvar list says the stats are reverted. At first I didn't put the stuff into my server.cfg like you mentioned on your github, but even after inserting the base weapon list I couldn't get it to work.

I'am using TTT2 addon which I could see maybe causing some conflict. Otherwise I'm kinda lost on what to do. You mention this working for any weapon most likely, but in the github say to put the convar lists into the server.cfg. So would I need to create a something based on your convar examples for other untested addons for it to work?

I'm not sure if I've missed some step, but if your able to point me in the right direction of research. That'd be appreciated.
imendezr 7 Jan, 2024 @ 10:00pm 
Yeah thx
The Stig  [author] 7 Jan, 2024 @ 3:10pm 
Should be fixed
The Stig  [author] 7 Jan, 2024 @ 2:35pm 
@imendezr Ah yes I think I know what happened there let me look into it
imendezr 7 Jan, 2024 @ 2:08pm 
I got this error on my server:

[ulib] lua/autorun/stig_generic_weapon_changes.lua:76: attempt to index field 'Primary' (a nil value)
1. fn - lua/autorun/stig_generic_weapon_changes.lua:76
2. unknown - addons/ulib/lua/ulib/shared/hook.lua:109