Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
[ENG] How to make gloves / Skins for gloves
By ReSynth
Guide how to make glove mods/ skins for gloves
[RU] Русская версия здесь
   
Award
Favorite
Favorited
Unfavorite
Preparation
Sorri for my bed england
So, let's begin with preparation:
  1. Crowbar - This program needed for compiling/decompiling models from games on source engine
    Here is official link for downloading
    How to set it up for right game you'll better to look in Internet, but I'll also leave a screenshot:

    I downloaded l4d2 on drive D, if you have it on drive C, the path will looks like:
    C:\Program Files (x86)\Steam\steamapps\common\Left 4 Dead 2


  2. vtfedit и gfscape - First program for working with textures, second is for working with packed source files, packed files and decompiled files are not the same!!
    VTFEdit [nemstools.github.io]
    GFScape[nemstools.github.io]

  3. Program for 3D modelling
    For this guide I'll use Blender, because I'd already worked in it, and its more comfortable for me.
    If you gonna use blender, as I do, you'll need Blender Source tools[steamreview.org], this addon to work with source decompiled models. How to install addons in blender, please, search on YouTube, I won't show you how to do it.

    If you gonna use other program for modelling, there will be no guide for it. because I only used to work in Blender

  4. Notepad++ [notepad-plus-plus.org]


  5. L4D2 Authoring Tools
    You can find them in Steam Library, and you need to download it to the same drive, where l4d2 is.

Getting model from game files
Let's take this gloves for example, you can use other.

Now you need to launch the game, and subscribe to gloves. Wait til it loaded (at the bottom of screen in main menu there will be loading bar) and close the game.
In steam Library click with RMB on Left 4 Dead 2, then manage, then browse local files.
Next, follow this path ...\steamapps\common\Left 4 Dead 2\left4dead2\addons\workshop and look for installed addon:
Every addon has uniqe ID, for easier finding it, open page with needed addon, and look at the link, at the end of it there will be numbers

In workshop folder you need to look for this numbers


Found it? Great!
Now open .vpk file with gfscape, and then this window will appear


Let me expalin what it is

folder materials contains textures for model (I'll tell about it later in guide);
folder models contains compiled files;
txt file contains information about addon, for example author, addon version, quick description and etc. It doesn't need for addon to work, but its better for users, to have it.

Next you need new empty folder for further proccess

You can make this folder structure like I did, or in other way, but I'll refer to my method.
Now open gfscape, select all files in right window, and drag&drop it into first folder.

Next, open crowbar and find Decompile section

*On the screenshot*
2 - locate to your unpacked files, where you dropped it from gfscape, notice that the path is further down to ...models\weapons\arms\v_arms_bill.mdl (there will be different .mdl files, they are for different characters, I'll use Bill)

3 - where will program decompile our files. also check in the left of the path to change folder method:
"Output to: *Work folder*, not game folder"

4 - Press it, when 2'nd and 3'rd steps are done
After this, the message will appear:

If it is, you've done right. if it isn't, check "Set Up Games" section in the top for proper locations for needed game files.
Editing model
You got to this step! Nice job!

Now you need to open Blender. After this in the top left of the screen there will be "File" button, click it, then Import, then source engine (.smd, .vta, .dmx, .qc)
in opened window locate to .smd file, where you decompiled files.
Click int hte bottom right of this window "Import SMD/VTA... and this will appear


Those grey dots are "bones", don't edit them, or move, beacuse it would be not good for animations and arms model.

Next do what you want to, I'll delete arms, for this guide.


After you done making, you need to remember 3 things:
  1. If you added somethin, all mesh need to be 1 model, you'll have to combine mesh into one.
  2. Also if you added your own mesh, for ex sleeves or more details, you'll have to do weight painting.
    (search for tutorial on youtube)

    *on image*
    1 & 2 - how to access weight painting mode
    3 & 4 tab with vertex groups
    After adding extra mesh, you need to assign it to certain vertex group, for ex if you added sleeves, and you want to assign it, then you need to select main hands, enter weight paint mode and click on each vertex group to see what vertex group for what mesh is used. (used mesh in vertex group will be colored as red and other colours in gradient from red to dark blue), remember needed vertex group name for needed mesh part, and assign your added mesh for certain vertex group, after thet you'll have to paint your mesh for game to use it.

    If you don't understand what I've just said, sorry, my english is bad, doing my best for this guide.


    And last thing you need to do, when you add mesh is setting material for further texturing.

*on image*
1 - how to locate materials tab
2 - material, that assigned to model
3- material name.
Again, if you added extra mesh, then you have to make new material and assign to your mesh.
Here is guide to do it:


1 - select model, enter edit mode (press tab), select new mesh
2 - click on "+" to add new material slot for model.
3 - Click to create new material in material slot
4 - click to assign new material for selected mesh

Now about material name:
You need to name it, like texture files
(about texturing a bit later)
in this gloves addon, on skin I have v_l_skin
which means
v - viewmodel, for first person view
l - light, light tone of skin( for ex. Bill, Zoey, Francis and etc.)
skin - well, skin...
Compiling model
Congrats' you've got to this section so far,
If you're still with me, let's continue.

Now you need to export your model, but do it properly!!
Select model, then bones (with L. Shift on keyboard)

1 - how to locate export tab (only for source engine models)
2 - set export path
3 - change export format to smd, its important!!
4- export
Now open where you've exported model
and copy folder named "v_arms_bill_anims" and file .qc into folder with your exporrted model
it will look like this
Now open .qc file with notepad++

1 - check for exported model file name and name in .qc file matching.
2 - check name on the end of the path for proper survivor

v_arms_bill - Bill
v_arms_francis - Francis
v_arms_louis - Louis
v_arms_zoey - Zoey
v_arms_coach_new - Coach
v_arms_gambler_new - Nick
v_arms_mechanic_new - Ellis
v_arms_producer_new - Rochelle

And now... compiling!
Open crowbar, and click on Compile tab

2 - locate to your .qc file, from prev step
3 - in the left choose Work Folder (not game folder) and set path for compiling
4 - set game to Left 4 Dead 2
5 - Compile!
and this message will appear
If it's not, try checking .qc file for names matching.

Now open first folder, where you'd drag&dropped files from gfscape, select from here folder "materials" and txt file "addoninfo.txt"
now paste it into folder where you compiled model.
Editing textures
This section only for them, who wants to make textures, or added new mesh to a model. in other way, if you don't need it, you can skip this section.
I'm sorry but you need to follow this guide up to decompiling model with crowbar.

Also for edditing textures you'll need photoshop.
Let's get started

in the last folder, where you have 2 folders "materials" and "models"
open "materials" and locate further to materials\models\weapons\v_models\arms
here you'll find .vmt and .vtf files
.vmt is main file, which reference to texture files .vtf
Source engine will look for textures firstly main file .vmt, and how it set up, engine will look for textures files .vtf
For example, in my model I have v_d_skin, in materials folder I need to create v_d_skin.vmt
in this .vmt file, I have to proper set textures files

1- base texture - I've set v_d_skin (set all texture file names without file format, without .vtf)
2 - bump map - normal texture for my material
3 - phong exponent - for material "shine"
and that's it

Now about .vtf files, and how to edit them:
Open .vtf file, in the top left of vtfedit window look for file>export, and choose where to export file.
Exported file will have .tga format, open it with photoshop and edit as you want. After that, in the top left of photoshop file>save as, and save in .tga format.
Open vtfedit, in the top left file>import, and locate your new .tga file, in opened window just click OK at the bottom, and you'll see your texture in vtfedit, now go to file again, then save as (save vtf file as), and locate to materials folder, save file here with proper name (which you set in .vmt file)

Congratulations! You've made your own texture!
Packing files into addon and testing
This is the final section, we have all files done and ready for packing.
You can close all programs, like blender, vtfedit, and etc.

Open folder where you have "materials", "models", "addoninfo.txt", I'll call it MainB folder

Now open where l4d2 is on your drive, and follow this path
...steamapps\common\Left 4 Dead 2\bin
scroll down to vpk.exe

now you have drag and drop your MainB folder (with materials, models, and txt file in it) on this vpk.exe
*my MainB folder is named "Compiled"

near your MainB folder will appear .vpk file


Finally, you are ready for testing your addon.
Copy this .vpk file and follow this path
steamapps\common\Left 4 Dead 2\left4dead2\addons
and paste here

Now you can test it ingame!!
I'll show gloves from this guide on Tumtara map,



That's the end of the guide!

also notice that I've only made gloves for Bill, if you follow step by step this guide, you'll don't have gloves for other survivors, to fix that, you'll have to export from blender model as other survivors, and edit .qc file for compiled file names.

how to publish your addon to workshop I'll add later to this guide, if there will be 6 add to favourite

ALSO IMPORTANT, PLEASE READ

I wont make gloves addons like " Please, make golves only for Nick, make gloves with csgo sleeves, gloves with vanilla survivors hands" and other little gloves addons.
Please, don't ask me for such mods, because only YOU need it, other people will hate me for spaming in workshop.
If you need so, get you lazy ass and do it by yourself. Atleast you'll gain usefull modding experience

If you have any problems in process, leave a comment, or text me in steam (you'll have to add me to friends first)
7 Comments
ShyGhost 10 Sep, 2023 @ 11:54am 
no problem
ReSynth  [author] 10 Sep, 2023 @ 4:12am 
Thanks!
ShyGhost 10 Sep, 2023 @ 2:07am 
pretty good guide also to be honest:resmile:
ShyGhost 10 Sep, 2023 @ 2:06am 
no its ok i was joking
ReSynth  [author] 10 Sep, 2023 @ 1:59am 
@FlowerWaterGhost

srry
ShyGhost 10 Sep, 2023 @ 1:23am 
my brain hurts now thanks.
save me already at last 9 Sep, 2023 @ 3:16am 
gg