Left 4 Dead 2

Left 4 Dead 2

63 个评价
Using TLS Weapon skins in hammer
由 мяFunreal 制作
Learn how to use L4D2's new weapon skins!
   
奖励
收藏
已收藏
取消收藏
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://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=1769855780
12 条留言
мяFunreal  [作者] 2022 年 2 月 18 日 下午 3:12 
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 2022 年 2 月 18 日 上午 11:38 
Was the "weaponskin" command added with The Last Stand update? If so, how does one go about adding new commands?
мяFunreal  [作者] 2021 年 3 月 26 日 下午 12:43 
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 2021 年 3 月 26 日 上午 5:00 
Sorry to ask here, but do these skin weapons have related console commands to get in game?
мяFunreal  [作者] 2020 年 10 月 4 日 下午 5:02 
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 2020 年 10 月 4 日 下午 2:59 
man, it be nice to know how to use hammer
мяFunreal  [作者] 2020 年 10 月 2 日 下午 11:37 
probably via vscripts, yes.
Xeizze 2020 年 10 月 2 日 下午 8:39 
can i set a default skin on official campaigns?
мяFunreal  [作者] 2020 年 9 月 30 日 上午 2:21 
Oh whoops, i dropped my monster condom, that i use for my MAGNUM DONG
Alex_D #NoWar 2020 年 9 月 29 日 下午 9:45 
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!