Left 4 Dead 2

Left 4 Dead 2

63 ratings
Using TLS Weapon skins in hammer
By мяFunreal
Learn how to use L4D2's new weapon skins!
   
Award
Favorite
Favorited
Unfavorite
Foreword
Since the "Last Stand" Update the following weapons have skins:

Weapon
Skins
Styles
Autoshotgun
2
Default
Bloody
Desert Eagle
3
Default
Blue
Another Silver
Pumpshotgun
2
Default
Chrome Shotgun
Chrome Shotgun
2
Default
Pumpshotgun
Ak47
3
Default
Green
Cs:Go Default
M16 Rifle
3
Default
Battle Worn
Silver and bloody
Silenced SMG
2
Default
Battle Worn
SMG
2
Default
Battle Worn
Hunting Rifle
2
Default
Bloody
Cricket Bat
2
Default
Australian Championship
Crowbar
2
Default
Golden

I'm gonna show you how to make use of those skins in Hammer.
Entity Setup
Add an "Weapon_*******_Spawn entity to your map.
Set both the Skin and weaponskin setting to the same number.


Only exception is the original skin.
That would be skin 0, but weaponskin -1. Not sure why, that's just how it is.

"Skin" is the worldmodel skin
"Weaponskin" is the viewmodel skin.
If the numbers don't match (except 0 and -1) your worldmodel and viewmodel will have different skins.
Setting Skin Via I/O
Say you have an entity which picks the skin, either a logic_case, a button or a trigger.
Unfortunately the "weaponskin" I/O setting does not exist like it does for "skin".

First give your weapon spawn entity a name, so that another entity can reference and modify it.


In in the Output section of your button, relay or whatever, add the output "skin" with the number of the skin you want and "AddOutput" with "weaponskin X" where X is the number of skin you want.
Custom Skins
You can use this system to also just add your own weapon modification that has X amounts of skins, or replace existing skins with your own textures
Say you port a CS:GO map with 30 skins for the AWP, it would be possible.
Of course the modified weapon model or texture must be shipped with the campaign.
Using a custom model will force that weapon onto anyone, no matter what weapon mod they have installed. That's a bad idea to do.

Here's some info on how to ship content with your campaign, while only having that content being used on your campaign maps.

https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1769855780
12 Comments
мяFunreal  [author] 18 Feb, 2022 @ 3:12pm 
the actual commands are hardcoded.
While you can add some things like "parentname" to other things that could use it, you can't just add whatever you want because the game would not recognize most things.
eddywhite89 18 Feb, 2022 @ 11:38am 
Was the "weaponskin" command added with The Last Stand update? If so, how does one go about adding new commands?
мяFunreal  [author] 26 Mar, 2021 @ 12:43pm 
You should be able to spawn a weapon, toss it on the ground, aim at it, use the cvar "Ent_fire !picker skin 1; ent_fire !picker weaponskin 1" to have both skin and weaponskin be changed.

the ent_fire cvar (which is a cheat) is basically the console command version of a button output. while !picker is whatever entity you look at.
I haven't tested this, but it should theoretically work.
Shirane Hane 26 Mar, 2021 @ 5:00am 
Sorry to ask here, but do these skin weapons have related console commands to get in game?
мяFunreal  [author] 4 Oct, 2020 @ 5:02pm 
why say this here? it got nothing to do with this guide.
if you wanna know how to use hammer, look at hammer guides on here, youtube and the VDC.
FallingStar 4 Oct, 2020 @ 2:59pm 
man, it be nice to know how to use hammer
мяFunreal  [author] 2 Oct, 2020 @ 11:37pm 
probably via vscripts, yes.
Xeizze 2 Oct, 2020 @ 8:39pm 
can i set a default skin on official campaigns?
мяFunreal  [author] 30 Sep, 2020 @ 2:21am 
Oh whoops, i dropped my monster condom, that i use for my MAGNUM DONG
Alex_D #NoWar 29 Sep, 2020 @ 9:45pm 
But hey! The blued Deagle says "MAGNUM DONG"! This is almost the same as "yOgi pwn 1337 weapon industries" or whatever the default Deagle says, so it's perfectly fitting!