Left 4 Dead 2

Left 4 Dead 2

142 oy
How to Mod Textures
мяFunreal tarafından
Want to learn how to make Texture mods?
   
Ödül
Favorilere Ekle
Favorilere Eklendi
Favorilerden Çıkar
Requirements
Before you start; here's a list of software you will need:

  • Crowbar
  • GCFScape* (Crowbar works aswell.)
  • L4D2 Authoring Tools (Steam Library)
  • VTFEdit*
    Alternatively, VTFEdit Reloaded[github.com]. Same tool, but more functions.
  • Image editing program, such as Photoshop, Gimp or Paint-net
  • VTF Plugin for Photoshop 32bit*, Gimp[www.tophattwaffle.com] or Paint-net*

Nem'sTools website where GCFScape, VTFEdit, Photoshop VTF plugin and Paint-net VTF Plugin can be downloaded is down.
Here's[nemstools.github.io] a Github Clone instead.
If the clone is down; HERE[gamebanana.com] is a gamebanana submission which acts as an archive for his tools.
GCFScape is in: Nem's Tools Archives\GCFScape\gcfscape131.zip
VTFEdit is in: Nem's Tools Archives\VTFEdit\vtfedit125-11.zip
The Paint-net plugin is in: Nem's Tools Archives\Others\pdnvtfplugin111-source.zip
The Photoshop plugin is in: Nem's Tools Archives\Others\psvtfplugin1011.zip
Getting files to modify
All textures are in the pak01_dir.vpk files, which can be opened with GCFScape and Crowbar.
Some things like L4D1 players, M60, Golfclub and general L4D1 content are part of the DLC. those are in their respective DLC pak files.


Survivors are in "Materials/Models/Survivors"
L4d1 ones are in the DLC1 pak01_dir.vpk, same folder location.
Infected are in "Materials/Models/Infected"
Guns are in "materials/Models/V_Models, W_models
Melee weapons are in "Materials/models/Weapon/Melee"
M60 and golfclub are also in the DLC1 pak01_dir.vpk
Carryable items are in the materials/models/props_junk
TLS skins are in the "Update" pak01

If you don't know the location of some item, but someone made a mod of it, download their addon and unpack it to check what file has been changed, then fetch the original file from the pak01_dir.vpk.

If you cannot find the files, you can try using Ctrl+F in GCFScape to search for a keyword that might appear in the name.
Using Hammer and Crowbar to find textures
If you could not find the material in GCFScape, you might try this step here.
If you did find the textures, skip this step entirely.

If the name search in GCFScape doesn't help, you can use Hammer map editor's (Part of SDK/Authoring Tools) model browser to search for the model instead.
Make a new empty map, then open Tools - Model browser
In the filter field enter some words that might be in your modelname.



In case you still cannot find the model that way, you can just decompile the map and go to where the model is located, double click on the entity and check what name it has.



The materials are usually in the same folder, but within the materials folder.
Model is: "models/props_urban/big_wheel001.mdl"
Texturtes are: "materials/models/props_urban/big_wheel001.vmt + .vtf"

If you found the model, but the materials are not where you expected them, open the model with Crowbar. The "View" tab shows you where the material folder is.
You can easily open mdl files in Crowbar if you assigned mdl files to always open with crowbar. that allows you to double click the mdl inside of GCFScape and have Crowbar open


In the example above the texturename has the entire folder tree in it. Usually that part only has the actual VMT name, while the line above would have the folder tree. But it doesn't matter.
Pre-building the addon
In order for your mod to actually modify the game files, you must create an addon.

First make a folder with whatever name you want the addon to have later.
I'll call mine "Prop_Bigwheel_Reskin"
Inside that folder you will re-create the original foldertree. Then put your files in there.
In this example, the VMT and VTF files were found in "Materials/Models/Props_Urban"


The "Root" folder (in my case "Prop_Bigwheel_Reskin") needs an addoninfo.txt file.
For texture mods it does one single thing: it makes the addon show up in the addon menu.
Its entire content will be ignored when some downloads the mod via workshop. Users will get the description of the workshop submission instead.
Here's a prebuilt addoninfo that has everything a texture mod needs:
"AddonInfo" { addonSteamAppID 550 //L4D2 Don't Change addontitle "ADDON_NAME" //Name for Addon Menu addonversion 1 addonauthor "AUTHOR_NAME" addonauthorSteamID "AUTHOT_STEAM_ID" //Optional. the number of your steam profile URL addonDescription "DESCRIPTION_GOES_HERE" }

You could also have an addonimage.jpg file. It's a thumbnail for the addon menu.
It is also ignored when downloaded via steam workshop and mods work without it.

But if you really want one, import a 128x128 jpg into VTFedit, compress it as DXT5 and then export it as "addonimage.jpg". Only VTFEdit compressed jpegs work.
Converting VTF to TGA
If you have a VTF Plugin for your image editor, Skip this step. Otherwise continue.

Most image editors cannot open VTF files, that's why using a plugin is reccomended. But just in case your software doesn't have that plugin, or you don't know how to use it, here's a guide on how to do it without that plugin.

Open the VTF file in VTFEdit.
Click "File - Export" or press Ctrl+E



Then pick any folder where you want to temporarily save the TGA file. I like to put mine right next to the VTF file, but it does not matter.
Editing Texture
Open the VTF or TGA file in the image editor of your choice.

You can now do whatever you want to the image.
The only tip i would give you is "Do not use actual black, only use dark colors"
Because even in real life, black color can still get shadows on it that are darker, but if your texture is already the darkest color your screen can display, your model can't get shadows in that black part. This will look strange.

Also, there's a bunch of different textures you can pull off.
Translucent, Glowing, Moving, Animated...
Here is info about glowing textures.
Here is info about translucent textures.

There's way more info on the VDC, but i won't link all relevant pages.
Saving Texture
When you're happy with your changes, save it as a VTF Texture, replacing the original file.
Reccomended settings are DXT5 format with the "Anisotropic" and "No Level of Detail" flags.
BGR888 and BGRA8888 are uncompressed formats, for when you do not want any compression. But they come with a massive file size.


IF you have no VTF plugin, save as TGA instead.
Unless your texture uses an alpha channel. In that case export the texture as a DDS file instead, because TGA sometimes doesn't export the alpha channel (at least for me, gotta find out yourself I guess)

Open VTFEdit again and hit "File - Import" or click CTRL+ i
After picking the file you are prompted to select your settings, i reccomend leaving it at default.


Texture flags, such as "Anisotropic" and "No Level of Detail" can be set by clicking the checkboxes on the left hand side. Then save the VTF.
Packing the addon.
For the addon to work, you must pack it into a vpk file. Crowbar can do that for you.
Just open crowbar in the "Pack" tab and drag your Root folder onto it and press the "pack" button.


Alternatively, you can make a right-click promt. I made a guide about that already.
https://steamcommunity.com/sharedfiles/filedetails/?id=1544981726

You'll get a vpk file that holds the same name as your root folder.
This vpk file can now be dragged into your addons folder, located in steamapps\common\Left 4 Dead 2\left4dead2\addons.

That's all.
Closing words
If you need more help, join the Dead 4 Mods Discord server[discord.gg].
29 Yorum
Vic Nic 25 Eki 2024 @ 9:49 
Alrighty I-ll join the discord group.
мяFunreal  [yaratıcı] 25 Eki 2024 @ 9:13 
i prefer debugging via discord than steam, because i do not like having to remove friends all the time because we only talk for three days or so.
Vic Nic 25 Eki 2024 @ 7:06 
I sent you a friend request so I can show you screenshot.
Vic Nic 25 Eki 2024 @ 7:03 
On the VTF edit the original has an 8 Bit Alpha setting checked, my texture mod doesn-t have it and it doesn-t let me check it. I tried adding a mask through GIMP but it still doesn-t show on the VTF-editor.
мяFunreal  [yaratıcı] 25 Eki 2024 @ 6:33 
shinyness is probably because of the alpha channel your texture had, which is now gone.

Sometimes the alpha channel is used as an "Envmap mask" which handles the strength of cubemap reflections. If that mask is gone, your item basically turns into a mirror.

Check if the original texture in vtfedit had an alpha channel. If it did, you either have to add that alpha channel back into your texture, or make a whole separate texture that is nothing but that greyscale mask, and defien that as "$envmapmask" in your vmt.
Vic Nic 24 Eki 2024 @ 16:44 
When I make a texture mod for weapons it becomes very shiny, how do I fix this?
Could I add you to send you a screenshot so you see the problem? It also seems to affect every other weapon.
мяFunreal  [yaratıcı] 19 Ağu 2024 @ 2:23 
Oh, that was the "VTF Shell Extension".
You can get it here https://developer.valvesoftware.com/wiki/VTF_Shell_Extensions
DVI 18 Ağu 2024 @ 22:41 
No, I mean on the 5th image there is VTF file that has preview image. How did you made it?
мяFunreal  [yaratıcı] 29 Tem 2024 @ 4:04 
i compiled a whole new model and loaded that in hlmv.
DVI 28 Tem 2024 @ 15:30 
how did you made it so there's a correct preview of a texture? Or you photoshopped it so it looked more understandable?