Garry's Mod

Garry's Mod

TFA For TTT
75 Comments
Karate Walrus 5 Feb, 2023 @ 3:59am 
Krystalhydralisk the clip and and the gun's ammo need to be the same. But that has to be changed per-weapon unless someone knows how to write a script to do that automatically. But you really need a custom lua script for a ttt weapon where you rewrite the existing one so that it has the right slow, hold type, ammo type, clip size (that equals ammo and isn't bigger than the ammo), whether or not it's a traitor or detective weapon and can be bought, what the icon is for it in the shop, etc.
Krystalhydralisk 1 Apr, 2022 @ 4:16pm 
So i know it's porably been asked before but is there an easy way to download an Lua so that TTT TFA guns can pick up ammo normally and not use their reserves for the clip?
Torbjörn sgn.gg 12 Jul, 2021 @ 9:16pm 
@kebokyo, did you figure that out? I'm trying to use the CS:GO guns for TFA in TTT and am having the same exact issue.
kebokyo 12 Dec, 2020 @ 10:47am 
I'm trying to use a bunch of Mac Tonight's COD weapons, and for some reason half the guns won't let me ironsight. What's up with that?
X 30 Oct, 2020 @ 6:40pm 
Fantastic Addon if you're using TFA for TTT
Ender 4 Sep, 2020 @ 8:48pm 
help with error in equipment shop interact with other ttt traitor weapons
[GOTR] Mechami  [author] 23 Jun, 2020 @ 8:03pm 
When you say customize do you mean customize the weapons stats?

This version of the addon is quite old; I'm hoping to update it at some point but haven't gotten around to doing so.

Alot has probably changed in TFA base so I don't have any context for what's causing your issue at the moment.
🦊ОкУнь НеБEсHый✞ 23 Jun, 2020 @ 9:38am 
I can't customize the weapon, what should I do?
Karate Walrus 18 Mar, 2020 @ 5:59pm 
Yah it's nice - gets the old weapons on tfa if you are using them. And then also it has a nice f1 menu in-game so you can edit all the settings like graphical stuff, aim down sight sensitivity, gun bob, etc. via the graphical interface vs using console commands.
bingley 18 Mar, 2020 @ 4:10pm 
Ay, does this addon still work? I mean, it's from 4 years ago...
Karate Walrus 18 Mar, 2020 @ 9:10am 
Also a video on youtube for longevity https://www.youtube.com/watch?v=CGRd23TNjUs
Karate Walrus 18 Mar, 2020 @ 7:46am 
PIZZA TIME I put up a guide for tfa ttt crap https://www.twitch.tv/videos/569698451
Marrko 17 Mar, 2020 @ 11:32pm 
How do I port over TFA weapons into TTT?
Alt+F4 5 Mar, 2020 @ 3:54pm 
For anyone who is trying to use this mod on their TTT servers:
If you're noticing gunshots registering more than 1 hit randomly on people, you need to turn off penetration for the server. Sadly this means you can't shoot through doors but it will stop the random multi-hits which breaks gameplay.

sv_tfa_bullet_penetration 0 <--- put this in server console
CullyDC 25 Oct, 2019 @ 7:24am 
Heads up for people who had the same problem as me:
(default TTT weapons would blur your entire screen when aiming down sights):
"cl_tfa_fx_rtscopeblur_mode 0"
seems to fix it.
Niko #teamtojo 12 Jul, 2019 @ 8:11pm 
Thanks for the iron sights tip, and yeah I set up the ammo to use the black ops ammo boxes for the rifles.
Karate Walrus 12 Jul, 2019 @ 7:39pm 
Also I'd recommend setting this value so you can actually aim down sights at targets and be able to shoot them if they aren't like right in front of you (for guns that don't have scopes).

SWEP.IronSightsSensitivity = .4
Karate Walrus 12 Jul, 2019 @ 7:38pm 
oh yeah swep.primary.ammo should match with swep.ammoent

So if you are using swep.primary.ammo = smg then swep.ammoent needs to be equal to item_ammo_smg1_ttt

ar ammo doesn't exist by default in ttt but it does come included in that blackops pack
Also, you will end up with more ammo each time you drop and pick up the gun (for TFA guns) unless SWEP.Primary.ClipSize and SWEP.Primary.DefaultClip are the same number
Niko #teamtojo 12 Jul, 2019 @ 2:06pm 
Ah, I figured it out! The CS:GO guns want the TTT ammo boxes to match the base ammo type that the guns have themselves. E.G. if the Deagle uses 357 ammo in sandbox, the ammo box it has to pick up must be the 357 box that TTT Snipers use, instead of the custom TTT Deagle ammo. I suppose if I were to set the base ammo to the custom one, it would work that way.
Niko #teamtojo 12 Jul, 2019 @ 1:55pm 
Huh, if I set the AK47's ammo to the ammo type that the Black Ops Assault Rifles use (the one RKellyJelly sent earlier in the thread), they start working. Weird...
Niko #teamtojo 12 Jul, 2019 @ 1:19pm 
https://pastebin.com/iVtHJtfR

There's a part of the code labeled --[[TTT]]-- that was already present. Only difference is throughout the CSGO lua files that have this chunk of code (others didnt and i merely added it's presence), AutoSpawnable was set to false, and the string.find() functions checked for the wrong gamemode name (since the name of the gamemode internally is "terrortown", and the original --[[TTT]]-- checked for "ttt" and "terrorist") and the ammo type was always item_ammo_smg1_ttt. There were several things i noticed when I flipped the switch for the AK-47 only:

- Enabling AutoSpawnable in only the AK47 lua file suddenly made ALL of the CSGO guns spawn, even stuff like the C4 and Medi-Shot.
- Weapons would sometimes obey the AmmoEnt line, and others would flat out ignore it. This also seemingly happened at random, and reconnecting would even sometimes break guns that would pick up ammo in the past.
Karate Walrus 12 Jul, 2019 @ 11:11am 
If you pastebin the lua and link it here I could take a look
Niko #teamtojo 11 Jul, 2019 @ 8:09pm 
Been trying to get the CS:GO weapons working, seems like the lua files already have a TTT section of code in them. However, for the life of me I can't figure out why they cannot pick up ammo, despite the line SWEP.AmmoEnt = "item_ammo_smg1_ttt" being present. They only receive ammo when you drop the weapon and pick it back up again.
Karate Walrus 29 Jun, 2019 @ 8:51am 
tfa guns do have to be configured to work with ttt though. They need to be configured to spawn and have the same clipsize as defaultclip otherwise dropping them and picking them up just gives you more ammo each time. Dunno why. For example - here is this nice tfa weapon
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1725472147

with lua converted to make it work with ttt - complete with random attachments being picked for it upon picking it up
https://pastebin.com/vn3EjwzT

Or you can download that file pack I mentioned below via {LINK REMOVED} and poke around in the weapon lua files and see how the weapons are set up.

Karate Walrus 29 Jun, 2019 @ 8:38am 
The default guns already work in ttt due to tfa base coming with a ttt patch. So this is not needed. The only thing this is good for now is the f1 menu (which is super nice) to customize the tfa base settings in the graphical interface rather than having to use console commands. The default guns kinda suck ballsacks though. Recommend https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1551226871 for a comprehensive weapon pack and traitor weapons that are pretty well-balanced, very low on the graphics required and file size.
BENNI.RoR 29 Jun, 2019 @ 8:31am 
I suppose there is no proper tutorial to get these working in TTT?
Karate Walrus 8 Apr, 2019 @ 4:54pm 
Alibiks, I changed the key to noclip because noclip isn't really used in ttt. That way I can still access quickchat with v by default For example:

--elseif string.find(bind, "zoom") and pressed then
elseif string.find(bind, "noclip") and pressed then

in
garrysmod/gamemodes/terrortown/gamemode/cl_keys.lua
Karate Walrus 6 Apr, 2019 @ 9:14pm 
Welcome, Thanks for telling me how to be able to change the radio commands. That's big fat oprah tits.
TheAlibiks 6 Apr, 2019 @ 1:38pm 
Rebinding the cmenu works well. Thanks for that, I didn't knew it was rebindable.

If you feel fine altering the terrortown files and disabling the radio commands you can go into \gamemode\cl_keys.lua and comment out line 63 to 66. This allows other mods to use the button. The Killing Floor 2 Melees all work for me with the radio commands disabled.
Karate Walrus 5 Apr, 2019 @ 9:46pm 
you can change the bind for the menu. You can set it manually on a local server you are running from gmod via 'bind l sv_tfa_cmenu_key' to make it the L key. It should not longer be the c key then. If it is, you can type 'unbind c' Also, on a server you can make a .lua file with this command in it and put it in the garrysmod/lua/autorun folder

RunConsoleCommand( "sv_tfa_cmenu_key", "22" ) -- rebinds inspect menu to L, otherwise it will conflict with buy menu

As for the chat issue. I dunno about that. I would like to figure that out too because while I don't really care about the skins, weapon bashing (melee with a weapon in your hand) mostly uses +zoom as well. So all these tfa_bash_base guns you can't bash with and that's a bummer. Plus one of the samurai swords has a nifty attack AND the killing floor shield that can actually block bullets (would be a great item for the detective) requires +zoom to work. I checked weapon_tttbase and it's not in there.
TheAlibiks 5 Apr, 2019 @ 5:28am 
@RKellyJelly How do you handle the C menu of TFA? I know that you can disable it with sv_tfa_cmenu 0 but some weapons use it so change scopes and attachments.

Some other weapons use different key binds that also conflict with TTT. For example the CSGO pack you posted uses the "Suit Zoom" Key as a custom menu key to change skins which conflicts with the chat call outs from TTT. I havn't really found a way to solve those conflicts.
Karate Walrus 3 Apr, 2019 @ 3:53pm 
Mechwarrior also did mention below you don't need this mod anymore for tfa weapons to work in ttt. Although, this mod does add a nice f1 menu option for enabling/disabling features for tfa which is pretty useful in instances where your fps is tanking because of the massive effects and you want to disable some graphical stuff.
Karate Walrus 3 Apr, 2019 @ 3:52pm 
Ok, I got the tfa weapons working. I couldn't pick up the ammo because I had to a

SWEP.AmmoEnt = "item_ammo_pistol_ttt"

line.
That's the ammo that will be picked up (pistol ammo in this case). Also, to keep from weapons automatically giving ammo everytime they get picked up (rather than just once as it should be) you have to set the clipsize and defaultclip to be the same.
So if SWEP.Primary.ClipSize = 10 then
SWEP.Primary.DefaultClip = 10 is correct

Also swep.slot has to be in there somewhere and swep.kind. Usually I do 3 for heavies (main weapons) and 2 for pistols (secondaries)
For example -

-- TTT Code --

SWEP.AutoSpawnable = false

SWEP.AmmoEnt = "item_ammo_smg1_ttt"

SWEP.Kind = WEAPON_HEAVY

SWEP.AllowDrop = true

SWEP.Slot = 3

-- End of TTT Code --

Karate Walrus 25 Mar, 2019 @ 9:15pm 
actually I can't get any tfa weapons so far to pick up ammo in ttt, the ammo boxes don't seem to work
Karate Walrus 25 Mar, 2019 @ 5:08pm 
also vipes I think you'd be better off with https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=533104097 for tfa. Better weapon models and everything and they work great in ttt
Karate Walrus 25 Mar, 2019 @ 5:07pm 
Well all the tfa weapons seem to work in ttt so far for me that I've tested, just the same as they do in gmod.
Vipes 25 Mar, 2019 @ 12:57am 
Also, I hate to ask, but could you also bring over these weapons?
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=253746161
Vipes 25 Mar, 2019 @ 12:35am 
The latest TFA Base as TTT support? But the author left a comment saying it doesn't. I'm confused.
Karate Walrus 17 Mar, 2019 @ 6:53pm 
Oh yeah, I did it. I just placed into a map in ttt with weapon placer and boom. I got a mag 7 =D I dunno how to change the context menu though. c brings up both the menu for the traitor and also does weapon examining.
Karate Walrus 17 Mar, 2019 @ 6:03pm 
so then if I use the weapon placer I could place them on a map or how I get them to spawn in ttt?
Karate Walrus 17 Mar, 2019 @ 5:36pm 
oh neat thanks!
[GOTR] Mechami  [author] 17 Mar, 2019 @ 10:52am 
@RKellyJelly The latest version of TFA Base has TTT support; You don't need this for that. At some point this addon will be updated to just port the vanilla TTT weapons to the latest version of TFA Base.
Karate Walrus 17 Mar, 2019 @ 10:48am 
so I can convert existing tfa weapons to use this base?
< blank > 12 Sep, 2018 @ 12:31am 
I'm having issues with ironsight aiming on a gun I am porting. Any advice?
< blank > 11 Sep, 2018 @ 9:34pm 
Does this still work?
Fesiug 16 May, 2018 @ 3:14pm 
hi is this jesus
Igzilee 26 Jul, 2017 @ 12:46pm 
does it only work in TTT, because i downloaded the base and they only appear as spawnable scopes no weapons

Miss Sluggies 29 Jun, 2017 @ 7:48pm 
RDM, what's wrong with it? ;/
CupCakeR 28 May, 2017 @ 12:26am 
this is very bad
Estrogen Enjoyer 26 Feb, 2017 @ 10:13am 
Is there a way to rebind the inspection menu?