Garry's Mod

Garry's Mod

[tsp] Handguns '21
ᴆᴒᴒᴍ  [developer] 8 Jan, 2018 @ 2:14pm
[tsp] Discussion Forum
*This is not a request thread*

This is the communication hub for any questions regarding [tsp] addons. I will monitor this thread and answer any comments/questions/concerns that are not addressed in the FAQ guide.

Please be sure to read through the FAQ guide before posting here as most questions have already been answered. The FAQ guide is located here: http://steamproxy.com/sharedfiles/filedetails/?id=493558238

If anyone needs assistance modifying [tsp] packs you can ask here for advice.

I will delete posts regarding any inquires that can be answered at the above link.
Last edited by ᴆᴒᴒᴍ; 21 Oct, 2019 @ 3:58pm
< >
Showing 1-15 of 68 comments
Desertedcake 8 Jan, 2018 @ 2:42pm 
I had a question regarding TSP/GDCW. So GDCW usually has an unreal amounts of damage to their weapons. I saw in the ammo types of the damage scaling when hitting certain body parts. Where would look to change the raw damage per shot? (i.e. SWEP.Primary.Damage)

Another question I had was where would change the amount of dust that kicks up? Shooting anything above 5.56 causes a lot of dust and FPS drops.
ᴆᴒᴒᴍ  [developer] 8 Jan, 2018 @ 3:26pm 
Good question. These issues are associated with the bullet entities themselves so you will not be able to find them in the actual weapon files. The bullet file you were in before is the right spot to look. It should be close to the top. I don't remember what it was called offhand so I'll give you an update when I get back to my computer but it's gonna be something like "hit" or "takedamage" followed by "(number, number)". This is the damage multiplier for that bullet. Reduce those two numbers to reduce the damage.

Detailed guide below:


I'm not currently at my home computer so I can't tell you exact file names or code at the moment but I'll try to walk you through it. I'll tell you how to do effect size later when I have the files in front of me because it's a little more involved.

Preventing conflicts:

If you are making tweaks, you will need to extract any [tsp] addons you're running, and you will have to remain unsubscribed from the workshop uploads so that my uploads don't overwrite your modified files. You can leave the extracted folders in your addons folder but the GMA files must be deleted to prevent conflicts.

Use notepad++ for editing lua files if you aren't already as it color codes everything making it easier to navigate, and it give you line numbers on the left side so I can point you to where you need to go the next time I'm at my pc.

It is extremely important that you completely remove all other [tsp] addons from your addons folder except for the one you're tweaking, because the base code and much of the bullet entities are duplicated on each individual [tsp] addon. Editing bullet code on one [tsp] addon but not the others that you're running will cause them to conflict, and you may not see your changes.

I'm gonna use the LAR-15 as an example, but you can navigate to any lua file the same way.

For damage:

1. Identify which bullets you want to tweak the damage of. If you are unsure, you can figure this out in the weapon script. Identify which guns are doing more damage than you want. To do this, simply launch your game and select a gun that's doing more damage than you'd like. Click on the gun from your spawn menu to equip the gun, then hit " ` " to open your console (if that doesn't work, go into advanced settings and make sure developer console is enabled). From the console, you will see the name of the lua folder i.e. "give [player] tsp_lar15".

2. Navigate to the weapon lua files. From the addon folder (tsp_ars_pt1) you will go to lua -> weapons -> lar_15. There will be three lua files in this folder. Click on cl_init.lua. This will pull up the code specific to this weapon. Look for "swep.primary.round" It should be followed with a variable something along the lines of "gdcwa_5.56x45" This would be the name of the lua file you want to edit.

3. Anything listed next to "swep.primary.round" is found at lua -> enitites. Go there and look for the folder that matches the name of that variable you found in the above step - in this example it would be "gdcwa_5.56x45". Click on that folder and select "init.lua", this file gives you all the code for that particular bullet. Inside that file you are going to look for the damage modifier. I don't remember what it was called offhand so I'll give you an update when I get back to my computer but it's gonna be something like "hit" or "takedamage" followed by "(number, number)". This is the damage multiplier for that bullet. Reduce those two numbers to reduce the damage. You can repeat these steps for each bullet entity as you see fit.

You can tweak these files on the fly as you're playing gmod, they should update automatically. As soon as you save your edited file, alt+tab back into game, open the console, and type in 'reload' to relaunch the map to update your lua files. Your changes will take effect without having to relaunch gmod.

When you're satisfied with your results, there's two ways to make the changes occur across all your installed [tsp] addons.

Option 1:
Replace the bullet: Simply copy and paste the folder of your edited bullet (gdcw_5.56x45) to the same directory (lua -> entities) of each addon that you're running, and confirm the replace when prompted.

Option 2:
Create a new bullet entity: Copy and paste the folder of your edited bullet (gdcw_5.56x45) and rename that folder to whatever you like (i.e. "gdcw_556x45_nerfed"). As long as the addon containing the new bullet is installed, you do not need to copy this into each individual [tsp] addon.

**At this point, if you have gmod running, relaunch gmod. *newly created* files usually require a hard restart.**

For every gun you want to have the new bullet, repeat step two above (Navigate to the weapon), and when you find the bullet in question (gdcw_5.56x45) rename that bullet to your newly created bullet (i.e. "gdcw_556x45_nerfed") and save. Repeat this process for each weapon in lua -> weapons. These changes will take effect in real time, you don't need to reload when updating the code for individual guns.
Last edited by ᴆᴒᴒᴍ; 12 Jan, 2018 @ 10:01am
Desertedcake 8 Jan, 2018 @ 7:55pm 
So looking at the init file for the ammo. I'm seeing "self.tissuedamage". Would this follow under damage taken if hit? After also has "math.random" followed by two numbers. I would imagine its the potential damage? https://i.gyazo.com/8f710f7c8cec01c2c3556ed526bc1842.png So this image says the player damage would be 200~?
Desertedcake 8 Jan, 2018 @ 9:04pm 
So if I were to put it as 10. The actual damage would be 15?
Desertedcake 9 Jan, 2018 @ 1:49pm 
Another question regarding the hitgroups/scales. What is "HITGROUP_GEAR"? Would that be below the belt area?

Also if the person is wearing armor, how does this affect the scale?
ᴆᴒᴒᴍ  [developer] 9 Jan, 2018 @ 2:31pm 
hitgroup_gear is the belt area. I have not messed with armor yet, but my assumption is that the damage dealt will go to armor HP first and then health.
ᴆᴒᴒᴍ  [developer] 12 Jan, 2018 @ 9:41am 
Originally posted by DesertedCake:
Another question regarding the hitgroups/scales. What is "HITGROUP_GEAR"? Would that be below the belt area?

Also if the person is wearing armor, how does this affect the scale?

Did everything work properly for you?
ᴆᴒᴒᴍ  [developer] 12 Jan, 2018 @ 10:22am 
TomatoMan: i wish these guns had no recoil

ᴆᴒᴒᴍ [author]: You can change the recoil yourself, refer to the instructions I gave another user for how to modify the files without conflicts.
On my first post in that read step 2. Disregard the bullet part on step 2, the file that step 2 asks you to open contains the recoil settings which you will see as you scroll through the file.
In your case you will not need to mess with other [tsp] addons you're running, just make sure after you extract the gma file that you delete the gma and keep the extracted folder.
All weapon files are in lua -> weapons.
Desertedcake 12 Jan, 2018 @ 10:30am 
Originally posted by ᴆᴒᴒᴍ:
Originally posted by DesertedCake:
Another question regarding the hitgroups/scales. What is "HITGROUP_GEAR"? Would that be below the belt area?

Also if the person is wearing armor, how does this affect the scale?

Did everything work properly for you?
I haven't tested it out yet but I'll let you know if it does. Overall everything works, thank you.
Desertedcake 3 Feb, 2018 @ 10:20am 
If you need any weapon sounds, I have the weapon sounds of ArmA2/3 JSRS. Insurgency/DOI has good handling sounds as well.
ᴆᴒᴒᴍ  [developer] 3 Feb, 2018 @ 11:13am 
Thanks, I'll let you know!
xeen 13 Mar, 2018 @ 11:19am 
will you finish tsp v2?
ᴆᴒᴒᴍ  [developer] 13 Mar, 2018 @ 1:08pm 
Originally posted by X33N:
will you finish tsp v2?
Eventually. Taking a break for now.
oranchecsgo 18 Sep, 2018 @ 2:12pm 
S'up- random question- whats your plan for the future of tsp?
How would you edit splash damage on the JDJ rifle ?
< >
Showing 1-15 of 68 comments
Per page: 1530 50