Left 4 Dead 2

Left 4 Dead 2

Not enough ratings
How to create bile textures
By CardboardLuigi
This tutorial will tell you how to make bile textures, so that your mod is more "complete."
   
Award
Favorite
Favorited
Unfavorite
Why would I want bile textures for my Left 4 Dead 2 survivor mod?
Adding bile textures to your survivor mod allows it to be more "complete," as it's something that the vanilla L4D survivors have.
Keep in mind that this only applies to survivors. Don't make bile textures for the infected.
Making bile texture VMTs.
In case you aren't in the know how, VMTs are the files that tells the game what textures to use. They coincide with VTFs, which are just the textures.
For this guide, I'll be using my upcoming Mega Man survivor mod as the example for this.

The first thing is to convert the textures that you're going to be using to VMT and VTF, and making sure everything is the way you want it. It should look something like this when you're done.

After that, you make copies of the VMTs.
If at all possible, avoid copying the VMTs for the eyes. You don't want bile in your character's eyes. It doesn't match up with the default survivors. This is unavoidable if the character's textures are just one file, however.

Anyhow, next you rename those VMT copies as "texturename_it."

And when you're done with that, you open up the "_it" file for one of the textures, and delete all of the text in there. Now you want to paste the following in there-
patch { include "materials/models/survivors/survivors_it_shared.vmt" insert { "$basetexture" "models/custom/" } }
And then, you open up the original VMT file, and copy the base texture line
and paste it over the one in the "_it" file, and it should look like this-

As for VMT files with extra information. (I.E, "nocull," "translucent," etc.), you copy that/those line(s) as well
and paste it just the same.

Now, you want to double check your "_it" files to verify that you have put the patch in.

Now, we can move on the putting it in the QC.
Making the bile textures appear in the QC
Open up the QC file (It's named "survivor_*survivor's internal name*") in your editor of choice (I use Notepad ++), and scroll down to where the textures are. After putting in the textures that the model uses, copy the line (Assuming that you have all of the textures on a single line) and paste it in the line below it. Add "_it" to the ends of the textures that have an "_it" file, and it should end up like this-

Something that is super, super, important is that you have all of the textures that the model uses in both lines, even if you don't have an "_it" file for it.
The reason for it is so that the textures line up properly when biled, otherwise it'll look flat out wrong.

So after all of the other adjustments to the QC that you're going to make, save it, and then compile it in the model compiler of your choice. (I use Crowbar), and then test out the model in Half-Life Model Viewer to see that everything is the way that's intended.
To see the "skinfamilies," go to the "model" tab, and change "Skin 1" to "Skin 2"

And while the actual bile probably won't show up, you should see that the textures are still looking right.
Changing the Expression When Biled
Stepping away from Mega Man to demonstrate this, you may have seen a survivor mod that changes expression when biled, may it be anything by Tiny King Trashmouth or my own Ninten and Lucas (but most likely the former), and thought "Hey, I want to do this myself. I wonder how to do it."
The operative word there was "may," but ignoring your obvious "no" for an answer, I'll show you how this is done.
Now the most important thing here for this one section is that the character's facial expressions are done through texture. I'll use Paula to show this off. With this in mind, I would recommend having two separate textures for their face (or in this case, their eyes), one for when they aren't biled, and one for when they are.

When you convert these to textures, create an "_it" file for their "standard" face/eyes/mouth/whatever, and instead of the $basetexture being the "standard" texture, you should have it be the texture for the expression that you want them to have.

And when you check out the model, you should see that their facial expression...
...is different when they're biled.

If you're wondering why all of Paula's textures are named "FitNess_part," it's because it was originally from a Brawl mod for Ness.
Misc. Things and The End.
One thing to note is that the maximum amount of VMTs that a model can have is 32. So at most, a model can only have 16 VMTs prior to making "_it" files. If your model has more than that, then it probably ain't gettin' bile textures.

And that's it. Hope this helped you with you modding in some way!
Mega Man and Paula have been released.
http://steamproxy.net/sharedfiles/filedetails/?id=974308586
http://steamproxy.net/sharedfiles/filedetails/?id=974298437
22 Comments
Roiditron77 18 Mar @ 3:49pm 
had an issue where a missing texture would appear on rochelle when getting barfed on, following this guide helped fix that :steamthumbsup::health:
Croissant 24 Aug, 2020 @ 8:41am 
Oh, I see what this does now, It adds a facial expression when you're getting biled. This was quite useful even if I didn't understand it at first. Thanks!
CardboardLuigi  [author] 23 Aug, 2020 @ 3:18pm 
I should really rewrite this guide at some point, now that I've got more experience under the belt.
Croissant 23 Aug, 2020 @ 1:26pm 
You don't really explain the reason or point of having bile textures too well, does this add expressions to the survivor mod or something?
CardboardLuigi  [author] 15 Jan, 2020 @ 6:42pm 
Specularbark45 15 Jan, 2020 @ 6:25pm 
ok got it one more question how do you scale the character size like you did to paula i use blender btw
CardboardLuigi  [author] 15 Jan, 2020 @ 6:18pm 
You should check the model in your modeling program of choice, and if the texture names are correct there (this can be verified by making sure that the texture group things have the same name as the original texture file, down to the file extension) and the textures still don't show up in game, then you should see if the textures show up in the model viewer (although you'll have to create an identical file directory in Left 4 Dead 2's material folder) and that the textures and their folder(s) are in the folder that's being used to compile the addon.
Specularbark45 15 Jan, 2020 @ 6:04pm 
ok so i checked th QC file and the folder are all right but in game there missing
Specularbark45 15 Jan, 2020 @ 5:53pm 
ok imma check that
CardboardLuigi  [author] 15 Jan, 2020 @ 5:52pm 
If it's for other people's mods and restarting the game or tinkering with the visual settings didn't do anything, then somebody goofed.